I have 2 image with a little bit orientation to left in camera, i want to find the orientation from opencv, i get surf keypoints from 2 image and my problem is how to compare this 2 keypoints to find orientation.
Asked
Active
Viewed 1,956 times
1 Answers
6
You need to apply a matcher (cv FlannMatcher for example) to detect which keypoints in both images correspond to the same point.
Then, with the paired matches you have to apply cv::findHomography(). This algorithm will use 4 matched pairs to extract the homography matrix.
The last step (some code here) is to convert from homography matrix to pose matrix (extrinsic parameters matrix). The pose matrix is composed by rotation and translation.
-
3Though stackoverflow is not a place where you can ask for code I can link you to a explanation of how to get pose from homography: http://dsp.stackexchange.com/a/2737/1473 – Jav_Rock Sep 04 '12 at 07:05