当设置创建棋盘参数为8时,得到图像如图3;参数为30时,图像如图4。从下面的两张图可以看出:增加迭代次数并限制偏离阈值、限制阈值能得到更好的效果。
图3
图4
3.维纳滤波器(Wiener Filter)
维纳滤波算法是由C.W.Helstron于1967年提出的。如果假设f(x,y)和噪声n(x,y)不相关,且n(x,y)有零值,则原维纳滤波器的传递函数为:
M(u,v)?H*(u,v) 2|H(u,v)|?RNS(u,v)式中H*(u,v)为H(u,v)的复共轭,RNS为噪信比。 【函数】
【功能】使用维纳滤波器对图像去模糊
J = DECONVWNR(I,PSF,NSR) deconvolves image I using the Wiener filter algorithm, returning deblurred image J. Image I can be an N-dimensional array. PSF is the point-spread function with which I was convolved. NSR is the noise-to-signal power ratio of the additive noise. NSR can be a scalar or an array of the same size as I. Specifying 0 for the NSR is equivalent to creating an ideal inverse filter.
J = deconvwnr(I,PSF,NCORR,ICORR)deconvolves image I, where NCORR is the autocorrelation function of the noise and ICORR is the autocorrelation function of the original image. NCORR and ICORR can be of any size or dimension, not exceeding the original image. If NCORR or ICORR are N-dimensional arrays, the values correspond to the autocorrelation within each dimension. If NCORR or ICORR are vectors, and PSF is also a vector, the values represent the autocorrelation function in the first imension. If PSF is an array, the 1-D autocorrelation function is extrapolated by symmetry to all non-singleton dimensions of PSF. If NCORR or ICORR is a scalar, this value represents the power of the noise of the image.
【编程实现】
I = checkerboard(8);
subplot(221); imshow(I);
title('Original Image (courtesy of MIT)');
% 模拟运动模糊. LEN = 21; THETA = 11;
PSF = fspecial('motion', LEN, THETA);
blurred = imfilter(I, PSF, 'conv', 'circular');
% 模拟附加噪声. noise_mean = 0; noise_var = 0.0001; blurred_noisy noise_var);
=
imnoise(blurred,
'gaussian',
noise_mean,
subplot(222);
imshow(blurred_noisy)
title('Simulate Blur and Noise')
% 在没有噪声的情况下尝试用维纳滤波器恢复. estimated_nsr = 0;
wnr2 = deconvwnr(blurred_noisy, PSF, estimated_nsr); subplot(223); imshow(wnr2)
title('Restoration of Blurred, Noisy Image Using NSR = 0')
% 用更好的信噪比估计来恢复
estimated_nsr = noise_var / var(I(:));
wnr3 = deconvwnr(blurred_noisy, PSF, estimated_nsr); subplot(224); imshow(wnr3)
title('Restoration of Blurred, Noisy Image Using Estimated NSR');
图5表示参数为8时的结果,图6表示参数为6时的结果。
图5
图6
4.约束最小乘方算法(CLS Algorithm)
若已知且仅知道噪声的先验知识时,采用拉格朗日优化理论,把约束噪声极值问题变化为无约束的极值问题
E(f,g,?)?||g?Hf||2??||Df||2?On2??||Df||2
约束最小二乘方去模糊图像复原滤波器的传递函数为
M(u,v)?H*(u,v)
|H*(u,v)|2??|D(u,v)|2式中?是拉格朗日常数,MATLAB自带函数deconvreg可指定范围(缺省
[1.0?10?9,1.0?109])选取最优的拉氏算子;D为高通滤波平滑算子,可以抑制和消除噪声。
【函数】deconvreg
【功能】使用最小二乘方算法对图像去模糊 【编程实现】
I = checkerboard(8);
PSF = fspecial('gaussian',7,10); V = .01;
BlurredNoisy = imnoise(imfilter(I,PSF),'gaussian',0,V);
NP = V*prod(size(I));% noise power
[J LAGRA] = deconvreg(BlurredNoisy,PSF,NP); subplot(221);imshow(BlurredNoisy);
title('A = Blurred and Noisy'); subplot(222);imshow(J);
title('[J LAGRA] = deconvreg(A,PSF,NP)');
subplot(223);imshow(deconvreg(BlurredNoisy,PSF,[],LAGRA/10)); title('deconvreg(A,PSF,[],0.1*LAGRA)');
subplot(224);imshow(deconvreg(BlurredNoisy,PSF,[],LAGRA*10)); title('deconvreg(A,PSF,[],10*LAGRA)');
图7
图8
可以看出约束最小二乘方算法可以实现最小均方误差复原,并对输出图像采用某些约束,且复原效果好于维纳滤波算法。这是因为该算法的推导假设是随机场是均匀的,以及谱密度已知的前提下。且D (u, v ) = 1 时, 约束最小二乘方算法就等同于维纳滤波算法。
此外,目前超分辨力图像复原领域M PML算法受到了广泛的关注,该算法的复原图像视觉效果相对其他几种算法好;在噪声小的情况下,虽然复原图像与原图像频谱的相关度略有下降,但图像的低频信息能被完全复原,复原图像中震荡条纹很小且具有较强的超分辨力复原能力,对于噪声较大的图像也能取得很好的复原效果。这里不再做详细介绍。
综上所述,各个算法在不同的情况下有不同的优势。
5.参考文献
[1] 孙鹏杰,张文爱.浅析盲去卷积算法及其进展.太原:太原科技.2009:1006-4877 [2] 刘扬阳,金伟其,苏秉华.数字图像去模糊处理算法的对比研究.北京:北京
理工大学学报.2004:1001-0645
[3] 贾花萍. 盲去卷积算法在图像恢复中的应用研究.信息技术.2011:10019-2552
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库常用图像去模糊算法分析与对比综述(2)在线全文阅读。
相关推荐: