Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi again, let me try to complement my answer.

One way to test if you found the object in a given image is indeed try to extract the homography (using findHomography) and then test its singular values, just like mentioned in the source you gave.

Another way is to see if at least you have a minimum number of matches. You need to specify the threshold yourself experimentally.

A third way to check the quality of the homography if you're working with planar objects (which I am going to assume that you are) is to compute the ZNCC (Zero Normalized Cross Correlation) between the object warped-back to the reference coordinate frame and the model you used. This ZNCC value is going to be very small if the homography is badly estimated. I used this method some time ago and it worked just fine. Also there is a function in OpenCV that you can use to compute that: matchTemplate().

These last two techniques are indeed used here: A realtime tracking system combining template-based and feature-based approaches (2007) - Ladikos et at.

I hope this can help.