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

partition_rectanglepartition_rectanglepartition_rectanglePartitionRectanglePartitionRectangle (Operator)

Name

partition_rectanglepartition_rectanglepartition_rectanglePartitionRectanglePartitionRectangle — Partition a region into rectangles of equal size.

Signature

partition_rectangle(Region : Partitioned : Width, Height : )

Herror partition_rectangle(const Hobject Region, Hobject* Partitioned, double Width, double Height)

Herror T_partition_rectangle(const Hobject Region, Hobject* Partitioned, const Htuple Width, const Htuple Height)

Herror partition_rectangle(Hobject Region, Hobject* Partitioned, const HTuple& Width, const HTuple& Height)

HRegion HRegion::PartitionRectangle(const HTuple& Width, const HTuple& Height) const

HRegionArray HRegionArray::PartitionRectangle(const HTuple& Width, const HTuple& Height) const

void HOperatorSetX.PartitionRectangle(
[in] IHUntypedObjectX* Region, [out] IHUntypedObjectX*Partitioned, [in] VARIANT Width, [in] VARIANT Height)

IHRegionX* HRegionX.PartitionRectangle(
[in] double Width, [in] double Height)

static void HOperatorSet.PartitionRectangle(HObject region, out HObject partitioned, HTuple width, HTuple height)

HRegion HRegion.PartitionRectangle(double width, double height)

Description

partition_rectanglepartition_rectanglepartition_rectanglePartitionRectanglePartitionRectangle partitions the input region into rectangles having an extent of WidthWidthWidthWidthwidth times HeightHeightHeightHeightheight. The region is always split into rectangles of equal size. Therefore, WidthWidthWidthWidthwidth and HeightHeightHeightHeightheight are adapted to the actual size of the region. If the region is smaller than the given size its output remains unchanged. A partition is only done if the size of the region is at least 1.5 times the size of the rectangle given by the parameters.

Parallelization

Parameters

RegionRegionRegionRegionregion (input_object)  region(-array) objectHRegionHRegionHRegionXHobject

Region to be partitioned.

PartitionedPartitionedPartitionedPartitionedpartitioned (output_object)  region(-array) objectHRegionHRegionHRegionXHobject *

Partitioned region.

WidthWidthWidthWidthwidth (input_control)  real HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Width of the individual rectangles.

HeightHeightHeightHeightheight (input_control)  real HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

Height of the individual rectangles.

Result

partition_rectanglepartition_rectanglepartition_rectanglePartitionRectanglePartitionRectangle 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>), 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>), and the behavior in case of an empty result region via set_system('store_empty_region',<true/false>)set_system("store_empty_region",<true/false>)set_system("store_empty_region",<true/false>)SetSystem("store_empty_region",<true/false>)SetSystem("store_empty_region",<true/false>). If necessary, an exception is raised.

Possible Predecessors

thresholdthresholdthresholdThresholdThreshold, connectionconnectionconnectionConnectionConnection

Alternatives

partition_dynamicpartition_dynamicpartition_dynamicPartitionDynamicPartitionDynamic

See also

intersectionintersectionintersectionIntersectionIntersection, smallest_rectangle1smallest_rectangle1smallest_rectangle1SmallestRectangle1SmallestRectangle1, shape_transshape_transshape_transShapeTransShapeTrans, 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