Skip to content

added blob contours to blob detector#21942

Merged
alalek merged 3 commits intoopencv:4.xfrom
pglotov:add-blob-contours
Oct 7, 2022
Merged

added blob contours to blob detector#21942
alalek merged 3 commits intoopencv:4.xfrom
pglotov:add-blob-contours

Conversation

@pglotov
Copy link
Copy Markdown
Contributor

@pglotov pglotov commented May 1, 2022

This PR adds an option to collect blob contours during blob detection (SimpleBlobDetector).

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@pglotov pglotov force-pushed the add-blob-contours branch 16 times, most recently from 49e9c75 to 539efc5 Compare May 3, 2022 17:56
@pglotov pglotov changed the base branch from 4.x to master May 12, 2022 02:16
@pglotov pglotov force-pushed the add-blob-contours branch 4 times, most recently from b36fa69 to bf284a9 Compare May 15, 2022 00:43
@pglotov pglotov force-pushed the add-blob-contours branch 2 times, most recently from 139ebd5 to cd46489 Compare May 22, 2022 04:08
@asmorkalov asmorkalov requested a review from vpisarev June 7, 2022 05:43
@vpisarev
Copy link
Copy Markdown
Contributor

vpisarev commented Jun 7, 2022

@pglotov, thank you for the contribution!
As I see, besides the claimed extension of SimpleBlobDetector API, you've also exposed MaskPredicate and runByPixelsMask2. Is it necessary? If not, probably it makes sense to keep them private.

@pglotov
Copy link
Copy Markdown
Contributor Author

pglotov commented Jun 8, 2022

makes sense, made changes

@pglotov pglotov force-pushed the add-blob-contours branch 2 times, most recently from 5469b78 to de097f5 Compare June 9, 2022 16:38
@asmorkalov asmorkalov changed the base branch from master to 4.x June 17, 2022 07:36
@vpisarev
Copy link
Copy Markdown
Contributor

@pglotov, thank you! I have just one more comment – see above. Other than that, the patch is ready for integration.

@pglotov pglotov force-pushed the add-blob-contours branch 2 times, most recently from 2351b8b to 8586426 Compare June 17, 2022 15:19
@asmorkalov
Copy link
Copy Markdown
Contributor

@alalek Could you add an exception to abi-complience-checker for the new fields and methods.

@asmorkalov asmorkalov added the need-ci-update CI or Infra update required to merge PR label Sep 21, 2022
CV_WRAP static Ptr<SimpleBlobDetector>
create(const SimpleBlobDetector::Params &parameters = SimpleBlobDetector::Params());
CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
CV_WRAP virtual const std::vector<std::vector<Point> >& getBlobContours() const = 0;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"Source API" compatibility doesn't allow to add new virtual pure methods.

Do we really want to violate that and bypass checker?


  • 4.x: implementation with CV_Error(not implemented) should be used instead.
  • 5.x: pure method patch should be used

Copy link
Copy Markdown
Contributor Author

@pglotov pglotov Sep 26, 2022

Choose a reason for hiding this comment

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

I initially wanted to merged this into master, not a particular release. Do you think it makes sense to have two PRs for both branches?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@alalek I added stup implementation with CV_Error.

@asmorkalov asmorkalov requested a review from alalek October 7, 2022 12:28
@alalek alalek merged commit a3ebafb into opencv:4.x Oct 7, 2022
@alalek alalek mentioned this pull request Jan 8, 2023
@asmorkalov asmorkalov added this to the 4.7.0 milestone Jan 23, 2023
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
added blob contours to blob detector

* added blob contours

* Fixed Java regression test after new parameter addition to SimpleBlobDetector.

* Added stub implementation of SimpleBlobDetector::getBlobContours to presume source API compatibility.
asmorkalov pushed a commit that referenced this pull request Dec 23, 2025
docs(features2d): document getBlobContours and collectContours in SimpleBlobDetector #28275

Description: This PR adds missing Doxygen documentation for the getBlobContours() method and the collectContours parameter in SimpleBlobDetector. These features were previously undocumented, making the contour collection functionality difficult for users to discover and use correctly.

Changes:
Added a @brief and detailed note for SimpleBlobDetector::Params::collectContours.
Added documentation for SimpleBlobDetector::getBlobContours(), including a @note regarding the required parameter setup.

Testing:
Verified the documentation build locally on macOS using ninja opencv_docs.
Confirmed the generated HTML displays the descriptions and cross-references accurately.

Partially fixes: #25904
Related PR that adds method: #21942

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work.
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
FoxHelms pushed a commit to FoxHelms/opencv that referenced this pull request Dec 23, 2025
…ctor-api

docs(features2d): document getBlobContours and collectContours in SimpleBlobDetector opencv#28275

Description: This PR adds missing Doxygen documentation for the getBlobContours() method and the collectContours parameter in SimpleBlobDetector. These features were previously undocumented, making the contour collection functionality difficult for users to discover and use correctly.

Changes:
Added a @brief and detailed note for SimpleBlobDetector::Params::collectContours.
Added documentation for SimpleBlobDetector::getBlobContours(), including a @note regarding the required parameter setup.

Testing:
Verified the documentation build locally on macOS using ninja opencv_docs.
Confirmed the generated HTML displays the descriptions and cross-references accurately.

Partially fixes: opencv#25904
Related PR that adds method: opencv#21942

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work.
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: features2d feature need-ci-update CI or Infra update required to merge PR test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants