Installing Tesseract-OCR on CentOS 6

前端 未结 6 1110
终归单人心
终归单人心 2020-12-11 02:50

I\'m trying to install Tesseract-OCR on my server however when I install all what I believe to be the correct repos. When I try to install it the package is not found

<
6条回答
  •  無奈伤痛
    2020-12-11 03:25

    Install Tesseract OCR libs from sources (UPDATED as on 14th July 2018)

    Download Leptonica and Teseract sources:

    $ wget http://www.leptonica.com/source/leptonica-1.76.0.tar.gz

    $ wget https://sourceforge.net/projects/tesseract-ocr-alt/files/tesseract-ocr-3.02.02.tar.gz

    Configure, compile, install Leptonica:

    $ tar xzvf leptonica-1.76.0.tar.gz
    $ cd leptonica-1.76.0
    $ ./configure & make & sudo make install
    

    Configure, compile, install Tesseract:

    $ tar xzf tesseract-ocr-3.02.02.tar.gz
    $ cd tesseract-ocr
    $ ./autogen.sh & ./configure & make & sudo make install & sudo ldconfig
    

    Download language file:

    I am downloading english language file(eng.traineddata) here. You can see complete list of language files here and download as per your need. https://github.com/tesseract-ocr/tesseract/wiki/Data-Files#data-files-for-version-302

    Download languages (english) and copy to tessdata folder:

    $ wget https://sourceforge.net/projects/tesseract-ocr-alt/files/tesseract-ocr-3.02.eng.tar.gz
    $ tar xzf tesseract-ocr-3.02.eng.tar.gz
    $ sudo cp tesseract-ocr/tessdata/* /usr/local/share/tessdata
    

    Now your Tesseract OCR is installed and ready to use! Example:

    $tesseract /path/to/input/test.jpg /path/to/output/abc.txt -l eng
    

    Enjoy!!!

提交回复
热议问题