2024-05-15 00:36:50 发布
网友
我不知道在hough函数中为阈值传递一个数字的原因
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,它表示:
theta
theta – Angle resolution of the accumulator in radians.
为了将d度转换为弧度,您应该将d乘以Math.Pi再除以180。在您的示例中,角度分辨率设置为1度或Math.Pi / 180弧度
d
Math.Pi
Math.Pi / 180
根据OpenCV的文档here:
第四个参数是
theta
,它表示:为了将
d
度转换为弧度,您应该将d
乘以Math.Pi
再除以180。在您的示例中,角度分辨率设置为1度或Math.Pi / 180
弧度相关问题 更多 >
编程相关推荐