public class DefaultIdCardScanner implements IdCardScanner
Default implementation for interface IdCardScanner
interface IdCardScannerpublic DefaultIdCardScanner(@NotNull
io.scanbot.sdk.blob.BlobManager blobManager)
Default implementation for interface IdCardScanner
interface IdCardScannerpublic float getAcceptedSharpnessScore()
Accepted minimal sharpness score. Images with a score less than that will be rejected with 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.
public void setAcceptedSharpnessScore(float value)
Accepted minimal sharpness score. Images with a score less than that will be rejected with 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 public java.util.List<io.scanbot.sdk.idcardscanner.IdScanResult.DocumentType> getAcceptedDocumentTypes()
Accepted document types. All other document types will be ignored.
By default - IdScanResult.DocumentType.DEFAULT_TYPES.
public void setAcceptedDocumentTypes(@NotNull
java.util.List<? extends io.scanbot.sdk.idcardscanner.IdScanResult.DocumentType> value)
Accepted document types. All other document types will be ignored.
By default - IdScanResult.DocumentType.DEFAULT_TYPES.
@Nullable public IdScanResult scanBitmap(@NotNull android.graphics.Bitmap bitmap, boolean shouldRecognize, int orientation)
Scan image to detect ID card and data on it
bitmap - imageshouldRecognize - whether to recognize field and their data on ID card. Defaults to trueorientation - image orientation. Default is 0@Nullable public IdScanResult scanJpeg(@NotNull kotlin.Array[] jpeg, boolean shouldRecognize, int orientation)
Scan image to detect ID card and data on it
jpeg - image in form of jpeg-encoded byte arrayshouldRecognize - whether to recognize field and their data on ID card. Defaults to trueorientation - image orientation. Default is 0@Nullable public IdScanResult scanNv21(@NotNull kotlin.Array[] nv21, int width, int height, int orientation, @Nullable android.graphics.Rect finderRect, boolean shouldRecognize)
Scan image to detect ID card and 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 on ID card. Defaults to true