给图像添加乘性斑点噪声(服从高斯分布)
def speckle_generator(image):
row, col = image.shape
gauss = np.random.randn(row, col)
gauss = gauss.reshape(row, col)
noisy = image + 0.4*image * gauss
return noisy*(255/np.max(image))
给图像添加乘性斑点噪声(服从高斯分布)
def speckle_generator(image):
row, col = image.shape
gauss = np.random.randn(row, col)
gauss = gauss.reshape(row, col)
noisy = image + 0.4*image * gauss
return noisy*(255/np.max(image))