当前位置:网站首页>将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
边栏推荐
- 将新增和编辑的数据同步更新到列表
- Packet capturing and sorting -- TCP protocol [8]
- 标签与路径
- Bert base Chinese Download (SMART)
- Community version Alibaba MQ ordinary message sending subscription demo
- Servlet监听器&过滤器介绍
- leetcode-791. 自定义字符串排序
- 8 websites that should be known for product development to enhance work experience
- Free and open source charging pile Internet of things cloud platform
- Record a website for querying compatibility, string Replaceall() compatibility error
猜你喜欢
Summary of JVM knowledge points - continuously updated
Importerror after tensorflow installation: DLL load failed: the specified module cannot be found, and the domestic installation is slow
Calculate the past date and days online, and calculate the number of live days
MySQL supports IP access
风尚云网学习-input属性总结
CVPR 2022 & ntire 2022 | the first transformer for hyperspectral image reconstruction
About the 'enum' enumeration type and structure.
The quill editor image zooms, multiple rich text boxes are used on one page, and the quill editor upload image address is the server address
使用Source Insight查看编辑源代码
Record some NPM related problems (messy records)
随机推荐
How to click an object to play an animation
PHP generates JSON to process Chinese
Fashion cloud learning - input attribute summary
Golang realizes regular matching: the password contains at least one digit, letter and special character, and the length is 8-16
Labels and paths
Introducing vant components on demand
98. Error s.e.errormvcautoconfiguration $staticview reported by freemaker framework: cannot render error page for request
Jupiter notebook installation
Read the data in Presto through sparksql and save it to Clickhouse
The quill editor image zooms, multiple rich text boxes are used on one page, and the quill editor upload image address is the server address
解决disagrees about version of symbol device_create
Importerror after tensorflow installation: DLL load failed: the specified module cannot be found, and the domestic installation is slow
SSM framework series - JUnit unit test optimization day2-3
Packet capturing and sorting -- TCP protocol [8]
PC starts multiple wechat at one time
Start mqbroker CMD failure resolution
BUUCTF WEB [BUUCTF 2018]Online Tool
Kubernetes 入门教程
XinChaCha Trust SSL Organization Validated
JDBC connection pool