Package io.scanbot.sdk.documentscanner
Class DocumentDetectionResult
- java.lang.Object
-
- io.scanbot.sdk.documentscanner.DocumentDetectionResult
-
public class DocumentDetectionResult extends java.lang.ObjectResult of the document contour detection.
-
-
Constructor Summary
Constructors Constructor Description DocumentDetectionResult(DocumentDetectionScores detectionScores, java.util.List<Point> points, java.util.List<LineSegmentInt> horizontalLines, java.util.List<LineSegmentInt> verticalLines, java.util.List<PointF> pointsNormalized, java.util.List<LineSegmentFloat> horizontalLinesNormalized, java.util.List<LineSegmentFloat> verticalLinesNormalized, double aspectRatio, PointF displacementVector)Constructs DocumentDetectionResult with default parameters.DocumentDetectionResult(DocumentDetectionStatus status, DocumentDetectionScores detectionScores, java.util.List<Point> points, java.util.List<LineSegmentInt> horizontalLines, java.util.List<LineSegmentInt> verticalLines, java.util.List<PointF> pointsNormalized, java.util.List<LineSegmentFloat> horizontalLinesNormalized, java.util.List<LineSegmentFloat> verticalLinesNormalized, double aspectRatio, int averageBrightness, DocumentDisplacement displacement, PointF displacementVector)Constructs DocumentDetectionResult with the given params.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetAspectRatio()Getter for aspectRatio field.intgetAverageBrightness()Getter for averageBrightness field.DocumentDetectionScoresgetDetectionScores()Getter for detectionScores field.DocumentDisplacementgetDisplacement()Getter for displacement field.PointFgetDisplacementVector()Getter for displacementVector field.java.util.List<LineSegmentInt>getHorizontalLines()Getter for horizontalLines field.java.util.List<LineSegmentFloat>getHorizontalLinesNormalized()Getter for horizontalLinesNormalized field.java.util.List<Point>getPoints()Getter for points field.java.util.List<PointF>getPointsNormalized()Getter for pointsNormalized field.DocumentDetectionStatusgetStatus()Getter for status field.java.util.List<LineSegmentInt>getVerticalLines()Getter for verticalLines field.java.util.List<LineSegmentFloat>getVerticalLinesNormalized()Getter for verticalLinesNormalized field.
-
-
-
Constructor Detail
-
DocumentDetectionResult
public DocumentDetectionResult(DocumentDetectionStatus status, DocumentDetectionScores detectionScores, java.util.List<Point> points, java.util.List<LineSegmentInt> horizontalLines, java.util.List<LineSegmentInt> verticalLines, java.util.List<PointF> pointsNormalized, java.util.List<LineSegmentFloat> horizontalLinesNormalized, java.util.List<LineSegmentFloat> verticalLinesNormalized, double aspectRatio, int averageBrightness, DocumentDisplacement displacement, PointF displacementVector)
Constructs DocumentDetectionResult with the given params.- Parameters:
status- Detection status. Default is NOT_ACQUIREDdetectionScores- The total and partial scores for the detected quad.points- Absolute coordinates of the detected document contour in image space sorted in clockwise order, starting from the top left corner.horizontalLines- All detected horizontal lines in image space.verticalLines- All detected vertical lines in image space.pointsNormalized- Normalized coordinates of the detected document contour in image space sorted in clockwise order, starting from the top left corner.horizontalLinesNormalized- Normalized horizontal lines in image space.verticalLinesNormalized- Normalized vertical lines in image space.aspectRatio- Aspect ratio of the detected document contour.averageBrightness- 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 0displacement- The displacement of the document from the image center if the document is partially visible. Default is NONEdisplacementVector- The displacement vector of the document from the image center if the document is partially visible in normalized coordinates.
-
DocumentDetectionResult
public DocumentDetectionResult(DocumentDetectionScores detectionScores, java.util.List<Point> points, java.util.List<LineSegmentInt> horizontalLines, java.util.List<LineSegmentInt> verticalLines, java.util.List<PointF> pointsNormalized, java.util.List<LineSegmentFloat> horizontalLinesNormalized, java.util.List<LineSegmentFloat> verticalLinesNormalized, double aspectRatio, PointF displacementVector)
Constructs DocumentDetectionResult with default parameters.- Parameters:
detectionScores- The total and partial scores for the detected quad.points- Absolute coordinates of the detected document contour in image space sorted in clockwise order, starting from the top left corner.horizontalLines- All detected horizontal lines in image space.verticalLines- All detected vertical lines in image space.pointsNormalized- Normalized coordinates of the detected document contour in image space sorted in clockwise order, starting from the top left corner.horizontalLinesNormalized- Normalized horizontal lines in image space.verticalLinesNormalized- Normalized vertical lines in image space.aspectRatio- Aspect ratio of the detected document contour.displacementVector- The displacement vector of the document from the image center if the document is partially visible in normalized coordinates.
-
-
Method Detail
-
getStatus
public DocumentDetectionStatus getStatus()
Getter for status field. See constructor documentation for more information about the field.- Returns:
- status
-
getDetectionScores
public DocumentDetectionScores getDetectionScores()
Getter for detectionScores field. See constructor documentation for more information about the field.- Returns:
- detectionScores
-
getPoints
public java.util.List<Point> getPoints()
Getter for points field. See constructor documentation for more information about the field.- Returns:
- points
-
getHorizontalLines
public java.util.List<LineSegmentInt> getHorizontalLines()
Getter for horizontalLines field. See constructor documentation for more information about the field.- Returns:
- horizontalLines
-
getVerticalLines
public java.util.List<LineSegmentInt> getVerticalLines()
Getter for verticalLines field. See constructor documentation for more information about the field.- Returns:
- verticalLines
-
getPointsNormalized
public java.util.List<PointF> getPointsNormalized()
Getter for pointsNormalized field. See constructor documentation for more information about the field.- Returns:
- pointsNormalized
-
getHorizontalLinesNormalized
public java.util.List<LineSegmentFloat> getHorizontalLinesNormalized()
Getter for horizontalLinesNormalized field. See constructor documentation for more information about the field.- Returns:
- horizontalLinesNormalized
-
getVerticalLinesNormalized
public java.util.List<LineSegmentFloat> getVerticalLinesNormalized()
Getter for verticalLinesNormalized field. See constructor documentation for more information about the field.- Returns:
- verticalLinesNormalized
-
getAspectRatio
public double getAspectRatio()
Getter for aspectRatio field. See constructor documentation for more information about the field.- Returns:
- aspectRatio
-
getAverageBrightness
public int getAverageBrightness()
Getter for averageBrightness field. See constructor documentation for more information about the field.- Returns:
- averageBrightness
-
getDisplacement
public DocumentDisplacement getDisplacement()
Getter for displacement field. See constructor documentation for more information about the field.- Returns:
- displacement
-
getDisplacementVector
public PointF getDisplacementVector()
Getter for displacementVector field. See constructor documentation for more information about the field.- Returns:
- displacementVector
-
-