Package io.scanbot.sdk.documentscanner
Class DocumentDetectionScores
java.lang.Object
io.scanbot.sdk.documentscanner.DocumentDetectionScores
The total and partial scores for the detected document contour.
-
Constructor Summary
ConstructorsConstructorDescriptionDocumentDetectionScores(double totalScore, double distanceScore, double angleScore, double sizeScore, double aspectRatioScore, double lineCoverageScore, double widthScore, double heightScore, double alreadyCroppedScore) Constructs DocumentDetectionScores with the given params. -
Method Summary
Modifier and TypeMethodDescriptiondoubleGetter for alreadyCroppedScore field.doubleGetter for angleScore field.doubleGetter for aspectRatioScore field.doubleGetter for distanceScore field.doubleGetter for heightScore field.doubleGetter for lineCoverageScore field.doubleGetter for sizeScore field.doubleGetter for totalScore field.doubleGetter for widthScore field.
-
Constructor Details
-
DocumentDetectionScores
public DocumentDetectionScores(double totalScore, double distanceScore, double angleScore, double sizeScore, double aspectRatioScore, double lineCoverageScore, double widthScore, double heightScore, double alreadyCroppedScore) 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.alreadyCroppedScore- Single-shot mode and ML engine mode only: Confidence in percent that the input image is already of a cropped document.
-
-
Method Details
-
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
-
getAlreadyCroppedScore
public double getAlreadyCroppedScore()Getter for alreadyCroppedScore field. See constructor documentation for more information about the field.- Returns:
- alreadyCroppedScore
-