opencv高斯模糊python
时间: 2023-08-17 10:16:14 浏览: 111
在Python中使用OpenCV进行高斯模糊的代码如下:
```python
import cv2 as cv
src = cv.imread('lena.jpg')
cv.imshow('input image', src)
dst = cv.GaussianBlur(src, (15, 15), 0)
cv.imshow('gaussianBlur_image', dst)
cv.waitKey(0)
cv.destroyAllWindows()
```
这段代码首先读取了一张名为"lena.jpg"的图片,并显示在窗口中。然后使用`cv.GaussianBlur()`函数对图片进行高斯模糊处理,其中`(15, 15)`表示高斯核的大小,0表示标准差。最后将处理后的图片显示在另一个窗口中。
#### 引用[.reference_title]
- *1* *2* [python-OpenCV:模糊操作,高斯模糊,原理及其代码解析。](https://blog.csdn.net/qq_45804132/article/details/113618578)[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* [高斯模糊(OpenCV+Python)](https://blog.csdn.net/m0_43425029/article/details/106072542)[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 ]
阅读全文