public GenericDocumentRecognizer
Component to scan image, detect different documents of known types, perform image optimization, cropping and (optionally) fields detection and fields' data recognition
float getAcceptedSharpnessScore()
Accepted minimal sharpness score. Images with a score less than that will be rejected with GenericDocumentRecognitionResult.RecognitionStatus.ErrorTooBlurry.
Default is 0
0 - any image will be accepted. 80 - a good compromise; the recommended setting. 100 - only very sharp images will be accepted.
void setAcceptedSharpnessScore(float p)
Accepted minimal sharpness score. Images with a score less than that will be rejected with GenericDocumentRecognitionResult.RecognitionStatus.ErrorTooBlurry.
Default is 0
0 - any image will be accepted. 80 - a good compromise; the recommended setting. 100 - only very sharp images will be accepted.
@NotNull java.util.List<io.scanbot.genericdocument.entity.RootDocumentType> getAcceptedDocumentTypes()
Accepted document types. All other document types will be ignored.
By default - RootDocumentType.ALL_TYPES
void setAcceptedDocumentTypes(@NotNull
java.util.List<? extends io.scanbot.genericdocument.entity.RootDocumentType> p)
Accepted document types. All other document types will be ignored.
By default - RootDocumentType.ALL_TYPES
@Nullable GenericDocumentRecognitionResult scanBitmap(@NotNull android.graphics.Bitmap bitmap, boolean shouldRecognize, int orientation)
Scan the image to detect document and recognize data on it
bitmap - imageshouldRecognize - whether to recognize field and their data. Otherwise the component will only detect document on the image. Defaults to trueorientation - image orientation. Default is 0@Nullable GenericDocumentRecognitionResult scanJpeg(@NotNull kotlin.Array[] jpeg, boolean shouldRecognize, int orientation)
Scan the image to detect document and recognize data on it
jpeg - image in form of jpeg-encoded byte arrayshouldRecognize - whether to recognize field and their data. Otherwise the component will only detect document on the image. Defaults to trueorientation - image orientation. Default is 0@Nullable GenericDocumentRecognitionResult scanNv21(@NotNull kotlin.Array[] nv21, int width, int height, int orientation, @Nullable android.graphics.Rect finderRect, boolean shouldRecognize)
Scan the image to detect document and recognize data on it
nv21 - image in form of nv21-encoded byte arraywidth - image width, pixelsheight - image height, pixelsorientation - image orientation. Default is 0finderRect - if non-null - perform scanning only in given area. Default is nullshouldRecognize - whether to recognize field and their data. Otherwise the component will only detect document on the image. Defaults to truevoid clear()
Clears the result accumulation cache (for live detection)