中值滤波 处理 椒盐噪声

littlebirdfrancis 16 0 PDF 2020-12-23 05:12:18

首先对原图像加椒盐噪声,之后经中值滤波 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 randy=np.random.randint(1,w-1) if np.rand

用户评论
请输入评论内容
评分:
暂无评论