partition_dynamic ( Region : Partitioned : Distance, Percent : )

Partition a region horizontally into rectangles.

partition_dynamic partitions the input region into rectangles having an average width of Distance. The region is not split exactly into n parts, but rather starting from the calculated splitting point positions having a minimum number of set pixels in the vertical directions are extracted. The search area is at most plus/minus the width of a rectangle. If Percent is passed as 100, this search area is used fully. If it is passed as 0, no search is done.

If the region is smaller than the given size it is output 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) -> object
Region to be partitioned.

Partitioned (output_object)
region(-array) -> object
Partitioned region.

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

Percent (input_control)
real -> real
Maximum shift of the partition point.
Default value: 20
Suggested values: 0, 10, 20, 30, 40, 50, 70, 90, 100
Range of values: 0 <= Percent <= 100


Result

partition_dynamic returns 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 is raised.


Possible Predecessors

threshold__, connection


Alternatives

partition_rectangle


See also

intersection, smallest_rectangle1, shape_trans, clip_region



Copyright © 1996-1997 MVTec Software GmbH