By Dr. Rajeev Srivastava

20
Image Restoration: Spatial Filtering By Dr. Rajeev Srivastava

description

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

Transcript of By Dr. Rajeev Srivastava

Page 1: By Dr. Rajeev Srivastava

Image Restoration:Spatial Filtering

ByDr. Rajeev Srivastava

Page 2: By Dr. Rajeev Srivastava

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

Page 3: By Dr. Rajeev Srivastava

Arithmetic Mean Filter

• Smooth local variations in an image• Noise is induced as a result of

blurring• g(s,t): Degraded image

Page 4: By Dr. Rajeev Srivastava

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 filterThe advantage with harmonic filter is that it works well for salt noise and gaussian noise but it fails considerably for pepper noise

Page 5: By Dr. Rajeev Srivastava

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

Page 6: By Dr. Rajeev Srivastava

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

Page 7: By Dr. Rajeev Srivastava

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.

Page 8: By Dr. Rajeev Srivastava

8

Arithmetic and Geometric Mean Filters (Example)

Page 9: By Dr. Rajeev Srivastava

9

Contra-Harmonic Mean Filter (Example)

Page 10: By Dr. Rajeev Srivastava

10

Contra-Harmonic Mean Filter (Example)

Page 11: By Dr. Rajeev Srivastava

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.

Page 12: By Dr. Rajeev Srivastava

12

Median Filter (Example)

Page 13: By Dr. Rajeev Srivastava

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)}

Page 14: By Dr. Rajeev Srivastava

14

Max and Min Filters (Example)

Page 15: By Dr. Rajeev Srivastava

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)[ {g(s,t)} + {g(s,t)}]

Page 16: By Dr. Rajeev Srivastava

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

Page 17: By Dr. Rajeev Srivastava

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.

Page 18: By Dr. Rajeev Srivastava

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𝑚𝑛−𝑑 ∑

(𝑠 ,𝑡 ) 𝜖𝑆𝑥𝑦

𝑔𝑟 (𝑠 , 𝑡 )

Page 19: By Dr. Rajeev Srivastava

19

Examples

Page 20: By Dr. Rajeev Srivastava

END