Hough Circle Transform
Примеры с cv2.imshow требуют сборки OpenCV с GUI. В ноутбуке с headless-версией используйте вывод изображений через Matplotlib.
Hough Circle Transform
- We will learn to use Hough Transform to find circles in an image.
- We will learn these functions: cv.HoughCircles()
Theory
A circle is represented mathematically as \((x-x_{center})^2 + (y - y_{center})^2 = r^2\) where \((x_{center},y_{center})\) is the center of the circle, and \(r\) is the radius of the circle. From equation, we can see we have 3 parameters, so we need a 3D accumulator for hough transform, which would be highly ineffective. So OpenCV uses more trickier method, Hough Gradient Method which uses the gradient information of edges.
We use the function: cv.HoughCircles (image, circles, method, dp, minDist, param1 = 100, param2 = 100, minRadius = 0, maxRadius = 0)
- Parameters
-