Skip to content

Fix hough circles alt dimensions#20584

Merged
alalek merged 5 commits intoopencv:masterfrom
AleksandrPanov:fix_HoughCircles_ALT_dimensions
Aug 24, 2021
Merged

Fix hough circles alt dimensions#20584
alalek merged 5 commits intoopencv:masterfrom
AleksandrPanov:fix_HoughCircles_ALT_dimensions

Conversation

@AleksandrPanov
Copy link
Copy Markdown
Contributor

@AleksandrPanov AleksandrPanov commented Aug 20, 2021

Fixes #19238
Relates #16561

cvMat with different dimensions were copied to OutputArray _circles.

HOUGH_GRADIENT :

Mat(1, numCircles, cv::traits::Type<CircleType>::value, &circles[0]).copyTo(_circles);

vs

HOUGH_GRADIENT_ALT :

std::vector<Vec3f> cwow(ncircles);
Mat(cwow).copyTo(_circles);

This has been fixed and a test has been added.

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 other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to 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

@asmorkalov
Copy link
Copy Markdown
Contributor

@AleksandrPanov
Copy link
Copy Markdown
Contributor Author

@alalek alalek merged commit 6f4160c into opencv:master Aug 24, 2021
@alalek alalek mentioned this pull request Oct 15, 2021
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
…ALT_dimensions

Fix hough circles alt dimensions

* fix OutputArray _circles dimensions

* add houghcircles_alt test

* fix warnings

* add shape assert

* change asserts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Different shape of result of the method HOUGH_GRADIENT_ALT in Python

3 participants