Ask Your Question
0

Java : How to use Crosscheck ?

asked 2013-05-06 02:51:49 -0600

Sylvain gravatar image

updated 2013-05-06 02:54:11 -0600

Hi !

I've follow the tutorial "object detection in a scene" (http://docs.opencv.org/doc/tutorials/features2d/feature_homography/feature_homography.html#feature-homography) and redo the same thing in java... and that's work pretty well. But I still have a question.

If I want to search an object which is not in the scene, I still have a (false) result. If I've well understand, using the crosscheck option for the brute-force matcher can help to deal with that. But I can't find how to use crosscheck, I can't find it in the Javadoc...

I've also read than knnmatch() can probably help me but I don't understand how. I already have my four points with "the best distance" when I follow the tutorial.

If I follow my instinct, the false-positive have to be detect after the findHomography() function. Nope ?

Is there somebody who can help me with my outliers ? :)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-05-06 05:24:46 -0600

Guanta gravatar image

Unfortunately cross-check is not wrapped by the Java-api. However you can easily code it yourself, see http://answers.opencv.org/question/15/how-to-get-good-matches-from-the-orb-feature. There is also suggested the ratio-test as another way of pruning the points.

False-positives matches should be either rejected beforehand or during findHomography (which you actually also do by applying RANSAC/LMEDS). More suggestions can also be found in this answer: http://answers.opencv.org/question/12898/how-to-know-if-findhomography-warpperspective-will/

edit flag offensive delete link more

Comments

Thanx a lot, I'll try this tomorrow but that's look nice :)

Sylvain gravatar imageSylvain ( 2013-05-06 10:29:06 -0600 )edit

Question Tools

Stats

Asked: 2013-05-06 02:51:49 -0600

Seen: 970 times

Last updated: May 06 '13