Class AutoLevelProcessor
Applies a luminance histogram equilization to the image.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Processing.Processors.Normalization
Assembly: SixLabors.ImageSharp.dll
Syntax
public class AutoLevelProcessor : HistogramEqualizationProcessor, IImageProcessor
Constructors
| Edit this page View SourceAutoLevelProcessor(int, bool, int, bool)
Initializes a new instance of the AutoLevelProcessor class. It uses the exact minimum and maximum values found in the luminance channel, as the BlackPoint and WhitePoint to linearly stretch the colors (and histogram) of the image.
Declaration
public AutoLevelProcessor(int luminanceLevels, bool clipHistogram, int clipLimit, bool syncChannels)
Parameters
Type | Name | Description |
---|---|---|
int | luminanceLevels | The number of different luminance levels. Typical values are 256 for 8-bit grayscale images or 65536 for 16-bit grayscale images. |
bool | clipHistogram | Indicating whether to clip the histogram bins at a specific value. |
int | clipLimit | The histogram clip limit. Histogram bins which exceed this limit, will be capped at this value. |
bool | syncChannels | Whether to apply a synchronized luminance value to each color channel. |
Properties
| Edit this page View SourceSyncChannels
Gets a value indicating whether to apply a synchronized luminance value to each color channel.
Declaration
public bool SyncChannels { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceCreatePixelSpecificProcessor<TPixel>(Configuration, Image<TPixel>, Rectangle)
Creates a pixel specific IImageProcessor<TPixel> that is capable of executing the processing algorithm on an Image<TPixel>.
Declaration
public override IImageProcessor<TPixel> CreatePixelSpecificProcessor<TPixel>(Configuration configuration, Image<TPixel> source, Rectangle sourceRectangle) where TPixel : unmanaged, IPixel<TPixel>
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | The configuration which allows altering default behaviour or extending the library. |
Image<TPixel> | source | The source image. Cannot be null. |
Rectangle | sourceRectangle | The Rectangle structure that specifies the portion of the image object to draw. |
Returns
Type | Description |
---|---|
IImageProcessor<TPixel> |
Type Parameters
Name | Description |
---|---|
TPixel | The pixel type. |