当前位置:网站首页>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()
边栏推荐
- 【華為機試真題詳解】歡樂的周末
- CPU design related notes
- Qingda KeYue rushes to the science and Innovation Board: the annual revenue is 200million, and it is proposed to raise 750million
- Online electronic component purchasing Mall: break the problem of information asymmetry in the purchasing process, and enable enterprises to effectively coordinate management
- Topology可视化绘图引擎
- PMP考试20天能通过吗?
- 黑马程序员-软件测试-10阶段2-linux和数据库-44-57为什么学习数据库,数据库分类关系型数据库的说明Navicat操作数据的说明,Navicat操作数据库连接说明,Navicat的基本使用,
- 【华为机试真题详解】字符统计及重排
- How to choose the appropriate certificate brand when applying for code signing certificate?
- Is the securities account given by the head teacher of qiniu school safe? Can I open an account?
猜你喜欢
Run faster with go: use golang to serve machine learning
Loop invariant
Section - left closed right open
面试突击62:group by 有哪些注意事项?
PHP - fatal error: allowed memory size of 314572800 bytes exhausted
PyTorch二分类时BCELoss,CrossEntropyLoss,Sigmoid等的选择和使用
How to choose the appropriate certificate brand when applying for code signing certificate?
Thymeleaf th:classappend attribute append th:styleappend style append th:data- custom attribute
IPv6与IPv4的区别 网信办等三部推进IPv6规模部署
leetcode:881. lifeboat
随机推荐
面试突击62:group by 有哪些注意事项?
mysql8.0JSON_ Instructions for using contains
CODING DevSecOps 助力金融企业跑出数字加速度
Security analysis of Web Architecture
How does redis implement multiple zones?
useMemo,memo,useRef等相关hooks详解
GPS原始坐标转百度地图坐标(纯C代码)
PyTorch二分类时BCELoss,CrossEntropyLoss,Sigmoid等的选择和使用
【招聘岗位】基础设施软件开发人员
How to solve the problem of garbled code when installing dependency through NPM or yarn
我这边同时采集多个oracle表,采集一会以后,会报oracle的oga内存超出,大家有没有遇到的?
Implement a blog system -- using template engine technology
做自媒體視頻二次剪輯,怎樣剪輯不算侵權
anaconda使用中科大源
Share 20 strange JS expressions and see how many correct answers you can get
如何将电脑复制的内容粘贴进MobaXterm?如何复制粘贴
在Pytorch中使用Tensorboard可视化训练过程
Thymeleaf th:classappend属性追加 th:styleappend样式追加 th:data-自定义属性
Install and configure Jenkins
PHP - fatal error: allowed memory size of 314572800 bytes exhausted