How to use the OpenCV houghcircles() output array parameter in Python

The OpenCV documentation for cv.houghcircles() includes an optional output vector array, denoted "circles."

cv.HoughCircles( image, method, dp, minDist[, circles[, param1[, param2[, minRadius[, maxRadius]]]]] ) -> circles

In no python example have I seen any use of this parameter. And, although the nested brackets seem to require the use of the output vector parameter in order to use the following parameters, again, I've never seen it used. I do see "circles" used as the output array such that the returned output of the method is assigned to "circles."

That is,

circles = cv2.houghcircles(img, method, dp, minDist, param1, param2, minrad, maxrad)

Is the output vector passed as a parameter into the call only used in C++, or, is there a context in python in which one would pass the output vector into the function call as it is described in the documentation?

(Also, am I correctly interpreting the nested brackets to mean that each nested level of optional parameter requires the preceding level?)



Read more here: https://stackoverflow.com/questions/68461807/how-to-use-the-opencv-houghcircles-output-array-parameter-in-python

Content Attribution

This content was originally published by Kokomodo at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: