当前位置:网站首页>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()
边栏推荐
- maxcompute有没有能查询 表当前存储容量的大小(kb) 的sql?
- [detailed explanation of Huawei machine test] character statistics and rearrangement
- freesurfer运行完recon-all怎么快速查看有没有报错?——核心命令tail重定向
- Section - left closed right open
- [detailed explanation of Huawei machine test] happy weekend
- CODING DevSecOps 助力金融企业跑出数字加速度
- Thymeleaf th:with局部变量的使用
- 面试突击62:group by 有哪些注意事项?
- 直播预告|如何借助自动化工具落地DevOps(文末福利)
- 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?
猜你喜欢

【NVMe2.0b 14-9】NVMe SR-IOV

【数组和进阶指针经典笔试题12道】这些题,满足你对数组和指针的所有幻想,come on !

周大福践行「百周年承诺」,真诚服务推动绿色环保

Change multiple file names with one click

leetcode:881. lifeboat

可视化任务编排&拖拉拽 | Scaleph 基于 Apache SeaTunnel的数据集成

Thymeleaf th:classappend属性追加 th:styleappend样式追加 th:data-自定义属性

CODING DevSecOps 助力金融企业跑出数字加速度

How to protect user privacy without password authentication?

FR练习题目---综合题
随机推荐
GPS原始坐标转百度地图坐标(纯C代码)
裁员下的上海
2022年国内正规的期货公司平台有哪些啊?方正中期怎么样?安全可靠吗?
mysql8.0JSON_CONTAINS的使用说明
I want to inquire about how to ensure data consistency when a MySQL transaction updates multiple tables?
Two Bi development, more than 3000 reports? How to do it?
选择排序和冒泡排序
【leetcode周赛总结】LeetCode第 81 场双周赛(6.25)
leetcode:881. 救生艇
CPU design practice - Chapter 4 practice task 3 use pre delivery technology to solve conflicts caused by related issues
Intelligent supply chain collaboration system solution for daily chemical products industry: digital intelligent SCM supply chain, which is the "acceleration" of enterprise transformation
在Pytorch中使用Tensorboard可视化训练过程
Change multiple file names with one click
【招聘岗位】基础设施软件开发人员
Sharing the 12 most commonly used regular expressions can solve most of your problems
Total amount analysis accounting method and potential method - allocation analysis
危机重重下的企业发展,数字化转型到底是不是企业未来救星
Online electronic component purchasing Mall: break the problem of information asymmetry in the purchasing process, and enable enterprises to effectively coordinate management
基于TI DRV10970驱动直流无刷电机
729. 我的日程安排表 I :「模拟」&「线段树(动态开点)」&「分块 + 位运算(分桶)」