zoukankan      html  css  js  c++  java
  • tesseract-ocr4.0 安装部署及训练验证码识别

    1.  下载最新版本的leptonica,  leptonica-1.74.1.tar.gz  

    2.  编译安装

    tar -zxvf leptonica-1.74.1.tar.gz
    cd leptonica-1.74.1
    ./configure
    make
    sudo make install

    3. 安装相关依赖库

    sudo apt-get install autoconf automake libtool
    sudo apt-get install autoconf-archive
    sudo apt-get install pkg-config
    sudo apt-get install libpng12-dev
    sudo apt-get install libjpeg8-dev
    sudo apt-get install libtiff5-dev
    sudo apt-get install zlib1g-dev
    
    #if you plan to install the training tools, you also need the following libraries:
    
    sudo apt-get install libicu-dev
    sudo apt-get install libpango1.0-dev
    sudo apt-get install libcairo2-dev

    4. 下载编译安装最新版本 tesseract-4.0, 

    git clone --depth 1 https://github.com/tesseract-ocr/tesseract.git
    cd tesseract
    ./autogen.sh
    ./configure --enable-debug
    LDFLAGS="-L/usr/local/lib" CFLAGS="-I/usr/local/include" make
    sudo make install
    sudo ldconfig

    5. 使用

    # 查看版本号
    tesseract -v
    
    # 查看tesseract 支持语言
    tesseract --list-langs
    
    # 识别 test.jpg 图片文字
    tesseract test.jpg out -l eng
    more out.txt
    每天一小步,人生一大步!Good luck~
  • 相关阅读:
    【搜索结果】高亮显示
    【搜索面板】排序单选
    【搜索面板】价格信息单选
    根据接口返回的数据重组数组
    Array.from
    获取指定字符串第n次出现的位置索引
    Object
    验证码倒计时
    iview Form表单正则验证
    网络图片转base64格式
  • 原文地址:https://www.cnblogs.com/jkmiao/p/6417167.html
Copyright © 2011-2022 走看看