Skip to content

polar_trans_imagepolar_trans_imagePolarTransImagePolarTransImagepolar_trans_imagepolar_trans_image🔗

Short description🔗

polar_trans_imagepolar_trans_imagePolarTransImagePolarTransImagepolar_trans_imagepolar_trans_image — Transform an image to polar coordinates

Warning🔗

polar_trans_imagePolarTransImage is obsolete and is only provided for reasons of backward compatibility. New applications should use the operator polar_trans_image_extPolarTransImageExt instead.

Signature🔗

polar_trans_image( image ImageXY, out image ImagePolar, point.y Row, point.x Column, extent.x Width, extent.y Height )polar_trans_image( ImageXY : ImagePolar : Row, Column, Width, Height : )void PolarTransImage( const HObject& ImageXY, HObject* ImagePolar, const HTuple& Row, const HTuple& Column, const HTuple& Width, const HTuple& Height )static void HOperatorSet.PolarTransImage( HObject imageXY, out HObject imagePolar, HTuple row, HTuple column, HTuple width, HTuple height )def polar_trans_image( image_xy: HObject, row: int, column: int, width: int, height: int ) -> HObject

Herror polar_trans_image( const Hobject ImageXY, Hobject* ImagePolar, const Hlong Row, const Hlong Column, const Hlong Width, const Hlong Height )

Herror T_polar_trans_image( const Hobject ImageXY, Hobject* ImagePolar, const Htuple Row, const Htuple Column, const Htuple Width, const Htuple Height )

HImage HImage::PolarTransImage( Hlong Row, Hlong Column, Hlong Width, Hlong Height ) const

HImage HImage.PolarTransImage( int row, int column, int width, int height )

Description🔗

polar_trans_imagePolarTransImage transforms an image in Cartesian coordinates to an image in polar coordinates. The size of the resulting image is selected with Widthwidthwidth and Heightheightheight. Widthwidthwidth determines the angular resolution, while Heightheightheight determines the resolution of the radius. Rowrowrow and Columncolumncolumn determine the center of the polar coordinate system in the original image ImageXYimageXYimage_xy. This point is mapped to the upper row of ImagePolarimagePolarimage_polar.

A point (x’,y’) in the result image corresponds to the point (x,y) in the original image in the following manner:

\[\begin{eqnarray*} x & = & y' * \cos(2 \pi (x'/result\_width)) + \textrm{Column} \\ y & = & y' * \sin(2 \pi (x'/result\_width)) + \textrm{Row} . \end{eqnarray*}\]

polar_trans_imagePolarTransImage can be executed on an OpenCL device if the input image does not exceed the maximum size of image objects of the selected device. Due to numerical reasons, there can be slight differences in the output compared to the execution on the CPU.

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.

Parameters🔗

ImageXYimageXYimage_xy (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 in Cartesian coordinates.

ImagePolarimagePolarimage_polar (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)

Result image in polar coordinates.

Rowrowrow (input_control) point.y → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Row coordinate of the center of the coordinate system.

Default: 100100
Suggested values: 0, 10, 100, 2000, 10, 100, 200
Value range: 0 ≤ Row ≤ 512
Minimum increment: 1
Recommended increment: 1

Columncolumncolumn (input_control) point.x → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Column coordinate of the center of the coordinate system.

Default: 100100
Suggested values: 0, 10, 100, 2000, 10, 100, 200
Value range: 0 ≤ Column ≤ 512
Minimum increment: 1
Recommended increment: 1

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

Width of the result image.

Default: 314314
Suggested values: 100, 200, 157, 314, 512100, 200, 157, 314, 512
Value range: 2 ≤ Width ≤ 512
Minimum increment: 1
Recommended increment: 10

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

Height of the result image.

Default: 200200
Suggested values: 100, 128, 256, 512100, 128, 256, 512
Value range: 2 ≤ Height ≤ 512
Minimum increment: 1
Recommended increment: 10

Example🔗

(HDevelop)


read_image(Image,'monkey')
dev_display (Image)
polar_trans_image(Image,PolarImage,100,100,314,200)
dev_display (PolarImage)
(C)
read_image(&Image,"monkey")\;
disp_image(Image,WindowHandle)\;
polar_trans_image(Image,&PolarImage,100,100,314,200)\;
disp_image(PolarImage,WindowHandle)\;

Module🔗

Foundation