Contrast adjusting in HSL color space.
Namespace:
AForge.Imaging.FiltersAssembly: AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.3.0 (2.2.3.0)
Syntax
| C# |
|---|
public class ContrastCorrection : BaseInPlacePartialFilter |
Remarks
The filter operates in HSL color space and adjusts pixels contrast value using luminance value of HSL color space, increasing it or decreasing by specified factor. The filters is based on HSLLinear filter, passing work to it after recalculating contrast factor to input/output ranges of the HSLLinear filter.
The filter accepts 24 and 32 bpp color images for processing.
Sample usage:
// create filter ContrastCorrection filter = new ContrastCorrection( 2.0f ); // apply the filter filter.ApplyInPlace( image );
Initial image:
Result image:
Inheritance Hierarchy
System..::.Object
AForge.Imaging.Filters..::.BaseInPlacePartialFilter
AForge.Imaging.Filters..::.ContrastCorrection
AForge.Imaging.Filters..::.BaseInPlacePartialFilter
AForge.Imaging.Filters..::.ContrastCorrection