Re: Questions about the Log Polar Transform.
- From: "Robin Tucker" <idontwanttobespammedanymore@xxxxxxxxxxxxxxx>
- Date: Thu, 14 Jul 2005 17:30:43 +0100
> 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.
.
- Follow-Ups:
- Re: Questions about the Log Polar Transform.
- From: Robin Tucker
- Re: Questions about the Log Polar Transform.
- References:
- Questions about the Log Polar Transform.
- From: Robin Tucker
- Re: Questions about the Log Polar Transform.
- From: Dave Martindale
- Questions about the Log Polar Transform.
- Prev by Date: Re: Questions about the Log Polar Transform.
- Next by Date: batch image processing with photoshop
- Previous by thread: Re: Questions about the Log Polar Transform.
- Next by thread: Re: Questions about the Log Polar Transform.
- Index(es):
Relevant Pages
|
|