zoukankan      html  css  js  c++  java
  • centos7下安装tesseractocr进行验证码识别,centos7 安装tesseract ,yum安装tesseract

    step  1 :  

      yum install tesseract -y

    查看  tesseract -v

    step 2:  install more language

      yum install -y tesseract-langpack-rus

    转自  http://tutorialspots.com/how-to-install-tesseract-on-centos-7-4500.html


    1  安装centos系统依赖

    yum install -y automake autoconf libtool gcc gcc-c++ 
    yum install -y libpng-devel libjpeg-devel libtiff-devel

    --部分新服务器需要 yum  install gtk2-devel yasm glibc.i686 libstdc++.so.6 libgtk-x11-2.0.so libatk-1.0.so.0 libcairo.so.2  libcups.so.2 libgdk-x11-2.0.so.0  libgdk_pixbuf-2.0.so.0 libgtk-x11-2.0.so.0  libpango-1.0.so.0   libpangocairo-1.0.so.0  libICE.so.6 libSM.so.6 libmng.so.1  libpng12.so.0  libGLU.so.1 -y


    2

    安装leptonica

    wget http://www.leptonica.org/source/leptonica-1.72.tar.gz
    tar xvzf leptonica-1.72.tar.gz
    cd leptonica-1.72/ 

    ./configure --prefix=/usr/local/
    make && make install
    配置环境
    vim /etc/bashrc
    加入
    
    PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
    
    export PKG_CONFIG_PATH
    
    CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/local/include/
    
    export CPLUS_INCLUDE_PATH
    
    C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/leptonica/include/leptonica
    
    export C_INCLUDE_PATH
    
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
    
    export LD_LIBRARY_PATH
    
    LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib
    
    export LIBRARY_PATH
    
    TESSDATA_PREFIX=/usr/local/share/tessdata
    
    export TESSDATA_PREFIX
     
    最后刷新
    source /etc/bashrc

    vim /etc/profile
    在最后插入
    
    export LD_LIBRARY_PATH=$LD_LIBRARY_PAYT:/usr/local/lib
    export LIBLEPT_HEADERSDIR=/usr/local/include
    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
    source /etc/profile 


    3

    安装tesseract-ocr

    wget https://github.com/tesseract-ocr/tesseract/archive/3.04.zip
    unzip 3.04.zip
    cd tesseract-3.04/ 
    ./autogen.sh
    ./configure --with-extra-includes=/usr/local/include --with-extra-libraries=/usr/local/include

    make && make install
    sudo ldconfig


    4

      (eng.traineddata     osd.traineddata)


     https://www.cnblogs.com/panpan61803/p/10978117.html

    https://www.cnblogs.com/arachis/p/OCR.html

    https://blog.csdn.net/diyiday/article/details/80004793

  • 相关阅读:
    记一次网站迁移的过程
    如何才能搜索微信群和网盘群
    2021最新车载u盘歌曲集合,每轴更新。想要拉你入群
    工具分享:目录生成器
    福利,剪映PC版来了~ 支持windos系统和苹果系统
    微信8.0来了,可以加1w人好友,微商必看!!!
    centOS7安装 redis server
    Task handler raised error: ValueError('not enough values to unpack (expected 3, got 0)')
    《More Effective C++》读书笔记(下)
    《More Effective C++》读书笔记(中)
  • 原文地址:https://www.cnblogs.com/angdh/p/11459400.html
Copyright © 2011-2022 走看看