Detecting outliers in SURF or SIFT algorithm with OpenCV
Asked Answered
U

1

4

Which method is the best to compare two images and discard outliers points? In find_obj.cpp opencv example, they use FLANN, but don't discard outliers.

I have seen some methods like using Kmeans or graphs.

Usable answered 9/8, 2011 at 10:18 Comment(1)
Hi I know this is very old question but I am also in same situation . May I know which algo did you used to remove the outliers in SURF algo ?Noblewoman
I
2

There is a fairly reliable and efficient way to both reject noisy points and determine the transformation between your points of interest. The algorithm that is usually used to reject outliers is known as RANSAC (http://en.wikipedia.org/wiki/RANSAC), and the algorithm used to determine the transformation can take several forms, but the most current state of the art is known as the five-point algorithm and can be found here -- a MATLAB implementation can be found here. Note that you do need to determine the transformation even if you don't care about the exact rotation between the two images -- this is how the outliers are identified.

Unfortunately I don't know of a mature implementation of both of those combined; you'll probably have to do some work of your own to implement RANSAC and integrate it with the five point algorithm.

OpenCV has an implementation that is overkill for your task (meaning it will work but will take more time than necessary) but is ready to work out of the box. The function of interest is called cv::findFundamentalMat (http://opencv.willowgarage.com/documentation/cpp/camera_calibration_and_3d_reconstruction.html#cv-findfundamentalmat)

Indusium answered 9/8, 2011 at 16:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.