public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Schmitz, Marco" <marco.schmitz@adesso-mobile.de>
To: "Schmitz, Marco" <marco.schmitz@adesso-mobile.de>,
	       Marco Atzeri	<marco.atzeri@gmail.com>,
	       "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: AW: Tesseract 3.04 - Cygwin64 - Windows 8.1 - Can't open makebox
Date: Tue, 22 Sep 2015 12:19:00 -0000	[thread overview]
Message-ID: <D347C6895A0AB142BAA2D2F876C96CAA83361900@ex2010-db01> (raw)
In-Reply-To: <D347C6895A0AB142BAA2D2F876C96CAA83361896@ex2010-db01>

Okay, my shell script problem "not finding makebox" was a line ending problem (CR+LF).

But how about TESSDATA_PREFIX ?

-----Ursprüngliche Nachricht-----
Von: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] Im Auftrag von Schmitz, Marco
Gesendet: Dienstag, 22. September 2015 13:23
An: Marco Atzeri <marco.atzeri@gmail.com>; cygwin@cygwin.com
Betreff: AW: Tesseract 3.04 - Cygwin64 - Windows 8.1 - Can't open makebox

Hi Marco,

without setting TESSDATA_PREFIX (neither Windows environment variables nor .bash_profile) I get:

$ tesseract --list-langs
Error opening data file C:\DEV\tesseract\Tesseract-OCR\tessdata/eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory.
Failed loading language 'eng'
Tesseract couldn't load any languages!
Could not initialize tesseract.


This is my first problem, which I solved defining TESSDATA_PREFIX (in Windows environment). Now I get:

$ tesseract --list-langs
List of available languages (13):
arbeitsunfaehigkeit
deu
deu_frak
eng
fra
ita
ita_old
nld
osd
por
spa
spa_old
vie


Then I try this:

$ tesseract arbeitsunfaehigkeit.hausarzt.exp0.jpg arbeitsunfaehigkeit batch.nochop makebox Tesseract Open Source OCR Engine v3.04.00 with Leptonica


Okay, but originally I wrote this issue because I tried to call it from a shell script. So, this is my box.sh:

#!/usr/bin/env bash
tesseract arbeitsunfaehigkeit.hausarzt.exp0.jpg arbeitsunfaehigkeit batch.nochop makebox

and calling it brings up the original error:

$ ./box.sh
Tesseract Open Source OCR Engine v3.04.00 with Leptonica
read_params_file: Can't open makebox


Best regards,
Marco


-----Ursprüngliche Nachricht-----
Von: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] Im Auftrag von Marco Atzeri
Gesendet: Montag, 21. September 2015 16:15
An: cygwin@cygwin.com
Betreff: Re: Tesseract 3.04 - Cygwin64 - Windows 8.1 - Can't open makebox

On 21/09/2015 11:03, Schmitz, Marco wrote:
> I am using Windows 8.1 and Cygwin64 in order to run Tesseract 3.04.
>
> Running the following command:
>
>      tesseract arbeitsunfaehigkeit.hausarzt.exp0.jpg 
> arbeitsunfaehigkeit batch.nochop makebox
>
> results in the following output:
>
>      Tesseract Open Source OCR Engine v3.04.00 with Leptonica
>      read_params_file: Can't open makebox
>
> And this is after I fixed the output:
>
>      Tesseract Open Source OCR Engine v3.04.00 with Leptonica
>      Error opening data file 
> C:\DEV\tesseract\Tesseract-OCR\tessdata/eng.traineddata

Are you defining TESSDATA_PREFIX ? Why ?

>      Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory.
>      Failed loading language 'eng'
>      Tesseract couldn't load any languages!
>      Could not initialize tesseract.
>
> Using the following line in .bash_profile:
>
>      export TESSDATA_PREFIX="/cygdrive/c/DEV/cygwin64/usr/share/tessdata/"


The default should be

TESSDATA_PREFIX="/usr/share/tessdata/"

Without defining TESSDATA_PREFIX, I have

$ tesseract.exe --list-langs
List of available languages (4):
deu
deu_frak
eng
osd

and the language files are in :

$ ls /usr/share/tessdata/
configs/              eng.cube.fold    eng.cube.size 
osd.traineddata
deu.traineddata       eng.cube.lm      eng.cube.word-freq     pdf.ttf
deu_frak.traineddata  eng.cube.nn      eng.tesseract_cube.nn  tessconfigs/
eng.cube.bigrams      eng.cube.params  eng.traineddata        training/


Regards
Marco




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2015-09-22 12:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-21  9:04 Schmitz, Marco
2015-09-21 14:14 ` Marco Atzeri
2015-09-22 11:23   ` AW: " Schmitz, Marco
2015-09-22 12:19     ` Schmitz, Marco [this message]
2015-09-22 16:15       ` Marco Atzeri
2015-10-05  9:09         ` AW: " Schmitz, Marco
2015-10-06  4:44           ` Marco Atzeri
2015-10-06  8:00             ` AW: " Schmitz, Marco
2015-10-06 10:01               ` Marco Atzeri
2015-09-22 16:43 ` Brian Inglis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D347C6895A0AB142BAA2D2F876C96CAA83361900@ex2010-db01 \
    --to=marco.schmitz@adesso-mobile.de \
    --cc=cygwin@cygwin.com \
    --cc=marco.atzeri@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).