feat(features2d): implement BFMatcher, DMatch and drawing utilities (#75)#77
Merged
kalwalt merged 2 commits intoJun 17, 2026
Conversation
…tracking tutorials (#75)
6855276
into
feat/feature-matching-infrastructure
3 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
feat)Detailed Description
This PR implements the core brute-force descriptor matching and visual correspondence drawing infrastructure for
purecvin the new modules:src/features2d/matcher.rs:DMatchstructure for match representation matching OpenCV fields (query_idx,train_idx,train_img_idx,distance).DescriptorMatcher<T>trait to define standard matcher behavior.BFMatcher<T>supportingNormHamming(binary like ORB) andNormL2(float).rayonunder theparallelfeature gate.filter_matcheshelper implementing Lowe's ratio test.src/features2d/draw.rs:draw_keypointsanddraw_matchesfunctions written in pure Rust (100% WebAssembly compatible, no external graphics dependencies).examples/match_features.rs:graf.pngimage.Review Checklist
.rsfiles.Result<T, PureCvError>.unsafeblocks are introduced.#[cfg(feature = "parallel")].cargo fmt) and linting (cargo clippy) pass with zero warnings.Risk Assessment
Test Coverage
src/features2d/tests.rsfor:Visual Aids
Here is the output from
cargo run --example match_features:Review Automation