Didon
Didon

Reputation: 393

Essential matrix estimation using Matlab and opencv

I want to estimate the essential matrix using MATLAB and OpenCV.

I tried then to interface MATLAB and OpenCV using mexopencv, but I couldn't find an appropriate function to do that. I found the function findFundamentalMat in mexopencv for the fundamental matrix estimation but not findEssentialMat function.

I think that it is a bit hard to write my own MEX-files as I haven't had the chance to do it before. Any suggestion would be helpful.

Thanks

Upvotes: 2

Views: 1353

Answers (2)

Dima
Dima

Reputation: 39389

The fundamental matrix is related to the essential matrix: E = K1' * F * K2, where K1 and K2 are the intrinsic matrices of the two cameras. So to compute the essential matrix, you need to calibrate your cameras (or camera, if you are looking at images taken with the same camera).

If you have the computer vision system toolbox, you can use the Camera Calibrator app to get the camera intrinsics, and the estimateFundamentalMatrix function to compute F. Alternatively, you can use the Stereo Camera Calibrator app to calibrate a stereo pair of cameras, which would give you the essential matrix for free.

Upvotes: 1

Amro
Amro

Reputation: 124563

The function was contributed in this pull request which was merged into the master branch (OpenCV 3.x) but not part of OpenCV 2.x

mexopencv targets the latest stable release, which is as of this moment OpenCV v2.4.10, OpenCV 3.x is still alpha..

Upvotes: 1

Related Questions