当前位置:网站首页>Easyocr character recognition
Easyocr character recognition
2022-07-05 14:45:00 【Harmony between man and nature 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 The parameter of is the path of the folder
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()
边栏推荐
- 危机重重下的企业发展,数字化转型到底是不是企业未来救星
- Thymeleaf 模板的创建与使用
- Thymeleaf common functions
- Selection and use of bceloss, crossentropyloss, sigmoid, etc. in pytorch classification
- maxcompute有没有能查询 表当前存储容量的大小(kb) 的sql?
- Disjoint Set
- Interview shock 62: what are the precautions for group by?
- 申请代码签名证书时如何选择合适的证书品牌?
- Solution of commercial supply chain collaboration platform in household appliance industry: lean supply chain system management, boosting enterprise intelligent manufacturing upgrading
- Long list optimized virtual scrolling
猜你喜欢
浅谈Dataset和Dataloader在加载数据时如何调用到__getitem__()函数
基于TI DRV10970驱动直流无刷电机
【leetcode周赛总结】LeetCode第 81 场双周赛(6.25)
Microframe technology won the "cloud tripod Award" at the global Cloud Computing Conference!
Under the crisis of enterprise development, is digital transformation the future savior of enterprises
Thymeleaf 模板的创建与使用
How to protect user privacy without password authentication?
MongDB学习笔记
Install and configure Jenkins
两个BI开发,3000多张报表?如何做的到?
随机推荐
Structure - C language
js亮瞎你眼的日期选择器
【leetcode周赛总结】LeetCode第 81 场双周赛(6.25)
【C 题集】of Ⅷ
可视化任务编排&拖拉拽 | Scaleph 基于 Apache SeaTunnel的数据集成
Type declaration of all DOM elements in TS
如何将电脑复制的内容粘贴进MobaXterm?如何复制粘贴
ASP. Net large takeout ordering system source code (PC version + mobile version + merchant version)
详解Vue适时清理keepalive缓存方案
Thymeleaf th:with局部变量的使用
Thymeleaf 模板的创建与使用
Catch all asynchronous artifact completable future
STM32+BH1750光敏传感器获取光照强度
Longest common subsequence dynamic programming
家用电器行业商业供应链协同平台解决方案:供应链系统管理精益化,助推企业智造升级
webRTC SDP mslabel lable
【招聘岗位】基础设施软件开发人员
How to open an account of qiniu securities? Is it safe to open an account?
[detailed explanation of Huawei machine test] happy weekend
想问下大家伙,有无是从腾讯云MYSQL同步到其他地方的呀?腾讯云MySQL存到COS上的binlog