DTSP Paper

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Analysis Of Different Image Filtering Techniques

To Reduce Salt And Pepper Noise


Soham Jagtap, Pranav Jaguste, Siddhi Korad
Department of Electronics and Telecommunication
Sardar Patel Institute of Technology
Bhartiya Vidya Bhavans Campus Munshi Nagar,Andheri-West Mumbai-400058

Abstract—The primary focus of this paper is to compare various III. F ILTERING T ECHNIQUES
Image Filtering Techniques like Median Filtering, Mean Filtering
and Gaussian Filtering Technique. An image can be affected due Different filtering technique to reduce Salt and Pepper
to various reasons like arbitrary alteration in intensity, changes Noise, analysed in this paper -
in lighting condition or poor contrast. Image filtering reduces the 1) Mean Filtering
noise and thus improves the quality of pictorial information for 2) Median Filtering
human interpretation. In this paper, comparative study has been
done based on Signal to Noise Ratio (SNR) values to highlight 3) Gaussian Filtering
how different technique affect the noise in image.
Index Terms—Median Filter, Mean Filter, Gaussian Filter, A. Mean Filtering
Pepper and Salt Noise, SNR The mean filter is linerar filter that replaces all pixels with
mean value of kernel. This kernel can assume any shape or
I. I NTRODUCTION size.
1) Working of Mean Filter
Digital images have become integral part of our lives as
it is used widely in medical and communication domain. For Assume for example the kernel create is with neighbour of 3
providing service of highest quality, it is necessary that digital i.e. 3x3 matrix is created. The mean of all of these elements
images are properly processed. These images are affected by is calculated. This mean value is then assigned to all the
many factors. Thus, image filtering is used to smoothen the elements in that kernel being computed. The formula used
noise added. for computation is
This paper mainly contains the three sections. First Section 1
describes the salt and pepper noise. The paper aims to provide xavg = × (x1 + x2 + · · · + xn ) (1)
n
techniques to reduce this noise . Section II elaborates various
Where :
filters like mean filter, median filter and gaussian filter.Also,
the output obtained from these filter is included. Section n : number of elements in kernel
III contains comparative table which summarises the output xavg : average value of kernel
obtained. 2) Results for Mean Filtering

II. S ALT AND P EPPER N OISE


Salt and Pepper, also known as Impulse Noise can be caused
by sharp and sudden disturbances in the image signal. The
pixels in images are corrupted as either white or black, leading
to degradation of image. For example, Fig. 1 is the image
corrupted with salt and pepper noise.

Fig. 2: Original Image

Fig. 1: Noise Affected Image


Fig. 3: 3x3 Kernel Fig. 4: 5x5 Kernel
The window created for Fig. 3 is 3x3. The SNR value is 3) Advantages of Median Filtering
2.09. For, Fig. 4, window created was 5x5. The SNR value of a) Median filter does not produce new value. Thus, the
Fig. 4 is 2.22. new pixels can be well represented.
3) Advantages of Mean Filtering b) Median filter is better at preservation of sharp edges.
a) Mean filtering are used for purposely blurring images. 4) Disadvantages of Median Filtering
b) It is not resource intensive as only summation and a) It is costly and complex to implement as first values
division is required. have to be sorted and then pixels in window are
4) Disadvantages of Mean Filtering assigned their median value.
a) It is practically impossible for a single pixel value to
C. Gaussian Filter
represent the pixels in the near surrounding.
b) At sharp edge, the pixel becomes blurred. Thus, this Gaussian filter is a linear filter which reduces noise and
filtering fails when sharp output is required. blurs the image. Filter action involves convoluting Gaussian
distribution function with the given image.
B. Median Filtering 1) Working of Gaussian Filter
Median filtering is a nonlinear method which is particularly Each image is stored as collection of pixels. Thus, approx-
effective in removing salt and pepper noise. The median filter imation of Gaussian Filter is necessary before convolution.
calculates the median of all pixels within a given window or Gaussian distribution is no zero everywhere but after three
kernel and replaces all the other values of kernel with it. This units away from standard deviation, the value reduces to zero.
kernel can assume any shape or size. Thus, selection of Gaussian is necessary. After selection of
1) Working of Median Filter suitable kernel, standard convolution is applied. The formula
Assume for example the kernel create is with neighbour of used for computation is
3 i.e. 3x3 matrix is created. All the pixel values are sorted 1 2 2
in ascending order and the middle term is assigned as median P (x) = √ e−(x−µ) /2σ (3)
σ 2π
value of pixels. This median value is then to all the elements in
that kernel being computed. The formula used for computation Where :
is σ : Standard Deviation of Distribution
xmed = Median(1, 2, 3, . . . , n) (2) µ : Mean of Distribution
n : number of elements in kernel 2) Results for Gaussian Filtering
xmed : median value of kernel
2) Results for Median Filter

Fig. 8: Original Image

Fig. 5: Original Image

Fig. 9: 3x3 Kernel Fig. 10: 5x5 Kernel

Fig. 6: 3x3 Kernel Fig. 7: 5x5 Kernel The window created for Fig. 9 is 3x3. The SNR value is
2.05. For, Fig. 10, window created was 5x5. The SNR value
The window created for Fig. 6 is 3x3. The SNR value is of Fig. 10 is 2.14.
1.85. For, Fig. 7, window created was 5x5. The SNR value of
Fig. 7 is 1.95.
3) Advantages of Gaussian Filtering
a) Gaussian filter reduce noise significantly.
b) Gaussian filter involves multiplication and addition
which is much faster than sorting of Median filter-
ing.Thus, Gaussian filter are faster.
c) This filter establishes rotational symmetricity.
4) Disadvantages of Gaussian Filtering
a) Preservation is not possible as image is blurred signif-
icantly.
b) This process requires extra RAM memory to store
intermediate values.
IV. C OMPARATIVE TABLE

TABLE I: Comparative Table


Image Window Signal Noise SNR
Original - 76.15 46.6 1.63
3x3 76.14 36.41 2.09
Mean Filter
5x5 71.80 37.77 2.22
3x3 72.32 39.00 1.85
Median Filter
5x5 76.13 34.23 1.90
3x3 76.14 37.11 2.05
Gaussian Filter
5x5 76.14 35.59 2.14

The results obtained are summarised in Table I. Above table


suggests that the SNR of image improves after the image
was processed using digital filters. For each case, the SNR
value incresased, suggesting that the noise in image
decreased. Thus, these filtering technique can be used to
improve the quality of image.
V. C ONCLUSION
All the filtering techniques used reduced noise, thereby
improving SNR value of image. Of all the filters,Even
though median filter is expensive to implement, it is suitable
for many applications.This is because of its ability to reduce
noise significantly and preservation of edges. However,
selection of filter is done according to need of application.
R EFERENCES
[1] Ms.K.Kanagalakshmi and Dr.E.Chandra (2011): Performance Evaluation
of Filters in Noise Removal of Fingerprint Image Proceedings of 3rd
International Conference on Electronics Computer Technology (ICECT),
(Volume:1), pp. 117 121.
[2] Jasvinder Singh and Dr. Navin Rajpal : ’Comparative Analysis of Image
Filtering Techniques’, Guru Gobind Singh Indraprastha University.
[3] M. Young, The Technical Writer’s Handbook. Mill Valley, CA: Univer-
sity Science, 1989.

You might also like