当前位置:网站首页>将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
边栏推荐
- Try the server for one month for free, and attach the tutorial
- Keyword interpretation and some APIs in RT thread
- (1) Openjuterpyrab comparison scheme
- Kubernetes 入门教程
- 8 websites that should be known for product development to enhance work experience
- [csnote] ER diagram
- Customize classloader and implement hot deployment - use loadclass
- SSM框架系列——数据源配置day2-1
- Software testing weekly (issue 68): the best way to solve difficult problems is to wait and see the changes and push the boat with the current.
- Softbank vision fund entered the Web3 security industry and led a new round of investment of US $60 million in certik
猜你喜欢
Remote access to raspberry pie at home (Part 1)
MySQL supports IP access
Try the server for one month for free, and attach the tutorial
Servlet监听器&过滤器介绍
mysql支持ip访问
梳理網絡IP代理的幾大用途
CVPR 2022&NTIRE 2022|首个用于高光谱图像重建的 Transformer
Plato farm - a game of farm metauniverse with Plato as the goal
软件测试周刊(第68期):解决棘手问题的最上乘方法是:静观其变,顺水推舟。
CGC: contractual graph clustering for community detection and tracking
随机推荐
只是不断地建构平台,不断地收拢流量,并不能够做好产业互联网
4.DRF 权限&访问频率&过滤&排序
There is no need to crack the markdown editing tool typora
Synchronously update the newly added and edited data to the list
Try the server for one month for free, and attach the tutorial
Use compressorjs to compress pictures, optimize functions, and compress pictures in all formats
leetcode:437. Path sum III [DFS selected or not selected?]
Packet capturing and sorting -- TCP protocol [8]
【蓝桥杯】4月17日省赛刷题训练(前3道题)
Software testing weekly (issue 68): the best way to solve difficult problems is to wait and see the changes and push the boat with the current.
Realize several "Postures" in which a box is horizontally and vertically centered in the parent box
At instruction of nbiot
21 天学习MongoDB笔记
Go language mapping operation
Get the punch in record of nailing attendance machine
Summary of JVM knowledge points - continuously updated
mysql支持ip访问
Use source insight to view and edit source code
Introduction to kubernetes
98. Error s.e.errormvcautoconfiguration $staticview reported by freemaker framework: cannot render error page for request