1 | initial version |
You could also use the output mask that findHomography creates when you use ransac or lmeds inside of it. Thats what opencv says about it: The best subset is then used to produce the initial estimate of the homography matrix and the mask of inliers/outliers.
So you could take this mask and count the inliers and outliers. Then you would check for example: if inliers > 50 and outliers/inliers > 0.5, then object found. Those numbers are totally random, you need to find them on your own through testing.
2 | No.2 Revision |
You could also use the output mask that findHomography creates when you use ransac or lmeds inside of it. Thats what opencv says about it: The best subset is then used to produce the initial estimate of the homography matrix and the mask of inliers/outliers.
So you could take this mask and count the inliers and outliers. Then you would check for example: if inliers > 50 and outliers/inliers > < 0.5, then object found. Those numbers are totally random, you need to find them on your own through testing.