Skip to content

polar_trans_image_invpolar_trans_image_invPolarTransImageInvPolarTransImageInvpolar_trans_image_invpolar_trans_image_inv🔗

Short description🔗

polar_trans_image_invpolar_trans_image_invPolarTransImageInvPolarTransImageInvpolar_trans_image_invpolar_trans_image_inv — Transform an image in polar coordinates back to Cartesian coordinates

Signature🔗

polar_trans_image_inv( image PolarImage, out image XYTransImage, number Row, number Column, angle.rad AngleStart, angle.rad AngleEnd, number RadiusStart, number RadiusEnd, extent.x Width, extent.y Height, string Interpolation )polar_trans_image_inv( PolarImage : XYTransImage : Row, Column, AngleStart, AngleEnd, RadiusStart, RadiusEnd, Width, Height, Interpolation : )void PolarTransImageInv( const HObject& PolarImage, HObject* XYTransImage, const HTuple& Row, const HTuple& Column, const HTuple& AngleStart, const HTuple& AngleEnd, const HTuple& RadiusStart, const HTuple& RadiusEnd, const HTuple& Width, const HTuple& Height, const HTuple& Interpolation )static void HOperatorSet.PolarTransImageInv( HObject polarImage, out HObject XYTransImage, HTuple row, HTuple column, HTuple angleStart, HTuple angleEnd, HTuple radiusStart, HTuple radiusEnd, HTuple width, HTuple height, HTuple interpolation )def polar_trans_image_inv( polar_image: HObject, row: Union[int, float], column: Union[int, float], angle_start: float, angle_end: float, radius_start: Union[int, float], radius_end: Union[int, float], width: int, height: int, interpolation: str ) -> HObject

Herror polar_trans_image_inv( const Hobject PolarImage, Hobject* XYTransImage, double Row, double Column, double AngleStart, double AngleEnd, double RadiusStart, double RadiusEnd, const Hlong Width, const Hlong Height, const char* Interpolation )

Herror T_polar_trans_image_inv( const Hobject PolarImage, Hobject* XYTransImage, const Htuple Row, const Htuple Column, const Htuple AngleStart, const Htuple AngleEnd, const Htuple RadiusStart, const Htuple RadiusEnd, const Htuple Width, const Htuple Height, const Htuple Interpolation )

HImage HImage::PolarTransImageInv( const HTuple& Row, const HTuple& Column, double AngleStart, double AngleEnd, const HTuple& RadiusStart, const HTuple& RadiusEnd, Hlong Width, Hlong Height, const HString& Interpolation ) const

HImage HImage::PolarTransImageInv( double Row, double Column, double AngleStart, double AngleEnd, double RadiusStart, double RadiusEnd, Hlong Width, Hlong Height, const HString& Interpolation ) const

HImage HImage::PolarTransImageInv( double Row, double Column, double AngleStart, double AngleEnd, double RadiusStart, double RadiusEnd, Hlong Width, Hlong Height, const char* Interpolation ) const

HImage HImage::PolarTransImageInv( double Row, double Column, double AngleStart, double AngleEnd, double RadiusStart, double RadiusEnd, Hlong Width, Hlong Height, const wchar_t* Interpolation ) const (Windows only)

HImage HImage.PolarTransImageInv( HTuple row, HTuple column, double angleStart, double angleEnd, HTuple radiusStart, HTuple radiusEnd, int width, int height, string interpolation )

HImage HImage.PolarTransImageInv( double row, double column, double angleStart, double angleEnd, double radiusStart, double radiusEnd, int width, int height, string interpolation )

Description🔗

polar_trans_image_invPolarTransImageInv transforms the polar coordinate representation of an image, stored in PolarImagepolarImagepolar_image, back onto an annular arc in Cartesian coordinates, described by the radii RadiusStartradiusStartradius_start and RadiusEndradiusEndradius_end and the angles AngleStartangleStartangle_start and AngleEndangleEndangle_end with the center point located at (Rowrowrow, Columncolumncolumn). All of these values can be chosen as real numbers. The overall size of the target image will be Widthwidthwidth x Heightheightheight pixels.

The parameter Interpolationinterpolationinterpolation is used to select the interpolation method 'bilinear'"bilinear" or 'nearest_neighbor'"nearest_neighbor". With 'nearest_neighbor'"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'"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'"bilinear" results in images of better quality, but is slower than the mode 'nearest_neighbor'"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 RadiusStartradiusStartradius_start pixels from the specified center and the last row will be mapped onto a circle of radius RadiusEndradiusEndradius_end.

polar_trans_image_invPolarTransImageInv is the inverse function of polar_trans_image_extPolarTransImageExt.

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 Imageimageimage, restricted to the circle around (Rowrowrow, Columncolumncolumn) with radius Radius, as its output image XYTransImageXYTransImagexytrans_image.

polar_trans_image_invPolarTransImageInv can be executed on an OpenCL device. There can be slight differences in the output compared to the execution on the CPU.

Additionally, for images of type byte, int2 or uint2 the system parameter 'int_zooming'"int_zooming" selects between fast calculation in fixed point arithmetics ('int_zooming'"int_zooming" = 'true'"true") and highly accurate calculation in floating point arithmetics ('int_zooming'"int_zooming" = 'false'"false"). Fixed point calculation can lead to minor gray value deviations. In this case, the domain of resulting images can differ as well.

Further Information🔗

For an explanation of the different 2D coordinate systems used in HALCON, see the introduction of chapter Transformations / 2D Transformations.

Execution information🔗

Execution information
  • Supports OpenCL compute devices.

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on tuple level.

  • Automatically parallelized on channel level.

  • Automatically parallelized on internal data level.

Parameters🔗

PolarImagepolarImagepolar_image (input_object) (multichannel-)image(-array) → object (byte* / int2* / uint2* / real*)object (byte* / int2* / uint2* / real*)HObject (byte* / int2* / uint2* / real*)HImage (byte* / int2* / uint2* / real*)HObject (byte* / int2* / uint2* / real*)Hobject (byte* / int2* / uint2* / real*) *allowed for compute devices

Input image.

XYTransImageXYTransImagexytrans_image (output_object) (multichannel-)image(-array) → object (byte / int2 / uint2 / real)object (byte / int2 / uint2 / real)HObject (byte / int2 / uint2 / real)HImage (byte / int2 / uint2 / real)HObject (byte / int2 / uint2 / real)Hobject * (byte / int2 / uint2 / real)

Output image.

Rowrowrow (input_control) number → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

Row coordinate of the center of the arc.

Default: 256256
Suggested values: 0, 16, 32, 64, 128, 240, 256, 480, 5120, 16, 32, 64, 128, 240, 256, 480, 512
Value range: 0 ≤ Row ≤ 32767

Columncolumncolumn (input_control) number → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

Column coordinate of the center of the arc.

Default: 256256
Suggested values: 0, 16, 32, 64, 128, 256, 320, 512, 6400, 16, 32, 64, 128, 256, 320, 512, 640
Value range: 0 ≤ Column ≤ 32767

AngleStartangleStartangle_start (input_control) angle.rad → (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Angle of the ray to map the first column of the input image to.

Default: 0.00.0
Suggested values: 0.0, 0.78539816, 1.57079632, 3.141592654, 6.28318530.0, 0.78539816, 1.57079632, 3.141592654, 6.2831853

AngleEndangleEndangle_end (input_control) angle.rad → (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Angle of the ray to map the last column of the input image to.

Default: 6.28318536.2831853
Suggested values: 0.0, 0.78539816, 1.57079632, 3.141592654, 6.28318530.0, 0.78539816, 1.57079632, 3.141592654, 6.2831853

RadiusStartradiusStartradius_start (input_control) number → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

Radius of the circle to map the first row of the input image to.

Default: 00
Suggested values: 0, 16, 32, 64, 100, 128, 256, 5120, 16, 32, 64, 100, 128, 256, 512
Value range: 0 ≤ RadiusStart

RadiusEndradiusEndradius_end (input_control) number → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

Radius of the circle to map the last row of the input image to.

Default: 100100
Suggested values: 0, 16, 32, 64, 100, 128, 256, 5120, 16, 32, 64, 100, 128, 256, 512
Value range: 0 ≤ RadiusEnd

Widthwidthwidth (input_control) extent.x → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Width of the output image.

Default: 512512
Suggested values: 256, 320, 512, 640, 800, 1024256, 320, 512, 640, 800, 1024
Value range: 0 ≤ Width ≤ 32767

Heightheightheight (input_control) extent.y → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Height of the output image.

Default: 512512
Suggested values: 240, 256, 480, 512, 600, 1024240, 256, 480, 512, 600, 1024
Value range: 0 ≤ Height ≤ 32767

Interpolationinterpolationinterpolation (input_control) string → (string)(string)HTuple (HString)HTuple (string)strHtuple (char*)

Interpolation method for the transformation.

Default: 'nearest_neighbor'"nearest_neighbor"
List of values: 'bilinear', 'nearest_neighbor'"bilinear", "nearest_neighbor"

Combinations with other operators🔗

Combinations

See also

polar_trans_image_extPolarTransImageExt, polar_trans_regionPolarTransRegion, polar_trans_region_invPolarTransRegionInv, polar_trans_contour_xldPolarTransContourXld, polar_trans_contour_xld_invPolarTransContourXldInv

Module🔗

Foundation