Skip to content

mirror_imageMirrorImageMirrorImagemirror_imagemirror_image🔗

Short description🔗

mirror_imageMirrorImageMirrorImagemirror_imagemirror_image — Mirror an image.

Signature🔗

mirror_image( image Image, out image ImageMirror, string Mode )void MirrorImage( const HObject& Image, HObject* ImageMirror, const HTuple& Mode )static void HOperatorSet.MirrorImage( HObject image, out HObject imageMirror, HTuple mode )def mirror_image( image: HObject, mode: str ) -> HObject

Herror mirror_image( const Hobject Image, Hobject* ImageMirror, const char* Mode )

Herror T_mirror_image( const Hobject Image, Hobject* ImageMirror, const Htuple Mode )

HImage HImage::MirrorImage( const HString& Mode ) const

HImage HImage::MirrorImage( const char* Mode ) const

HImage HImage::MirrorImage( const wchar_t* Mode ) const (Windows only)

HImage HImage.MirrorImage( string mode )

Description🔗

mirror_imageMirrorImage reflects an image Imageimageimage about one of three possible axes. If Modemodemode is set to 'row'"row", it is reflected about the horizontal axis, if Modemodemode is set to 'column'"column", about the vertical axis, and if Modemodemode is set to 'diagonal'"diagonal", about the main diagonal x=y.

Attention🔗

mirror_imageMirrorImage can be executed on OpenCL devices if the input image does not exceed the maximum size of image objects of the selected device. However, execution might be faster on the CPU, especially for the mode 'row'"row".

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🔗

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

Input image.

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

Reflected image.

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

Axis of reflection.

Default: 'row'"row"
List of values: 'column', 'diagonal', 'row'"column", "diagonal", "row"

Example🔗

(HDevelop)

read_image(Image,'monkey')
dev_display (Image)
mirror_image(Image,MirrorImage,'row')
dev_display (MirrorImage)
(C)
read_image(&Image,"monkey")\;
disp_image(Image,WindowHandle)\;
mirror_image(Image,&MirImage,"row")\;
disp_image(MirImage,WindowHandle)\;

Combinations with other operators🔗

Combinations

Alternatives

hom_mat2d_rotateHomMat2dRotate, hom_mat2d_reflectHomMat2dReflect, affine_trans_imageAffineTransImage, rotate_imageRotateImage

See also

rotate_imageRotateImage, hom_mat2d_rotateHomMat2dRotate

Module🔗

Foundation