Class DocumentDetectionResult
-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class DocumentDetectionResult implements Parcelable
Result of the document contour detection.
-
-
Field Summary
Fields Modifier and Type Field Description private final DocumentDetectionStatusstatusprivate final DocumentDetectionScoresdetectionScoresprivate final List<Point>pointsprivate final List<LineSegmentInt>horizontalLinesprivate final List<LineSegmentInt>verticalLinesprivate final List<PointF>pointsNormalizedprivate final List<LineSegmentFloat>horizontalLinesNormalizedprivate final List<LineSegmentFloat>verticalLinesNormalizedprivate final DoubleaspectRatioprivate final IntegeraverageBrightness
-
Constructor Summary
Constructors Constructor Description DocumentDetectionResult(Map<String, Object> source)DocumentDetectionResult(JSONObject json)DocumentDetectionResult(DocumentDetectionStatus status, DocumentDetectionScores detectionScores, List<Point> points, List<LineSegmentInt> horizontalLines, List<LineSegmentInt> verticalLines, List<PointF> pointsNormalized, List<LineSegmentFloat> horizontalLinesNormalized, List<LineSegmentFloat> verticalLinesNormalized, Double aspectRatio, Integer averageBrightness)
-
Method Summary
Modifier and Type Method Description final DocumentDetectionStatusgetStatus()Detection status. final DocumentDetectionScoresgetDetectionScores()The total and partial scores for the detected quad. final List<Point>getPoints()Absolute coordinates of the detected document contour in image space sorted in clockwise order, starting from the top left corner. final List<LineSegmentInt>getHorizontalLines()All detected horizontal lines in image space. final List<LineSegmentInt>getVerticalLines()All detected vertical lines in image space. final List<PointF>getPointsNormalized()Normalized coordinates of the detected document contour in image space sorted in clockwise order, starting from the top left corner. final List<LineSegmentFloat>getHorizontalLinesNormalized()Normalized horizontal lines in image space. final List<LineSegmentFloat>getVerticalLinesNormalized()Normalized vertical lines in image space. final DoublegetAspectRatio()Aspect ratio of the detected document contour. final IntegergetAverageBrightness()Average brightness, calculated as the average of the Value channel in the HSV color space of: the whole image, if no document was detected
the document crop, if a document was detected Ranges from 0 to 255.
final JSONObjecttoJson(ToJsonConfiguration config)final DocumentDetectionResultclone()-
-
Constructor Detail
-
DocumentDetectionResult
DocumentDetectionResult(JSONObject json)
-
DocumentDetectionResult
DocumentDetectionResult(DocumentDetectionStatus status, DocumentDetectionScores detectionScores, List<Point> points, List<LineSegmentInt> horizontalLines, List<LineSegmentInt> verticalLines, List<PointF> pointsNormalized, List<LineSegmentFloat> horizontalLinesNormalized, List<LineSegmentFloat> verticalLinesNormalized, Double aspectRatio, Integer averageBrightness)
-
-
Method Detail
-
getStatus
final DocumentDetectionStatus getStatus()
Detection status.
Default is NOT_ACQUIRED
-
getDetectionScores
final DocumentDetectionScores getDetectionScores()
The total and partial scores for the detected quad.
-
getPoints
final List<Point> getPoints()
Absolute coordinates of the detected document contour in image space sorted in clockwise order, starting from the top left corner.
-
getHorizontalLines
final List<LineSegmentInt> getHorizontalLines()
All detected horizontal lines in image space.
-
getVerticalLines
final List<LineSegmentInt> getVerticalLines()
All detected vertical lines in image space.
-
getPointsNormalized
final List<PointF> getPointsNormalized()
Normalized coordinates of the detected document contour in image space sorted in clockwise order, starting from the top left corner.
-
getHorizontalLinesNormalized
final List<LineSegmentFloat> getHorizontalLinesNormalized()
Normalized horizontal lines in image space.
-
getVerticalLinesNormalized
final List<LineSegmentFloat> getVerticalLinesNormalized()
Normalized vertical lines in image space.
-
getAspectRatio
final Double getAspectRatio()
Aspect ratio of the detected document contour.
-
getAverageBrightness
final Integer getAverageBrightness()
Average brightness, calculated as the average of the Value channel in the HSV color space of:
the whole image, if no document was detected
the document crop, if a document was detected Ranges from 0 to 255.
Default is 0
-
toJson
final JSONObject toJson(ToJsonConfiguration config)
-
clone
final DocumentDetectionResult clone()
-
-
-