Cannot open input file

1,651 views
Skip to first unread message

Lutz Wittenmayer

unread,
May 28, 2014, 9:09:00 AM5/28/14
to tesser...@googlegroups.com
I have installed tesseract-ocr-setup-3.02.02.exe on my Windows 7 PC.

I wanted to try an OCR with the a file coming with the installation in the doc directory "eurotext.tif"
tesseract eurotext.tif doc -l deu
results in "Cannot open input file: eurotext.tif"

I made a copy of the eurotext.tif and inserted it into the directory where the tesseract.exe is located. Same error message
Finally I also placed this tif into the directory tessdata.

I got always the meassage "Cannot open input file: eurotext.tif" I have tried my own tiffs, the same results. What do I have to change?

Nick White

unread,
May 28, 2014, 10:52:32 AM5/28/14
to tesser...@googlegroups.com
On Wed, May 28, 2014 at 06:09:00AM -0700, Lutz Wittenmayer wrote:
> I made a copy of the eurotext.tif and inserted it into the directory where the tesseract.exe is located. Same error message
> Finally I also placed this tif into the directory tessdata.
>
> I got always the meassage "Cannot open input file: eurotext.tif" I have tried my own tiffs, the same results. What do I have to change?

If you're using the command line, then the image file has to be in
the current directory, unless you specify a path. Read up on how to
use the command line for your operating system (this is standard
behaviour).

Nick

Morgan Boyd

unread,
Aug 6, 2014, 2:14:58 PM8/6/14
to tesser...@googlegroups.com
I am also receiving this error, despite adding the full file path (sample below). I have attempted to run the software in bulk against an entire directory, as well as to a single file. The error replicates regardless of configuration.

C:\Program Files (x86)\Tesseract-OCR>tesseract.exe -C:\Users\dtc1712\Desktop\FleetInvoices\Test3\Batch_1\00000334_1.tif "C:\Users\dtc1712\Desktop\FleetInvoices\Test3\Batch_1\00000334_1.txt"

C:\Program Files (x86)\Tesseract-OCR>for %F in ("C:\Users\dtc1712\Desktop\FleetInvoices\Test3\Batch_1\*") do tesseract.exe -%F "%~dpnF.txt"

Insight or advice would be quite helpful. I have ~1300 images to process through, and need to do so quickly.

Quan Nguyen

unread,
Aug 6, 2014, 7:18:27 PM8/6/14
to tesser...@googlegroups.com
The command was incorrect -- that hyphen threw it off keel.

If you could not get the command squared away, you can use VietOCR, which supports Bulk OCR.

jdia...@gmail.com

unread,
Dec 28, 2014, 11:45:41 AM12/28/14
to tesser...@googlegroups.com

If you're using the command line, then the image file has to be in
the current directory, unless you specify a path. Read up on how to
use the command line for your operating system (this is standard
behaviour).

Nick

Hi Nick, I have no knowledge of cmd line prompts and would appreciate it if you can provide a basic command line for an image on the desktop. Let's call it "myscan3.tif".
I'm not adverse to learning and putting the time in, but after 4 hours of getting the same error message the gentleman got above, I know that I'm missing something.
I'm running Windows 7 and am a graphic artist interested in learning this ocr stuff to contribute to the scholarly community.

Any help you can provide will be greatly appreciated and rewarded to those who value knowledge.

-Joe D. 

shree

unread,
Dec 28, 2014, 2:22:35 PM12/28/14
to tesser...@googlegroups.com
If you are on windows7, it maybe better for you to use VietOCR as the GUI frontend for tesseract. The commandline version of tesseract has not been updated while VIETOCR uses the newer engine.


jdia...@gmail.com

unread,
Jan 1, 2015, 2:24:06 PM1/1/15
to tesser...@googlegroups.com
Thank you Shree, I have installed VietOCR, learned how to share traineddata b/w tesseract and VietOCR.
I'm now going for JTessboxeditor...as this is the tool that I foresee will eventually allow me to train old English literature more accurately than archive.org and google.books does. As I side note do you know of any polygonal training programs out there?

Faraz Arastu

unread,
Jul 25, 2016, 2:10:35 AM7/25/16
to tesseract-ocr
Joseph, thank you for posting. I had the same problem in the command window: "Cannot open input file" and downloaded VietOCR but when I run VietOCR, the English text output is not even close to the English image input. Very disappointing. I'm going back to the command line. Any solutions for opening the input file?
Reply all
Reply to author
Forward
Message has been deleted
0 new messages