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,
                            OcrConfiguration configuration,
                            OCREngineProgressListener progressListener)
        Creates an OCRProcessor
        context - used to create temporary files for preprocessing
        configuration - OCR configuration
        progressListener - reporting OCR progress
    • Method Detail

      • processImage

        public OcrResult processImage​( imageFile)
                               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
        an object containing the detected text and its layout information
        OcrException - if OCR failed
        com.geniusscansdk.core.LicenseException - if license is not valid anymore
        com.geniusscansdk.core.ProcessingException - if there is an error during preprocessing