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

    Class GrayscaleFilter

    Converts color images to grayscale and applies autocontrast.

    Index

    Constructors

    • Parameters

      • Optionalsource: DeepPartial<GrayscaleFilter>

      Returns GrayscaleFilter

    Properties

    _type: "GrayscaleFilter"
    blackOutliersFraction: number

    Clip this fraction of the darkest pixels in operations such as autocontrast. Increasing the range of middle gray levels at the expense of the brightest and darkest levels may improve the overall contrast and quality of the result. Sum of blackOutliersFraction and whiteOutliersFraction must be less than 1 but usually good values for the parameters do not exceed 0.05;.

    Default is 0.0

    borderWidthFraction: number

    Ignore this fraction of pixels at the edge of the image when calculating statistics. Pixels at the edge of the image typically have poor statistics. Ignoring them and using only the inner pixels when calculating certain statistics can substantially improve the quality of the result. The value must be less than 0.5 but usually good values are between 0 and 0.15.

    Default is 0.06

    whiteOutliersFraction: number

    Clip this fraction of the brightest pixels in operations such as autocontrast. Increasing the range of middle gray levels at the expense of the brightest and darkest levels may improve the overall contrast and quality of the result. Sum of blackOutliersFraction and whiteOutliersFraction must be less than 1 but usually good values for the parameters do not exceed 0.05;.

    Default is 0.02

    Methods

    • Parameters

      Returns {
          _type?: "GrayscaleFilter";
          blackOutliersFraction?: number;
          borderWidthFraction?: number;
          serialize?: (
              config?: ToJsonConfiguration,
          ) => { readonly _type?: "GrayscaleFilter" | undefined; borderWidthFraction?: number | undefined; blackOutliersFraction?: number | undefined; whiteOutliersFraction?: number | undefined; serialize?: ((config?: ToJsonConfiguration | undefined) => ...) | undefined; };
          whiteOutliersFraction?: number;
      }

      • Optional Readonly_type?: "GrayscaleFilter"
      • OptionalblackOutliersFraction?: number

        Clip this fraction of the darkest pixels in operations such as autocontrast. Increasing the range of middle gray levels at the expense of the brightest and darkest levels may improve the overall contrast and quality of the result. Sum of blackOutliersFraction and whiteOutliersFraction must be less than 1 but usually good values for the parameters do not exceed 0.05;.

        Default is 0.0

      • OptionalborderWidthFraction?: number

        Ignore this fraction of pixels at the edge of the image when calculating statistics. Pixels at the edge of the image typically have poor statistics. Ignoring them and using only the inner pixels when calculating certain statistics can substantially improve the quality of the result. The value must be less than 0.5 but usually good values are between 0 and 0.15.

        Default is 0.06

      • Optionalserialize?: (
            config?: ToJsonConfiguration,
        ) => { readonly _type?: "GrayscaleFilter" | undefined; borderWidthFraction?: number | undefined; blackOutliersFraction?: number | undefined; whiteOutliersFraction?: number | undefined; serialize?: ((config?: ToJsonConfiguration | undefined) => ...) | undefined; }
      • OptionalwhiteOutliersFraction?: number

        Clip this fraction of the brightest pixels in operations such as autocontrast. Increasing the range of middle gray levels at the expense of the brightest and darkest levels may improve the overall contrast and quality of the result. Sum of blackOutliersFraction and whiteOutliersFraction must be less than 1 but usually good values for the parameters do not exceed 0.05;.

        Default is 0.02