乘性斑点噪声模型(瑞利分布)
def rayleigh_speckle(image, scale):
rayleigh_samples = np.random.rayleigh(scale, size=image.shape)
noisy = image + image * np.clip(rayleigh_samples, 0, 255).astype(np.uint8)
return noisy
乘性斑点噪声模型(瑞利分布)
def rayleigh_speckle(image, scale):
rayleigh_samples = np.random.rayleigh(scale, size=image.shape)
noisy = image + image * np.clip(rayleigh_samples, 0, 255).astype(np.uint8)
return noisy