当前位置:网站首页>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()
边栏推荐
- 【华为机试真题详解】欢乐的周末
- Does maxcompute have SQL that can query the current storage capacity (KB) of the table?
- Thymeleaf 模板的创建与使用
- MongDB学习笔记
- webRTC SDP mslabel lable
- Mongdb learning notes
- 家用电器行业商业供应链协同平台解决方案:供应链系统管理精益化,助推企业智造升级
- Strong connection component
- CPU design practice - Chapter 4 practical task 2 using blocking technology to solve conflicts caused by related problems
- be careful! Software supply chain security challenges continue to escalate
猜你喜欢

ASP. Net large takeout ordering system source code (PC version + mobile version + merchant version)

Install and configure Jenkins

Drive brushless DC motor based on Ti drv10970

Security analysis of Web Architecture

How does redis implement multiple zones?

leetcode:881. 救生艇

日化用品行业智能供应链协同系统解决方案:数智化SCM供应链,为企业转型“加速度”

Implement a blog system -- using template engine technology

SaaS multi tenant solution for FMCG industry to build digital marketing competitiveness of the whole industry chain

【华为机试真题详解】字符统计及重排
随机推荐
How does redis implement multiple zones?
Thymeleaf th:with局部变量的使用
Opengauss database source code analysis series articles -- detailed explanation of dense equivalent query technology (Part 2)
Thymeleaf common functions
安装配置Jenkins
MongDB学习笔记
申请代码签名证书时如何选择合适的证书品牌?
Principle and performance analysis of lepton lossless compression
Google eventbus usage details
NBA赛事直播超清画质背后:阿里云视频云「窄带高清2.0」技术深度解读
Talking about how dataset and dataloader call when loading data__ getitem__ () function
webRTC SDP mslabel lable
家用电器行业商业供应链协同平台解决方案:供应链系统管理精益化,助推企业智造升级
mysql8.0JSON_CONTAINS的使用说明
2022年国内正规的期货公司平台有哪些啊?方正中期怎么样?安全可靠吗?
Online electronic component purchasing Mall: break the problem of information asymmetry in the purchasing process, and enable enterprises to effectively coordinate management
用 Go 跑的更快:使用 Golang 为机器学习服务
【NVMe2.0b 14-9】NVMe SR-IOV
网上电子元器件采购商城:打破采购环节信息不对称难题,赋能企业高效协同管理
Webrtc learning (II)