Tesseract running error

后端 未结 11 1227
情书的邮戳
情书的邮戳 2020-11-29 21:08

I have a problem with running tesseract-ocr engine on linux. I\'ve downloaded RUS language data and put it to tessdata directory (/usr/local/share/tessdata). When I\'m tryin

11条回答
  •  余生分开走
    2020-11-29 21:26

    tesseract  --tessdata-dir   stdout --oem 2 -l 
    

    In my case, the mistakes that I've made or attempts that wasn't a success.

    • I cloned the github repo and copied files from there to
      • /usr/local/share/tessdata/
      • /usr/share/tesseract-ocr/tessdata/
      • /usr/share/tessdata/
    • Used TESSDATA_PREFIX with above paths
    • sudo apt-get install tesseract-ocr-eng

    First 2 attempts did not worked because, the files from git clone did not worked for the reasons that I do not know. I am not sure why #3 attempt worked for me.

    Finally,

    1. I downloaded the eng.traindata file using wget
    2. Copied it to some directory
    3. Used --tessdata-dir with directory name

    Take away for me is to learn the tool well & make use of it, rather than relying on package manager installation & directories

提交回复
热议问题