Table of Contents

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

upper Color

Color for upper threshold.

lower Color

Color for lower threshold.

AdaptiveThresholdProcessor(Color, Color, float)

Initializes a new instance of the AdaptiveThresholdProcessor class.

public AdaptiveThresholdProcessor(Color upper, Color lower, float thresholdLimit)

Parameters

upper Color

Color for upper threshold.

lower Color

Color for lower threshold.

thresholdLimit float

Threshold limit.

AdaptiveThresholdProcessor(float)

Initializes a new instance of the AdaptiveThresholdProcessor class.

public AdaptiveThresholdProcessor(float thresholdLimit)

Parameters

thresholdLimit float

Threshold limit.

Properties

Lower

Gets or sets lower color limit for threshold.

public Color Lower { get; set; }

Property Value

Color

ThresholdLimit

Gets or sets the value for threshold limit.

public float ThresholdLimit { get; set; }

Property Value

float

Upper

Gets or sets upper color limit for thresholding.

public Color Upper { get; set; }

Property Value

Color

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

configuration Configuration

The configuration which allows altering default behaviour or extending the library.

source Image<TPixel>

The source image. Cannot be null.

sourceRectangle Rectangle

The Rectangle structure that specifies the portion of the image object to draw.

Returns

IImageProcessor<TPixel>

The IImageProcessor<TPixel>

Type Parameters

TPixel

The pixel type.