HALCON Reference Manual 10.0.2
Table of Contents / Regions / Transformations ClassesClassesClasses | | | Operators

clip_region_relclip_region_relclip_region_relClipRegionRelClipRegionRel (Operator)

Name

clip_region_relclip_region_relclip_region_relClipRegionRelClipRegionRel — Clip a region relative to its size.

Signature

clip_region_rel(Region : RegionClipped : Top, Bottom, Left, Right : )

Herror clip_region_rel(const Hobject Region, Hobject* RegionClipped, const Hlong Top, const Hlong Bottom, const Hlong Left, const Hlong Right)

Herror T_clip_region_rel(const Hobject Region, Hobject* RegionClipped, const Htuple Top, const Htuple Bottom, const Htuple Left, const Htuple Right)

Herror clip_region_rel(Hobject Region, Hobject* RegionClipped, const HTuple& Top, const HTuple& Bottom, const HTuple& Left, const HTuple& Right)

HRegion HRegion::ClipRegionRel(const HTuple& Top, const HTuple& Bottom, const HTuple& Left, const HTuple& Right) const

HRegionArray HRegionArray::ClipRegionRel(const HTuple& Top, const HTuple& Bottom, const HTuple& Left, const HTuple& Right) const

void HOperatorSetX.ClipRegionRel(
[in] IHUntypedObjectX* Region, [out] IHUntypedObjectX*RegionClipped, [in] VARIANT Top, [in] VARIANT Bottom, [in] VARIANT Left, [in] VARIANT Right)

IHRegionX* HRegionX.ClipRegionRel(
[in] Hlong Top, [in] Hlong Bottom, [in] Hlong Left, [in] Hlong Right)

static void HOperatorSet.ClipRegionRel(HObject region, out HObject regionClipped, HTuple top, HTuple bottom, HTuple left, HTuple right)

HRegion HRegion.ClipRegionRel(int top, int bottom, int left, int right)

Description

clip_region_relclip_region_relclip_region_relClipRegionRelClipRegionRel clips a region to a rectangle lying within the region. The size of the rectangle is determined by the enclosing rectangle of the region, which is reduced by the values given in the four control parameters. All four parameters must contain numbers larger or equal to zero, and determine by which amount the rectangle is reduced at the top (TopTopTopToptop), at the bottom (BottomBottomBottomBottombottom), at the left (LeftLeftLeftLeftleft), and at the right (RightRightRightRightright). If all parameters are set to zero, the region remains unchanged.

Parallelization

Parameters

RegionRegionRegionRegionregion (input_object)  region(-array) objectHRegionHRegionHRegionXHobject

Regions to be clipped.

RegionClippedRegionClippedRegionClippedRegionClippedregionClipped (output_object)  region(-array) objectHRegionHRegionHRegionXHobject *

Clipped regions.

TopTopTopToptop (input_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Number of rows clipped at the top.

Default value: 1

Suggested values: 0, 1, 2, 3, 4, 5, 7, 10, 20, 30, 50

Typical range of values: 0 ≤ Top Top Top Top top (lin)

Minimum increment: 1

Recommended increment: 1

BottomBottomBottomBottombottom (input_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Number of rows clipped at the bottom.

Default value: 1

Suggested values: 0, 1, 2, 3, 4, 5, 7, 10, 20, 30, 50

Typical range of values: 0 ≤ Bottom Bottom Bottom Bottom bottom (lin)

Minimum increment: 1

Recommended increment: 1

LeftLeftLeftLeftleft (input_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Number of columns clipped at the left.

Default value: 1

Suggested values: 0, 1, 2, 3, 4, 5, 7, 10, 20, 30, 50

Typical range of values: 0 ≤ Left Left Left Left left (lin)

Minimum increment: 1

Recommended increment: 1

RightRightRightRightright (input_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Number of columns clipped at the right.

Default value: 1

Suggested values: 0, 1, 2, 3, 4, 5, 7, 10, 20, 30, 50

Typical range of values: 0 ≤ Right Right Right Right right (lin)

Minimum increment: 1

Recommended increment: 1

Result

clip_region_relclip_region_relclip_region_relClipRegionRelClipRegionRel returns 2 (H_MSG_TRUE) if all parameters are correct. The behavior in case of empty input (no regions given) can be set via set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>) and the behavior in case of an empty input region via set_system('empty_region_result',<Result>)set_system("empty_region_result",<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

thresholdthresholdthresholdThresholdThreshold, connectionconnectionconnectionConnectionConnection, regiongrowingregiongrowingregiongrowingRegiongrowingRegiongrowing, pouringpouringpouringPouringPouring

Possible Successors

select_shapeselect_shapeselect_shapeSelectShapeSelectShape, disp_regiondisp_regiondisp_regionDispRegionDispRegion

Alternatives

smallest_rectangle1smallest_rectangle1smallest_rectangle1SmallestRectangle1SmallestRectangle1, intersectionintersectionintersectionIntersectionIntersection, gen_rectangle1gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1, clip_regionclip_regionclip_regionClipRegionClipRegion

Module

Foundation


Table of Contents / Regions / Transformations ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH