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 DoubletotalScoreprivate final DoubledistanceScoreprivate final DoubleangleScoreprivate final DoublesizeScoreprivate final DoubleaspectRatioScoreprivate final DoublelineCoverageScoreprivate final DoublewidthScoreprivate final DoubleheightScore
-
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 DoublegetTotalScore()Weighted sum of all partial scores. final DoublegetDistanceScore()100 points, if the center of the contour is exactly in the image center. final DoublegetAngleScore()100 points, if all angles are 90 degrees. final DoublegetSizeScore()100 points, if the contour occupies at least 50% of the area of the image. final DoublegetAspectRatioScore()100 points, if the aspect ratio matches exactly one of the given aspect ratios. final DoublegetLineCoverageScore()Percentage of the document contour that the edge detector was able to find (in LEGACY engine mode only). final DoublegetWidthScore()Percentage of the image width taken by the detected document. final DoublegetHeightScore()Percentage of the image height taken by the detected document. final JSONObjecttoJson(ToJsonConfiguration config)final DocumentDetectionScoresclone()-
-
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()
-
-
-
-