Back to Adaptive Vision Library website

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

ErodeRegion_AnyKernel


Header: AVL.h
Namespace: avl
Module: FoundationBasic

Performs a morphological erosion on a region using an arbitrary kernel.

Applications: Making the region thinner in a non-symmetrical way or removing small parts of a particular shape.

Syntax

C++
C#
 
void avl::ErodeRegion_AnyKernel
(
	const avl::Region& inRegion,
	const avl::Region& inKernel,
	atl::Optional<const avl::Location&> inKernelAnchor,
	avl::Region& outRegion
)

Parameters

Name Type Default Description
inRegion const Region& Input region
inKernel const Region& Kernel shape (any)
inKernelAnchor Optional<const Location&> NIL Location within inKernel, defining its center
outRegion Region& Output region

Description

The operation is a cousin of the ErodeRegion filter, yet it uses any proper region selected by user as a structuring element. The center of a kernel is assumed to be at location (width/2,height/2). Refer to the ErodeRegion article for further information regarding the morphological erosion itself.

Examples

Errors

List of possible exceptions:

Error type Description
DomainError Empty kernel on input in ErodeRegion_AnyKernel.

See Also

  • ErodeRegion – Performs a morphological erosion on a region using a predefined kernel.