基于pytesseract的OCR图片识别

简介

pytesseract是基于谷歌的tesseract的OCR包,支持识别一些简单的数字、字母、中文。

安装

安装引擎

下载地址:https://digi.bib.uni-mannheim.de/tesseract/
一般是Windows 64位系统最新版:
1

如果要识别中文,注意选中中文模块。
1

下载
把tesseract.exe目录加入Path,如D:\Program Files\Tesseract-OCR

安装pytesseract包

pip install Pillow
pip install pytesseract

测试代码

1

from PIL import Image
import pytesseract

res = pytesseract.image_to_string(Image.open('test.jpg'), lang='chi_sim')
print(res)

1

相关链接

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

相关推荐

  1. 使用Pytesseract进行OCR

    2024-07-13 07:40:04       38 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-13 07:40:04       67 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-13 07:40:04       72 阅读
  3. 在Django里面运行非项目文件

    2024-07-13 07:40:04       58 阅读
  4. Python语言-面向对象

    2024-07-13 07:40:04       69 阅读

热门阅读

  1. Tinker集成备忘录

    2024-07-13 07:40:04       19 阅读
  2. TypeScript学习笔记

    2024-07-13 07:40:04       27 阅读
  3. MIME 类型

    2024-07-13 07:40:04       25 阅读
  4. 35、php 实现构建乘积数组、正则表达式匹配

    2024-07-13 07:40:04       22 阅读
  5. django ninja get not allowed 能用 put delete

    2024-07-13 07:40:04       23 阅读
  6. 【算法】删除链表的倒数第 N 个结点

    2024-07-13 07:40:04       21 阅读
  7. 力扣-bfs

    2024-07-13 07:40:04       22 阅读
  8. 访问本地SQL Server:巴比达内网穿透的又一妙用

    2024-07-13 07:40:04       23 阅读
  9. 会话固定攻击

    2024-07-13 07:40:04       26 阅读
  10. Json 之 DSL-Json

    2024-07-13 07:40:04       20 阅读