Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error performing OCR with Tesseract: read_params_file: Can't open deu

Tags:

ocr

tesseract

While specifiing the language pack used to perform the OCR, i get the following error (for every language pack corresponding):

read_params_file: Can't open deu

I used the command as described in the wiki:

tesseract test.tif out -1 deu

The .traineddata files are located under tessdata and the TESSDATA_PREFIX is set to the parent directory of tessdata. The process works under default without given language information.

I have Tesseract 3.05 installed on Windows 10.

like image 919
Niels Avatar asked Jul 14 '16 17:07

Niels


People also ask

What is the latest version of Tesseract OCR?

Tesseract is an open source text recognition (OCR) Engine, available under the Apache 2.0 license. Major version 5 is the current stable version and started with release 5.0. 0 on November 30, 2021.

Is Tesseract OCR from Google?

Tesseract is an optical character recognition engine for various operating systems. It is free software, released under the Apache License. Originally developed by Hewlett-Packard as proprietary software in the 1980s, it was released as open source in 2005 and development has been sponsored by Google since 2006.


2 Answers

The command should be

tesseract test.tif out -l deu

with "l" instead of a "1".

like image 158
Niels Avatar answered Jan 01 '23 10:01

Niels


This is a common response, if there is anything wrong with your parameter setup. Either if you add a param which is not defined - like "1" or if you add params in the wrong order.

E.g.

if you add the hocr parameter , you have to place it after the -l parameter. In the official docs there is no case in which hocr is used with the language parameter.

Wrong:

PS C:\Users\Mememe\Desktop\tesseract> & 'C:\Program Files (x86)\Tesseract-OCR\tesseract.exe' 'C:\Users\mememe\Desktop\tesseract\img.jpg' out hocr -l deu
read_params_file: Can't open l
read_params_file: Can't open deu
Tesseract Open Source OCR Engine v4.00.00alpha with Leptonica

Better:

'C:\Program Files (x86)\Tesseract-OCR\tesseract.exe' 'C:\Users\Mememe\Desktop\tesseract\img.jpg' out -l deu hocr
Tesseract Open Source OCR Engine v4.00.00alpha with Leptonica

So if you have this error check:

  • Are all your parameters defined? (Check the help parameter to get a list of all available params)
  • Are all parameters in the right order? (Good Luck figuring out :) )
  • Are the paths I defined correct? Are there dots or spaces I should double check?

If this doesn't work - double check. Otherwise feel free to add your answer here.

like image 32
Goot Avatar answered Jan 01 '23 10:01

Goot