当前位置:网站首页>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 th:classappend属性追加 th:styleappend样式追加 th:data-自定义属性
- Type declaration of all DOM elements in TS
- 【招聘岗位】软件工程师(全栈)- 公共安全方向
- Sharing the 12 most commonly used regular expressions can solve most of your problems
- How can non-technical departments participate in Devops?
- FR练习题目---综合题
- 详解Vue适时清理keepalive缓存方案
- Security analysis of Web Architecture
- Thymeleaf th:classappend attribute append th:styleappend style append th:data- custom attribute
- CPU design related notes
猜你喜欢
Thymeleaf 使用后台自定义工具类处理文本
How does redis implement multiple zones?
SaaS multi tenant solution for FMCG industry to build digital marketing competitiveness of the whole industry chain
Selection and use of bceloss, crossentropyloss, sigmoid, etc. in pytorch classification
How to protect user privacy without password authentication?
Topology可视化绘图引擎
Install and configure Jenkins
CyCa children's physical etiquette Ningbo training results assessment came to a successful conclusion
Opengauss database source code analysis series articles -- detailed explanation of dense equivalent query technology (Part 2)
【NVMe2.0b 14-9】NVMe SR-IOV
随机推荐
做自媒體視頻二次剪輯,怎樣剪輯不算侵權
Share 20 strange JS expressions and see how many correct answers you can get
C language -- structure and function
[summary of leetcode weekly competition] the 81st fortnight competition of leetcode (6.25)
Thymeleaf 使用后台自定义工具类处理文本
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?
maxcompute有没有能查询 表当前存储容量的大小(kb) 的sql?
【NVMe2.0b 14-9】NVMe SR-IOV
I want to inquire about how to ensure data consistency when a MySQL transaction updates multiple tables?
js亮瞎你眼的日期选择器
NBA赛事直播超清画质背后:阿里云视频云「窄带高清2.0」技术深度解读
anaconda使用中科大源
Is the securities account given by the head teacher of qiniu school safe? Can I open an account?
想问下大家伙,有无是从腾讯云MYSQL同步到其他地方的呀?腾讯云MySQL存到COS上的binlog
[learning notes] stage test 1
Thymeleaf th:with局部变量的使用
启牛证券账户怎么开通,开户安全吗?
Is it OK to open the securities account on the excavation finance? Is it safe?
Catch all asynchronous artifact completable future
[C question set] of Ⅷ