当前位置:网站首页>easyOCR 字符識別
easyOCR 字符識別
2022-07-05 14:45:00 【天人合一peng】
import easyocr
import cv2
import os
reader = easyocr.Reader(['en'],model_storage_directory="./easyOCRModel")
path = r"D:\BUFFER\Pycharm\RecognitionOCR\images\ROI_Images"
# path = r"D:\BUFFER\Pycharm\RecognitionOCR\images\rudeOCR"
for filename in os.listdir(path): # listdir的參數是文件夾的路徑
img_path = path + '\\' + filename
# print(filenames)
img_orig = cv2.imread(img_path, 1)
# cv2.imshow("image", img_orig)
# cv2.waitKey()
result = reader.readtext(img_path)
if result and result[0][2] >= 0.90:
print(img_path)
print(result[0][1])
print(result[0][2])
# str_j = 'python {}! format {}!'.format(666, 999)
ocr_possible = ' {}-{}!'.format( result[0][1], result[0][2])
cv2.putText(img_orig, ocr_possible , (2, 20), cv2.FONT_HERSHEY_SIMPLEX, 0.75, (0, 0, 255), 2)
cv2.imshow("image", img_orig)
cv2.waitKey()
边栏推荐
- 开挖财上的证券账户可以吗?安全吗?
- easyOCR 字符识别
- PyTorch二分类时BCELoss,CrossEntropyLoss,Sigmoid等的选择和使用
- Qingda KeYue rushes to the science and Innovation Board: the annual revenue is 200million, and it is proposed to raise 750million
- 快消品行业SaaS多租户解决方案,构建全产业链数字化营销竞争力
- How can non-technical departments participate in Devops?
- Topology visual drawing engine
- C language -- structure and function
- 计算中间件 Apache Linkis参数解读
- Photoshop插件-动作相关概念-非加载执行动作文件中动作-PS插件开发
猜你喜欢

Sharing the 12 most commonly used regular expressions can solve most of your problems

Intelligent supply chain collaboration system solution for daily chemical products industry: digital intelligent SCM supply chain, which is the "acceleration" of enterprise transformation

周大福践行「百周年承诺」,真诚服务推动绿色环保

超级哇塞的快排,你值得学会!

freesurfer运行完recon-all怎么快速查看有没有报错?——核心命令tail重定向

How can non-technical departments participate in Devops?

Section - left closed right open

IPv6与IPv4的区别 网信办等三部推进IPv6规模部署

Countermeasures of enterprise supply chain management system in UCA Era

Thymeleaf 模板的创建与使用
随机推荐
mysql8.0JSON_ Instructions for using contains
Topology可视化绘图引擎
裁员下的上海
Run faster with go: use golang to serve machine learning
Chow Tai Fook fulfills the "centenary commitment" and sincerely serves to promote green environmental protection
Does maxcompute have SQL that can query the current storage capacity (KB) of the table?
【華為機試真題詳解】歡樂的周末
Penetration testing methodology
Thymeleaf 使用后台自定义工具类处理文本
webRTC SDP mslabel lable
【招聘岗位】基础设施软件开发人员
在Pytorch中使用Tensorboard可视化训练过程
可视化任务编排&拖拉拽 | Scaleph 基于 Apache SeaTunnel的数据集成
两个BI开发,3000多张报表?如何做的到?
CPU设计实战-第四章实践任务三用前递技术解决相关引发的冲突
easyOCR 字符识别
be careful! Software supply chain security challenges continue to escalate
浅谈Dataset和Dataloader在加载数据时如何调用到__getitem__()函数
【数组和进阶指针经典笔试题12道】这些题,满足你对数组和指针的所有幻想,come on !
Thymeleaf 模板的创建与使用