【发布时间】:2017-05-05 20:57:48
【问题描述】:
我有rho,theta 代表线(通过霍夫变换找到):
rho = x cos(theta) + y sin(theta)
从中获取两个笛卡尔点(如果可能,在图像边界内)的最 Pythonic 和最有效的方法是什么?
【问题讨论】:
我有rho,theta 代表线(通过霍夫变换找到):
rho = x cos(theta) + y sin(theta)
从中获取两个笛卡尔点(如果可能,在图像边界内)的最 Pythonic 和最有效的方法是什么?
【问题讨论】:
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))
【讨论】: