1. 首页
  2. 数据库
  3. 其它
  4. 中值滤波 处理 椒盐噪声

中值滤波 处理 椒盐噪声

上传者: 2020-12-23 05:48:19上传 PDF文件 230.48KB 热度 17次
首先对原图像加椒盐噪声,之后经中值滤波 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
下载地址
用户评论