cv2.imwrite()保存路径
时间: 2023-11-19 17:55:12 浏览: 95
cv2.imwrite()函数用于将OpenCV图像保存到指定的文件。保存的路径是通过指定filename参数来确定的,可以是相对路径或绝对路径。在代码中,通过定义path变量来指定保存图片的文件夹路径,然后通过拼接name和'.jpg'来生成图片的文件名。最后,使用cv2.imwrite()函数将图像保存在指定路径下。所以,cv2.imwrite()函数保存的路径取决于你在代码中指定的path变量的值。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [【OpenCV 例程300篇】02. 图像的保存(cv2.imwrite)](https://blog.csdn.net/youcans/article/details/121169014)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [cv2.imwrite()保存图片相对路径的问题](https://blog.csdn.net/weixin_43462052/article/details/123802352)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文