Initializes a new instance of the Convolution class.

Namespace:  AForge.Imaging.Filters
Assembly:  AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public Convolution(
	int[,] kernel
)

Parameters

kernel
Type: array< System..::.Int32 ,2>[,](,)[,]
Convolution kernel.

Remarks

Using this constructor (specifying only convolution kernel), division factor will be calculated automatically summing all kernel values. In the case if kernel's sum equals to zero, division factor will be assigned to 1.

Exceptions

ExceptionCondition
System..::.ArgumentExceptionInvalid kernel size is specified. Kernel must be square, its width/height should be odd and should be in the [3, 25] range.

See Also