How to get image indices in polar coordinates
1 次查看(过去 30 天)
显示 更早的评论
回答(2 个)
Image Analyst
2011-11-26
Where is your origin? At the upper left like it normally is for images? Have you seen cart2pol()?
4 个评论
Image Analyst
2011-11-27
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
2011-11-26
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Import, Export, and Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!