Class DocumentAutoSnappingController
-
- All Implemented Interfaces:
-
io.scanbot.sdk.camera.BasePictureCallback
,io.scanbot.sdk.camera.autosnapping.IAutoSnappingController
public final class DocumentAutoSnappingController extends BaseContourAutoSnappingController implements BasePictureCallback
Controls auto-snapping for a document based on it's detected contours.
-
-
Constructor Summary
Constructors Constructor Description DocumentAutoSnappingController(IScanbotCameraView cameraView, ContourDetectorFrameHandler contourDetectorFrameHandler)
-
Method Summary
Modifier and Type Method Description Unit
detach()
Allows to detach successor implementation class. Unit
onPictureTakenInternal(ByteArray image, Integer imageOrientation, List<PointF> finderRect, Boolean isCapturedAutomatically)
Invoked when picture is taken final static DocumentAutoSnappingController
attach(IScanbotCameraView cameraView, ContourDetector contourDetector)
Convenience method for attaching DocumentAutoSnappingController to IScanbotCameraViewAuto-snapping is enabled by default as soon as you create new instance of DocumentAutoSnappingController. final static DocumentAutoSnappingController
attach(IScanbotCameraView cameraView, ContourDetectorFrameHandler frameHandler)
Convenience method for attaching DocumentAutoSnappingController to IScanbotCameraViewAuto-snapping is enabled by default as soon as you create new instance of DocumentAutoSnappingController. -
-
Constructor Detail
-
DocumentAutoSnappingController
DocumentAutoSnappingController(IScanbotCameraView cameraView, ContourDetectorFrameHandler contourDetectorFrameHandler)
- Parameters:
cameraView
- cameraView to attach this new instance to
-
-
Method Detail
-
detach
Unit detach()
Allows to detach successor implementation class. To be called in place of usage when screen hierarchy is being destroyed.
-
onPictureTakenInternal
Unit onPictureTakenInternal(ByteArray image, Integer imageOrientation, List<PointF> finderRect, Boolean isCapturedAutomatically)
Invoked when picture is taken
-
attach
final static DocumentAutoSnappingController attach(IScanbotCameraView cameraView, ContourDetector contourDetector)
Convenience method for attaching DocumentAutoSnappingController to IScanbotCameraView
Auto-snapping is enabled by default as soon as you create new instance of DocumentAutoSnappingController. You can manually enable or disable auto-snapping by setting DocumentAutoSnappingController.isEnabled.
- Parameters:
cameraView
- cameraView to attach tocontourDetector
- contourDetector to process frames and get live detection results
-
attach
final static DocumentAutoSnappingController attach(IScanbotCameraView cameraView, ContourDetectorFrameHandler frameHandler)
Convenience method for attaching DocumentAutoSnappingController to IScanbotCameraView
Auto-snapping is enabled by default as soon as you create new instance of DocumentAutoSnappingController. You can manually enable or disable auto-snapping by setting DocumentAutoSnappingController.isEnabled.
- Parameters:
cameraView
- cameraView to attach toframeHandler
- contourDetectorFrameHandler to process frames and get live detection results
-
-
-
-