Skip to content

Use OpenCV's brute-force match with cross-check instead of KNN match with ratio check and symmetry check#479

Open
borongyuan wants to merge 1 commit intorpng:masterfrom
borongyuan:master
Open

Use OpenCV's brute-force match with cross-check instead of KNN match with ratio check and symmetry check#479
borongyuan wants to merge 1 commit intorpng:masterfrom
borongyuan:master

Conversation

@borongyuan
Copy link
Contributor

As described in the doc of BFMatcher::create, this is alternative to the ratio test. It is the fastest of the several methods I tested and simplifies a lot of code.

@goldbattle goldbattle closed this Nov 30, 2025
@goldbattle goldbattle reopened this Nov 30, 2025

// Our descriptor matcher
cv::Ptr<cv::DescriptorMatcher> matcher = cv::DescriptorMatcher::create("BruteForce-Hamming");
cv::Ptr<cv::BFMatcher> matcher = cv::BFMatcher::create(cv::NORM_HAMMING, true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this enables the cross check.

@goldbattle
Copy link
Member

Hi, this is backwards compatible with OpenCV 3 correct? Seems like this is a decent replacement will need to test on a few datasets though myself before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants