public static class ContourDetectorFrameHandler.DetectedFrame
Contour detection results alongside with information about frame
@JvmField @NotNull public io.scanbot.sdk.core.contourdetector.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.
@JvmField @NotNull 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.
@JvmField 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.
@JvmField public int frameWidth
Width of the frame before rotation
@JvmField public int frameHeight
Height of the frame before rotation
@JvmField public double detectionScore
Score of detected frame as double value in [0.0, 100.0].
@JvmField @Nullable public android.graphics.Rect finderRect
@JvmField @Nullable public java.util.List<io.scanbot.sdk.core.contourdetector.PageAspectRatio> requiredPageAspectRatios
@Deprecated
public DetectedFrame(@NotNull
io.scanbot.sdk.core.contourdetector.DetectionResult detectionResult,
@Nullable
java.util.List<? extends android.graphics.PointF> polygon,
int frameOrientation,
int frameWidth,
int frameHeight)
Deprecated constructor, with missing detectionScore.
public DetectedFrame(@NotNull
io.scanbot.sdk.core.contourdetector.DetectionResult detectionResult,
@Nullable
java.util.List<? extends android.graphics.PointF> polygon,
int frameOrientation,
int frameWidth,
int frameHeight,
double detectionScore,
@Nullable
android.graphics.Rect finderRect,
@Nullable
java.util.List<io.scanbot.sdk.core.contourdetector.PageAspectRatio> requiredPageAspectRatios)