Cannot set datapath

Mateusz Z
2014-06-06
2014-06-10
  • Mateusz Z
    Mateusz Z
    2014-06-06

    Hi,
    I try to set datapath in application like that:

    Tesseract ocr = Tesseract.getInstance();
    ocr.setDatapath("/home/xyz/workspace/OcrTest/"); //or
    ocr.setDatapath("/home/xyz/workspace/OcrTest/datapath");

    but each time I got:

    Error opening data file /usr/local/share/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!

    If i set environment variable TESSDATA_PREFIX everything starts working. Does anybody notice this problem? I use ubuntu 64x 13.10.

     
  • Quan Nguyen
    Quan Nguyen
    2014-06-10

    Yes, the issue was fixed in Tesseract 3.03.