Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Essential Matrix from Fundamental Matrix in OpenCV

I've already computed the Fundamental Matrix of a stereo pair through corresponding points, found using SURF. According to Hartley and Zisserman, the Essential Matrix is computed doing:

E = K.t() * F * K

How I get K? Is there another way to compute E?

like image 337
JuaniL Avatar asked May 29 '14 21:05

JuaniL


People also ask

What is the difference between essential matrix and fundamental matrix?

Thus both the Essential and Fundamental matrices completely describe the geometric relationship between corresponding points of a stereo pair of cameras. The only difference between the two is that the former deals with calibrated cameras, while the latter deals with uncalibrated cameras.

What is fundamental matrix Opencv?

Fundamental Matrix contains the same information as Essential Matrix in addition to the information about the intrinsics of both cameras so that we can relate the two cameras in pixel coordinates. (If we are using rectified images and normalize the point by dividing by the focal lengths, F=E).

What is the purpose of fundamental matrix?

The fundamental matrix is used to express the state-transition matrix, an essential component in the solution of a system of linear ordinary differential equations.


1 Answers

I don't know where you got that formulae, but the correct one is E = K'^T . F . K (see Hartley & Zisserman, §9.6, page 257 of second edition)

K is the intrinsic camera parameters, holding scale factors and positions of the center of the image, expressed in pixel units.

    | \alpha_u     0     u_0 |
K = |    0      \alpha_u v_0 |
    |    0         0      1  |

(sorry, Latex not supported on SO)

Edit : To get those values, you can either:

  • calibrate the camera
  • compute an approximate value if you have the manufacturer data. If the lens is correctly centered on the sensor, then u_0 and v_0 are the half of, respectively, width and height of image resolution. And alpha = k.f with f: focal length (m.), and k the pixel scale factor: if you have a pixel of, say, 6 um, then k=1/6um. Example, if the lens is 8mm and pixel size 8um, then alpha=1000

Computing E

Sure, there are several of ways to compute E, for example, if you have strong-calibrated the rig of cameras, then you can extract R and t (rotation matrix and translation vector) between the two cameras, and E is defined as the product of the skew-symmetric matrix t and the matrix R.

But if you have the book, all of this is inside.

Edit Just noticed, there is even a Wikipedia page on this topic!

like image 52
kebs Avatar answered Sep 29 '22 21:09

kebs