Package io.scanbot.sdk.document
Class DocumentDetectionScores
-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class DocumentDetectionScores implements Parcelable
The total and partial scores for the detected document contour.
-
-
Field Summary
Fields Modifier and Type Field Description private final Double
totalScore
private final Double
distanceScore
private final Double
angleScore
private final Double
sizeScore
private final Double
aspectRatioScore
private final Double
lineCoverageScore
private final Double
widthScore
private final Double
heightScore
-
Constructor Summary
Constructors Constructor Description DocumentDetectionScores(Map<String, Object> source)
DocumentDetectionScores(JSONObject json)
DocumentDetectionScores(Double totalScore, Double distanceScore, Double angleScore, Double sizeScore, Double aspectRatioScore, Double lineCoverageScore, Double widthScore, Double heightScore)
-
Method Summary
Modifier and Type Method Description final Double
getTotalScore()
Weighted sum of all partial scores. final Double
getDistanceScore()
100 points, if the center of the contour is exactly in the image center. final Double
getAngleScore()
100 points, if all angles are 90 degrees. final Double
getSizeScore()
100 points, if the contour occupies at least 50% of the area of the image. final Double
getAspectRatioScore()
100 points, if the aspect ratio matches exactly one of the given aspect ratios. final Double
getLineCoverageScore()
Percentage of the document contour that the edge detector was able to find (in LEGACY engine mode only). final Double
getWidthScore()
Percentage of the image width taken by the detected document. final Double
getHeightScore()
Percentage of the image height taken by the detected document. final JSONObject
toJson(ToJsonConfiguration config)
final DocumentDetectionScores
clone()
-
-
Constructor Detail
-
DocumentDetectionScores
DocumentDetectionScores(JSONObject json)
-
-
Method Detail
-
getTotalScore
final Double getTotalScore()
Weighted sum of all partial scores.
-
getDistanceScore
final Double getDistanceScore()
100 points, if the center of the contour is exactly in the image center.
-
getAngleScore
final Double getAngleScore()
100 points, if all angles are 90 degrees.
-
getSizeScore
final Double getSizeScore()
100 points, if the contour occupies at least 50% of the area of the image.
-
getAspectRatioScore
final Double getAspectRatioScore()
100 points, if the aspect ratio matches exactly one of the given aspect ratios.
-
getLineCoverageScore
final Double getLineCoverageScore()
Percentage of the document contour that the edge detector was able to find (in LEGACY engine mode only).
-
getWidthScore
final Double getWidthScore()
Percentage of the image width taken by the detected document.
-
getHeightScore
final Double getHeightScore()
Percentage of the image height taken by the detected document.
-
toJson
final JSONObject toJson(ToJsonConfiguration config)
-
clone
final DocumentDetectionScores clone()
-
-
-
-