Mean filter.

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

Syntax

C#
public sealed class Mean : Convolution

Remarks

The filter performs each pixel value's averaging with its 8 neighbors, which is convolution filter using the mean kernel:

Copy 
1  1  1
1  1  1
1  1  1

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

With the above kernel the convolution filter is just calculates each pixel's value in result image as average of 9 corresponding pixels in the source image.

Note:By default this filter sets ProcessAlpha property to trueTruetruetrue (True in Visual Basic), so the alpha channel of 32 bpp and 64 bpp images is blurred as well.

Sample usage:

CopyC#
// create filter
Mean filter = new Mean( );
// apply the filter
filter.ApplyInPlace( image );

Initial image:

Result image:

Inheritance Hierarchy

See Also