美文网首页OpenCV
python-opencv windows安装流程

python-opencv windows安装流程

作者: 佑___ | 来源:发表于2020-07-06 17:48 被阅读0次
    • 安装步骤

    一、python环境下安装 opencv

      pip install opencv-python
      pip install pytesseract
    

    二.、下载安装tesseract安装包

    https://github.com/tesseract-ocr/tesseract/wiki

    64位:
    http://digi.bib.uni-mannheim.de/tesseract/tesseract-ocr-setup-4.00.00dev.exe
    下载后直接安装即可,但是要记得你的安装目录,等会需配置环境变量

    如果不是做英文的图文识别,还需要下载其他语言的识别包
    https://github.com/tesseract-ocr/tesseract/wiki/Data-Files

    简体字识别包:
    https://raw.githubusercontent.com/tesseract-ocr/tessdata/4.00/chi_sim.traineddata

    繁体字识别包:
    https://github.com/tesseract-ocr/tessdata/raw/4.0/chi_tra.traineddata

    • 一直按下一步安装即可

    三、配置环境变量

    • 将以下路径配置环境变量中


      image.png
    • 配置完成,打开cmd,输以下命令,即完成配置。


      image.png

    四、配置pytesseract.py

    1. 打开pytesseract.py文件
    image.png
    1. 找到原来的路径: tesseract_cmd = 'tesseract',
      改为自己下载好的路径:tesseract_cmd = 'D:\Tesseract-OCR\tesseract.exe'
    image.png

    欧克,以上就是完整的python OpenCV的完整安装步骤!

    相关文章

      网友评论

        本文标题:python-opencv windows安装流程

        本文链接:https://www.haomeiwen.com/subject/kikgqktx.html