当前位置:网站首页>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()
边栏推荐
- maxcompute有没有能查询 表当前存储容量的大小(kb) 的sql?
- 想进阿里必须啃透的12道MySQL面试题
- Thymeleaf th:with局部变量的使用
- 【学习笔记】图的连通性与回路
- 日化用品行业智能供应链协同系统解决方案:数智化SCM供应链,为企业转型“加速度”
- Longest common subsequence dynamic programming
- MongDB学习笔记
- Install and configure Jenkins
- Change multiple file names with one click
- Chow Tai Fook fulfills the "centenary commitment" and sincerely serves to promote green environmental protection
猜你喜欢

网上电子元器件采购商城:打破采购环节信息不对称难题,赋能企业高效协同管理

【NVMe2.0b 14-9】NVMe SR-IOV

【数组和进阶指针经典笔试题12道】这些题,满足你对数组和指针的所有幻想,come on !

黑马程序员-软件测试-10阶段2-linux和数据库-44-57为什么学习数据库,数据库分类关系型数据库的说明Navicat操作数据的说明,Navicat操作数据库连接说明,Navicat的基本使用,
![[summary of leetcode weekly competition] the 81st fortnight competition of leetcode (6.25)](/img/d7/f49bca8da2ce286c18508325985990.png)
[summary of leetcode weekly competition] the 81st fortnight competition of leetcode (6.25)

LeetCode_ 2 (add two numbers)

选择排序和冒泡排序

FR练习题目---综合题

Microframe technology won the "cloud tripod Award" at the global Cloud Computing Conference!

729. My schedule I: "simulation" & "line segment tree (dynamic open point) &" block + bit operation (bucket Division) "
随机推荐
Opengauss database source code analysis series articles -- detailed explanation of dense equivalent query technology (Part 2)
通过npm 或者 yarn安装依赖时 报错 出现乱码解决方式
[learning notes] connectivity and circuit of graph
LeetCode_ 3 (longest substring without repeated characters)
超级哇塞的快排,你值得学会!
How to make a second clip of our media video without infringement
微帧科技荣获全球云计算大会“云鼎奖”!
Is it OK to open the securities account on the excavation finance? Is it safe?
CODING DevSecOps 助力金融企业跑出数字加速度
危机重重下的企业发展,数字化转型到底是不是企业未来救星
直播预告|如何借助自动化工具落地DevOps(文末福利)
freesurfer运行完recon-all怎么快速查看有没有报错?——核心命令tail重定向
C language -- structure and function
【NVMe2.0b 14-9】NVMe SR-IOV
World Environment Day | Chow Tai Fook serves wholeheartedly to promote carbon reduction and environmental protection
2022年国内正规的期货公司平台有哪些啊?方正中期怎么样?安全可靠吗?
【华为机试真题详解】字符统计及重排
申请代码签名证书时如何选择合适的证书品牌?
SaaS multi tenant solution for FMCG industry to build digital marketing competitiveness of the whole industry chain
I want to inquire about how to ensure data consistency when a MySQL transaction updates multiple tables?