Filter löschen
Filter löschen

inverse filtering and weiner filtering matlab code

42 Ansichten (letzte 30 Tage)
aziz alfares
aziz alfares am 3 Dez. 2021
Kommentiert: aziz alfares am 4 Dez. 2021
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');

Antworten (1)

yanqi liu
yanqi liu am 4 Dez. 2021
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');
  1 Kommentar
aziz alfares
aziz alfares am 4 Dez. 2021
i didnt work out with me
do you have another suggestions?
thanks,

Melden Sie sich an, um zu kommentieren.

Produkte


Version

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by