OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Sun, 26 Mar 2017 23:22:39 -0500Why does recoverPose return a non-zero position when identical point vectors are supplied?http://answers.opencv.org/question/74487/why-does-recoverpose-return-a-non-zero-position-when-identical-point-vectors-are-supplied/ By accident I tried estimating the relative position of an image to itself (don't ask). I would expect a result of 0 translation and 0 rotation.
Surprisingly, I get a non-zero translation result. In fact I get a rather significant result: 0.0825 -0.0825.
In essence my code is as follows:
cv::Point2d pp(u0, v0);
cv::Mat R, t, mask;
cv::Mat E = cv::findEssentialMat(points1, points2, focal, pp, cv::RANSAC, 0.999, 1.0, mask);
cv::recoverPose(E, points1, points2, R, t);
In the above code, t != 0. My question is: is a non-zero result for recoverPose valid when points1 and points2 are identical? If so, why?
Tue, 27 Oct 2015 11:10:06 -0500http://answers.opencv.org/question/74487/why-does-recoverpose-return-a-non-zero-position-when-identical-point-vectors-are-supplied/Answer by ririgo for <p>By accident I tried estimating the relative position of an image to itself (don't ask). I would expect a result of 0 translation and 0 rotation.</p>
<p>Surprisingly, I get a non-zero translation result. In fact I get a rather significant result: 0.0825 -0.0825.</p>
<p>In essence my code is as follows:</p>
<pre><code>cv::Point2d pp(u0, v0);
cv::Mat R, t, mask;
cv::Mat E = cv::findEssentialMat(points1, points2, focal, pp, cv::RANSAC, 0.999, 1.0, mask);
cv::recoverPose(E, points1, points2, R, t);
</code></pre>
<p>In the above code, t != 0. My question is: is a non-zero result for recoverPose valid when points1 and points2 are identical? If so, why?</p>
http://answers.opencv.org/question/74487/why-does-recoverpose-return-a-non-zero-position-when-identical-point-vectors-are-supplied/?answer=136133#post-id-136133Not sure but in epipolar constraint
x2^T * E * x1 = 0
where x2 is a 2d point in second image, and x1 is in first image.
when x1 = x2, we expect that the R is identity right?
Than we can rewrite above as
x1^T * [t]x * x1 = 0
whew [t]x is a skew-symmetric form of t.
In linear algebra, product the same vector with a skew-symmetric matrix always give 0 so there is no solution for t I guess.Sun, 26 Mar 2017 23:22:39 -0500http://answers.opencv.org/question/74487/why-does-recoverpose-return-a-non-zero-position-when-identical-point-vectors-are-supplied/?answer=136133#post-id-136133