How to get image indices in polar coordinates
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Actually the title is the question. Thank you
0 Kommentare
Antworten (2)
Image Analyst
am 26 Nov. 2011
Where is your origin? At the upper left like it normally is for images? Have you seen cart2pol()?
4 Kommentare
Image Analyst
am 27 Nov. 2011
Isn't the angle arctangent(y/x)? You might need to call fftshift andset your origin at the center to get the right angle, like atan(((y-yCenter) / (x-xCenter)). By the way in the past week or so there already was a posting on how to rotate an image via the Fourier domain, perhaps it was a classmate of yours. Do a search for it. It had working code and everything.
Walter Roberson
am 26 Nov. 2011
Are you trying to take a rectangular image and "warp" it to a circle, like a "fish-eye lens" ?
Are you trying to create a circular image and are hampered because arrays are rectangular, and you are not sure how to map the rectangular array to the circular image?
If your goal is to create a circular image and you want to know how to map the pixels, then there are two basic methods of doing that. You can start with the rectangular coordinates and "push" each of them in to the circle, or you can start with the circle and "pull" pixels from the rectangle.
People tend to program the "push" method, but it can be shown that for some image transformations, this will leave unpainted gaps in the final image. The only general and reliable method is the "pull" method of starting with the structure of the final image and figuring out where the pixels should come from.
Either way you have the problem that multiple pixels in the source will affect each destination pixel, so you have to use non-linear extrapolation. I know it would take me a while to figure out. I would probably google for information rather than working through the math.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Import, Export, and Conversion finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!