dp = 1:原图;dp=2:小一半的图
param2选30-50,超过这个值
OpenCV中的霍夫变换圆检测函数 cv::HoughCircles:
它整合了Canny检测和霍夫变换,输出是cv::Vec3f向量,每个元素包含检测圆的圆心坐标和半径(cx, cy, radius)。
如果噪声不是椒盐噪声就可以不用median blur,可以用gaussian blur等等
hough circles参数
1:dp
(5)10:min_dist: Minimum distance between detected centers
(6)100:Upper threshold for the internal Canny edge detector
(7)30:Threshold for center detection
(8)5:min radius
(9)50:max radius