Class HistogramEqualizationProcessor
- Namespace
- SixLabors.ImageSharp.Processing.Processors.Normalization
- Assembly
- SixLabors.ImageSharp.dll
Defines a processor that normalizes the histogram of an image.
public abstract class HistogramEqualizationProcessor : IImageProcessor
- Inheritance
-
HistogramEqualizationProcessor
- Implements
- Derived
- Inherited Members
Constructors
HistogramEqualizationProcessor(int, bool, int)
Initializes a new instance of the HistogramEqualizationProcessor class.
protected HistogramEqualizationProcessor(int luminanceLevels, bool clipHistogram, int clipLimit)
Parameters
luminanceLevels
intThe number of different luminance levels. Typical values are 256 for 8-bit grayscale images or 65536 for 16-bit grayscale images.
clipHistogram
boolIndicates, if histogram bins should be clipped.
clipLimit
intThe histogram clip limit. Histogram bins which exceed this limit, will be capped at this value.
Properties
ClipHistogram
Gets a value indicating whether to clip the histogram bins at a specific value.
public bool ClipHistogram { get; }
Property Value
ClipLimit
Gets the histogram clip limit. Histogram bins which exceed this limit, will be capped at this value.
public int ClipLimit { get; }
Property Value
LuminanceLevels
Gets the number of luminance levels.
public int LuminanceLevels { get; }
Property Value
Methods
CreatePixelSpecificProcessor<TPixel>(Configuration, Image<TPixel>, Rectangle)
Creates a pixel specific IImageProcessor<TPixel> that is capable of executing the processing algorithm on an Image<TPixel>.
public abstract IImageProcessor<TPixel> CreatePixelSpecificProcessor<TPixel>(Configuration configuration, Image<TPixel> source, Rectangle sourceRectangle) where TPixel : unmanaged, IPixel<TPixel>
Parameters
configuration
ConfigurationThe configuration which allows altering default behaviour or extending the library.
source
Image<TPixel>The source image. Cannot be null.
sourceRectangle
RectangleThe Rectangle structure that specifies the portion of the image object to draw.
Returns
- IImageProcessor<TPixel>
Type Parameters
TPixel
The pixel type.
FromOptions(HistogramEqualizationOptions)
Creates the HistogramEqualizationProcessor that implements the algorithm defined by the given HistogramEqualizationOptions.
public static HistogramEqualizationProcessor FromOptions(HistogramEqualizationOptions options)
Parameters
options
HistogramEqualizationOptions