# Computing Essential Matrix from Fundamental Matrix

I have calibrated my cameras using OpenCV. I used cv.stereoCalibrate to get the E, and F matrices. I wanted to do a sanity check to see if the E matrix obtained is the same from what is manually computed, but I did not get the same results.

I am using E = np.dot(np.dot(K2.T, F), K1)

K2 is the Second (Right) Camera Matrix & K1 is the First (Left) Camera Matrix.

The values obtained from cv.stereoCalibrate are -

K1 = array([[934.06230207,   0.        , 959.99754346],
[  0.        , 933.44096222, 539.98442119],
[  0.        ,   0.        ,   1.        ]])

K2 = array([[935.93262747,   0.        , 960.00167839],
[  0.        , 936.1379955 , 539.98789096],
[  0.        ,   0.        ,   1.        ]])

E = array([[-4.27815162e-05, -6.90641692e-02,  3.35371623e-02],
[ 5.78660464e-02,  1.37740833e-02,  1.20282641e+01],
[-3.54642135e-02, -1.20281991e+01,  1.37524047e-02]])

F = array([[-1.45461342e-09, -2.34981243e-06,  2.33536635e-03],
[ 1.96707058e-06,  4.68541244e-07,  3.79780838e-01],
[-2.18936224e-03, -3.81020843e-01,  1.00000000e+00]])


If I compute E = np.dot(np.dot(K2.T, F), K1) I get

E = array([[-1.27165124e-03, -2.05288509e+00,  9.96869161e-01],
[ 1.72002857e+00,  4.09425185e-01,  3.57531907e+02],
[-1.05414944e+00, -3.57529974e+02,  4.08780803e-01]])


This is not equal to the E I got from OpenCV. enter code here

• Welcome to Robotics, PyWalker2797. What results are you getting? Where are K2 and K1 coming from? Why are they different? – Chuck May 19 '20 at 14:48
• I updated my question with some more information. K2 and K1 are the camera matrices of the second and first camera respectively. – PyWalker2797 May 19 '20 at 14:57

F = cameraMatrix2^{-T} E cameraMatrix1^{-1}

• I will check but I am passing all the parameters correctly and passing None for parameters that don't need values so that the order does not get messed up – PyWalker2797 May 19 '20 at 15:13