# Determine the relative camera pose given two RGB camera frames in openCV-python

I would like to determine the relative camera pose given two RGB camera frames. I assume there's overlap in field of view between the two cameras, what I am looking for ultimately is the rotation and translation between two cameras. I understand how to do this in theory, and am looking for existing openCV implementations in python. An existing one for matlab can be found here: https://www.mathworks.com/help/vision/ref/relativecamerapose.html#inputarg_inlierPoints1. But so far as I can tell I see no openCV API in python.

Once you have access to these matches (pairs of features visible in both images), you can then use the findEssentialMat() function in OpenCV, where you will have to provide the intrinsics data from the camera as well as those matching pairs you obtained in the first step. This function, using a RANSAC scheme will compute the essential matrix that encodes the transformation between the scenes. Once you obtain the matrix $E$, you can use another OpenCV function recoverPose() and pass the $E$ matrix to it, which will calculate the relative rotation (as a Rodrigues vector, if I remember right) and the relative translation up to scale.