当前位置:网站首页>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()
边栏推荐
- 安装配置Jenkins
- Thymeleaf th:classappend attribute append th:styleappend style append th:data- custom attribute
- Is it OK to open the securities account on the excavation finance? Is it safe?
- 一键更改多个文件名字
- 微帧科技荣获全球云计算大会“云鼎奖”!
- Talking about how dataset and dataloader call when loading data__ getitem__ () function
- leetcode:881. 救生艇
- The function of qualifier in C language
- TS所有dom元素的类型声明
- Run faster with go: use golang to serve machine learning
猜你喜欢
Differences between IPv6 and IPv4 three departments including the office of network information technology promote IPv6 scale deployment
[summary of leetcode weekly competition] the 81st fortnight competition of leetcode (6.25)
可视化任务编排&拖拉拽 | Scaleph 基于 Apache SeaTunnel的数据集成
Thymeleaf th:with use of local variables
周大福践行「百周年承诺」,真诚服务推动绿色环保
PyTorch二分类时BCELoss,CrossEntropyLoss,Sigmoid等的选择和使用
网上电子元器件采购商城:打破采购环节信息不对称难题,赋能企业高效协同管理
Talking about how dataset and dataloader call when loading data__ getitem__ () function
Security analysis of Web Architecture
How to protect user privacy without password authentication?
随机推荐
SSL证书错误怎么办?浏览器常见SSL证书报错解决办法
FR练习题目---综合题
webRTC SDP mslabel lable
【数组和进阶指针经典笔试题12道】这些题,满足你对数组和指针的所有幻想,come on !
maxcompute有没有能查询 表当前存储容量的大小(kb) 的sql?
CPU设计相关笔记
日化用品行业智能供应链协同系统解决方案:数智化SCM供应链,为企业转型“加速度”
启牛学堂班主任给的证券账户安全吗?能开户吗?
webRTC SDP mslabel lable
Thymeleaf th:classappend attribute append th:styleappend style append th:data- custom attribute
IPv6与IPv4的区别 网信办等三部推进IPv6规模部署
How to solve the problem of garbled code when installing dependency through NPM or yarn
Un week - end heureux
How can non-technical departments participate in Devops?
Isn't it right to put money into the external market? How can we ensure safety?
Photoshop plug-in - action related concepts - actions in non loaded execution action files - PS plug-in development
leetcode:881. lifeboat
How does redis implement multiple zones?
STM32+BH1750光敏传感器获取光照强度
GPS原始坐标转百度地图坐标(纯C代码)