-
-
Notifications
You must be signed in to change notification settings - Fork 56.2k
imgproc_fix_houghcircles #20919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imgproc_fix_houghcircles #20919
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for contribution!
modules/imgproc/src/hough.cpp
Outdated
@@ -1728,7 +1728,7 @@ static void HoughCircles( InputArray _image, OutputArray _circles, | |||
} | |||
|
|||
CV_Assert(!_image.empty() && _image.type() == CV_8UC1 && (_image.isMat() || _image.isUMat())); | |||
CV_Assert(_circles.isMat() || _circles.isVector()); | |||
CV_Assert(_circles.isMat() || _circles.isUMat() || _circles.isVector()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, we don't really need this check at all (whole CV_Assert statement). It is source of similar problems in the future.
.copyTo(_circles)
(line 1710) says if container is not supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, we don't really need this check at all. It is source of similar problems in the future.
i've no problem closing this
(indeed, it might be better to keep it as is, than to make it look like it is doing anything useful with UMat)
.copyTo(_circles) (line 1710) says if container is not supported.
hmm, i dont run into any issue using master branch (why would coying a Mat to UMat be a problem ?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to close, just remove this CV_Assert line (we don't need to duplicate checks, it tries to bring checks from .copyTo, but current attempt is not complete and would be broken in the future again).
i dont run into any issue
as expected.
imgproc: remove asserts for circles_ in HoughCircles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you 👍
imgproc: add a check for UMat in HoughCircles
resolves #20913
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.