Log Polar Transform

backlinks: /SRSoftwareOverview


The log-polar transform warps an image onto new axes, angle (latex2png equation) and log of distance (latex2png equation). The angle and distance are measured in relation to the centre of the image, .

Forward coordinate transformation

Using the centre of the image as the axis reference, pixel coordinates are given by

latex2png equation

the angle is

latex2png equation

and, with a base of latex2png equation, the log of the distance is

latex2png equation

The base, chosen so the diameter of the transformed image is the same as that of the input image, is

latex2png equation

where latex2png equation is the minimum dimension (probably height) of the input image.

Reverse coordinate transformation

When warping images, it is often impractical to use the forward transform. Since we use discrete coordinates (i.e. integer x and y values), more than one input coordinate may map to the same output coordinate. Even worse, not every output coordinate will be covered.

One solution is to calculate the irregular grid of coordinates obtained by transforming each input coordinate (without discretising). Then, the grid is resampled (using interpolation) at the required output positions.

An easier (and sometimes less computationally intensive) method is to reverse the process. For each output coordinate, the transformation is applied in reverse, to obtain a coordinate in (or outside) the input image. Using interpolation, a value is determined.

This can be done if, neglecting the effect of discretisation, the transformation function is bijective (one-to-one correspondence, and all input and output coordinates are mapped).

Given latex2png equation and latex2png equation, we would now like to find latex2png equation and latex2png equation. First, we calculate the distance latex2png equation from the centre:

latex2png equation

whereafter we can determine latex2png equation and latex2png equation as

latex2png equation
sub-sahara africa
sahara trip IanKnot rainbow