当前位置:网站首页>将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
边栏推荐
猜你喜欢
Analysis of InnoDB execution process in MySQL
[daily question] chessboard question
Record a website for querying compatibility, string Replaceall() compatibility error
【蓝桥杯】4月17日省赛刷题训练(前3道题)
CGC: contractual graph clustering for community detection and tracking
Van uploader upload picture implementation process, using native input to upload pictures
Summary of JVM knowledge points - continuously updated
Realize several "Postures" in which a box is horizontally and vertically centered in the parent box
Pytorch: a pit about the implementation of gradreverselayer
box-sizing
随机推荐
BUUCTF WEB [GXYCTF2019]禁止套娃
Deploying MySQL in cloud native kubesphere
Jupiter notebook installation
What are the forms of attack and tampering on the home page of the website
The continuous construction of the Internet industry platform is not only able to collect traffic
Record Alibaba cloud server mining program processing
SSM框架系列——数据源配置day2-1
Use of Presto date function
Buuctf Web [bjdctf2020] zjctf, but so
Unable to create servlet under SRC subfile of idea
云原生KubeSphere部署Redis
SSM框架系列——注解开发day2-2
V-model binding value in El select, data echo only displays value, not label
22. 括号生成
Kubernets Getting started tutoriel
Labels and paths
Learning materials
22. Bracket generation
SSM framework series - JUnit unit test optimization day2-3
BUUCTF WEB [BJDCTF2020]The mystery of ip