Package io.scanbot.genericdocument
Class NativeGenericDocumentScanner
-
- All Implemented Interfaces:
public final class NativeGenericDocumentScanner extends SelfDisposable
Wrapper for JNI GenericDocumentScanner.
-
-
Constructor Summary
Constructors Constructor Description NativeGenericDocumentScanner()
-
Method Summary
Modifier and Type Method Description final GenericDocumentScanResult
scanBitmap(Bitmap bitmap, Boolean shouldRecognize, Integer orientation)
Scan image to detect ID card and data on it final GenericDocumentScanResult
scanJpeg(ByteArray jpeg, Boolean shouldRecognize, Integer orientation)
Scan image to detect ID card and data on it final GenericDocumentScanResult
scanNv21(ByteArray nv21, Integer width, Integer height, Integer orientation, Rect finderRect, Boolean shouldRecognize)
Scan image to detect ID card and data on it final Unit
setAcceptedDocumentTypes(List<RootDocumentType> acceptedDocumentTypes)
Accepted document types. final Unit
setExcludedFieldTypes(Set<String> excludedFieldTypes)
Set of secure fields which should be excluded from scanning process. final Unit
setAccumulationConfiguration(ResultAccumulationConfig config)
final Unit
clear()
Clears the result accumulation cache (see accumulateFrames). -
-
Method Detail
-
scanBitmap
@Synchronized() final GenericDocumentScanResult scanBitmap(Bitmap bitmap, Boolean shouldRecognize, Integer orientation)
Scan image to detect ID card and data on it
- Parameters:
bitmap
- imageshouldRecognize
- whether to recognize field and their data on ID card.orientation
- image orientation.
-
scanJpeg
@Synchronized() final GenericDocumentScanResult scanJpeg(ByteArray jpeg, Boolean shouldRecognize, Integer orientation)
Scan image to detect ID card and data on it
- Parameters:
jpeg
- image in form of jpeg-encoded byte arrayshouldRecognize
- whether to recognize field and their data on ID card.orientation
- image orientation.
-
scanNv21
@Synchronized() final GenericDocumentScanResult scanNv21(ByteArray nv21, Integer width, Integer height, Integer orientation, Rect finderRect, Boolean shouldRecognize)
Scan image to detect ID card and data on it
- Parameters:
nv21
- image in form of nv21-encoded byte arraywidth
- image width, pixelsheight
- image height, pixelsorientation
- image orientation.finderRect
- if non-null - perform scanning only in given area.shouldRecognize
- whether to recognize field and their data on ID card.
-
setAcceptedDocumentTypes
@Synchronized() final Unit setAcceptedDocumentTypes(List<RootDocumentType> acceptedDocumentTypes)
Accepted document types. All other document types will be ignored.
By default - all document types are accepted.
-
setExcludedFieldTypes
@Synchronized() final Unit setExcludedFieldTypes(Set<String> excludedFieldTypes)
Set of secure fields which should be excluded from scanning process. All other fields will be scanned as usual.
By default - empty, and all fields are scanned.
-
setAccumulationConfiguration
@Synchronized() final Unit setAccumulationConfiguration(ResultAccumulationConfig config)
-
clear
@Synchronized() final Unit clear()
Clears the result accumulation cache (see accumulateFrames).
-
-
-
-