Re: Questions about the Log Polar Transform.



> That formula will only give you angles between -90 and +90 degrees. To
> get proper polar coordinates, you'll have to use atan2(), or look at
> the sign of (x-xc) and make a correction to get angles in the left half
> of the plane.

Yes, I noticed this so am now using atan2.

>
> That's the first half of the mapping. This gives you the polar
> coordinates of the pixel in the source image. Then you have to map
> that to a new position (x', y') in the destination image using
> something like
>
> x' = k1 * r + k2
> y' = k3 * a + k4
>
> where k1-k4 are constants used to set the size of the output image and
> make the X and Y addresses all positive.



Examples help (I'm not all that good at math):

Resulting Image Map is 320 x 240 pixels.
Source Image Map is 320 x 240 pixels,

so, k1, k3 are both 1, k2 = 160, k4 = 120?

Resulting Image Map is 320 x 240 pixels
Source Image Map is 160 x 120 pixels,

so, k1 = 0.5, k3 = 0.5, k2 = 160, k4 = 120?


>
> The easiest thing to do in this case is to operate in output image
> space. For every pixel location (x', y') in the output image, calculate
> the input pixel location (x, y) by inverting the expressions above.
> This will give you a position that isn't exactly aligned with any input
> pixel.
>

This is where I'm falling over (apart from everything else). If I iterate
across the final image in Y and X, to get a mapping back from log polar
coordinate space to cartesian space, how would I rearrange the given
equations (I'm not a math graduate, to my great shame).



Thanks.








.



Relevant Pages

  • Re: Questions about the Log Polar Transform.
    ... >transform maps radial lines in Cartesian space to horizontal lines in polar ... coordinates of the pixel in the source image. ... If you want a log-polar output image, not just a polar one, you'll also ...
    (sci.image.processing)
  • Re: code optimization help
    ... interpolation lookup table for speed. ... of pixels from the source image that contribute to the corresponding ... contribute to the output pixel. ...
    (comp.soft-sys.matlab)
  • Re: Is there anyone who has developed map projection library?
    ... >To add a comment to Pauls thoughs on transformation of images: ... Now scan through the OUTPUT image and find ... >the location of this pixel in the original image and fill it with that value. ... >because your entire output image is filled with values (or outside the input image) ...
    (comp.infosystems.gis)
  • Re: Rookie having problems with some filter code. Any help?
    ... This doesn't seem to match your output image so perhaps you are adding the filter result to the input pixel value. ... with a 4 in the middle, this would be a Laplacian but now it is a sum of the Laplacian and the center pixel. ...
    (sci.image.processing)
  • Re: Wallpaper goes "fuzzy"
    ... >> "The first display is an approximation of the resampled image, ... >> by showing the nearest-neighbour pixel of the source image, ... >> of multiple source image pixels (or calculates smooth gradations between ...
    (comp.sys.mac.misc)