简体   繁体   中英

Extract text from image in java using tika library

I need to extract text from image so i found few OCR library

  1. Tess4j

Which didn't worked so I move to apache tika.

In apacke tika , I tried with both ImageParser and JpegParser . It is giving file info but not providing text in my image file.

You can also run tika from the command line. Run it on just the images you want to perform OCR on:

java -jar ./tika-app/target/tika-app-1.13-SNAPSHOT.jar -t ~/Desktop/tess.png

Tika uses tesseract internally to perform OCR. So you should have that installed and on your PATH.

For Image processing Tessaract is the best api, which provides some methods along with java, try it once. You can find more details here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM