【问题标题】:Most efficient way to find points on line with polar representation使用极坐标表示在线查找点的最有效方法
【发布时间】:2017-05-05 20:57:48
【问题描述】:

我有rhotheta 代表线(通过霍夫变换找到)​​:

rho = x cos(theta) + y sin(theta)

从中获取两个笛卡尔点(如果可能,在图像边界内)的最 Pythonic 和最有效的方法是什么?

【问题讨论】:

    标签: python hough-transform


    【解决方案1】:
    def get_points_on_polar_line(rho,theta):
        a=np.cos(theta)
        b=np.sin(theta)
        x0=np.array((rho * a, rho * b))
        return (x0,x0+(-b, a))
    

    【讨论】:

      猜你喜欢
      • 2012-03-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-14
      • 2017-12-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多