当前位置:网站首页>使用tesseract识别图片中的文字
使用tesseract识别图片中的文字
2022-06-09 16:16:00 【Unacandoit】
1.下载tesseract,并将其加入环境变量
下载地址:https://digi.bib.uni-mannheim.de/tesseract/
这里我下载的最新版本,保存到D:\Tesseract
然后我们来设置环境变量:
右击“此电脑”——选择“属性”——找到“高级系统设置”——在“系统变量”中点击Path,进行编辑
点击右侧的“编辑”,将tesseract的保存路径复制进来
然后再新建一个系统环境变量,点击“新建”
创建变量TESSDATA_PREFIX,变量值就是tessdata所在路径
2.图片中的英文识别
按住win+R,输入cmd
假设我们要识别的图片所在路径为F:\Saved Pictures
那么我们首先进入f盘,然后用cd导入图片所在路径
开始识别:输入命令tesseract a.png a
3.图片中的中文识别
到下面的网址中去下载chi_sim.traineddata这个文件,并将其保存到tesseract文件夹下的tessdata文件夹中
https://github.com/tesseract-ocr/tessdata_fast/blob/main/chi_sim.traineddata
假设我们要识别的图片所在路径为F:\Saved Pictures
那么我们首先进入f盘,然后用cd导入图片所在路径
然后开始识别:输入命令tesseract b.png b -l chi_sim
以后一行代码就可以解决截图中文字识别的问题了,再也不用找别的软件啦,一劳永逸哈哈!!!大家加油鸭~~
边栏推荐
猜你喜欢

看完就会,从抓包到接口测试的全过程解析

SphereEx 正式开源面向 Database Mesh 的解决方案 Pisanix

Win10找不到飞行模式开关怎么办?

windows 下安装 MySQL5.7服务端(满满都是坑)

Solution de téléchargement d'images ueditor entre domaines

Customizing the in app keyboard in fluent

在不平衡数据上使用AUPRC替代ROC-AUC

30-year-old mind map

Senior openstacker - Bloomberg, vexxhost upgraded to gold member of openinfra Foundation
![[ctfshow singles cup]web writeup & learn the basic usage of SED awk](/img/e6/c0ce483e091ba03f81667dacc04c3b.png)
[ctfshow singles cup]web writeup & learn the basic usage of SED awk
随机推荐
Browser fingerprint interpretation
测试必看,初次编写测试用例的要点
ue4 bsp画刷中光源需要重建(x未构建对象)
Replace ROC-AUC with auprc on unbalanced data
cesium 绘制栅栏
Deepin 运行 cherrytree报错找不到模块gtksourceview2
Wechat applet mind map
从 0 到 1,探究百亿流量验证下的 MVVM 框架设计
疫情之下,四点认知助你成长!
代码。。。。
Moonbeam foundation and Arrington capital jointly launched the $100million ecological growth fund to promote the ecological growth of moonbeam
[ctfshow singles cup]web writeup & learn the basic usage of SED awk
Kali intranet penetration shell
Install MySQL 5.7 server under windows (full of holes)
R language plot visualization: plot to visualize the two-dimensional histogram contour map, and add two variable edge histograms (2D histogram contour subplot) on the top and right of the two-dimensio
Introduction to database storage directory structure
Test must see, key points of writing test cases for the first time
Dapr . Net core example
Win10找不到飞行模式开关怎么办?
中原银行统一日志平台