Package 

Interface GenericDocumentRecognizer


  • 
    public interface GenericDocumentRecognizer
    
                        

    Component to scan image, detect different documents of known types, perform image optimization, cropping and (optionally) fields detection and fields' data recognition

    • Method Detail

      • 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 array
        shouldRecognize - 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 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.
      • clear

         abstract Unit clear()

        Clears the result accumulation cache (for live detection)

      • 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