clc;
clear;
close all;
warning off;
%频谱图像
img = imread('c2.jpg');
img_freq = fft2(img);
figure(1);
subplot(231),imshow(img,[0 255]),title('模糊图像');
[height width]=size(img);
motion = 12;
h = 1/motion * ones(1,motion);
%维纳滤波,nsr=0
nsr = 0;
f = deconvwnr(img,h,nsr);
subplot(232),imshow(f,[0 255]),title('维纳滤波复原图像(NSR=0)');
%维纳滤波,nsr=0.002
nsr = 0.002;
f = deconvwnr(img,h,nsr);
subplot(233),imshow(f,[0 255]),title('维纳滤波复原图像(NSR=0.002)');
%维纳滤波,nsr=0.005
nsr = 0.005;
f = deconvwnr(img,h,nsr);
subplot(234),imshow(f,[0 255]),title('维纳滤波复原图像(NSR=0.005)');
%维纳滤波,nsr=0.008
nsr = 0.008;
f = deconvwnr(img,h,nsr);
subplot(235),imshow(f,[0 255]),title('维纳滤波复原图像(NSR=0.008)');
%维纳滤波,nsr=0.015
nsr = 0.05;
f = deconvwnr(img,h,nsr);
subplot(236),imshow(f,[0 255]),title('维纳滤波复原图像(NSR=0.015)');
标签:subplot,img,title,imshow,滤波,MATLAB,nsr,维纳滤波 From: https://blog.51cto.com/u_15815923/5743794