-
public interface GenericDocumentRecognizerComponent to scan image, detect different documents of known types, perform image optimization, cropping and (optionally) fields detection and fields' data recognition
-
-
Method Summary
Modifier and Type Method Description abstract GenericDocumentRecognitionResultscanBitmap(Bitmap bitmap, Boolean shouldRecognize, Integer orientation)Scan the image to detect document and recognize data on it abstract GenericDocumentRecognitionResultscanJpeg(ByteArray jpeg, Boolean shouldRecognize, Integer orientation)Scan the image to detect document and recognize data on it abstract GenericDocumentRecognitionResultscanNv21(ByteArray nv21, Integer width, Integer height, Integer orientation, Rect finderRect, Boolean shouldRecognize)Scan the image to detect document and recognize data on it abstract Unitclear()Clears the result accumulation cache (for live detection) abstract FloatgetAcceptedSharpnessScore()Accepted minimal sharpness score. abstract UnitsetAcceptedSharpnessScore(Float acceptedSharpnessScore)Accepted minimal sharpness score. abstract List<RootDocumentType>getAcceptedDocumentTypes()Accepted document types. abstract UnitsetAcceptedDocumentTypes(List<RootDocumentType> acceptedDocumentTypes)Accepted document types. -
-
Method Detail
-
scanBitmap
abstract GenericDocumentRecognitionResult scanBitmap(Bitmap bitmap, Boolean shouldRecognize, Integer orientation)
Scan the image to detect document and recognize data on it
- Parameters:
bitmap- imageshouldRecognize- whether to recognize field and their data.orientation- image orientation.
-
scanJpeg
abstract GenericDocumentRecognitionResult scanJpeg(ByteArray jpeg, Boolean shouldRecognize, Integer orientation)
Scan the image to detect document and recognize data on it
- Parameters:
jpeg- image in form of jpeg-encoded byte arrayshouldRecognize- whether to recognize field and their data.orientation- image orientation.
-
scanNv21
abstract GenericDocumentRecognitionResult scanNv21(ByteArray nv21, Integer width, Integer height, Integer orientation, Rect finderRect, Boolean shouldRecognize)
Scan the image to detect document and recognize 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.
-
getAcceptedSharpnessScore
abstract 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.
-
setAcceptedSharpnessScore
abstract Unit setAcceptedSharpnessScore(Float acceptedSharpnessScore)
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.
-
getAcceptedDocumentTypes
abstract List<RootDocumentType> getAcceptedDocumentTypes()
Accepted document types. All other document types will be ignored.
By default - RootDocumentType.ALL_TYPES
-
setAcceptedDocumentTypes
abstract Unit setAcceptedDocumentTypes(List<RootDocumentType> acceptedDocumentTypes)
Accepted document types. All other document types will be ignored.
By default - RootDocumentType.ALL_TYPES
-
-
-
-