Convert grayscale images to black and white using Aforge.Net.

I am new to Aforge.Net and I am looking for a way to convert a grayscale image to black and white. I could not find any support?

I was able to convert the normal image to GrayScale using the Grayscale filter. but I could not find anything about black and white conversion

Can someone give me a hand with him, please.

+5
source share
2 answers

Use the threshold class to convert the image to black and white.

 // create filter
Threshold filter = new Threshold( 100 );
// apply the filter
filter.ApplyInPlace( image );

Details of the threshold class can be found on Aforge .

. , , . . 8 16 - bpp . . 8 bpp 16 bpp, ThresholdValue . 8 bpp [0, 255], 16 bpp [0, 65535].

+9

All Articles