image restoration matlab code
Show older comments

hello i am trying to implement this code to get the result in figure 5.26(b) but still something wrong could you help me in that
thanks,
refernce: digital image processing gonzalez third edition
here is my code
c = im2double(imread('Fig0526(a)(original_DIP).tif'));
figure,imshow(c)
a = 0.1;
b = 0.1;
T=1;
[M, N] = size(c);
h = zeros(M,N);
for u = 1:M
for v = 1:N
h(u,v) = (T/(pi*(u*a + v*b)))*...
sin(pi*(u*a + v*b))*...
exp(-1i*pi*(u*a + v*b));
end
end
cf=(fft2(c));
c1 = cf.*h;
c1a=(ifft2(c1));
figure,imshow(abs(log(c1a)+1), []);
Accepted Answer
More Answers (2)
Image Analyst
on 2 Dec 2021
0 votes
Why are you doing
exp(-1i*pi*(u*a + v*b));
??? Just use fft2().
1 Comment
aziz alfares
on 2 Dec 2021
vaishnavi padhar
on 13 Apr 2022
0 votes
Can you please provide the block diagram for the same.
Categories
Find more on Images in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!