Class TesseractOCR

    • Constructor Detail

      • TesseractOCR

        public TesseractOCR​(String pathToTessData)
        Constructor to initialize api.
        Parameters:
        pathToTessData - relative to this path there has to be stored the tessdata folder with the correct language files in it. pathToTessData/tessdata/deu.traineddata
      • TesseractOCR

        public TesseractOCR​(String pathToTessData,
                            String tessLanguage)
        Constructor to initialize api.
        Parameters:
        pathToTessData - relative to this path there has to be stored the tessdata folder with the correct language files in it. pathToTessData/tessdata/deu.traineddata
        tessLanguage - the language with which tesseract should be initialized
    • Method Detail

      • setWhitespaceCharacters

        public void setWhitespaceCharacters​(String characters)
        Set whitelist characters, this help the ocr to know which letters are expected
        Parameters:
        characters - whitelist characters
      • setMode

        public void setMode​(OCRMode m)
        Set the Mode type (how to perform the image)
        Parameters:
        m - mode
      • close

        public void close()
        Close function to End api.
        Specified by:
        close in interface AutoCloseable