質問

I'm using the Tessnet2 assembly (which uses Tesseract) to do OCR. Unfortunately the programm crashes without any exception after I call the init method:

tessnet2.Tesseract ocr = new tessnet2.Tesseract();
ocr.Init(@"D:\Test\Tessdata\german", "deu", false);

The german folder contains the following tesseract 2 word data:

  • deu.DangAmgigs
  • deu.freq-dawg
  • deu.inttemp
  • deu.normproto
  • deu.pffmtable
  • deu.unicharset
  • deu.user-words
  • deu.word-dawg

If I use null for the path it works fine because I installed tesseract on my machine. However I need a solution with the path because where the programm will be deplyoed it is not ensured that tesseract is installed.

役に立ちましたか?

解決

The problem is that if you have Tesseract installed there is an environment variable set ( TESSDATA_PREFIX )which contains the path of the tessdata. To use your own path it is necessary to uninstall Tesseract and delete the environment variable.

他のヒント

Try the path:
     @"D:\Test\Tessdata"
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top