public class GenericDocumentCameraView implements IGenericDocumentCameraView
Represents camera view for GenericDocumentRecognizer scanner.
public static io.scanbot.sdk.ui.view.genericdocument.GenericDocumentCameraView.Companion Companion
public GenericDocumentCameraView(@NotNull
android.content.Context context,
@NotNull
android.util.AttributeSet attrs)
Represents camera view for GenericDocumentRecognizer scanner.
protected void onDetachedFromWindow()
public void setListener(@NotNull
io.scanbot.sdk.ui.view.genericdocument.IGenericDocumentCameraView.Listener listener)
listener - which will receive callbacks on user interactions.public void updateState(@NotNull
io.scanbot.sdk.ui.view.genericdocument.IGenericDocumentCameraView.State newState)
public void setCameraOrientationMode(@NotNull
io.scanbot.sdk.ui.view.base.configuration.CameraOrientationMode cameraOrientationMode)
Sets camera orientation mode
cameraOrientationMode - CameraOrientationMode.LANDSCAPE or CameraOrientationMode.PORTRAITpublic void setCameraModule(@NotNull
io.scanbot.sdk.camera.CameraModule cameraModule)
Set camera module
cameraModule - one of the supported modes - CameraModulepublic boolean handle(@NotNull
io.scanbot.sdk.camera.FrameHandlerResult<io.scanbot.sdk.genericdocument.GenericDocumentRecognitionResult,io.scanbot.sdk.SdkLicenseError> result)
public void setDocumentRecognizer(@NotNull
io.scanbot.sdk.genericdocument.GenericDocumentRecognizer recognizer)
Sets instance of generic document recognizer to be used for this view
public void setAcceptedDocumentTypes(@NotNull
java.util.List<? extends io.scanbot.genericdocument.entity.RootDocumentType> documentTypes)
Accepted document types. All other document types will be ignored.
By default - RootDocumentType.ALL_TYPES.
public void setSharpnessAcceptanceFactor(float sharpnessAcceptanceFactor)
Accepted minimal sharpness score. Images with a score less than that will be rejected with RecognitionStatus::ErrorTooBlurry.
Default is 80
0 - any image will be accepted. 80 - a good compromise; the recommended setting. 100 - only very sharp images will be accepted.