Start » Filter Reference » Region » Region Features » RegionNumberOfHoles

RegionNumberOfHoles


Module: FoundationBasic

Computes the number of holes in a region.

Name Type Range Description
Input value
inRegion Region Input region
Input value
inConnectivity RegionConnectivity Region connectivity semantics
Input value
inMinHoleArea Integer 0 - Minimal area of a hole
Input value
inMaxHoleArea Integer* 0 - Maximal area of a hole
Output value
outNumberOfHoles Integer

Description

The operation computes the number of region holes. Holes of a region are those connected areas of pixels not belonging to the region, that do not touch the boundary of the region frame.

Examples

The number of holes in the sample (left) region equals to 3. The holes are presented on the right image.

Complexity Level

This filter is available on Advanced Complexity Level.

See Also

  • FillRegionHoles – Adds pixels to the input region so that it contains no holes.