当前位置:网站首页>easyOCR 字符識別
easyOCR 字符識別
2022-07-05 14:45:00 【天人合一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的參數是文件夾的路徑
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()
边栏推荐
- Handwriting promise and async await
- Photoshop plug-in - action related concepts - actions in non loaded execution action files - PS plug-in development
- 【华为机试真题详解】欢乐的周末
- leetcode:881. lifeboat
- Thymeleaf 模板的创建与使用
- 我这边同时采集多个oracle表,采集一会以后,会报oracle的oga内存超出,大家有没有遇到的?
- Is the securities account given by the head teacher of qiniu school safe? Can I open an account?
- NBA赛事直播超清画质背后:阿里云视频云「窄带高清2.0」技术深度解读
- The function of qualifier in C language
- 长列表优化虚拟滚动
猜你喜欢
Qingda KeYue rushes to the science and Innovation Board: the annual revenue is 200million, and it is proposed to raise 750million
World Environment Day | Chow Tai Fook serves wholeheartedly to promote carbon reduction and environmental protection
Talking about how dataset and dataloader call when loading data__ getitem__ () function
Topology visual drawing engine
Microframe technology won the "cloud tripod Award" at the global Cloud Computing Conference!
CPU design related notes
Chow Tai Fook fulfills the "centenary commitment" and sincerely serves to promote green environmental protection
PyTorch二分类时BCELoss,CrossEntropyLoss,Sigmoid等的选择和使用
Security analysis of Web Architecture
Pointer operation - C language
随机推荐
想进阿里必须啃透的12道MySQL面试题
Selection and use of bceloss, crossentropyloss, sigmoid, etc. in pytorch classification
网上电子元器件采购商城:打破采购环节信息不对称难题,赋能企业高效协同管理
快消品行业SaaS多租户解决方案,构建全产业链数字化营销竞争力
anaconda使用中科大源
详解Vue适时清理keepalive缓存方案
Change multiple file names with one click
Shanghai under layoffs
Principle and performance analysis of lepton lossless compression
想问下大家伙,有无是从腾讯云MYSQL同步到其他地方的呀?腾讯云MySQL存到COS上的binlog
有一个强大又好看的,赛过Typora,阿里开发的语雀编辑器
【leetcode周赛总结】LeetCode第 81 场双周赛(6.25)
Fonctions communes de thymeleaf
CYCA少儿形体礼仪 宁波市培训成果考核圆满落幕
729. 我的日程安排表 I :「模拟」&「线段树(动态开点)」&「分块 + 位运算(分桶)」
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?
两个BI开发,3000多张报表?如何做的到?
启牛学堂班主任给的证券账户安全吗?能开户吗?
Structure - C language
Faire un clip vidéo auto - média deux fois, comment clip n'est pas considéré comme une infraction