简体   繁体   中英

Equivalent parameter 'Unique' in SIFT matching between FLANN matcher in OpenCv and matchFeature in matlab

I am porting to python a matlab software that matches images.

Since in matlab the function matchFeature is used with the parameter Unique set to true , it returns a list of matches where the keypoints don't repeat themselves (you can look up the function here: https://it.mathworks.com/help/vision/ref/matchfeatures.html ). In python i use OpenCv for SIFT calculation and a FLANN based matcher. I tried to find an equivalent parameter for the FLANN matcher, but i didn't find any.

Does a parameter like this exists in OpenCv's matchers? if not, how can i select the matches with keypoints that do not repeate themselves?

The BruteForce Matcher does this with the parameter crossCheck=True. This matcher is roughly equivalent to Matlab's matchFeatures with 'Unique' = true and 'Method' = 'Exhaustive' (default). The OpenCV Flann matcher (similar to MATLAB's 'Method' = 'Approximate') would require you to implement your own crosschecking by searching for repeats of either the queryIdx or trainIdx members of the matches.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM