This forum is disabled, please visit https://forum.opencv.org

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.

Copyright OpenCV foundation, 2012-2018. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.