C# Class Accord.Imaging.Filters.GaussianSharpen

Gaussian sharpen filter.

The filter performs convolution filter using the kernel, which is calculate with the help of AForge.Math.Gaussian.Kernel2D method and then converted to integer sharpening kernel. First of all the integer kernel is calculated from AForge.Math.Gaussian.Kernel2D by dividing all elements by the element with the smallest value. Then the integer kernel is converted to sharpen kernel by negating all kernel's elements (multiplying with -1), but the central kernel's element is calculated as 2 * sum - centralElement, where sum is the sum off elements in the integer kernel before negating.

For the list of supported pixel formats, see the documentation to Convolution filter.

Sample usage:

// create filter with kernel size equal to 11 // and Gaussia sigma value equal to 4.0 GaussianSharpen filter = new GaussianSharpen( 4, 11 ); // apply the filter filter.ApplyInPlace( image );

Initial image:

Result image:

Inheritance: Convolution
Mostra file Open project: accord-net/framework Class Usage Examples

Public Methods

Method Description
GaussianSharpen ( ) : Accord.Math

Initializes a new instance of the GaussianSharpen class.

GaussianSharpen ( double sigma ) : Accord.Math

Initializes a new instance of the GaussianSharpen class.

GaussianSharpen ( double sigma, int size ) : Accord.Math

Initializes a new instance of the GaussianSharpen class.

Private Methods

Method Description
CreateFilter ( ) : void

Method Details

GaussianSharpen() public method

Initializes a new instance of the GaussianSharpen class.
public GaussianSharpen ( ) : Accord.Math
return Accord.Math

GaussianSharpen() public method

Initializes a new instance of the GaussianSharpen class.
public GaussianSharpen ( double sigma ) : Accord.Math
sigma double Gaussian sigma value.
return Accord.Math

GaussianSharpen() public method

Initializes a new instance of the GaussianSharpen class.
public GaussianSharpen ( double sigma, int size ) : Accord.Math
sigma double Gaussian sigma value.
size int Kernel size.
return Accord.Math