Created
May 12, 2020 06:45
-
-
Save logbasex/17f53b4f2d51c804830d0a1ba9053835 to your computer and use it in GitHub Desktop.
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
//https://www.geeksforgeeks.org/tesseract-ocr-with-java-with-examples/ | |
//https://medium.com/@rahulvaish/simple-tesseract-ocr-java-be261e343c5b | |
public static void main(String[] args) { | |
Tesseract tesseract = new Tesseract(); | |
try { | |
//not working perfectly | |
tesseract.setDatapath("C:\\Users\\conta\\Downloads\\Tess4J\\tessdata"); | |
String text = tesseract.doOCR(new File("C:\\Users\\conta\\OneDrive\\Desktop\\t.png")); | |
System.out.print(text); | |
} catch (TesseractException e) { | |
e.printStackTrace(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment