我有rho
,theta
代表该行(由Hough Transform找到(:
rho = x cos(theta) + y sin(theta)
从中获得两个笛卡尔点(在图像范围内(最有效的方法是什么?
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))