This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import net.sourceforge.tess4j.Tesseract; | |
import net.sourceforge.tess4j.TesseractException; | |
/*<dependency> | |
<groupId>net.sourceforge.tess4j</groupId> | |
<artifactId>tess4j</artifactId> | |
<version>4.3.1</version> | |
</dependency>*/ | |
public class Tesss { | |
public static void main(String[] args) throws TesseractException { | |
/*File src = new File("C:\\OCR\\tess.png"); | |
Tesseract tesseract = new Tesseract(); | |
String text = tesseract.doOCR(src); | |
System.out.println(text);*/ | |
System.out.println(new Tesseract().doOCR(new File("C:\\OCR\\tess.png"))); | |
} | |
} |