zoukankan      html  css  js  c++  java
  • tesseract 3.04在centos6上安装

    tesseract是一个开源的OCR文字识别工具

    查找相关文章:tesseract
     

    tesseract 4.0一直安装失败,后来参照网上的方法,成功安装3.04

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    yum -y install automake libtool autoconf gcc gcc-c++
     
    wget http://www.leptonica.com/source/leptonica-1.73.tar.gz
     
    tar -xvf leptonica-1.73.tar.gz;
    cd leptonica-1.73;
    ./configure && make && make install
     
     
    wget https://github.com/tesseract-ocr/tesseract/archive/3.04.01.tar.gz;
    mv 3.04.01.tar.gz tesseract-3.04.01.tar.gz;
    tar xzvf tesseract-3.04.01.tar.gz;
    cd tesseract-3.04.01/;
    ./autogen.sh;
    ./configure;
    make;
    make install
     
    ldconfig
     
    安装后tesseract位于以下位置
    /usr/local/bin/tesseract
     
    export TESSDATA_PREFIX=/usr/local/share/tessdata/
     
     
    wget --no-check-certificate https://github.com/tesseract-ocr/tessdata/raw/master/eng.traineddata;
    wget --no-check-certificate https://github.com/tesseract-ocr/tessdata/raw/master/chi_sim.traineddata;
    wget --no-check-certificate https://github.com/tesseract-ocr/tessdata/raw/master/chi_tra.traineddata;
                           
    mv *.traineddata /usr/local/share/tessdata/
     
     
    install Ghostscript for processing png:
     
    wget https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs920/ghostscript-9.20.tar.gz;
    tar xzvf ghostscript-9.20.tar.gz;
    cd ghostscript-9.20/;
    ./autogen.sh;
    ./configure;
    make;
    make install

    更简便的方法是使用yum方式安装

    1
    2
    3
    4
    5
    6
    yum install epel-release
    yum install tesseract
    中文包
    yum install tesseract-langpack-chi_sim.noarch
    训练文件位于
    /usr/share/tesseract/tessdata/
  • 相关阅读:
    2019-8-31-C#-性能分析-反射-VS-配置文件-VS-预编译
    2018-8-10-WPF-鼠标移动到列表上-显示列表图标
    C语言对齐、补齐
    main函数前后
    Ubuntu安装telnet
    Ubuntu安装rpm
    extern c 解释
    gcc和g++编译器
    原子操作
    linux内核信号量
  • 原文地址:https://www.cnblogs.com/xzlive/p/11445000.html
Copyright © 2011-2022 走看看