mirror_regionmirror_regionMirrorRegionMirrorRegionmirror_region (Operator)

Name

mirror_regionmirror_regionMirrorRegionMirrorRegionmirror_region — Reflect a region about an axis.

Signature

mirror_region(Region : RegionMirror : Mode, WidthHeight : )

Herror mirror_region(const Hobject Region, Hobject* RegionMirror, const char* Mode, const Hlong WidthHeight)

Herror T_mirror_region(const Hobject Region, Hobject* RegionMirror, const Htuple Mode, const Htuple WidthHeight)

void MirrorRegion(const HObject& Region, HObject* RegionMirror, const HTuple& Mode, const HTuple& WidthHeight)

HRegion HRegion::MirrorRegion(const HString& Mode, Hlong WidthHeight) const

HRegion HRegion::MirrorRegion(const char* Mode, Hlong WidthHeight) const

HRegion HRegion::MirrorRegion(const wchar_t* Mode, Hlong WidthHeight) const   ( Windows only)

static void HOperatorSet.MirrorRegion(HObject region, out HObject regionMirror, HTuple mode, HTuple widthHeight)

HRegion HRegion.MirrorRegion(string mode, int widthHeight)

def mirror_region(region: HObject, mode: str, width_height: int) -> HObject

Description

mirror_regionmirror_regionMirrorRegionMirrorRegionmirror_region reflects a region about one of three possible axes. If ModeModeModemodemode is set to 'row'"row""row""row""row", it is reflected about the horizontal axis, if ModeModeModemodemode is set to 'column'"column""column""column""column", about the vertical axis, and if ModeModeModemodemode is set to 'diagonal'"diagonal""diagonal""diagonal""diagonal", about the main diagonal x=y.

For ModeModeModemodemode = 'row'"row""row""row""row" or 'column'"column""column""column""column" the parameter WidthHeightWidthHeightWidthHeightwidthHeightwidth_height specifies two times the coordinate of the axis of symmetry. Hence, if RegionRegionRegionregionregion has been extracted from an image and should be mirrored in a way such as if it had been extracted from a mirrored version of this image, WidthHeightWidthHeightWidthHeightwidthHeightwidth_height corresponds to one of the dimensions of this image (according to ModeModeModemodemode). If ModeModeModemodemode = 'diagonal'"diagonal""diagonal""diagonal""diagonal", the parameter WidthHeightWidthHeightWidthHeightwidthHeightwidth_height is not used.

Execution Information

Parameters

RegionRegionRegionregionregion (input_object)  region(-array) objectHRegionHObjectHObjectHobject

Region(s) to be reflected.

RegionMirrorRegionMirrorRegionMirrorregionMirrorregion_mirror (output_object)  region(-array) objectHRegionHObjectHObjectHobject *

Reflected region(s).

Number of elements: RegionMirror == Region

ModeModeModemodemode (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Axis of symmetry.

Default: 'row' "row" "row" "row" "row"

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

WidthHeightWidthHeightWidthHeightwidthHeightwidth_height (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Twice the coordinate of the axis of symmetry.

Default: 512

Suggested values: 128, 256, 512, 525, 768, 1024

Value range: 1 ≤ WidthHeight WidthHeight WidthHeight widthHeight width_height ≤ 1024 (lin)

Minimum increment: 1

Recommended increment: 1

Restriction: WidthHeight > 0

Example (C)

read_image(&Image,"monkey");
threshold(Image,&Seg,128.0,255.0);
mirror_region(Seg,&Mirror,"row",512);
disp_region(Mirror,WindowHandle);

Possible Predecessors

thresholdthresholdThresholdThresholdthreshold, connectionconnectionConnectionConnectionconnection, regiongrowingregiongrowingRegiongrowingRegiongrowingregiongrowing, pouringpouringPouringPouringpouring

Possible Successors

select_shapeselect_shapeSelectShapeSelectShapeselect_shape, disp_regiondisp_regionDispRegionDispRegiondisp_region

Alternatives

hom_mat2d_reflecthom_mat2d_reflectHomMat2dReflectHomMat2dReflecthom_mat2d_reflect, affine_trans_regionaffine_trans_regionAffineTransRegionAffineTransRegionaffine_trans_region

See also

zoom_regionzoom_regionZoomRegionZoomRegionzoom_region

Module

Foundation