Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prerequesites and what are the configuration need to do OCR #20

Open
karunakarthadkapally opened this issue Aug 1, 2020 · 1 comment
Labels
question Further information is requested

Comments

@karunakarthadkapally
Copy link

we are using tesseract 4.0.0.
While doing OCR through Linux command "tesseract pan.jpg stdout" getting the better result. But when we integrated tesseract logic in java application it is not giving proper results. But in the same project working fine windows machine. We have already set the TESSDATA_PREFIX environment variable. And in both environments, we have the latest eng.traineddata only. Please find the sample code below.

try{
Tesseract instance = new Tesseract();
instance.setDatapath("/usr/share/tesseract/");
File file = new File("/home/projectr/pan.jpg");
instance.setLanguage("eng");

String result = instance.doOCR(file);
System.out.println(result);
} catch (Exception e) {
e.printStackTrace()
}

If possible send a sample java project which will run on the Linux environment with prerequisite in Linux machine and anything needs to change in any config file.

we are using Linux version 3.10.0-693.el7.x86_64

below are the tesseract version details in Linux machine.
tesseract 4.0.0
leptonica-1.77.0
libjpeg 6b (libjpeg-turbo 1.2.90) : libpng 1.5.13 : libtiff 4.0.3 : zlib 1.2.7

@stweil
Copy link
Contributor

stweil commented Aug 31, 2020

Tesseract 4.0.0 is unsupported. Please use a newer version, either Tesseract 4.1 or latest Tesseract from git.

@stweil stweil added the question Further information is requested label Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants