World's most popular travel blog for travel bloggers.

# Hough transform: difference in cartesian to polar equation

, ,
Problem Detail:

According to Wikipedia and most other resources on the internet, the relation between cartesian coordinate and polar coordinate parameters are described by the equation $x\cos{\theta}+y\sin{\theta}=d$.

However, the computer vision course in Udacity used $x\cos{\theta}-y\sin{\theta}=d$ instead, as shown in this short video https://youtu.be/2oGYGXJfjzw?t=4s.

What is the difference?

There's no fundamental difference. The difference is merely one of convention, namely, where you consider the origin to be in your $(x,y)$ coordinates. If you consider $(0,0)$ to be in the upper-left (with increasing $y$ values corresponding to going downwards), use one formula. If you consider $(0,0)$ to be in the lower-left (with increasing $y$ values corresponding to going upwards), use the other. Ultimately, the two are equivalent, up to a flip of the plane (reflection across the x axis).