Reputation: 91
with Opencv 3.0, I obtained the essential matrix with the function:
E = findEssentialMat(points2, points1, focal, pp, RANSAC, 0.999, 1.0, mask);
Looking at the mask values number of inliers are really high.
After I used the recoverPose function:
recoverPose(E, points2, points1, R, t, focal, pp, mask);
But I noticed that the number of passed inliers (looking at the mask) are very few (often zeroes).
My questions is: There is a way to obtain more inliers from recoverPose function? If not, There is alternate way to obtain R and t (without using recoverPose function)?
Thanks a lot!
Upvotes: 2
Views: 4711
Reputation: 71
Without more details it is really hard to judge what is going on. The main task RecoverPose has to solve is to choose between 4 different solutions for translation and rotation given an essential matrix estimate.
The steps are roughly the following:
So it seems like that something is going wrong during the Cheirality check. You can actually implement RecoverPose yourself quite easily. You can check how I did it in my current project (look for DecomposeEssentialMat) : https://github.com/makra89/Visual-Odometry-Cpp/blob/master/src/Utils/src/ImageProcessingUtils.cpp
Upvotes: 1