Ask Your Question
1

Essential matrix 6x3 (expecting 3x3)

asked 2015-08-05 08:09:59 -0600

SteveBorges gravatar image

updated 2015-08-05 08:21:27 -0600

After calling findEssentialMat() function:

essMatrix = findEssentialMat( points1, points2, 1.0, Point2d( 0, 0 ), RANSAC, 0.999, 3.0  );

I get 6x3 matrix. Next I would like to use recoverPose() function which requires 3x3 essential matrix as an input. Therefore an "assertion fail" error shows up. Why is my essential matrix not 3x3 and what can I do?

Console output:

points1:
[496.24762, 215.24762;
 496, 503.5;
 783.99518, 503.50491;
 783.75238, 215.24762;
 639.99756, 359.25223]
points2:
[-256.5, -256.5;
 -256.5, 256.5;
 256.5, 256.5;
 256.5, -256.5;
 0, 0]

    essMatrix.rows() = 6
    essMatrix.cols() = 3
    essMatrix:
    [1.495439070665867e-08, -0.0004217709137173954, 0.3456540852386693;
     0.0004236403216190259, -2.044583490213094e-06, -0.6168655278608869;
     -0.346120572048197, 0.6166038972684622, -2.663582069025173e-06;
     -1.286638357093461e-09, 0.001502552560190315, -0.3456533986887974;
     -0.001504059448579667, -2.06088959516535e-06, 0.6168642186647175;
     -0.3461198575633839, 0.6166026176096243, -2.118298495767899e-07]

OpenCV Error: Assertion failed (E.cols == 3 && E.rows == 3) in decomposeEssentialMat, file /.../opencv-3.0.0-rc1_stable/modules/calib3d/src/five-point.cpp, line 597
terminate called after throwing an instance of 'cv::Exception' what():  /.../opencv-3.0.0-rc1_stable/modules/calib3d/src/five-point.cpp:597: error: (-215) E.cols == 3 && E.rows == 3 in function decomposeEssentialMat
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-09-24 10:05:38 -0600

gby gravatar image

I experienced the same issue when using only 5 points for the algorithm. If I use more, it works slow but fine but its a little bit strange if the 5-point algorithm only works with more then five points ;)

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-08-05 08:09:59 -0600

Seen: 1,313 times

Last updated: Aug 05 '15