Image Processing Chapter 5
Image Processing Chapter 5
Image Processing Chapter 5
12/07/21
Processing
Image Restoration
1
Contents
12/07/21
Image Restoration
Gaussian noise.
Speckle noise.
Periodic noise.
2
Image Restoration
12/07/21
3
Image Restoration cont.
g(x,y) =f(x,y)*h(x,Y)
We may use additive function to generate noise
g(x,y) =f(x,y)*h(x,y)+n(x,y)
If we know h,n we may acquire the original image
f(x,y)= (g(x,y)-n(x,y))/h(x,y)
Noise
t=rgb2gray(tw);
To add noise, we use the Matlab function imnoise which takes a
t_spk=imnoise(t,'speckle');
I(1+N)
Speckle noise-Cont.
>> s=size(t);
>> [x,y]=meshgrid(1:s(1),1:s(2));
>> p=sin(x/3+y/5)+1;
>> t_pn=(im2double(t)+p/2)/2;
Periodic noise-Cont.
Periodic noise
Cleaning salt and pepper noise
Median filtering
Rank-order filtering
D=.2 D=.4
Cleaning Gaussian noise
>> [x,y]=meshgrid(1:256,1:256);
>> p=1+sin(x+y/1.5);
>> cm = imread('cameraman.tif');
>> tp=(double(cm)/128+p)/4;
>> imshow(tp)
>>fcm = fftshift(fft(tp));
>>figure,imshow(fcm)
2. Notch filtering.
Removal of periodic noise-Cont
Notch filtering
With a notch Filter, we simply make
the rows and columns of the spikes
zero:
>> tf(156,:)=0;
>> tf(102,:)=0;
>> tf(:,170)=0;
>> tf(:,88)=0;
and the result is shown in gure 6.3(a).
The image after inversion is shown in
gure 6.3(b).
Removal of periodic noise-Cont
Any questions
LOGO