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

Partition a region into rectangles of equal size.

::partition_rectangle partitions the input region into rectangles having an extent of Width times Height. The region is always split into rectangles of equal size. Therefore, Width and Height 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 paramters.


Parameters

Region (input_object)
region(-array) -> Hobject: HRegion(Array)
Region to be partitioned.

Partitioned (output_object)
region(-array) -> Hobject * : HRegion(Array)
Partitioned region.

Width (input_control)
real -> HTuple.double
Width of the individual rectangles.

Height (input_control)
real -> HTuple.double
Height of the individual rectangles.


Result

::partition_rectangle returns 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>), the behavior in case of an empty input region via ::set_system('empty_region_result',<Result>), and the behavior in case of an empty result region via ::set_system('store_empty_region',<true/false>). If necessary, an exception handling is raised.


Possible Predecessors

::threshold, ::connection


Alternatives

::partition_dynamic


See also

::intersection, ::smallest_rectangle1, ::shape_trans, ::clip_region


Module

Region processing



Copyright © 1996-2002 MVTec Software GmbH