How the Polar Coordinate Tool Works

The Polar Coordinate Transformation tool provides a method of transforming from a Cartesian to a polar representation. Mathematically speaking, these images should be identical. But because images are comprised of discrete pixels, errors are introduced in the interpolation or averaging required in the transformation.

The Polar Coordinate Transformation tool can be used alone for processing images with strong circular symmetry. Combined with the Cognex searching tools, this tool can be used as part of a more complex vision operation such as reading or verification.

Each pixel in the destination image can contain at most four source image pixels, as shown in the figure below. The destination image is the polar projection, or rotation signature, of the source. The Polar Coordinate Transformation tool calculates each polar pixel value by averaging the weighted values of the for corresponding pixels in Cartesian system. Because the pixels in the two images differ in shape, the transformation may result in some distortion.

 

Cartesian source image mapped to polar destination image.

Both the source image and the destination image are represented as ccPelBuffers. By convention, the polar radius is the y dimension and the polar angle is the x dimension of the ccPelBuffer.