Created
May 26, 2020 09:06
-
-
Save engleangs/f170c1d4272fe6856f8f01d3975d47ae 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
BufferedImage image = ImageIO.read( new File("sample/captcha-sample-1.png")); | |
BufferedImage clean = cleanImage(image); | |
ImageIO.write(clean, "png",new File("sample/clean.png")); | |
Tesseract tesseract = new Tesseract(); | |
tesseract.setDatapath("D:\\ProgramFiles\\Tesseract-OCR\\tessdata"); | |
String result = tesseract.doOCR( clean); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment