当前位置:网站首页>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()
边栏推荐
- Thymeleaf th:with use of local variables
- 2022年国内正规的期货公司平台有哪些啊?方正中期怎么样?安全可靠吗?
- Thymeleaf 模板的创建与使用
- 有一个强大又好看的,赛过Typora,阿里开发的语雀编辑器
- CPU设计相关笔记
- Is it OK to open the securities account on the excavation finance? Is it safe?
- Longest common subsequence dynamic programming
- Pointer operation - C language
- 乌卡时代下,企业供应链管理体系的应对策略
- 微帧科技荣获全球云计算大会“云鼎奖”!
猜你喜欢

Under the crisis of enterprise development, is digital transformation the future savior of enterprises

Topology visual drawing engine

Interview shock 62: what are the precautions for group by?

Thymeleaf th:with局部变量的使用

Topology可视化绘图引擎

LeetCode_ 2 (add two numbers)

Niuke: intercepting missiles

Thymeleaf th:classappend attribute append th:styleappend style append th:data- custom attribute

There is a powerful and good-looking language bird editor, which is better than typora and developed by Alibaba

Implement a blog system -- using template engine technology
随机推荐
Photoshop plug-in action related concepts actionlist actiondescriptor actionlist action execution load call delete PS plug-in development
How to solve the problem of garbled code when installing dependency through NPM or yarn
Differences between IPv6 and IPv4 three departments including the office of network information technology promote IPv6 scale deployment
Thymeleaf th:with use of local variables
美国费城发生“安全事故” 2名警察遭枪杀
Sharing the 12 most commonly used regular expressions can solve most of your problems
Un week - end heureux
leetcode:881. lifeboat
Thymeleaf 使用后台自定义工具类处理文本
Penetration testing methodology
LeetCode_ 69 (square root of x)
Explain Vue's plan to clean up keepalive cache in time
乌卡时代下,企业供应链管理体系的应对策略
NBA赛事直播超清画质背后:阿里云视频云「窄带高清2.0」技术深度解读
IPv6与IPv4的区别 网信办等三部推进IPv6规模部署
Postgresql 13 安装
我这边同时采集多个oracle表,采集一会以后,会报oracle的oga内存超出,大家有没有遇到的?
PostgreSQL 13 installation
leetcode:881. 救生艇
超级哇塞的快排,你值得学会!