public static class ContourDetectorFrameHandler.DetectedFrame
Contour detection results alongside with information about frame
| Modifier and Type | Field and Description |
|---|---|
net.doo.snap.lib.detector.DetectionResult |
detectionResult
Contour detection result status. Typically used to decide whether contour detection was successful or not and what can be improved from user side.
|
double |
detectionScore
Score of detected frame as double value in
[0.0, 100.0]. |
int |
frameHeight
Height of the frame before rotation
|
int |
frameOrientation
Rotation of the frame in degrees relatively to what is seen on the screen. Frames might come in different orientation from the camera, that's why this value is needed. You might use it to compensate rotation of
#polygon. |
int |
frameWidth
Width of the frame before rotation
|
java.util.List<android.graphics.PointF> |
polygon
Detected polygon. If no polygon was detected - empty list. Points of polygon are normalized values between 0 and 1 relatively to the size of the frame. For instance,
point.x = 0.5f means that point is centered horizontally in the frame. point.y = 1.0f means that point is at the bottom of the frame and so on. Note, that points are not rotated by #frameOrientation. |
| Constructor and Description |
|---|
DetectedFrame()
Deprecated constructor, with missing detectionScore.
|
DetectedFrame() |
public net.doo.snap.lib.detector.DetectionResult detectionResult
Contour detection result status. Typically used to decide whether contour detection was successful or not and what can be improved from user side.
public java.util.List<android.graphics.PointF> polygon
Detected polygon. If no polygon was detected - empty list. Points of polygon are normalized values between 0 and 1 relatively to the size of the frame.
For instance, point.x = 0.5f means that point is centered horizontally in the frame. point.y = 1.0f means that point is at the bottom of the frame and so on.
Note, that points are not rotated by #frameOrientation.
public int frameOrientation
Rotation of the frame in degrees relatively to what is seen on the screen. Frames might come in different orientation from the camera, that's why this value is needed. You might use it to compensate rotation of #polygon.
public int frameWidth
Width of the frame before rotation
public int frameHeight
Height of the frame before rotation
public double detectionScore
Score of detected frame as double value in [0.0, 100.0].