cv2.imread(path)返回什么
时间: 2023-11-02 09:54:42 浏览: 75
cv2.imread(path)返回的是读取的图片对象。\[1\] 该函数可以读取指定路径的图片,并返回一个表示该图片的对象。如果路径错误,函数不会报错,而是返回一个空对象。可以通过传入不同的参数来指定读取图片的模式,如读取彩色图片、灰度图片或包含alpha通道的图片。默认情况下,函数会以彩色模式读取图片。
#### 引用[.reference_title]
- *1* [cv2.imread(),cv2.imshow(),cv2.imwrite()的使用](https://blog.csdn.net/JSSQSC/article/details/119396731)[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^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [Opencv入门教程(1)—图像基本操作(imread,imshow,waitKey,imwrite,cv2.cvtColor)](https://blog.csdn.net/ygy555/article/details/127485668)[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^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [cv2.imread(filename, 0)和先img=cv2.imread(filename, 1)再cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)得出...](https://blog.csdn.net/weixin_54555607/article/details/124760269)[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^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文