Class AdaptiveThresholdProcessor
- Namespace
- SixLabors.ImageSharp.Processing.Processors.Binarization
- Assembly
- SixLabors.ImageSharp.dll
Performs Bradley Adaptive Threshold filter against an image.
public class AdaptiveThresholdProcessor : IImageProcessor
- Inheritance
-
AdaptiveThresholdProcessor
- Implements
- Inherited Members
Remarks
Implements "Adaptive Thresholding Using the Integral Image", see paper: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.420.7883&rep=rep1&type=pdf
Constructors
AdaptiveThresholdProcessor()
Initializes a new instance of the AdaptiveThresholdProcessor class.
public AdaptiveThresholdProcessor()
AdaptiveThresholdProcessor(Color, Color)
Initializes a new instance of the AdaptiveThresholdProcessor class.
public AdaptiveThresholdProcessor(Color upper, Color lower)
Parameters
AdaptiveThresholdProcessor(Color, Color, float)
Initializes a new instance of the AdaptiveThresholdProcessor class.
public AdaptiveThresholdProcessor(Color upper, Color lower, float thresholdLimit)
Parameters
upperColorColor for upper threshold.
lowerColorColor for lower threshold.
thresholdLimitfloatThreshold limit.
AdaptiveThresholdProcessor(float)
Initializes a new instance of the AdaptiveThresholdProcessor class.
public AdaptiveThresholdProcessor(float thresholdLimit)
Parameters
thresholdLimitfloatThreshold limit.
Properties
Lower
Gets or sets lower color limit for threshold.
public Color Lower { get; set; }
Property Value
ThresholdLimit
Gets or sets the value for threshold limit.
public float ThresholdLimit { get; set; }
Property Value
Upper
Gets or sets upper color limit for thresholding.
public Color Upper { get; set; }
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 IImageProcessor<TPixel> CreatePixelSpecificProcessor<TPixel>(Configuration configuration, Image<TPixel> source, Rectangle sourceRectangle) where TPixel : unmanaged, IPixel<TPixel>
Parameters
configurationConfigurationThe configuration which allows altering default behaviour or extending the library.
sourceImage<TPixel>The source image. Cannot be null.
sourceRectangleRectangleThe Rectangle structure that specifies the portion of the image object to draw.
Returns
- IImageProcessor<TPixel>
Type Parameters
TPixelThe pixel type.