Skip to content

Error in HoughCircles when using UMat image input #20913

@zain-sohail

Description

@zain-sohail

I have been using the HoughCircles function through Python for circle detection but wanted to speed it up by making use of Transparent API. I understand that usage of UMat is necessary for that and img is of such type

circles = cv2.HoughCircles(img,cv2.HOUGH_GRADIENT, 1.2, 1500)

When I run the code, I get this error:

hough.cpp:2254: error: (-215:Assertion failed) _circles.isMat() || _circles.isVector() in function 'HoughCircles'

I could find this assertion in here.

CV_Assert(_circles.isMat() || _circles.isVector());

Even with giving circles (np.zeros((1,1,3), np.float32)) as an input parameter, it gives the same error. From my understanding this is something internal within the function and since I have little experience with openCV codebase, I wonder if this is a purposeful feature or a bug.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions