-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Error in HoughCircles when using UMat image input #20913
Description
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.
opencv/modules/imgproc/src/hough.cpp
Line 1660 in 6ffc487
| 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.