-
- All Implemented Interfaces:
-
io.scanbot.sdk.idcardscanner.IdCardScanner
public final class DefaultIdCardScanner implements IdCardScanner
Default implementation for IdCardScanner
-
-
Field Summary
Fields Modifier and Type Field Description private FloatacceptedSharpnessScoreprivate List<IdScanResult.DocumentType>acceptedDocumentTypes
-
Constructor Summary
Constructors Constructor Description DefaultIdCardScanner(BlobManager blobManager)
-
Method Summary
Modifier and Type Method Description FloatgetAcceptedSharpnessScore()Accepted minimal sharpness score. UnitsetAcceptedSharpnessScore(Float acceptedSharpnessScore)List<IdScanResult.DocumentType>getAcceptedDocumentTypes()Accepted document types. UnitsetAcceptedDocumentTypes(List<IdScanResult.DocumentType> acceptedDocumentTypes)IdScanResultscanBitmap(Bitmap bitmap, Boolean shouldRecognize, Integer orientation)Scan image to detect ID card and data on it IdScanResultscanJpeg(ByteArray jpeg, Boolean shouldRecognize, Integer orientation)Scan image to detect ID card and data on it IdScanResultscanNv21(ByteArray nv21, Integer width, Integer height, Integer orientation, Rect finderRect, Boolean shouldRecognize)Scan image to detect ID card and data on it -
-
Method Detail
-
getAcceptedSharpnessScore
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.
-
setAcceptedSharpnessScore
Unit setAcceptedSharpnessScore(Float acceptedSharpnessScore)
-
getAcceptedDocumentTypes
List<IdScanResult.DocumentType> getAcceptedDocumentTypes()
Accepted document types. All other document types will be ignored.
By default -
IdScanResult.DocumentType.DEFAULT_TYPES.
-
setAcceptedDocumentTypes
Unit setAcceptedDocumentTypes(List<IdScanResult.DocumentType> acceptedDocumentTypes)
-
scanBitmap
IdScanResult 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
IdScanResult 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
IdScanResult 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.
-
-
-
-