You are here: Start » AVL.NET » Function Reference » Region » Region Morphology » AVL.DilateRegion

AVL.DilateRegion

Performs a morphological dilation on a region using a predefined kernel.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void DilateRegion
(
	AvlNet.Region inRegion,
	AvlNet.KernelShape inKernel,
	int inRadiusX,
	int? inRadiusY,
	AvlNet.Region outRegion
)

Parameters

Name Type Range Default Description
inRegionAvlNet.RegionInput region.
inKernelAvlNet.KernelShapeKernel shape (predefined).
inRadiusXint<0, INF>1Nearly half of the kernel's width (2*R+1). Default value: 1.
inRadiusYint?<0, INF>Nearly half of the kernel's height (2*R+1), or same as inRadiusX. Default value: atl::NIL.
outRegionAvlNet.RegionOutput region.

Description

The operation performs a morphological dilation, which is a basic tool used for region expansion. Similarly to other region morphology operations, dilation is conducted using a shape called kernel (or structuring element). The kernel is repeatedly centered at each location within the dimensions of the input region. Then, pixel location L is added to the resulting region if and only if at least one of the input region pixels lies inside the kernel centered at this (L) location.

The input parameter inKernel allows to choose the shape of a kernel, while parameters inRadiusX, inRadiusY allow to determine its dimensions. For instance:

  • inKernel = Ellipse together with inRadiusX = inRadiusY results in expansion performed equally in all directions.
  • Setting inRadiusX to higher value than inRadiusY results in expansion performed more significantly along horizontal axis.

Examples

DilateRegion run with inKernel = Ellipse of dimensions inRadiusX = 5, inRadiusY = 5.

Errors

List of possible exceptions:

Error type Description
DomainError Unsupported kernel in DilateRegion.

Function Overrides

See also