完成readme、并添加效果图

This commit is contained in:
张梦南 2025-04-15 20:33:55 +08:00
parent 27b1ccfa45
commit be75ffd21f
4 changed files with 32 additions and 1 deletions

View File

@ -1 +1,32 @@
<h1 align=center>图像去噪</h1>
# <center>图像去噪</center>
## 运行库
cv2、matplotlib、numpy<br>
contraharmonic_mean_filter.py、adaptive_median_filter.py
## 高斯滤波
利用高斯滤波处理高斯噪声。<br>
运行gaussian.py程序进行高斯滤波处理。<br>
如果需要修改处理文件请修改gaussian.py文件中的照片路径。
```c
image_gaussian = cv2.imread("file/circuitboard-gaussian.tif")
```
程序效果展示如下。<br>
![高斯滤波](/effect_picture/1.高斯滤波.png#pic_center)
## 反谐波均值滤波
利用反谐波均值滤波处理胡椒噪声或盐噪声。<br>
运行pepper_salt.py程序进行反谐波均值滤波处理。<br>
如果需要修改处理文件请修改pepper_salt.py文件中的照片路径。
```c
image_pepper = cv2.imread("file/circuitboard-pepper.tif", cv2.IMREAD_GRAYSCALE)
image_salt = cv2.imread("file/circuitboard-salt.tif", cv2.IMREAD_GRAYSCALE)
```
程序效果展示如下。<br>
![反谐波均值滤波](/effect_picture/2.反谐波均值滤波.png#pic_center)
## 自适应中值滤波
利用自适应中值滤波处理胡椒噪声或盐噪声。<br>
运行pepper_and_salt.py程序进行自适应中值滤波处理。<br>
如果需要修改处理文件请修改pepper_and_salt.py文件中的照片路径。
```c
image_saltandpep = cv2.imread("file/circuitboard-saltandpep.tif", cv2.IMREAD_GRAYSCALE)
```
程序效果展示如下。<br>
![自适应中值滤波](/effect_picture/3.自适应中值滤波.png#pic_center)

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 KiB