当前位置:网站首页>easyOCR 字符识别
easyOCR 字符识别
2022-07-05 14:44: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()
边栏推荐
- CPU design related notes
- Selection and use of bceloss, crossentropyloss, sigmoid, etc. in pytorch classification
- Structure - C language
- C language -- structure and function
- 【華為機試真題詳解】歡樂的周末
- Total amount analysis accounting method and potential method - allocation analysis
- Time to calculate cron expression based on cronsequencegenerator
- What about SSL certificate errors? Solutions to common SSL certificate errors in browsers
- Share 20 strange JS expressions and see how many correct answers you can get
- leetcode:881. lifeboat
猜你喜欢

有一个强大又好看的,赛过Typora,阿里开发的语雀编辑器

两个BI开发,3000多张报表?如何做的到?

leetcode:881. 救生艇

Thymeleaf 使用后台自定义工具类处理文本

How can non-technical departments participate in Devops?

Thymeleaf 模板的创建与使用

Two Bi development, more than 3000 reports? How to do it?

FR练习题目---简单题

快消品行业SaaS多租户解决方案,构建全产业链数字化营销竞争力

黑马程序员-软件测试-10阶段2-linux和数据库-44-57为什么学习数据库,数据库分类关系型数据库的说明Navicat操作数据的说明,Navicat操作数据库连接说明,Navicat的基本使用,
随机推荐
【华为机试真题详解】欢乐的周末
leetcode:881. lifeboat
日化用品行业智能供应链协同系统解决方案:数智化SCM供应链,为企业转型“加速度”
Time to calculate cron expression based on cronsequencegenerator
03_ Dataimport of Solr
用 Go 跑的更快:使用 Golang 为机器学习服务
Differences between IPv6 and IPv4 three departments including the office of network information technology promote IPv6 scale deployment
面试突击62:group by 有哪些注意事项?
Online electronic component purchasing Mall: break the problem of information asymmetry in the purchasing process, and enable enterprises to effectively coordinate management
How does redis implement multiple zones?
Thymeleaf common functions
【数组和进阶指针经典笔试题12道】这些题,满足你对数组和指针的所有幻想,come on !
Chow Tai Fook fulfills the "centenary commitment" and sincerely serves to promote green environmental protection
注意!软件供应链安全挑战持续升级
mysql8.0JSON_CONTAINS的使用说明
Qingda KeYue rushes to the science and Innovation Board: the annual revenue is 200million, and it is proposed to raise 750million
启牛学堂班主任给的证券账户安全吗?能开户吗?
LeetCode_ 2 (add two numbers)
Thymeleaf th:with use of local variables
Matrix chain multiplication dynamic programming example