gpt4 book ai didi

python - 在hough函数中传递math.pi(pi编号)的原因是什么?

转载 作者:行者123 更新时间:2023-12-02 17:24:04 24 4
gpt4 key购买 nike

我不知道在霍夫函数中传递阈值数字的原因

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 – Angle resolution of the accumulator in radians.



为了将 d度转换为弧度,应将 d乘以 Math.Pi并除以180。在您的示例中, Angular 分辨率设置为 1度Math.Pi / 180弧度。

关于python - 在hough函数中传递math.pi(pi编号)的原因是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60458592/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com