Tesseract: text2image not found (Mac OS X)

1.9k Views Asked by At

After dozens of hurdles solved, this one (or two) finally stopped me...

So I'm trying to train Tesseract 3.04 for specific font and I've completed couple of .box files with over 800 characters each. Then I've created .tr files and now I'm ready to train Tesseract:

sudo ./tesstrain.sh --lang eng --langdata_dir /Users/vitaliy/Desktop/tess-training/langdata --tessdata_dir /Users/vitaliy/Desktop/tess-training/TIFs 

This is an error (s) I'm getting:

=== Starting training for language 'eng'
mktemp: illegal option -- -
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix 
ERROR: text2image not found

Any advice helps! Thank you!

2

There are 2 best solutions below

0
On

I'm not sure what does the command that you have described do, but as for the error, text2image not found, try the following

make training
sudo make training-install

as it was described in this website if you search for the command above it says that these commands are for training tools, which clearly text2image is one of them

0
On
  • You mostly have not built the training component which gets enabled during configure steps if you have met with all the requirements.

    • first do this

    ./configure > config.log

    • Make sure there is no warning or error and Makefile should be generated in the training folder.

    • Mostly you will need the following things to be installed

    • sudo apt-get install libicu-dev

    • sudo apt-get install libpango1.0-dev
    • sudo apt-get install libcairo2-dev

    • make

    • sudo make training
    • sudo make training-install
  • text2Image should be built by now make sure you adjust the PATH variable accordingly.