Class DocumentDetectionScores


  • public class DocumentDetectionScores
    extends java.lang.Object
    The total and partial scores for the detected document contour.
    • Constructor Summary

      Constructors 
      Constructor Description
      DocumentDetectionScores​(double totalScore, double distanceScore, double angleScore, double sizeScore, double aspectRatioScore, double lineCoverageScore, double widthScore, double heightScore)
      Constructs DocumentDetectionScores with the given params.
    • Constructor Detail

      • DocumentDetectionScores

        public DocumentDetectionScores​(double totalScore,
                                       double distanceScore,
                                       double angleScore,
                                       double sizeScore,
                                       double aspectRatioScore,
                                       double lineCoverageScore,
                                       double widthScore,
                                       double heightScore)
        Constructs DocumentDetectionScores with the given params.
        Parameters:
        totalScore - Weighted sum of all partial scores.
        distanceScore - 100 points, if the center of the contour is exactly in the image center.
        angleScore - 100 points, if all angles are 90 degrees.
        sizeScore - 100 points, if the contour occupies at least 50% of the area of the image.
        aspectRatioScore - 100 points, if the aspect ratio matches exactly one of the given aspect ratios.
        lineCoverageScore - Percentage of the document contour that the edge detector was able to find (in LEGACY engine mode only).
        widthScore - Percentage of the image width taken by the detected document.
        heightScore - Percentage of the image height taken by the detected document.
    • Method Detail

      • getTotalScore

        public double getTotalScore()
        Getter for totalScore field. See constructor documentation for more information about the field.
        Returns:
        totalScore
      • getDistanceScore

        public double getDistanceScore()
        Getter for distanceScore field. See constructor documentation for more information about the field.
        Returns:
        distanceScore
      • getAngleScore

        public double getAngleScore()
        Getter for angleScore field. See constructor documentation for more information about the field.
        Returns:
        angleScore
      • getSizeScore

        public double getSizeScore()
        Getter for sizeScore field. See constructor documentation for more information about the field.
        Returns:
        sizeScore
      • getAspectRatioScore

        public double getAspectRatioScore()
        Getter for aspectRatioScore field. See constructor documentation for more information about the field.
        Returns:
        aspectRatioScore
      • getLineCoverageScore

        public double getLineCoverageScore()
        Getter for lineCoverageScore field. See constructor documentation for more information about the field.
        Returns:
        lineCoverageScore
      • getWidthScore

        public double getWidthScore()
        Getter for widthScore field. See constructor documentation for more information about the field.
        Returns:
        widthScore
      • getHeightScore

        public double getHeightScore()
        Getter for heightScore field. See constructor documentation for more information about the field.
        Returns:
        heightScore