%%学习目标: 盲卷积算法对模糊噪声图像的恢复
I = checkerboard(12);
PSF = fspecial('gaussian',6,12);
V = .0002;
BlurredNoisy = imnoise(imfilter(I,PSF),'gaussian',0,V);
WT = zeros(size(I));
WT(5:end-4,5:end-4) = 1;
INITPSF = ones(size(PSF)); %初始点扩展函数
[J P] = deconvblind(BlurredNoisy,INITPSF,30,8*sqrt(V),WT); %迭代30次,
% 8*sqrt(V)是偏离阈值,WT是权重数组
subplot(2,2,1);imshow(BlurredNoisy);
title('S = Blurred and Noisy');
subplot(222);imshow(PSF,[]);
title('True PSF');
subplot(2,2,3);imshow(J);
title('Deblurred Image');
subplot(2,2,4);imshow(P,[]);
title('Recovered PSF');
%% 优势:不用知道点扩展函数,最大程度恢复。
%% 大仙QQ:1960009019
%% 在线教育微信公众号:大仙一品堂