Equation of a straight line in polar coordinates
1,744
As hinted by David Holden, sign of my slope equation was wrong, since during change of Δx, y changed by -Δy, not +Δy.
Related videos on Youtube
Comments
-
Puchatek over 1 year
For line detection with Hough transform a line equation in Cartesian coordinates
y = m⋅x + b (1)
is transformed to polar coordinates to become:
p = x⋅cos(θ) + y⋅sin(θ) (2)
I'm trying to prove (2) from (1), but keep on getting
p = -x⋅cos(θ) + y⋅sin(θ) (2)
I attached my derivation below:
Can anyone point me to where am I making a mistake?
-
David Holden almost 7 yearscheck your expression for "m" with particular attention to the sign
-
Puchatek almost 7 years@DavidHolden I appreciate that flipping sign on it I would get expected result, but don't see why that should be done. Slope of a line is defined by
Δy/Δx
, not-Δy/Δx
-
David Holden almost 7 yearsyes but Δx is negative! think about the definition of the slope of a line
-
Adriano almost 7 years$\sin\theta = \frac{\rho}{\Delta y}$ is incorrect, since the length of a hypotenuse should be positive, but here $\Delta y < 0$. You should have $\sin\theta = \frac{\rho}{- \Delta y}$.
-
Puchatek almost 7 years@DavidHolden Ah, now I finally get it. Slope is a change of y during change in x. From 0 to x, or change Δx, y changed by -Δy. Thank you, a feel really silly now.
-
David Holden almost 7 yearsdon't feel silly, it was an easy mistake to make, and having made it, the conclusion seems so logical that it is then difficult to find the flaw in the line of reasoning.
-