问题
This question already has an answer here:
- Java OCR implementation [closed] 5 answers
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!
回答1:
You need to look into Java OCR implementations. Take a look at this question: Java OCR
回答2:
Tess4J, a JNA wrapper around Tesseract engine, supports APIs that take BufferedImage, File, or image data as input, and return String as output.
回答3:
You need an OCR (optical character recognizer) library or write your own. Check out this SO question.
回答4:
Try this character recognition library: http://sourceforge.net/projects/javaocr/
来源:https://stackoverflow.com/questions/10419577/turn-image-into-text-java