Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Essential matrix 6x3 (expecting 3x3)

After calling findEssentialMat() function:

essMatrix = findEssentialMat( points1, points2, 1.0, Point2d( 0, 0 ), essMethod, 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

Essential matrix 6x3 (expecting 3x3)

After calling findEssentialMat() function:

essMatrix = findEssentialMat( points1, points2, 1.0, Point2d( 0, 0 ), essMethod, 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