Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

findHomography with RANSAC wrong outliering

I am doing some object detection using features2d (ORB, SIFT etc)

I am investigating further into homography with RANSAC. I found out that many good points are marked wrongly as outliers.

There are lots of outliers that shouldn't be outliers inside the object (the book)

I have tried to rise threshold up to 10 but the result is pretty the same. Can I do something to improve this situation?

Is there something broke with RANSAC ?

like image 869
dynamic Avatar asked Feb 20 '23 10:02

dynamic


2 Answers

Outliers in this case means that those points don't fit the model, but they don't necessarily have to fall outside your object.

RANSAC finds the best set of points that fits the model, and the rest are considered outliers, but an outlier can perfectly be a point of the object you are tracking that is affected by noise and its detected position is deviated enough from RANSAC's reprojection to be considered an outlier.

You don't have to worry, it is working fine and your object is detected, as shown in your image.

like image 93
Jav_Rock Avatar answered Feb 27 '23 17:02

Jav_Rock


Try to find more features (min 100) by using other feature detector or tune the detector threshold to increase the number. It is also suitable to distribute points equally on the object. You can try goodFeaturesToTrack from OpenCV.

like image 29
VisionC Avatar answered Feb 27 '23 16:02

VisionC