polar_trans_image_inv ( PolarImage : XYTransImage : Row, Column, AngleStart, AngleEnd, RadiusStart, RadiusEnd, Width, Height, Interpolation : )

Transform an image in polar coordinates back to cartesian coordinates

polar_trans_image_inv transforms the polar coordinate representation of an image, stored in PolarImage, back onto an annular arc in cartesian coordinates, described by the radii RadiusStart and RadiusEnd and the angles AngleStart and AngleEnd with the center point located at (Row, Column). All of these values can be chosen as real numbers. The overall size of the target image will be Width x Height pixels.

The parameter Interpolation is used to select the interpolation method 'bilinear' or 'nearest_neighbor'. With 'nearest_neighbor', the gray value of a pixel in the output image is determined by the gray value of the closest pixel in the input image. With 'bilinear', the gray value of a pixel in the output image is determined by bilinear interpolation of the gray values of the four closest pixels in the input image. The mode 'bilinear' results in images of better quality, but is slower than the mode 'nearest_neighbor'.

The angles and radii are inclusive, which means that the first row of the input image will be mapped onto a circle with a distance of RadiusStart pixels from the specified center and the last row will be mapped onto a circle of radius RadiusEnd.

polar_trans_image_inv is the inverse function of polar_trans_image_ext.

The call sequence:

polar_trans_image_ext(Image, PolarImage, Row, Column, rad(360), 0, 0, 
                      Radius, Width, Height, Interpolation)
polar_trans_image_inv(PolarImage, XYTransImage, Row, Column, rad(360), 0, 0, 
                      Radius, Width, Height, Interpolation)

returns the image Image, restricted to the circle around (Row, Column) with radius Radius, as its output image XYTransImage.


Parameters

PolarImage (input_object)
(multichannel-)image(-array) -> object : byte / int2 / uint2
Input image.

XYTransImage (output_object)
(multichannel-)image(-array) -> object : byte / int2 / uint2
Output image.

Row (input_control)
number -> real / integer
Row coordinate of the center of the arc.
Default value: 256
Suggested values: 0, 16, 32, 64, 128, 240, 256, 480, 512
Typical range of values: 0 <= Row <= 32767

Column (input_control)
number -> real / integer
Column coordinate of the center of the arc.
Default value: 256
Suggested values: 0, 16, 32, 64, 128, 256, 320, 512, 640
Typical range of values: 0 <= Column <= 32767

AngleStart (input_control)
number -> real
Angle of the ray to map the first column of the input image to.
Default value: 0.0
Suggested values: 0.0, 0.78539816, 1.57079632, 3.141592654, 6.2831853

AngleEnd (input_control)
number -> real
Angle of the ray to map the last column of the input image to.
Default value: 6.2831853
Suggested values: 0.0, 0.78539816, 1.57079632, 3.141592654, 6.2831853

RadiusStart (input_control)
number -> real / integer
Radius of the circle to map the first row of the input image to.
Default value: 0
Suggested values: 0, 16, 32, 64, 100, 128, 256, 512
Typical range of values: 0 <= RadiusStart

RadiusEnd (input_control)
number -> real / integer
Radius of the circle to map the last row of the input image to.
Default value: 100
Suggested values: 0, 16, 32, 64, 100, 128, 256, 512
Typical range of values: 0 <= RadiusEnd

Width (input_control)
number -> integer
Width of the output image.
Default value: 512
Suggested values: 256, 320, 512, 640, 800, 1024
Typical range of values: 0 <= Width <= 32767

Height (input_control)
number -> integer
Height of the output image.
Default value: 512
Suggested values: 240, 256, 480, 512, 600, 1024
Typical range of values: 0 <= Height <= 32767

Interpolation (input_control)
string -> string
Interpolation method for the transformation.
Default value: 'nearest_neighbor'
List of values: 'nearest_neighbor', 'bilinear'


Parallelization Information

polar_trans_image_inv is reentrant and automatically parallelized (on tuple level, channel level).


See also

polar_trans_image, polar_trans_image_ext


Module

Foundation



Copyright © 1996-2008 MVTec Software GmbH