Turn Image into Text - Java [duplicate]

放肆的年华 提交于 2019-11-26 22:54:40

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!