Presentation is loading. Please wait.

Presentation is loading. Please wait.

By Dr. Rajeev Srivastava

Similar presentations


Presentation on theme: "By Dr. Rajeev Srivastava"ā€” Presentation transcript:

1 By Dr. Rajeev Srivastava
Image Restoration: Spatial Filtering By Dr. Rajeev Srivastava

2 The filters which needs to be considered are:
Restoration of Noise Only- Spatial Filtering The filters which needs to be considered are: Arithmetic mean filters Geometric mean filters Harmonic mean filters Contra-harmonic mean filters Mean filters Median filter Max and min filter Mid point filter Alpha trimmed mean filter Order statistics filter

3 Arithmetic Mean Filter
Smooth local variations in an image Noise is induced as a result of blurring g(s,t): Degraded image š‘† š‘„š‘¦ :š‘ š‘’š‘” š‘œš‘“ š‘š‘œš‘œš‘Ÿš‘‘š‘–š‘›š‘Žš‘”š‘’š‘  š‘–š‘› š‘Ž š‘Ÿš‘’š‘š‘”š‘Žš‘›š‘”š‘¢š‘™š‘Žš‘Ÿ š‘ š‘¢š‘š‘–š‘šš‘Žš‘”š‘’ š‘¤š‘–š‘›š‘‘š‘œš‘¤ š‘œš‘“ š‘ š‘–š‘§š‘’ š‘šĆ—š‘› š‘“ š‘„,š‘¦ = 1 š‘šš‘› (š‘„,š‘”)šœ– š‘† š‘„š‘¦ š‘”(š‘ ,š‘”)

4 Geometric and Harmonic Mean Filter
Geometric mean filter: it is comparable to the arithmetic mean filter.it achieves smoothening and lossless image detail in the process. š‘“ š‘„,š‘¦ = (š‘ ,š‘”)šœ– š‘† š‘„š‘¦ š‘”(š‘ ,š‘”) š‘šš‘› Harmonic mean filter The advantage with harmonic filter is that it works well for salt noise and gaussian noise but it fails considerably for pepper noise š‘“ š‘„š‘¦ = š‘šš‘› (š‘ ,š‘”)šœ– š‘† š‘„š‘¦ š‘”(š‘ ,š‘”)

5 Contra-Harmonic Mean Filter
This filter can reduce the effect of both salt and pepper noise but the glitch is that it can not eliminate both of them simultaneously. If we consider the order of filter as Q, then the following will hold: Q>0; eliminate pepper noise Q<0; eliminate salt noise Q=0; arithmetic mean filter Q=-1; harmonic mean filter š¹ š‘„,š‘¦ = (š‘ ,š‘”)šœ– š‘† š‘„š‘¦ š‘” š‘„+1 (š‘ ,š‘”) (š‘ ,š‘”) š‘” š‘„ (š‘ ,š‘”)

6 Classification of Contra-Harmonic Filter Applications
The positive order filters effectively reduce the pepper noise, at the expense of blurring the dark areas. The negative order filters effectively reduce the salt noise, at the expense of blurring the bright areas

7 Arithmetic and geometric mean filters suit the Gaussian or uniform noise
Contra harmonic filters suit the impulse noise,yet,with the information of dark or light noise to select the proper file for Q.

8 Arithmetic and Geometric Mean Filters (Example)

9 Contra-Harmonic Mean Filter (Example)

10 Contra-Harmonic Mean Filter (Example)

11 Order Statistics Filters: Median Filter
Output is based on ordering(ranking) the pixels in a subimage. Replace the value of a pixel by the median of the grey levels in the neighborhood of that pixel. Excellent for removing both bipolar and unipolar impulse noise. š‘“ š‘„,š‘¦ = š‘šš‘’š‘‘š‘–š‘Žš‘› {š‘” š‘ ,š‘” }

12 Median Filter (Example)

13 Order Statistics Filters: Max and Min filter
Max filter: replace the value of a pixel by the maximum of the grey levels(the brightest points) in the neighborhood of that pixel. Min filter: replace the value of a pixel by the minimum of the gray levels(the darkest points) in the neighborhood of that pixel. f(x,y)= š‘šš‘Žš‘„ (š‘ ,š‘”)šœ– š‘† š‘„š‘¦ {g(s,t)} f(x,y)= š‘šš‘–š‘› (š‘ ,š‘”)šœ– š‘† š‘„š‘¦ {g(s,t)}

14 Max and Min Filters (Example)

15 Order Statistics Filters: Midpoint Filter
Filters output: the midpoint between the maximum and minimum values of the gray levels in the mask. It combines order statistics and averaging The midpoint filter works best for randomly distributed noise which includes Gaussian or uniform noise. f(x,y) = 1 2 [ š‘šš‘Žš‘„ (š‘ ,š‘”)šœ– š‘† š‘„š‘¦ {g(s,t)} + š‘šš‘–š‘› (š‘ ,š‘”)šœ– š‘† š‘„š‘¦ {g(s,t)}]

16 Order Statistics Filters: Alpha-Trimmed Mean Filter
Output: Average of the grey levels of the remaining (mn-d) pixels š‘” š‘Ÿ š‘ ,š‘” in the mask after removing the d/2 lowest and d/2 highest grey levels in š‘† š‘„š‘¦

17 The range of ā€˜dā€™ lies in between 0 to (mn-1)
When d equals 0, it becomes arithmetic mean filter, when it equals ((mn-1)/2), it becomes median filter.

18 These filters can be used to solve the problem of multi-type noise problem, like combination of salt and pepper noise and Gaussian noise. š‘“ š‘„,š‘¦ = 1 š‘šš‘›āˆ’š‘‘ (š‘ ,š‘”)šœ– š‘† š‘„š‘¦ š‘” š‘Ÿ (š‘ ,š‘”)

19 Examples

20 END


Download ppt "By Dr. Rajeev Srivastava"

Similar presentations


Ads by Google