feat(features2d): add FAST keypoint detection algorithm#69
Open
kalwalt wants to merge 1 commit into
Open
Conversation
- Implement Bresenham circle patterns (FAST-5, FAST-7, FAST-9) - Port Edward Rosten's optimized C++ corner scoring math - Add early rejection filters and contiguous segment checks - Add 2-pass detection grid with thread-safe 8-neighborhood NMS - Implement extensive validation and synthetic corner test suite Ref: #58, Parent: #65
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.
1. PR Summary
feat(features2d): add FAST keypoint detection algorithmfeat/issue-58-fasttargetingdev2. Detailed Description
This Pull Request implements the standard FAST (Features from Accelerated Segment Test) keypoint detection algorithm as specified under Issue #58.
Key architectural details include:
features2dmodule.Type5_8), FAST-7 (Type7_12), and FAST-9 (Type9_16), matching OpenCV's core neighborhood definitions.OFFSETS_8,OFFSETS_12, andOFFSETS_16) map the correct circular trajectories around target pixels.parallelfeature is activated.3. Review Checklist
General
Code Quality & Correctness
unsafeblocks used in the entire module.par_chunks_exact_mutparallel iteration integrates safely with the fallback sequential loops.PureCvError::InvalidInput) on non-1-channel images.Testing
src/features2d/tests.rscovering channel validation, flat uniform images, synthetic corner detection, and non-maximum suppression (NMS) differences.4. Risk Assessment
5. Test Coverage
src/features2d/fast.rs: 100% coverage on core detection and scoring routines.src/features2d/tests.rs: 100% coverage on new test functions.6. Visual Aids
An illustrative schema of the Bresenham Circle Pattern (FAST-9 example):
Where C is the candidate pixel, and the outer circular boundary comprises the 16 pixels evaluated against the intensity threshold.
7. Size Recommendations
At 2 changed files and ~600 lines, this PR is self-contained and small enough to be fully reviewed in a single pass. No splits are recommended.
8. Review Automation
cargo clippy --all-targets --all-features(0 warnings/errors on new files).cargo fmt(Perfect formatting).