![]()
Linear color correction filtersAForge.NET framework provides number of filters, which perform linear correction of Source image RGB levels linear correction // create filter LevelsLinear filter = new LevelsLinear( ); // set ranges filter.InRed = new IntRange( 30, 230 ); filter.InGreen = new IntRange( 50, 240 ); filter.InBlue = new IntRange( 10, 210 ); // apply the filter filter.ApplyInPlace( Image );
HSL levels linear correction // create filter HSLLinear filter = new HSLLinear( ); // configure the filter filter.InLuminance = new DoubleRange( 0, 0.85 ); filter.OutSaturation = new DoubleRange( 0.25, 1 ); // apply the filter filter.ApplyInPlace( image );
YCbCr levels linear correction // create filter YCbCrLinear filter = new YCbCrLinear( ); // configure the filter filter.InCb = new DoubleRange( -0.276, 0.163 ); filter.InCr = new DoubleRange( -0.202, 0.500 ); // apply the filter filter.ApplyInPlace( image );
Brightness correction // create filter BrightnessCorrection filter = new BrightnessCorrection( -50 ); // apply the filter filter.ApplyInPlace( image );
Contrast correction // create filter ContrastCorrection filter = new ContrastCorrection( 15 ); // apply the filter filter.ApplyInPlace( image );
Saturation correction // create filter SaturationCorrection filter = new SaturationCorrection( -0.5 ); // apply the filter filter.ApplyInPlace( image );
|
|||||||