Class ParametricFilter
- Namespace
- ScanbotSDK.MAUI
- Assembly
- ScanbotSDK.Shared.dll
Base class for all parametric filters.
[JsonPolymorphic(TypeDiscriminatorPropertyName = "_type")]
[JsonDerivedType(typeof(ScanbotBinarizationFilter), "ScanbotBinarizationFilter")]
[JsonDerivedType(typeof(CustomBinarizationFilter), "CustomBinarizationFilter")]
[JsonDerivedType(typeof(ColorDocumentFilter), "ColorDocumentFilter")]
[JsonDerivedType(typeof(BrightnessFilter), "BrightnessFilter")]
[JsonDerivedType(typeof(ContrastFilter), "ContrastFilter")]
[JsonDerivedType(typeof(GrayscaleFilter), "GrayscaleFilter")]
[JsonDerivedType(typeof(LegacyFilter), "LegacyFilter")]
[JsonDerivedType(typeof(WhiteBlackPointFilter), "WhiteBlackPointFilter")]
public class ParametricFilter
- Inheritance
-
ParametricFilter
- Derived
- Inherited Members
Properties
ColorDocument
public static ColorDocumentFilter ColorDocument { get; }
Property Value
LegacyFilter
Returns the value of Legacy Image Filter.
public ImageFilter? LegacyFilter { get; set; }
Property Value
Methods
Brightness(double)
public static BrightnessFilter Brightness(double brightness)
Parameters
brightness
double
Returns
Contrast(double)
public static ContrastFilter Contrast(double contrast)
Parameters
contrast
double
Returns
CustomBinarization(OutputMode, double, int, BinarizationFilterPreset)
public static CustomBinarizationFilter CustomBinarization(OutputMode outputMode, double denoise, int radius, BinarizationFilterPreset preset)
Parameters
outputMode
OutputModedenoise
doubleradius
intpreset
BinarizationFilterPreset
Returns
FromLegacyFilter(ImageFilter)
Only used for the Legacy Filters
public static ParametricFilter FromLegacyFilter(ImageFilter legacyFilter)
Parameters
legacyFilter
ImageFilterLegacy filter
Returns
- ParametricFilter
Common ParametricFilter object
GetSelectedFilter<T>(ParametricFilter)
public static T GetSelectedFilter<T>(ParametricFilter filter) where T : ParametricFilter
Parameters
filter
ParametricFilter
Returns
- T
Type Parameters
T
Grayscale(double, double, double)
public static GrayscaleFilter Grayscale(double borderWidthFraction, double blackOutliersFraction, double whiteOutliersFraction)
Parameters
Returns
ScanbotBinarization(OutputMode)
public static ScanbotBinarizationFilter ScanbotBinarization(OutputMode outputMode)
Parameters
outputMode
OutputMode
Returns
ToNative(ParametricFilter)
public static ParametricFilter ToNative(ParametricFilter filter)
Parameters
filter
ParametricFilter
Returns
WhiteBlackPoint(double, double)
public static WhiteBlackPointFilter WhiteBlackPoint(double blackPoint, double whitePoint)
Parameters
Returns
Operators
implicit operator ParametricFilter(ImageFilter)
public static implicit operator ParametricFilter(ImageFilter filterType)
Parameters
filterType
ImageFilter