数字图像处理英文课件:lecture5 Image Restoration_第1页
数字图像处理英文课件:lecture5 Image Restoration_第2页
数字图像处理英文课件:lecture5 Image Restoration_第3页
数字图像处理英文课件:lecture5 Image Restoration_第4页
数字图像处理英文课件:lecture5 Image Restoration_第5页
已阅读5页,还剩100页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Image Restoration Degradation Model and General ApproachesTermsImage restoration:图象恢复Degrade: 退化Autocorrelation:自相关Convolution:卷积Pad:填充Period:周期Linear algebra:线性代数TermsCirculant matrix:循环矩阵Transpose:转置Block matrix:分块矩阵Block circulant matrix:分块循环矩阵Impulse: 冲激函数Dirac delta function: 狄拉克函数Impulse respo

2、nse:冲激响应Point spread function (PSF):点扩展函数Image Restoration- outlineImage enhancement vs. restorationDegradation modelNoise onlyLinear, space-invariant 位置不变性General approachesInverse filtersWiener filtersConstrained least squares filtering前者主要是一个主观过程,后者则是一个客观过程。后者是试图利用退化现象的某种先验知识来重建或复原被退化图像。Image Res

3、torationImage enhancement : process image so that the result is more suitable for a specific application, is largely a subjective process.Image restoration : recover image from distortions to its original image, is largely an objective process.Image enhancement vs. restoration 图象增强:旨在改善图象质量。 图象恢复:力求

4、保持图象的本来面目,以保真原则为前提,找出图象降质的原因,描述其物理过程,提出数学模型。恢复的过程是沿着质量降质的逆过程来重现原始图象。 退化:质量降质。 图象退化的一种现象图象模糊。Digital video camerajiObject to be imagedDirection of motion of beltConveyor beltFigure 1 Imaging of object moving at constant velocity.ji图象恢复 图象退化的原因: (1)摄影时照相机镜头的移动; (2)放大镜凸透变形等。 图象退化模型:图象模糊可以笼统的归纳为成象系统没有理想

5、的冲激响应。 51 A Model of the Image Degradation/Restoration Process Model the degradationObjective of restoration-to obtain an estimate of the original image. Apply the inverse process to recover the original image空间域上的卷积等同于频域上的乘积。h是退化函数的空间描述,H是频域描述。If H is linear, spatially invariant process, thenP142Th

6、e OTF and PSF are a Fourier transform pair, and the toolbox provide otf2psf and psf2otf functions, for converting between them. P142Noise modelsSpatial characteristics (independent or dependent)Intensity ( distribution, spectrum)Correlation with the image (additive, multiplicative) De-noising Spatia

7、l filteringFrequency domain filteringDegradation models : due to noise only MATLAB图像噪声腐蚀函数 imnoiseThe toolbox uses function imnoise to corrupt an image with noise. The function has the basic syntax: g=imnoise(f,type,parameters)Function imnoise converts the input image to class double in the range0,1

8、 before adding noise to it. This must be taken into account when Specifying noise parameters. For example, to add Gaussian noise of Mean 64 and variance 400 to an uint8 image, we scale the mean to 64/255 and the variance to for input into imnoise.Image Restoration - 1Noise models examples Image Rest

9、oration - 1Noise models examples Image RestorationEstimation of noise parametersBy spectrum inspection: for periodic noiseBy test image: mean, variance and histogram shape, if imaging system is availableBy small patches, if only image is availableDe-noising Spatial filtering ( for additive noise)Mea

10、n filtersOrder-statistics filtersAdaptive filtersFrequency domain filtering (for periodic noise)De-noising Image Restoration De-noising Gaussian noise example Arithmetic mean filterGeometric mean filterImage Restoration Order-statistics filtersMedian filterGood for impulse noise reduction with less

11、blurringMax filterFind the brightest pointsMin filterFind the darkest pointsMidpoint filterCombines order statistics and averaging, works best for randomly distributed noise.De-noising Image RestorationDe-noising Salt & Pepper noise example Image RestorationDe-noising Salt & Pepper noise example 均值滤

12、波器算术均值滤波器几何均值滤波器谐波均值滤波器逆谐波均值滤波器 算术均值滤波器 表示中心在(x,y)点,尺寸为m*n的矩形子图像窗口的坐标组。简单平滑了一幅图像的局部变化,其对图像的复原效果最差。 几何均值滤波器几何均值滤波相对于算术均值滤波平滑度差不多,但图像的细节丢失更少。算术均值滤波器和几何均值滤波器适于处理高斯或均匀分布噪声。滤波效果对比a)原图b)叠加了高斯噪声的 图像c)3*3算数均值滤波d)3*3几何均值滤波对噪声衰减都有作用,但几何均值滤波比算术均值滤波减少了对图像的模糊谐波均值滤波器谐波均值滤波器对于“盐” 噪声效果较好,但不适于“胡椒”噪声。它善于处理高斯噪声。在逆谐波均值

13、滤波器中, Q成为滤波器的阶数。当Q为正数时,滤波器消除胡椒噪声;当Q为负值时,滤波器消除盐噪声;当Q=0,逆谐波滤波器退化为算术均值滤波器;当Q=-1时,逆谐波均值滤波器变为谐波均值滤波器。谐波均值滤波器适于处理脉冲噪声,但必须知道噪声是暗噪声还是亮噪声,以便于选择合适的Q符号。 逆谐波均值滤波器滤波效果对比a)叠加了胡椒噪声的图像b)叠加了盐噪声的图像c)对a) 3*3 Q=1.5逆谐波滤波d) 对b) 3*3 Q=-1.5逆谐波滤波 正阶滤波器在使暗区模糊的损失下,使背景较为清晰。负阶相反。逆谐波滤波中Q值选择错误时造成的结果滤波效果对比统计排序滤波器中值滤波器最大值滤波器最小值滤波器中

14、点滤波器修正的阿尔法均值滤波器 统计排序滤波器中值滤波器: 适于处理椒盐噪声,通过多次使用小模板,可以获得很好的去噪效果。最大值滤波器: 这种滤波器对发现图像中的最亮点非常有用,可以用来消除胡椒噪声。最小值滤波器: 这种滤波器对发现图像中的最暗点非常有用,可以用来消除盐噪声统计排序滤波器 取最大值和最小值的平均值。对高斯和均匀随机分布的噪声有效。中点滤波器 统计排序滤波器修正后的阿尔法均值滤波器为邻域内去掉d/2个最大值和d/2个最小值后剩余的mn-d个像素。由这些点的平均值形成的滤波器称为修正后的阿尔法均值滤波器。 d值可以取到0到mn-1之间的任意数。当d=0时,滤波器退变为算术均值滤波器

15、;当d=(mn-1)/2时,滤波器就成为中值滤波器。d取其它值时,滤波器在包含多种噪声的情况下非常适用,例如高斯噪声和椒盐噪声混合的情况。由加性均匀噪声污染的图像 均值为0,方差为800的高斯噪声(b) 图(a)加上椒盐噪声污染的图像 Pa=Pb=0.1得椒盐噪声(c) 55的算术均值滤波处理图(b)(d) 几何均值滤波器处理图(b)(e) 中值滤波器处理图(b)(f) d=5的修正后的阿尔法均值滤波器(a)(b)(c)(d)(e)(f)由于脉冲噪声的存在,算术均值滤波器和几何均值滤波器没有起到良好作用.中值滤波器和阿尔法滤波器效果更好,阿尔法最好.修正后的阿尔法滤波自适应滤波器自适应局部噪声

16、消除滤波器自适应中值滤波器 自适应滤波器自适应滤波器是基于m*n矩形窗区域图像的统计特性而变化的,其性能优于前面所讨论的任何一种滤波器;但作为提高滤波能力的代价是滤波器的复杂度增加了。随机变量最简单的统计量是均值和方差,这些适当的参数是自适应滤波器的基础。均值给出了计算均值的区域中灰度平均值的度量,而方差给出了这个区域的平均对比度的度量.自适应局部噪声消除滤波器需要估计自适应局部噪声消除滤波器自适应局部噪声消除滤波器a)由0均值和方差为1000的加性高斯噪声污染的图像b) 7*7算术均值滤波处理后图像c) 7*7几何均值滤波处理后图像d) 7*7自适应噪声消除滤波器处理后图像滤波效果与算术、几

17、何均值滤波器相近,但图像更尖锐些。自适应中值滤波器5049494925547484746对于更大概率密度的椒盐噪声去除需考虑:a)去除椒盐噪声b) 平滑其他非冲激噪声c) 减少边界细化或粗化等失真Zmin窗口区域灰度级的最小值Zmax窗口区域灰度级的最大值Zmed窗口区域灰度级的中值Zxy 坐标(x,y)上的灰度级SmaxSxy允许的最大尺寸2555049494948474746自适应中值滤波器A层次 (判断Zmed是否为脉冲) A1=Zmed-ZminA2=Zmed-Zmax如果A10,且A20且B20,输出Zxy否则输出Zmed5049494925547484746255255255484

18、947474846输出Zmed输出ZxyZxy本身为脉冲自适应中值滤波效果a)Pa=Pb=0.25的椒盐噪声污染的图像b) 7*7中值滤波处理后图像c) Smax=7的自适应中值滤波处理后图像噪声去除水平与中值滤波效果相近,但图像保持了点的尖锐性及其细节。The model of degradation5.2.1 spatial noise filtersThe method of choice for reduction of noise is spatial filtering.The linear filters function-imfilterThe nonlinear,order-

19、statistics filters functions-medfilt2 max min ordfilt252 Restoration in the Presence of Noise Only-Spatial FilteringP159: Spfilt functionP162: functionsP162: example 5.5P148: Imnoise2 functionEx505.mAdaptive local noise reduction filter5.2.2 adaptive spatial filtersAdaptive median filterLet Zmin=min

20、imum intensity value in Sxy Zmax=maximum intensity value in SxyZmed=median of the intensity value in SxyZxy=intensity value at coordinate (x,y)The adaptive median filtering algorithm works in two levels, denoted level A and level B:Level A: if Zmin Zmed Zmax goto level BElse increase the window size

21、If window size=Smax,repeat level AElse output Zmedlevel B: if Zmin Zxy T=2 0 0;0 3 0;0 0 1; tform=maketform(affine,T) tform.tdata tform.tdata.TinvIPT provides two functions for applying a spatial transformation to points: tformfwd and tforminv.The calling syntax for tformfwd is XY=tformfwd(WZ, tform

22、). Here, WZ is a P*2 matrix of points;each row of WZ contains the w and z coordinates of one point. XY is a P*2 matrix of point. WZ=1 1;3 2; XY=tformfwd(WZ,tform)XY = 2 3 6 6 WZ2=tforminv(XY,tform)WZ2 = 1 1 3 2 T1=3 0 0;0 2 0;0 0 1; tform1=maketform(affine,T1); vistformfwd(tform1,0 100,0 100); %5.13

23、(a-b) T1=3 0 0;.2 1 0;0 0 1; tform1=maketform(affine,T1); vistformfwd(tform1,0 100,0 100); %5.13(c-d) Tscale=1.5 0 0;0 2 0;0 0 1; Trotation=cos(pi/4) sin(pi/4) 0;-sin(pi/4) cos(pi/4) 0;0 0 1; Tshear=1 0 0;.2 1 0;0 0 1; T3=Tscale*Trotation*Tshear; tform3=maketform(affine,T3); vistformfwd(tform3,0 100

24、,0 100);5.3.2 applying Spatial Transformations to imagesForward mappingInverse mappingIPT function imtransform g=imtransform(f, tform, interp)Where interp is a string that specifies how input image pixels are interpolated to obtain output pixels:nearest,bilinear,bicubic(default to bilinear)Linear conformal transformation(线性保角、保形变换)The affine transformation matrix in this case has the form f=checkerboard(50); s=0.8; theta=pi/6; T=s*cos(theta) s*sin(t

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论