我不知道在霍夫函数中传递阈值数字的原因
cv.HoughLines(src, lines, 1, Math.PI / 180, 30, 0, 0, 0);
最佳答案
基于OpenCV的文档here:
HoughLines(InputArray image, OutputArray lines, double rho, double theta, int threshold, double srn=0, double stn=0 )
第四个参数是
theta
,它表示:为了将
d
度转换为弧度,应将d
乘以Math.Pi
并除以180。在您的示例中, Angular 分辨率设置为 1度或Math.Pi / 180
弧度。