Class NativeGenericDocumentScanner

    • Constructor Detail

      • NativeGenericDocumentScanner

        NativeGenericDocumentScanner(String tessDataPath, Boolean accumulateFrames)
    • Method Detail

      • 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 array
        shouldRecognize - 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 array
        width - image width, pixels
        height - image height, pixels
        orientation - image orientation.
        finderRect - if non-null - perform scanning only in given area.
        shouldRecognize - whether to recognize field and their data on ID card.
      • setAcceptedSharpnessScore

        @Synchronized() final Unit setAcceptedSharpnessScore(Float acceptedSharpnessScore)

        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.

      • 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.