第五章 图像复原
一、图像退化、复原处理模型
在空间域,h(x,y)称为点扩散函数(PSF),对于任何种类的输入,让h(x,y)作用于光源的一个点来得到退化的特征。
二、噪声模型
模拟噪声的行为和影响的能力是图像复原的核心。
2.1、使用函数imnoise添加噪声
g = imnoise(f,type,parameters)
典型的函数语法形式:
g = imnoise(f,'gaussian',m,var) %将均值为m、方差为var的高斯噪声加到图像f上,默认值为均值是0,方差是0.01的噪声
g = imnoise(f,'salt & pepper',d) %用椒盐噪声污染图像f,其中d是噪声密度
g = imnoise(f,'poisson') %从数据中生成泊松噪声,而不是人工添加
2.2、使用指定的分布产生空间随机噪声
g = imnoise2(type,M,N,a,b)
与imnoise不同,下面的M函数产生一个大小为M*N的噪声数组R,它不以任何方式缩放;imnoise输出一个有噪声的图像,而imnoise2产生噪声模式本身。
注意:为了使这个数组有用,需要对它进行进一步的处理,若要用这个数组来污染一幅图像,则我们可使用函数find寻找R中所有值为0的坐标,并把图像中相应得坐标置为可能的最小灰度值(通常为0),同样我们可以使用函数find寻找R中所有值为1的坐标,并把图像中相应得坐标置为可能的最高灰度值(8bit通常为25