polar coordinates to Cartesian coordinates.
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
mohamed yassine ben homrane
am 5 Sep. 2015
Kommentiert: mohamed yassine ben homrane
am 6 Sep. 2015
Hello everyone; I applied the Hough transform on an image and then I searched the peaks using the function (Houghpeaks) the problem is that I want to convert these peaks (polar coordinates) to Cartesian coordinates then, I applied function (pol2carts) but I found negative value. how can I fix that and thank you.

0 Kommentare
Antworten (1)
dpb
am 5 Sep. 2015
doc hough
...
The function returns ... the angle in degrees between the x-axis and this vector.
doc pol2cart
... TH must be in radians.
So, firstwise, you haven't converted the output of hough for the angle (degrees) into the correct units (radians) for pol2cart so the numeric values are incorrect.
Secondly, the x,y values returned may be negative, depends on where the origin is defined to be and the quadrant in which the input angles lay. I'm no image processing guru, so don't know about the latter but I suspect if you correct the angle to be in radian and consider the coordinates in light of the origin in the computation from hough, all will make sense.
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!