image = cv2.imread 读取png
时间: 2023-10-17 17:00:38 浏览: 101
VC6.0使用PNG库读取png图片数据
3星 · 编辑精心推荐
使用cv2.imread函数读取图片时,可以指定要读取的图片的路径和读取的方式。在示例中,使用cv2.imread('1.jpg',0)来读取图片文件'1.jpg',并且指定读取的方式为灰度图形式。然后使用cv2.imwrite函数将读取到的图片保存为'1.png'文件。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [【OpenCV学习笔记】OpenCV基础操作:图片的读取与写出](https://blog.csdn.net/qq_51701007/article/details/122365721)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [【opencv】1、图片基本操作 - 图片读取 cv2.imread() 、图片展示 cv2. imshow() 、图片保存 cv2.imwrite()](https://blog.csdn.net/weixin_37804469/article/details/109392335)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文