Class OcrProcessor

  • public final class OcrProcessor
    extends java.lang.Object
    Class that allows running OCR on an image file.
    • Constructor Detail

      • OcrProcessor

        public OcrProcessor​(android.content.Context context)
        Creates an OCRProcessor
        context - used to create temporary files for preprocessing
    • Method Detail

      • processImage

        public OcrResult processImage​( imageFile,
                                      OcrConfiguration configuration,
                                      OCREngineProgressListener progressListener)
                               throws OcrException,
        Perform OCR on an image. This will take care of filtering the image for optimal OCR. For optimal results it's recommended that you provide a properly cropped document without distortion.
        imageFile - image on which OCR should be applied
        configuration - OCR configuration
        progressListener - reporting OCR progress
        an object containing the detected text and its layout information
        OcrException - if OCR failed - if image cannot be read
        com.thegrizzlylabs.geniusscan.sdk.core.LicenseException - if license is not valid anymore
        com.thegrizzlylabs.geniusscan.sdk.core.ProcessingException - if there is an error during preprocessing