【问题标题】:Whats the reason for passing a math.pi (pi number) in the hough function?在霍夫函数中传递math.pi(pi数)的原因是什么?
【发布时间】:2020-02-28 20:08:24
【问题描述】:

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

cv.HoughLines(src, lines, 1, Math.PI / 180, 30, 0, 0, 0);

【问题讨论】:

    标签: python opencv image-processing opencv3.0


    【解决方案1】:

    基于OpenCV的文档here

    HoughLines(InputArray image, OutputArray lines, double rho, double theta, int threshold, double srn=0, double stn=0 )
    

    第四个参数是theta,指的是:

    theta – 累加器的角度分辨率,以弧度为单位。

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

    【讨论】:

      猜你喜欢
      • 2018-03-12
      • 1970-01-01
      • 1970-01-01
      • 2017-06-22
      • 2011-04-13
      • 2019-10-24
      • 2020-11-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多