Fix Matcher Confidence Handling#19955
Closed
danielenricocahall wants to merge 3 commits intoopencv:3.4from
Closed
Conversation
alalek
reviewed
Apr 21, 2021
| // Set zero confidence to remove matches between too close images, as they don't provide | ||
| // additional information anyway. The threshold was set experimentally. | ||
| matches_info.confidence = matches_info.confidence > 3. ? 0. : matches_info.confidence; | ||
| // matches_info.confidence = matches_info.confidence > 3. ? 0. : matches_info.confidence; |
Member
There was a problem hiding this comment.
What is about the comment above of this code?
Contributor
Author
There was a problem hiding this comment.
@alalek could you re-review/approve at earliest convenience? Thank you!
Member
There was a problem hiding this comment.
Could you please share some dataset which shows the problem of this change? So we can take a look on the problem.
This code is here for eliminating of very close images (may happen on live capturing on mobile devices). Blending step with two close images provides unnecessary artifacts, so this threshold is applied here.
Ideally it would be great to provide dedicated parameter for this threshold (probably for the master branch, 3.4 is in the maintenance mode)
4 tasks
6 tasks
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.
Per the issue #11084, we don't throw high confidence matches in
AffineBestOf2NearestMatcher, but we do inBestOf2NearestMatcher. In this PR, I am commenting out the line for consistency across the two feature matchers (it's currently commented out in the affine as well). An alternative idea is making this threshold configurable.Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.