Class DetectionResult
-
- All Implemented Interfaces:
public final class DetectionResult
Contour detection result objects that contains all the information about detected contour
-
-
Field Summary
Fields Modifier and Type Field Description private final DocumentDetectionStatus
status
private final List<Point>
polygon
private final List<PointF>
polygonF
private final Double
detectionScore
private final List<Line2D>
horizontalLines
private final List<Line2D>
verticalLines
private final Integer
averageBrightness
-
Method Summary
Modifier and Type Method Description final DocumentDetectionStatus
getStatus()
final List<Point>
getPolygon()
final List<PointF>
getPolygonF()
final Double
getDetectionScore()
final List<Line2D>
getHorizontalLines()
final List<Line2D>
getVerticalLines()
final Integer
getAverageBrightness()
-
-
Constructor Detail
-
DetectionResult
DetectionResult(DocumentDetectionStatus status, List<Point> polygon, List<PointF> polygonF, Double detectionScore, List<Line2D> horizontalLines, List<Line2D> verticalLines, Integer averageBrightness)
- Parameters:
status
- Result status of contour detectionpolygon
- detected polygon (if any) as absolute pixel coordinates.polygonF
- detected polygon (if any) as floating point coordinates in[0.f, 1.f]
.detectionScore
- detection score (if any) as double value in[0.0, 100.0]
.horizontalLines
- Detected horizontal lines (can be used to snap while editing)verticalLines
- Detected vertical lines (can be used to snap while editing)averageBrightness
- Average brightness of the detected contour area, in range 0, 255
-
-
Method Detail
-
getStatus
final DocumentDetectionStatus getStatus()
-
getPolygon
final List<Point> getPolygon()
-
getPolygonF
final List<PointF> getPolygonF()
-
getDetectionScore
final Double getDetectionScore()
-
getHorizontalLines
final List<Line2D> getHorizontalLines()
-
getVerticalLines
final List<Line2D> getVerticalLines()
-
getAverageBrightness
final Integer getAverageBrightness()
-
-
-
-