反谐波均值滤波
This commit is contained in:
parent
6f583e6e3d
commit
267fc120e0
@ -1,5 +1,5 @@
|
||||
import numpy as np
|
||||
|
||||
|
||||
#反谐波均值滤波
|
||||
def contraharmonic_mean_filter(img, kernel_size=3, Q=1.5):
|
||||
img = img.astype(np.float64)
|
||||
|
@ -3,7 +3,7 @@ import matplotlib.pyplot as plt
|
||||
plt.rcParams['font.sans-serif'] = ['simHei']
|
||||
plt.rcParams['axes.unicode_minus'] = False
|
||||
from contraharmonic_mean_filter import contraharmonic_mean_filter
|
||||
|
||||
|
||||
#读取照片
|
||||
image_pepper = cv2.imread("file/circuitboard-pepper.tif", cv2.IMREAD_GRAYSCALE)
|
||||
image_salt = cv2.imread("file/circuitboard-salt.tif", cv2.IMREAD_GRAYSCALE)
|
||||
|
Loading…
x
Reference in New Issue
Block a user