Upcoming SlideShare
×

# Matlab Image Restoration Techniques

4,468 views
4,193 views

Published on

Matlab Image Restoration Techniques

Published in: Technology, Sports
4 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

Views
Total views
4,468
On SlideShare
0
From Embeds
0
Number of Embeds
66
Actions
Shares
0
0
0
Likes
4
Embeds 0
No embeds

No notes for slide

### Matlab Image Restoration Techniques

1. 1. Matlab:Image Restoration Techniques<br />
2. 2. Removing Noise By Linear Filtering<br />Linear filters, such as averaging or Gaussian filters can be used to remove certain types of noise. An averaging filter is useful for removing grain noise from a photograph. Because each pixel gets set to the average of the pixels in its neighborhood, local variations caused by grain are reduced.<br />
3. 3. Removing Noise By Median Filtering<br />With median filtering, the value of an output pixel is determined by the median of the neighborhood pixels, rather than the mean. The median is much less sensitive than the mean to extreme values (called outliers). Median filtering is therefore better able to remove these outliers without reducing the sharpness of the image.<br />
4. 4. Applying the averaging filter<br />&gt;&gt;I=imread(&apos;img.bmp&apos;);<br /> &gt;&gt; I=I(:,:,1);<br />&gt;&gt; imshow(I);<br />&gt;&gt;K = filter2(fspecial(&apos;average&apos;,3),I)/255;<br />&gt;&gt;figure, imshow(K)<br />
5. 5. Applying the median filter<br />&gt;&gt;I=imread(&apos;img.bmp&apos;);<br /> &gt;&gt; I=I(:,:,1);<br />&gt;&gt; imshow(I);<br />&gt;&gt; L = medfilt2(I,[3 3]);<br />&gt;&gt;figure, imshow(L)<br />
6. 6. Rectifying background illumination<br />Step 1: Read Image<br />Step 2: Use Morphological Opening to Estimate the Background<br />Step 3: View the Background Approximation as a Surface<br />Step 4: Subtract the Background Image from the Original Image<br />
7. 7. Rectifying background illumination<br />Step1: Read Image<br />I = imread(&apos;rice.png&apos;); imshow(I)<br />
8. 8. Rectifying background illumination<br />Step 2: Use Morphological Opening to Estimate the Background<br />&gt;&gt;background = imopen(I,strel(&apos;disk&apos;,15));<br />&gt;&gt;figure, surf(double(background(1:8:end,1:8:end))),zlim([0 255]); set(gca,&apos;ydir&apos;,&apos;reverse&apos;);<br /><ul><li>Step 3: View the Background Approximation as a Surface</li></li></ul><li>Rectifying background illumination<br />Step 2: Use Morphological Opening to Estimate the Background<br /><ul><li>Step 3: View the Background Approximation as a Surface</li></li></ul><li>Rectifying background illumination<br />Step 4: Subtract the Background Image from the Original Image<br />I2 = I - background; imshow(I2)<br />