当前位置:网站首页>将opencv 图片转换为字节的方式
将opencv 图片转换为字节的方式
2022-04-23 12:58:00 【图像处理大大大大大牛啊】
1.
out = io.BytesIO()
np.save(out, img)
out.seek(0)
# 读取
out.read()
2.
success, encoded_image = cv2.imencode('.png', img)
content = encoded_image.tobytes()
版权声明
本文为[图像处理大大大大大牛啊]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_26696715/article/details/124360889
边栏推荐
- Golang implements MD5, sha256 and bcrypt encryption
- [Blue Bridge Cup] April 17 provincial competition brushing training (the first three questions)
- Trier les principales utilisations de l'Agent IP réseau
- Learning materials
- 产品开发都应该知道的8个网站,增强工作体验
- 世界读书日:我想推荐这几本书
- Plato farm - a game of farm metauniverse with Plato as the goal
- 22. Bracket generation
- 【csnote】ER图
- PHP generates JSON to process Chinese
猜你喜欢

Free and open source charging pile Internet of things cloud platform

jmeter操作redis

世界读书日:我想推荐这几本书

Navicat远程连接数据库 出现 1130- Host xxx is not allowed to connect to this MySQL server错误

Labels and paths

STM32 is connected to the motor drive, the DuPont line supplies power, and then the back burning problem

Idea的src子文件下无法创建servlet

CVPR 2022 & ntire 2022 | the first transformer for hyperspectral image reconstruction

Wonderful review | the sixth issue of "source" - open source economy and industrial investment

mysql支持ip访问
随机推荐
Packet capturing and sorting -- TCP protocol [8]
Remote access to raspberry pie at home (Part 1)
Introduction to servlet listener & filter
No idle servers? Import OVF image to quickly experience smartx super fusion community version
风尚云网学习-input属性总结
Golang implements a five insurance and one gold calculator with web interface
JDBC connection pool
HQL statement tuning
Resolve disagrees about version of symbol device_ create
21 天学习MongoDB笔记
Record a website for querying compatibility, string Replaceall() compatibility error
If you were a golang interviewer, what questions would you ask?
软件测试周刊(第68期):解决棘手问题的最上乘方法是:静观其变,顺水推舟。
Record the problems encountered in using v-print
Unable to create servlet under SRC subfile of idea
【蓝桥杯】4月17日省赛刷题训练(前3道题)
SSM框架系列——Junit单元测试优化day2-3
Jiachen chapter Genesis "inner universe" joint Edition
实现一个盒子在父盒子中水平垂直居中的几种“姿势”
Object. The disorder of key value array after keys