SIFT+RANSAC matching algorithm

asked 2017-02-19 08:58:58 -0500

Machupicchu gravatar image

updated 2017-02-19 09:23:06 -0500

Hi,

I ve wirtten some code to compute SIFT decriptors from images and then compute the homography matrix from the 'good matches'. My goal is to distinguish between 2 classes (different and same) images.

[H, mask ]= findHomography(...)

However the values returned in mask are almost the same (number of inliers between 4-8) for both 'same' and 'different'.

My procedure was to check the number of inliers in mask ... but is that the correct way? Or should I apply the Homography to my image and rerun RANSAC and retest something like the so-called 'back-projection error'? If yes can you provide some hints about the threshold to use?

Best regards. O.

edit retag flag offensive close merge delete

Comments

My goal is to distinguish between 2 classes

then you got the wrong algorithm for this.

feature matching is meant to produce a homography for a known scene between 2 images, it's not meant to distinguish between 2 different ones. the outliers in the homography only specify, which points were acceptable for the transformation, they do not measure similarity at all.

berak gravatar imageberak ( 2017-02-20 03:21:57 -0500 )edit

I didn't explain clearly maybe: the distinction is intended to be made by the percentage of error with the homography , i.e. if too much error (threshold) then no match -> not able to realign properly, otherwsise match

Machupicchu gravatar imageMachupicchu ( 2017-02-20 10:12:53 -0500 )edit

still, wrong tool for your job. none of those measurements give you a meaningful similarity.

berak gravatar imageberak ( 2017-02-20 10:47:55 -0500 )edit

I guess I am still not formulating it well enough. I can assure you it is used in academics domain (university) to to such kind of evaluation (detection), therefore I am sure this approach is valid. The idea is that we use the geometrical info in the keypoints to try realingning them to a supposedly matching image. If alignment is good->match if no good-> no match maybe you see better what i mean now ?

Machupicchu gravatar imageMachupicchu ( 2017-02-20 19:31:52 -0500 )edit