Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turn Image into Text - Java [duplicate]

This is an interesting topic. Basically, I have an image that contains some text. How do I extract the text from the image?

I have already tried many things, but everything I do is very tedious and usually does not work. I am simply wondering if there is a fairly easy way to do this.

I have come upon this: http://sourceforge.net/projects/javaocr/. I have tried this for hours, but I cannot get it to take an Image and turn it into a String of text from the image.

Thank you all in advance!

like image 301
Dylan Wheeler Avatar asked May 02 '12 18:05

Dylan Wheeler


3 Answers

You need to look into Java OCR implementations. Take a look at this question: Java OCR

like image 89
Josh Diehl Avatar answered Oct 19 '22 04:10

Josh Diehl


Tess4J, a JNA wrapper around Tesseract engine, supports APIs that take BufferedImage, File, or image data as input, and return String as output.

like image 4
nguyenq Avatar answered Oct 19 '22 04:10

nguyenq


You need an OCR (optical character recognizer) library or write your own. Check out this SO question.

like image 2
Pablo Santa Cruz Avatar answered Oct 19 '22 02:10

Pablo Santa Cruz