fix findContours in SimpleBlobDetector#24433
Draft
AleksandrPanov wants to merge 1 commit into
Draft
Conversation
asmorkalov
reviewed
Oct 25, 2023
| minConvexity (inclusive) and maxConvexity (exclusive). | ||
|
|
||
| Default values of parameters are tuned to extract dark circular blobs. | ||
| @note Don't disable the param filterByArea with dark blobs and white backgound, findContours() find extra contour in this case. |
Contributor
There was a problem hiding this comment.
I propose to extract parameters description from brief section and move to each parameter. It fixes doxygen documentation and add help messages to IDE. Also I propose to rephrase the sentence: "filterByArea should be true for black blobs on white background as findContours expects background to be black and adds extra contours for the case."
| The function retrieves contours from the binary image using the algorithm @cite Suzuki85 . The contours | ||
| are a useful tool for shape analysis and object detection and recognition. See squares.cpp in the | ||
| OpenCV sample directory. | ||
| OpenCV sample directory, tutorial @ref tutorial_py_contours_begin} or @ref tutorial_find_contours. |
Contributor
There was a problem hiding this comment.
extra } in the reference.
Comment on lines
+4021
to
+4022
| @note In OpenCV, finding contours is like finding white object from black background. So remember, | ||
| object to be found should be white and background should be black. |
Contributor
There was a problem hiding this comment.
I propose to remove note and extend function description:
Non-zero pixels are treated as 1's. Zero
pixels remain 0's, so the image is treated as binary.
Zero values (black color) is used as background.
Contributor
|
@AleksandrPanov Friendly reminder. |
Contributor
Author
Contributor
Author
|
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.


commented problem from #24388
TODO: need to fix a bug
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.