© 1999-2048 dssz.net 粤ICP备11031372号
[其它] 中值滤波 处理 椒盐噪声
说明:首先对原图像加椒盐噪声,之后经中值滤波 import cv2 as cv import numpy as np def noise(img,snr): h=img.shape[0] w=img.shape[1] img1=img.copy() sp=h*w NP=int(sp*(1-snr)) for i in range (NP): randx=np.random.randint(1,h-1) # random<weixin_38739044> 上传 | 大小:230kb