The total and partial scores for the detected document contour.

Hierarchy (view full)

Constructors

Properties

angleScore: number

100 points, if all angles are 90 degrees.

aspectRatioScore: number

100 points, if the aspect ratio matches exactly one of the given aspect ratios.

distanceScore: number

100 points, if the center of the contour is exactly in the image center.

heightScore: number

Percentage of the image height taken by the detected document.

lineCoverageScore: number

Percentage of the document contour that the edge detector was able to find (in LEGACY engine mode only).

sizeScore: number

100 points, if the contour occupies at least 50% of the area of the image.

totalScore: number

Weighted sum of all partial scores.

widthScore: number

Percentage of the image width taken by the detected document.

Methods

  • Parameters

    Returns {
        angleScore?: number;
        aspectRatioScore?: number;
        distanceScore?: number;
        heightScore?: number;
        lineCoverageScore?: number;
        sizeScore?: number;
        totalScore?: number;
        widthScore?: number;
        serialize?: any;
    }

    • Optional Readonly angleScore?: number

      100 points, if all angles are 90 degrees.

    • Optional Readonly aspectRatioScore?: number

      100 points, if the aspect ratio matches exactly one of the given aspect ratios.

    • Optional Readonly distanceScore?: number

      100 points, if the center of the contour is exactly in the image center.

    • Optional Readonly heightScore?: number

      Percentage of the image height taken by the detected document.

    • Optional Readonly lineCoverageScore?: number

      Percentage of the document contour that the edge detector was able to find (in LEGACY engine mode only).

    • Optional Readonly sizeScore?: number

      100 points, if the contour occupies at least 50% of the area of the image.

    • Optional Readonly totalScore?: number

      Weighted sum of all partial scores.

    • Optional Readonly widthScore?: number

      Percentage of the image width taken by the detected document.