inverse filtering and weiner filtering matlab code
조회 수: 26 (최근 30일)
이전 댓글 표시
here i am trying to implement inverse filtering and weiner filtering
in this figure both of gaussian noise and motion blure were added after that both of uinverse filtering and weiner filtering were applied
note : the value of mean and vaiance are 0 and 650 respectively but when i enter the 650 to the variance it doesnt give me any result so i changed it to 0.01
this is where i came so far still not working anyone can help
thanks,,
I = im2double(imread('Fig0526(a)(original_DIP).tif'));
imshow(I);
title('Original Image (courtesy of MIT)');
LEN = 90;
THETA = 45;
PSF = fspecial('motion', LEN, THETA);
blurred = imfilter(I, PSF, 'conv', 'circular');
figure, imshow(blurred)
noise_mean = 0;
noise_var =0.01 ;
blurred_noisy = imnoise(blurred, 'gaussian', noise_mean, noise_var);
figure, imshow(blurred_noisy)
title('Simulate Blur and Noise')
estimated_nsr = noise_var / var(I(:));
wnr3 = deconvwnr(blurred_noisy, PSF, estimated_nsr);
figure, imshow(wnr3)
title('Restoration of Blurred, Noisy Image Using Estimated NSR');
댓글 수: 0
답변 (1개)
yanqi liu
2021년 12월 4일
yes,sir,may be change some parameter,because motion too big to hard restore,such as
clc; clear all; close all;
I = im2double(imread('cameraman.tif'));
imshow(I);
title('Original Image');
LEN = 20;
THETA = 45;
PSF = fspecial('motion', LEN, THETA);
blurred = imfilter(I, PSF, 'conv', 'circular');
figure, imshow(blurred)
noise_mean = 0;
noise_var = 0.001;
blurred_noisy = imnoise(blurred, 'gaussian', noise_mean, noise_var);
figure, imshow(blurred_noisy)
title('Simulate Blur and Noise')
estimated_nsr = noise_var / var(I(:));
wnr3 = deconvwnr(blurred_noisy, PSF, estimated_nsr);
figure, imshow(wnr3)
title('Restoration of Blurred, Noisy Image Using Estimated NSR');
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!