Click or drag to resize
Accord.NET (logo)

NormalKernel2D Method

2-D Gaussian kernel.

Namespace:  Accord.Math
Assembly:  Accord.Math (in Accord.Math.dll) Version: 3.8.0
Syntax
public static double[,] Kernel2D(
	double sigmaSquared,
	int size
)
Request Example View Source

Parameters

sigmaSquared
Type: SystemDouble
The variance parameter σ² (sigma squared).
size
Type: SystemInt32
Kernel size (should be odd), [3, 101].

Return Value

Type: Double
Returns 2-D Gaussian kernel of specified size.
Exceptions
ExceptionCondition
ArgumentExceptionWrong kernel size.
Remarks

The function calculates 2-D Gaussian kernel, which is array of Gaussian function's values in the [-r, r] range of x,y values, where r=floor(size/2).

See Also