On a very high level, my pose estimation pipeline looks somewhat like this:
- Find features in image_1 and image_2 (let's say
cv::ORB
) - Match the features (let's say using the
BruteForce-Hamming
descriptor matcher) - Calculate Essential Matrix (using
cv::findEssentialMat
) - Decompose it to get the proper rotation matrix and translation unit vector (using
cv::recoverPose
) - Repeat
I noticed that at some point, the yaw angle (calculated using the output rotation matrix R
of cv::recoverPose
) suddenly jumps by more than 150 degrees. For that particular frame, the number of inliers is 0
(the return value of cv::recoverPose
). So, to understand what exactly that means and what's going on, I asked this question on SO.
As per the answer to my question:
So, if the number of inliers is 0, then something went very wrong. Either your E is wrong, or the point matches are wrong, or both. In this case you simply cannot estimate the camera motion from those two images.
For that particular image pair, based on the visualization and from my understanding, matches look good:
The next step in the pipeline is finding the Essential Matrix. So, now, how can I check whether the calculated Essential Matrix is correct or not without decomposing it i.e. without calculating Roll Pitch Yaw angles (which can be done by finding the rotation matrix via cv::recoverPose
)?
Basically, I want to double-check whether my Essential Matrix is correct or not before I move on to the next component (which is cv::recoverPose
) in the pipeline!