How to deblur an image in frequency domain?
Mostra commenti meno recenti
Hi, I've blurred an image by using averaging filter mask in frequency domain. Now, I want to deblur it but I keep getting a black image. Here is my code:
*1161x799 is the size of my image
I want to know why I keep getting a black image even if I use another trustworthy code.
im_gray = rgb2gray(im);
im_gray = im2double(im_gray);
%17*17 Average Filter
avgFilter = ones(17) / 289;
%Now taking FFT of both image and filter to work in frequency domain
im_fft = fft2(im_gray, 1161,799);
avgFilter_fft = fft2(avgFilter, 1161,799);
Conv = im_fft .* avgFilter_fft;
%inverse FFT
blurry_image = ifft2(Conv);
%deblur
Inv = Conv./avgFilter_fft;
deblur = ifft2(Inv);
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Deblurring in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!