I use SIFT algorithm and try to use Kovesi's functions to get Homography. However, I cannot succeed. I only have descriptors and locations of the SIFT algorithm.
1 Answers
You need to perform descriptor matching between two frames. So you find the SIFT descriptors in frame A and then frame B.
Then you see which ones correspond between the two images. To do that you need to compare the distance between each descriptor in each frame and then create a matched pair from the best score and repeat for all the points.
Now, you can use RANSAC which basically just means take 4 random sets of matches, calculate the homography using the DLT and then project the points through the inverse of the homography in both directions. Measure the error and then repeat this again a number of times until you get a set of pairs that produce a homography with an error youre happy with.
Now use the chosen homography to project all the points between the images and remove all the outlying matches that have an error above a threshold you define. Then recalculate the homography based on the inliers. OpenCV is avision library that is useful for all these things. And you dont have to use SIFT. You could use SURF which has a nice implementation in OpenCV.

- 4,977
- 3
- 40
- 70
-
1Theres a great explanation here: http://stackoverflow.com/questions/1500498/how-to-use-sift-algorithm-to-compute-how-similiar-two-images-are – twerdster May 14 '11 at 10:49
-
You dont compare the descriptors using RANSAC. RANSAC is useful for robustly estimating the homography AFTER you have decided on matched descriptors. The above links explains that you can compare the descriptors using euclidean distance but that you should check the ratios between the best matched descriptor and the next best one to check that they arent too similar. – twerdster May 14 '11 at 15:21