当前位置:网站首页>Reconnaissance des caractères easycr
Reconnaissance des caractères easycr
2022-07-05 14:45:00 【Le ciel et l'homme en un 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): # listdirLe paramètre pour est le chemin du dossier
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()
边栏推荐
猜你喜欢
FR练习题目---简单题
如何将电脑复制的内容粘贴进MobaXterm?如何复制粘贴
Sharing the 12 most commonly used regular expressions can solve most of your problems
Countermeasures of enterprise supply chain management system in UCA Era
计算中间件 Apache Linkis参数解读
浅谈Dataset和Dataloader在加载数据时如何调用到__getitem__()函数
日化用品行业智能供应链协同系统解决方案:数智化SCM供应链,为企业转型“加速度”
How can non-technical departments participate in Devops?
基于TI DRV10970驱动直流无刷电机
周大福践行「百周年承诺」,真诚服务推动绿色环保
随机推荐
实现一个博客系统----使用模板引擎技术
【学习笔记】图的连通性与回路
STM32+BH1750光敏传感器获取光照强度
【華為機試真題詳解】歡樂的周末
I collect multiple Oracle tables at the same time. After collecting for a while, I will report that Oracle's OGA memory is exceeded. Have you encountered it?
乌卡时代下,企业供应链管理体系的应对策略
LeetCode_ 3 (longest substring without repeated characters)
webRTC SDP mslabel lable
【招聘岗位】软件工程师(全栈)- 公共安全方向
想问下大家伙,有无是从腾讯云MYSQL同步到其他地方的呀?腾讯云MySQL存到COS上的binlog
Explain Vue's plan to clean up keepalive cache in time
家用电器行业商业供应链协同平台解决方案:供应链系统管理精益化,助推企业智造升级
[learning notes] connectivity and circuit of graph
计算中间件 Apache Linkis参数解读
anaconda使用中科大源
Using tensorboard to visualize the training process in pytoch
Matrix chain multiplication dynamic programming example
做自媒體視頻二次剪輯,怎樣剪輯不算侵權
想进阿里必须啃透的12道MySQL面试题
快消品行业SaaS多租户解决方案,构建全产业链数字化营销竞争力