Fundamental Matrix For Point Correspondence
Solution 1:
I am not sure if equation 1 can be written as equation 2. I would definitely recommend using equation 1 and homogenous coordinates (z value is set to 1). You should consider normalizing the coordinates because X and Y would be much larger than Z. This can be done by computing a similarity transform established by Hartley, Zisserman and e.g. shown here: page 2.
After that you could use the OpenCV Mat
to directly compute the results. First, I would recommend that you try to use different methods for calculating the Fundamental Matrix. Since you are having a lot of feature points generated by ORB, I would use CV_FM_RANSAC
e.g. with a reprojThreshold of 3 and confidence of 0.99. This could already do the trick.
A short code example in C++:
cv::Mat F = cv::findFundamentalMat(kp_left, kp_right, cv::RANSAC, 3.0, 0.999); # here you need to use your feature points cv::Point2f
point_left = cv::Mat(cv::Point3d(82,340,1));
point_right = cv::Mat(cv::Point3d(74,340,1));
cv::Mat distance = point_left.t()*F*point_right;
The distance is usually never exactly 0 but should now be close to it.
Post a Comment for "Fundamental Matrix For Point Correspondence"