ConvolutionKernel

References
public sealed class ConvolutionKernel
Represents a custom convolution kernel.

Properties

Height

#
public int Height { get; }
Gets the full height of the kernel.

Inverse

#
public float Inverse { get; }
Gets the inverse of all cells in the kernel.

RadiusX

#
public int RadiusX { get; }
Gets the radius in the X direction. This is identical to the (Width - 1) / 2.

RadiusY

#
public int RadiusY { get; }
Gets the radius in the Y direction. This is identical to the (Height - 1) / 2.

Total

#
public float Total { get; }
Gets the total weight of all cells in the kernel.

Width

#
public int Width { get; }
Gets the full width of the kernel.

Indexers

this[]

#
public float this[int x, int y] { get; }
Gets the weight of the specified cell.
x (int)X index, must be in the range [0, Width).
y (int)Y index, must be in the range [0, Height).

Methods

Create

#
public static ConvolutionKernel Create(float[][] kernel)
Create a convolution kernel from a nested array.
kernel (float[][])Array containing an odd number of nested array, each containing an odd number of values.
Matrix.

Create

#
public static ConvolutionKernel Create(int width, int height, params float[] values)
Create a convolution kernel from a collection of values.
width (int)Width of kernel (must be a positive, odd number).
height (int)Height of kernel (must be a positive, odd number).
values (params float[])Collection of cell values, starting from upper left, row by row.
Convolution kernel.

CreateBlockBlur

#
public static ConvolutionKernel CreateBlockBlur(int radiusX, int radiusY)
Create a block blur kernel.
radiusX (int)X radius.
radiusY (int)Y radius.
Blur kernel.

CreateConeBlur

#
public static ConvolutionKernel CreateConeBlur(int radius)
Create a conical blur kernel.
radius (int)Radius.
Blur kernel.

CreateDiscBlur

#
public static ConvolutionKernel CreateDiscBlur(int radius)
Create a circular blur kernel.
radius (int)Radius.
Blur kernel.

CreateEdgeDetectOrthogonal

#
public static ConvolutionKernel CreateEdgeDetectOrthogonal()
Creates a standard 3x3 edge detection kernel for horizontal and vertical edges.
Convolution kernel.

CreateEdgeDetectRadial

#
public static ConvolutionKernel CreateEdgeDetectRadial()
Creates a standard 3x3 edge detection kernel for all edges.
Convolution kernel.

CreateEmboss

#
public static ConvolutionKernel CreateEmboss()
Creates a standard 3x3 embossing kernel.
Convolution kernel.

CreateGaussianBlur

#
public static ConvolutionKernel CreateGaussianBlur()
Create a standard 3x3 gaussian blur kernel.
Blur kernel.

CreateIdentity

#
public static ConvolutionKernel CreateIdentity()
Create the 3x3 identity kernel.

CreateLaplacian

#
public static ConvolutionKernel CreateLaplacian()
Create a standard 3x3 Laplacian kernel.
Convolution kernel.

CreateSharpen

#
public static ConvolutionKernel CreateSharpen()
Creates a standard 3x3 sharpen kernel.
Convolution kernel.

CreateSobelHorizontal

#
public static ConvolutionKernel CreateSobelHorizontal(SobelOperator operator)
Create a sobel edge operator kernel.
operator (SobelOperator)Sobel operator.
Sobel kernel.

CreateSobelVertical

#
public static ConvolutionKernel CreateSobelVertical(SobelOperator operator)
Create a sobel edge operator kernel.
operator (SobelOperator)Sobel operator.
Sobel kernel.

CreateUnsharp

#
public static ConvolutionKernel CreateUnsharp()
Creates a standard 5x5 unsharp kernel.
Convolution kernel.

Normalise

#
public ConvolutionKernel Normalise()
Normalise this kernel.
Normalised kernel.

ToString

#
public override string ToString()
Returns a string that represents the current object.
A string that represents the current object.
Object.ToString