Anda di halaman 1dari 7

Name: Genet Jordano Nicola

Class: CoSc 711


Instructor Name: Dr. Million Meshesha
Assignment: What is the difference between mean and median filters?
Date: May 22, 2018

Digital Image Processing & Analysis (DIP&A)

Report no. Three

In this report, we can see the Difference between mean and median filters

Introduction

Remove Noise Using an Averaging Filter and a Median Filter. ... However, 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.
Comparison of mean median and mode. Mean, median and mode are all different terms of central
tendency or the average but they are all different from each other. ... The median on the other hand is
one where half the values are below and half the values are above.

The median filter is also a sliding-window spatial filter, but it replaces the center value in the window
with the median of all the pixel values in the window. As for the mean filter, the kernel is usually
square but can be any shape.

The "mean" is the "average" you're used to, where you add up all the numbers and then divide by the
number of numbers. The "median" is the "middle" value in the list of numbers. ... If no number in the
list is repeated, then there is no mode for the list. Close to symmetric means the data are roughly the
same in height and location on either side of the center of the histogram; it doesn't need to be exact. ...
Its mean and median are both equal to 3.5: If the histogram is skewed left, the mean is less than
the median. “However, when the sample size is large and does not include outliers, the mean score
usually provides a better measure of central tendency. “(Then goes on to give an example of when
the median is better.) “Use the median to describe the middle of a set of data that does have an outlier.

The mean filter is a simple sliding-window spatial filter that replaces the center value in the window
with the average (mean) of all the pixel values in the window. The window, or kernel, is usually
square but can be any shape.

1
Step 1 Starting from the origin

0 0 0 0 0 0 0 0
0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 100 120 110 0 0 100 120 110 110 0 0 100 120 110 0
0 110 90 100 0 0 110 90 100 100 0 0 110 90 100 0
0 130 130 110 0 0 130 130 110 110 0 0 130 130 110 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Mean=100 /9 = 11.11 mean= (100+120) = 24.4 mean = (100+110+120) = 36.6

9 9

0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 100 120 110 0 0 100 120 110 0 0
0 110 90 100 0 0 110 90 100 0
0 130 130 110 0 0 130 130 110 0
0 0 0 0 0 0 0 0 0 0

Mean = (110+120) = 25.5 Mean = 110 = 12.2

9 9

Step 2 starting from the origin

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 100 120 110 0 0 100 120 110 0 0 100 120 110 0
0 0 110 90 100 0 0 110 90 100 0 0 110 90 100 0
0 0 130 130 110 0 0 130 130 110 0 0 130 130 110 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Mean=(100+110)= 23. Mean=(90+100+110+120)=46.6 Mean=(90+100+100+110+110+120)=70

9 9 9

2
0 0 0 0 0
0 0 0 0 0 0
0 100 120 110 0
0 100 120 110 0 0
0 110 90 100 0 0 110 90 100 0 0
0 130 130 110 0 0 130 130 110 0 0
0 0 0 0 0 0 0 0 0 0 0

Mean=(90+100+110+120)=46.6 Mean=(100+110)=23.3

9 9

Step 3

0 0 0 0 0 0 0 0 0 0 0
0 0 100 120 110 0 0 100 120 110 0
0 0 110 90 100 0 0 110 90 100 0
0 0 130 130 110 0 0 130 130 110 0
0 0 0 0 0 0 0 0 0 0 0
Mean=(100+110+130)=37.7 Mean=(90+100+110+120+130+130)=75.5

9 9
0 0 0 0 0
0 100 120 110 0
0 110 90 100 0
0 130 130 110 0
0 0 0 0 0
Mean=(90+100+100+110+110+110+120+130)=111.1

0 0 0 0 0 0 0 0 0 0 0
0 100 120 110 0 0 100 120 110 0 0
0 110 90 100 0 0 110 90 100 0 0
0 130 130 110 0 0 130 130 110 0 0
0 0 0 0 0 0 0 0 0 0 0

Mean=(90+100+110+110+120+130)=73.3 Mean=(100+110+110)=35.5

9 9

3
Step 1. We calculate the central value of 100 in 3x3 in image

0 0 0 0 0 0 0 0 0 0

0 100 120 110 0 0 0 120 110 0


Out put=
0 110 90 100 0 0 110 90 100 0
0 130 130 110 0 0 130 130 110 0
0 0 0 0 0 0 0 0 0 0

We use ascending or descending order to get the median the median value. Here we use
ascending order

Med = (0, 0,0,0,0,90,100,110,120)


Med = 0

 Out put after applying median filtering the central value changed to zero (0).

Step 2. We calculate the central value of 120 in 3x3 in image

0 0 0 0 0 0 0 0 0 0

0 100 120 110 0 0 100 100 110 0

0 110 90 100 0 0 110 90 100 0

0 130 130 110 0 0 130 130 110 0

0 0 0 0 0 0 0 0 0 0

Med = (0, 0,0,90,100,100,110,110,120)


Med =100

 Output after applying median filtering the central value changed to 100.

4
Step 3.

0 0 0 0 0 0 0 0 0 0

0 100 120 110 0 0 100 100 0 0

0 110 90 100 0 0 110 90 100 0

0 130 130 110 0 Out put = 0 130 110 110 0

0 0 0 0 0 0 0 0 0 0

Med =(0,0,0,0,0,90,100,110,120)

Med = 0

 Out put after applying median filtering the central value changed to zero (0).

Step 4. We calculate the central value of 110 in 3x3 in image

0 0 0 0 0
0 0 0 0 0
0 100 120 110 0
0 100 120 110 0
0 110 90 100 0 Out put =
0 110 90 100 0
0 130 130 110 0
0 130 130 110 0
0 0 0 0 0
0 0 0 0 0

Med =(0,0,0,0,90,100,110,120,130,130)

Med = 100

 Out put after applying median filtering the central value changed to 100.

5
Step 5. We calculate the central value of 90 in 3x3 in image

0 0 0 0 0 0 0 0 0 0

0 100 120 110 0 0 100 120 110 0

0 110 90 100 0 Out put = 0 100 110 100 0

0 130 130 110 0 0 130 130 110 0

0 0 0 0 0 0 0 0 0 0

Med= (90,100,100,110,110,110,120,130,130)

Med = 110

6
Conclusion

Mean-median filter is proposed for the suppression of impulse noise and various artifacts from the
digital images. We have combined the advantages of standard and state-of-the-art methods to achieve
high results in terms of PSNR and IEF. Furthermore, this method has reasonable computation time in
high noise densities (CT).Leading Diagonal Sorting Algorithm is used with the fixed 3x3 size
working window to compute the median. Truncated mean is computed by defining the boundaries
and truncating the pixel values in the filtering window that fall outside the defined boundary. Noise
detection is done with an intelligent edge preserving decision criterion. The method is very simple,
easy to implement, and computationally an efficient one. Performance of the proposed filter
algorithm is studied on a large number of images with varying amount of salt and pepper noise and
several types of artifacts and their combinations.

References

Anil K. Jain, Fundamentals of Digital Image Processing. Prentice Hall, 1989.

William K. Pratt, Digital Image Processing. Wiley, 1991.

Rafael C. Gonzalez and Richard E. Woods, Digital Image Processing. Addison-Wesley, 1992.

I. Pitas and A. N. Venetsanopoulos, Nonlinear Digital Filters: Principles and Applications.


Kluwer Academic, 1990.

Anda mungkin juga menyukai