connect_and_holes ( Regions : : : NumConnected, NumHoles )

Number of connection components and holes

The operator connect_and_holes calculates the number of connection components and the number of holes of each region of Regions.

If more than one region is passed the numerical values of the output control parameters NumConnected and NumHoles are each stored in a tuple, the position of a value in the tuple corresponding to the position of the region in the input tuple.


Parameters

Regions (input_object)
region(-array) -> object
Region(s) to be examined.

NumConnected (output_control)
integer(-array) -> integer
Number of connection components of a region.

NumHoles (output_control)
integer(-array) -> integer
Number of holes of a region.


Result

The operator connect_and_holes returns the value 2 (H_MSG_TRUE) if the input is not empty. The behavior in case of empty input (no input regions available) is set via the operator set_system('no_object_result',<Result>). The behavior in case of empty region (the region is the empty set) is set via set_system('empty_region_result',<Result>).


Parallelization Information

connect_and_holes is reentrant and automatically parallelized (on tuple level).


Possible Predecessors

threshold, regiongrowing, connection


Alternatives

euler_number


See also

connection, fill_up, fill_up_shape, union1


Module

Foundation



Copyright © 1996-2008 MVTec Software GmbH