Class BinaryThresholdFilter
A filter to applied the binarization to the image splitting the pixels at the given threshold with Luminance as the color component to be compared to threshold.
Inheritance
Implements
Namespace: IronBarCode
Assembly: IronBarCode.dll
Syntax
public class BinaryThresholdFilter : Object, IImageFilter
Constructors
BinaryThresholdFilter()
Initializes a new instance of the BinaryThresholdFilter class.
Declaration
public BinaryThresholdFilter()
BinaryThresholdFilter(Color, Color, Single)
Initializes a new instance of the BinaryThresholdFilter class with the specified Upper, Lower and Threshold.
Declaration
public BinaryThresholdFilter(Color Upper, Color Lower, float Threshold)
Parameters
Type | Name | Description |
---|---|---|
IronSoftware.Drawing.Color | Upper | Upper (white) color for thresholding. |
IronSoftware.Drawing.Color | Lower | Lower (black) color for thresholding. |
System.Single | Threshold | Threshold limit (0.0-1.0) to consider for binarization. |
BinaryThresholdFilter(Color, Color, Single, CropRectangle)
Initializes a new instance of the BinaryThresholdFilter class with the specified Upper, Lower, Threshold and Rectangle.
Declaration
public BinaryThresholdFilter(Color Upper, Color Lower, float Threshold, CropRectangle Rectangle)
Parameters
Type | Name | Description |
---|---|---|
IronSoftware.Drawing.Color | Upper | Upper (white) color for thresholding. |
IronSoftware.Drawing.Color | Lower | Lower (black) color for thresholding. |
System.Single | Threshold | Threshold limit (0.0-1.0) to consider for binarization. |
IronSoftware.Drawing.CropRectangle | Rectangle | Rectangle region to apply the processor on. |
BinaryThresholdFilter(Single)
Initializes a new instance of the BinaryThresholdFilter class with the specified Threshold.
Declaration
public BinaryThresholdFilter(float Threshold)
Parameters
Type | Name | Description |
---|---|---|
System.Single | Threshold | Threshold limit (0.0-1.0) to consider for binarization. |
Properties
Lower
The color to use for pixels that are below the threshold.
Declaration
public Color Lower { get; set; }
Property Value
Type | Description |
---|---|
IronSoftware.Drawing.Color |
Rectangle
Rectangle region to apply the processor on.
Declaration
public CropRectangle Rectangle { get; set; }
Property Value
Type | Description |
---|---|
IronSoftware.Drawing.CropRectangle |
Threshold
The threshold to apply binarization of the image. Must be between 0 and 1. Default = 0.4.
Declaration
public float Threshold { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Upper
The color to use for pixels that are above the threshold.
Declaration
public Color Upper { get; set; }
Property Value
Type | Description |
---|---|
IronSoftware.Drawing.Color |