Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在 matlab 中实现广义霍夫变换。该算法需要形状中每个点的梯度方向。如何测量 phi,如下图所示?
曲线 [x(t), y(t)] 的法线是 [-dy(t)/dt, dx(t)/dt]。因此,x作为 x 坐标和yy 坐标,法线是
x
y
[-diff(y(:)),diff(x(:))]
角度 phi 是
atan2(diff(x(:)),-diff(y(:)))