Table of Contents

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

ColorDocumentFilter

LegacyFilter

Returns the value of Legacy Image Filter.

public ImageFilter? LegacyFilter { get; set; }

Property Value

ImageFilter?

Methods

Brightness(double)

public static BrightnessFilter Brightness(double brightness)

Parameters

brightness double

Returns

BrightnessFilter

Contrast(double)

public static ContrastFilter Contrast(double contrast)

Parameters

contrast double

Returns

ContrastFilter

CustomBinarization(OutputMode, double, int, BinarizationFilterPreset)

public static CustomBinarizationFilter CustomBinarization(OutputMode outputMode, double denoise, int radius, BinarizationFilterPreset preset)

Parameters

outputMode OutputMode
denoise double
radius int
preset BinarizationFilterPreset

Returns

CustomBinarizationFilter

FromLegacyFilter(ImageFilter)

Only used for the Legacy Filters

public static ParametricFilter FromLegacyFilter(ImageFilter legacyFilter)

Parameters

legacyFilter ImageFilter

Legacy 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

borderWidthFraction double
blackOutliersFraction double
whiteOutliersFraction double

Returns

GrayscaleFilter

ScanbotBinarization(OutputMode)

public static ScanbotBinarizationFilter ScanbotBinarization(OutputMode outputMode)

Parameters

outputMode OutputMode

Returns

ScanbotBinarizationFilter

ToNative(ParametricFilter)

public static ParametricFilter ToNative(ParametricFilter filter)

Parameters

filter ParametricFilter

Returns

ParametricFilter

WhiteBlackPoint(double, double)

public static WhiteBlackPointFilter WhiteBlackPoint(double blackPoint, double whitePoint)

Parameters

blackPoint double
whitePoint double

Returns

WhiteBlackPointFilter

Operators

implicit operator ParametricFilter(ImageFilter)

public static implicit operator ParametricFilter(ImageFilter filterType)

Parameters

filterType ImageFilter

Returns

ParametricFilter