Class ImageExtractionService

    • Constructor Detail

      • ImageExtractionService

        public ImageExtractionService​(java.lang.String tessDataPath,
                                      java.lang.String language,
                                      boolean OCRon)
    • Method Detail

      • getPageCount

        public int getPageCount​(java.io.File imageFile)
                         throws java.lang.Exception
        Specified by:
        getPageCount in class AbstractExtractionService
        Throws:
        java.lang.Exception
      • extractTextFromImage

        public java.lang.String extractTextFromImage​(java.io.File file,
                                                     RegionDefinion coordinates)
                                              throws java.io.IOException,
                                                     net.sourceforge.tess4j.TesseractException
        Throws:
        java.io.IOException
        net.sourceforge.tess4j.TesseractException
      • extractRegions

        public java.util.List<RegionExtractionResult> extractRegions​(java.io.File file,
                                                                     java.util.List<Region> regions)
                                                              throws java.io.IOException,
                                                                     net.sourceforge.tess4j.TesseractException
        Specified by:
        extractRegions in class AbstractExtractionService
        Throws:
        java.io.IOException
        net.sourceforge.tess4j.TesseractException