capacitor-plugin-scanbot-sdk
    Preparing search index...

    Class CustomBinarizationFilter

    Automatic binarization filter. This filter is a good starting point for most use cases.

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    _type: "CustomBinarizationFilter"
    denoise: number

    Value controlling the amount of noise removal. Value between 0 and 1. Too little noise removal may result in a very noisy image, worsening readability. Too much noise removal may result in the degradation of text, again, worsening readability.

    Default is 0.5

    outputMode: OutputMode

    Output mode of the filter. BINARY will return a black and white image, GRAYSCALE will return an antialiased grayscale image.

    Default is BINARY

    Preset of binarization filter parameters that are found to perform well on different types of documents.

    Default is PRESET_4

    radius: number

    Filter radius. The bigger the radius, the slower the filter and generally the less noise in the result. The radius is used for both shadows removal and the calculation of local statistics in the main body of the filter. Higher radius usually allows to cope better with regions of light text on dark background. All the values larger than 127 are clamped to 127.

    Default is 32

    Methods

    • Parameters

      Returns {
          _type?: "CustomBinarizationFilter";
          denoise?: number;
          outputMode?: OutputMode;
          preset?: BinarizationFilterPreset;
          radius?: number;
          serialize?: (
              config?: ToJsonConfiguration,
          ) => { readonly _type?: "CustomBinarizationFilter" | undefined; outputMode?: OutputMode | undefined; denoise?: number | undefined; radius?: number | undefined; preset?: BinarizationFilterPreset | undefined; serialize?: ((config?: ToJsonConfiguration | undefined) => ...) | undefined; };
      }

      • Optional Readonly_type?: "CustomBinarizationFilter"
      • Optionaldenoise?: number

        Value controlling the amount of noise removal. Value between 0 and 1. Too little noise removal may result in a very noisy image, worsening readability. Too much noise removal may result in the degradation of text, again, worsening readability.

        Default is 0.5

      • OptionaloutputMode?: OutputMode

        Output mode of the filter. BINARY will return a black and white image, GRAYSCALE will return an antialiased grayscale image.

        Default is BINARY

      • Optionalpreset?: BinarizationFilterPreset

        Preset of binarization filter parameters that are found to perform well on different types of documents.

        Default is PRESET_4

      • Optionalradius?: number

        Filter radius. The bigger the radius, the slower the filter and generally the less noise in the result. The radius is used for both shadows removal and the calculation of local statistics in the main body of the filter. Higher radius usually allows to cope better with regions of light text on dark background. All the values larger than 127 are clamped to 127.

        Default is 32

      • Optionalserialize?: (
            config?: ToJsonConfiguration,
        ) => { readonly _type?: "CustomBinarizationFilter" | undefined; outputMode?: OutputMode | undefined; denoise?: number | undefined; radius?: number | undefined; preset?: BinarizationFilterPreset | undefined; serialize?: ((config?: ToJsonConfiguration | undefined) => ...) | undefined; }