Binarization with thresholds matrix.

Idea of the filter is the same as idea of Threshold filter - change pixel value to white, if its intensity is equal or higher than threshold value, or to black otherwise. But instead of using single threshold value for all pixel, the filter uses matrix of threshold values. Processing image is divided to adjacent windows of matrix size each. For pixels binarization inside of each window, corresponding threshold values are used from specified threshold matrix.

The filter accepts 8 bpp grayscale images for processing.

Sample usage:

// create binarization matrix byte[,] matrix = new byte[4, 4] { { 95, 233, 127, 255 }, { 159, 31, 191, 63 }, { 111, 239, 79, 207 }, { 175, 47, 143, 15 } }; // create filter OrderedDithering filter = new OrderedDithering( matrix ); // apply the filter filter.ApplyInPlace( image );

Initial image:

Result image:

Inheritance: BaseInPlacePartialFilter
Beispiel #1
0
 private void SetFilter()
 {
     ImageType = ImageTypes.GrayscaleBT709;
     Af.OrderedDithering newFilter = new Af.OrderedDithering();
     imageFilter = newFilter;
 }