Hough transform: difference in cartesian to polar equation
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).