Character level annotation, contains information about the quality of a character in the document.

Constructors

Properties

contrast: number

Estimated contrast of the character, in the range of [0, 1], where 0 means no contrast and 1 means perfect contrast.

fontSize: number

Estimated height of the character in pixels.

ocrability: number

Estimated OCRability of the character, in the range of [0, 1], where 0 means not readable and 1 means perfect readability.

orientation: number

Orientation of the character in degrees counter-clockwise, where 0 means straight, and the value is in the range of [-180, 180].

orientationDeviation: number

Deviation of the character's normalized orientation from dominant orientation of the line, in degrees.

orientationNormalized: number

Same as orientation, but takes into account surrounding characters to smooth the orientation values of characters in a line.

plotCenter: Point

Coordinates of the character's center in the image. The coordinates are in pixels, with (0, 0) being the top-left corner of the image. The rectangle described by the plotCenter, plotWidth, and plotHeight fields serve as a rough estimate of the position of the character in the input image, intended for plotting.

plotHeight: number

Height of the character in pixels.

plotWidth: number

Width of the character in pixels.

Methods

  • Parameters

    Returns {
        contrast?: number;
        fontSize?: number;
        ocrability?: number;
        orientation?: number;
        orientationDeviation?: number;
        orientationNormalized?: number;
        plotCenter?: Point;
        plotHeight?: number;
        plotWidth?: number;
        serialize?(config?): { readonly plotCenter?: Point | undefined; readonly plotWidth?: number | undefined; readonly plotHeight?: number | undefined; readonly ocrability?: number | undefined; ... 5 more ...; serialize?: ((config?: ToJsonConfiguration | undefined) => ...) | undefined; };
    }

    • Optional Readonly contrast?: number

      Estimated contrast of the character, in the range of [0, 1], where 0 means no contrast and 1 means perfect contrast.

    • Optional Readonly fontSize?: number

      Estimated height of the character in pixels.

    • Optional Readonly ocrability?: number

      Estimated OCRability of the character, in the range of [0, 1], where 0 means not readable and 1 means perfect readability.

    • Optional Readonly orientation?: number

      Orientation of the character in degrees counter-clockwise, where 0 means straight, and the value is in the range of [-180, 180].

    • Optional Readonly orientationDeviation?: number

      Deviation of the character's normalized orientation from dominant orientation of the line, in degrees.

    • Optional Readonly orientationNormalized?: number

      Same as orientation, but takes into account surrounding characters to smooth the orientation values of characters in a line.

    • Optional Readonly plotCenter?: Point

      Coordinates of the character's center in the image. The coordinates are in pixels, with (0, 0) being the top-left corner of the image. The rectangle described by the plotCenter, plotWidth, and plotHeight fields serve as a rough estimate of the position of the character in the input image, intended for plotting.

    • Optional Readonly plotHeight?: number

      Height of the character in pixels.

    • Optional Readonly plotWidth?: number

      Width of the character in pixels.

    • serialize?:function
      • Parameters

        Returns { readonly plotCenter?: Point | undefined; readonly plotWidth?: number | undefined; readonly plotHeight?: number | undefined; readonly ocrability?: number | undefined; ... 5 more ...; serialize?: ((config?: ToJsonConfiguration | undefined) => ...) | undefined; }