Back to Adaptive Vision Library website

You are here: Start » Function Reference » Region » Region Morphology » PruneRegion

PruneRegion


Header: AVL.h
Namespace: avl
Module: FoundationBasic

Removes one pixel wide branches from a region.

Syntax

C++
C#
 
void avl::PruneRegion
(
	const avl::Region& inRegion,
	const int inMaxLength,
	avl::Region& outRegion
)

Parameters

Name Type Range Default Description
inRegion const Region& Input region
inMaxLength const int 0 - 3 Maximal length of a branch of the input region to be pruned
outRegion Region& Output region

Description

The operation removes all branches with length at most inMaxLength from the input region. The branches being removed have to be at most one pixel wide, so the filter should be invoked on thinned regions such as the results of SkeletonizeRegion operation only.

Examples

PruneRegion run on a sample one pixel wide region with inMaxLength = 58.

See Also