image restoration filters in spatial domain for various ... · image restoration filters in spatial...
TRANSCRIPT
IJSRD - International Journal for Scientific Research & Development| Vol. 5, Issue 07, 2017 | ISSN (online): 2321-0613
All rights reserved by www.ijsrd.com 250
Image Restoration Filters in Spatial Domain for various Noise Density
Ranges Smita Agrawal1 Sunil Kumar2 Anurag Bajpai3 Vivek Kumar4
1,2,3,4Department of Electronics Design & Technology 1,2,3,4NIELIT, Gorakhpur, India
Abstract— Image Restoration is an area of image processing
that deals with the removal of noise by various filtering
techniques. There are various filters that exist in literature for
various types of noise. Most of them are specific to the noise
type and particular noise ranges. These are classified into
linear and non-linear filters. Linear filters are more suitable
for gaussian noise removal even at higher noise densities
(>30%) and at times for speckle noise removal, whereas non-
linear filters are more suitable for impulse noise removal,
especially at low and medium level densities. However, at
higher noise densities, non-linear filtering efficiency
generally gets degraded. In this paper, a comparative
analytical treatment is done for six filtering methods, at
medium to high noise densities, and the choice of the most
suitable filter technique is determined for particular noise
ranges. The noise and filter functions are implemented in
MATLAB.
Key words: SNR, PSNR, MSE, Salt and Pepper Noise,
Speckle Noise, Gaussian Noise, Hybrid Median Filter
I. INTRODUCTION
Noise removal from a corrupted image has been a prominent
field of research and a large number of algorithms have been
implemented, tested and their results are compared [2][3][16][18][20]. The main thrust on all such algorithms is to
remove impulse noise while preserving image details [21].
Non-linear filters are most suitable for performing noise
removal as well as edge preservation, while linear filters
cause blurring of images [17][20][21][22][23]. Linear filtering of an
image is accomplished through an operation
called convolution. Convolution of neighbour-hood
operation in which each output pixel is the weighted sum of
neighbouring input pixels. The matrix of weights is called
the convolution kernel, also known as the filter. A
convolution kernel is a correlation kernel that has been
rotated 180 degrees [22]. The operation called correlation is
closely related to convolution. In correlation, the value of an
output pixel is also computed as a weighted sum of
neighbouring pixels. The difference is that the matrix of
weights, in this case called the correlation kernel, is not
rotated during the computation. Major linear filters include
Mean Filter, Adaptive Wiener Filter, Gaussian Filter. Linear
filters are more suited for frequency domain as these work on
the frequency spectrum [19][20]. These remove speckle noise
and also, gaussian noise to a great extent, thereby reducing
the size of the image, however, in doing that, they cause
blurring of images, with Wiener filter being an exception.
Non-linear filtering methods, on the other hand, give
excellent salt and pepper (impulse) noise removal in spatial
domain. These, however, are not suited for gaussian noise
removal as their statistical analysis is very difficult.
II. NOISE
Noise arises as a result of un-modelled or un-modellable
processes going on in the production and capture of the real
signal [2]. It is not part of the ideal signal and may be caused
by a wide range of sources, e.g. variations in the detector
sensitivity, environmental variations, the discrete nature of
radiation, transmission or quantization errors, etc. It is also
possible to treat irrelevant scene details as if they are image
noise (e.g. surface reflectance textures). The characteristics
of noise depend on its source, as does the operator which best
reduces its effects [10][14][15]. Many image processing packages
contain operators to artificially add noise to an image.
Deliberately corrupting an image with noise allows us to test
the resistance of an image processing operator to noise and
assess the performance of various noise filters. Noise can
generally be grouped into two classes:
Independent noise.
Noise which is dependent on the image data.
Image independent noise can often be described by
an additive noise model, where the recorded image f(x,y) is
the sum of the true image s(x,y) and the noise n(x,y):
f(x,y) = s(x,y) + n(x,y) (1)
The noise n(x,y) is often zero-mean and described
by its variance σn2 . The impact of the noise on the image is
often described by the signal to noise ratio (SNR), which is
given by:
(1)
Where σs2 and σf
2 are the variances of the true image
and the recorded image, respectively. In the second case of
data-dependent noise (e.g. arising when monochromatic
radiation is scattered from a surface whose roughness is of the
order of a wavelength, causing wave interference which
results in image speckle), it is possible to model noise with a
multiplicative, or non-linear, model. These models are
mathematically more complicated; hence, if possible, the
noise is assumed to be data independent. The major types of
noise that occur in MRI and ultrasound spectroscopy are
impulse noise and speckle noise. In this work, three types of
noise are filtered; viz., salt and pepper (impulse) noise,
speckle noise, and gaussian noise; and the results are analysed
by three parameters; viz., SNR, PSNR and MSE. Six filters
are used for noise removal separately and their performance
is observed for different noise densities.
A. Impulse Noise
The impulse noise may be classified into salt-and-pepper
noise and random valued noise. The salt and pepper noise
pixels can take only the maximum gray and the minimum
gray values. But in random valued noise pixels can take any
random value between the maximum and minimum gray
values. Thus, it could severely degrade the image quality and
Image Restoration Filters in Spatial Domain for various Noise Density Ranges
(IJSRD/Vol. 5/Issue 07/2017/062)
All rights reserved by www.ijsrd.com 251
cause some loss of information. An image containing impulse
noise can be represented as
g(x,y) = {η(x, y)with probability P
f(x, y)with probability 1 − P (3)
The detection of random valued impulse noise is
much difficult than the detection of salt-and-pepper. The
mean square error (MSE) is used to determine the peak signal
to noise ratio (PSNR).
MSE = ∑ ∑ (𝐨(𝐱,𝐲)𝐟(𝐱,𝐲))𝟐𝐧−𝟏
𝐲=𝟎𝐦−𝟏𝐱−𝟎
𝐌 𝐍 (4)
The PSNR in dB is given,
PSNR = 10log (𝟐𝟓𝟓𝟐
𝐌𝐒𝐄) (5)
O(x, y) is the original image, f (x,y) represents the
denoised image, and M N is the size of the image. Idea
behind in this PSNR is to compute a single number that
reflects the quality of the restored image. Salt-and-pepper
noise is a form of noise sometimes seen on images. It is also
known as fixed valued impulse noise. This noise can be
caused by sharp and sudden disturbances in the image signal.
It presents itself as sparsely occurring white and black pixels.
Here, the noise is caused by errors in the data transmission [2][8]. The corrupted pixels are either set to the maximum value
(which looks like snow in the image) or have single bits
flipped over. In some cases, single pixels are set alternatively
to zero or to the maximum value, giving the image a `salt and
pepper' like appearance. Unaffected pixels always remain
unchanged. The noise is usually quantified by the percentage
of pixels which are corrupted. Often, salt and pepper noise is
the natural result of creating a binary image via thresholding [11][14]. Salt corresponds to pixels in a dark region that
somehow passed the threshold for bright, and pepper
corresponds to pixels in a bright region that were below
threshold. Salt and pepper might be classification errors
resulting from variation in the surface material or
illumination, or perhaps noise in the analog/digital
conversion process in the frame grabber [5][6]. For this kind of
noise, conventional low pass filtering, e.g. mean filtering or
Gaussian smoothing is relatively unsuccessful because the
corrupted pixel value can vary significantly from the original
and therefore the mean can be significantly different from the
true value [25]. A median filter removes drop-out noise more
efficiently and at the same time preserves the edges and small
details in the image better [3]. Conservative smoothing can be
used to obtain a result which preserves a great deal of high
frequency detail, but is only effective at reducing low levels
of noise. Median filtering techniques and their variations are
quite successful in reducing impulse noise to a great extent.
B. Speckle Noise
Speckle is a granular 'noise' that inherently exists in and
degrades the quality of the active radar, synthetic aperture
radar (SAR), medical ultrasound and optical coherence
tomography images. The vast majority of surfaces, synthetic
or natural, are extremely rough on the scale of the
wavelength. Images obtained from these surfaces by coherent
imaging systems such as laser, SAR, and ultrasound suffer
from a common phenomenon called speckle. Speckle, in both
cases, is primarily due to the interference of the returning
wave at the transducer aperture. The origin of this noise is
seen if we model our reflectivity function as an array of
scatterers [13]. Because of the finite resolution, at any time we
are receiving from a distribution of scatterers within the
resolution cell. These scattered signals add coherently; that is,
they add constructively and destructively depending on the
relative phases of each scattered waveform [15][16]. Speckle
noise results from these patterns of constructive and
destructive interference shown as bright and dark dots in the
image. Speckle noise is a multiplicative noise, i.e. it is in
direct proportion to the local gray level in any area. The signal
and the noise are statistically independent of each other. The
sample mean and variance of a single pixel are equal to the
mean and variance of the local area that is centred on that
pixel. Gaussian filters perform best removal of speckle noise
as their impulse response is a gaussian function itself.
C. Gaussian Noise
This kind of noise is due to the discrete nature of radiation,
i.e. the fact that each imaging system is recording an image
by counting photons. Allowing some assumptions (which are
valid for many applications) this noise can be modelled with
an independent, additive model, where the noise n(x,y) has a
zero-mean Gaussian distribution described by its standard
deviation σ, or variance. This means that each pixel in the
noisy image is the sum of the true pixel value and a random,
Gaussian distributed noise value [14]. Gaussian noise is
statistical noise having a probability density function (PDF)
equal to that of the normal distribution, which is also known
as the Gaussian distribution. In other words, the values that
the noise can take on are Gaussian-distributed. Image noise is
the random variation of brightness or colour information in
images produced by the sensor and circuitry of a scanner or
digital camera [18][20]. The probability density function p of a
Gaussian random variable z is given by:
(6)
In digital image processing, Gaussian noise can be
reduced using a spatial filter, though when smoothing an
image, an undesirable outcome may result in the blurring of
fine-scaled image edges and details because they also
correspond to blocked high frequencies. Conventional spatial
filtering techniques for noise removal include: mean
(convolution) filtering, median filtering and Gaussian
smoothing [15].
III. RESULTS
Six different filters of standard window size 5 x 5 are taken
for noise. The efficiency of each filter is tested against
increasing noise density levels. The noise levels induced were
10%, 20%, 30% and 50% for different iterations.
Fig. 1: Original Image
Image Restoration Filters in Spatial Domain for various Noise Density Ranges
(IJSRD/Vol. 5/Issue 07/2017/062)
All rights reserved by www.ijsrd.com 252
Fig. 2: Average Filtering at 30% Noise
At high noise densities, average (mean) filters
perform marginally better than other filters for speckle noise
removal. They, however, behave poorly for salt and pepper
noise removal.
Fig. 3: Adaptive Wiener Filtering at 30% Noise
Adaptive Wiener Filters perform fairly well for
speckle and gaussian noise removal at medium to high noise
densities but not for salt and pepper noise.
Fig. 4: Gaussian Filtering at 30% Noise
Gaussian filters perform the best noise filtering at
lower noise densities, and they fairly well for higher noise
densities also. However, these are highly inefficient for
gaussian noise and impulse noise removal.
Fig. 5: Standard Median Filtering at 30% Noise
Salt and pepper noise
Speckle noise
Gaussian noise
Salt and pepper noise
Speckle noise
Gaussian noise
Salt and pepper noise
Speckle noise
Gaussian noise
Salt and pepper noise
Speckle noise
Gaussian noise
Image Restoration Filters in Spatial Domain for various Noise Density Ranges
(IJSRD/Vol. 5/Issue 07/2017/062)
All rights reserved by www.ijsrd.com 253
Fig. 6: Weighted Median Filtering at 30% Noise
Standard Median Filters exhibit quite superior filtering for
salt and pepper noise at even very high noise densities.
Fig. 7: Hybrid Median Filtering at 30% Noise
Hybrid Median Filters perform best noise removal
for salt and pepper noise at low noise densities. They behave,
however, quite poorly, at higher noise density values.
Table 1: Filter performance at 10% noise
Table 2: Filter performance at 30% noise
From Table.1, it is evident that median filters and
their derivations provide best discrete impulse noise removal
at lower noise densities (Figure.8).
Fig. 8: Bar Graphs for salt and pepper noise filtering at 10%
noise density
However, median filters tend to minimize the mean
square error better than the linear filters for this purpose.
Overall, hybrid median filters provide convenient results both
in terms of SNR and MSE (Figure.9). At lower noise
densities, standard median filters exhibit superior
performance for Gaussian noise removal both in terms of
SNR as well as MSE.
Salt and pepper noise
Speckle noise
Gaussian noise
NOISE Para-
meter
Average
(Mean)
Filter
Adaptive
Wiener
Filter
Gaussian
Filter
Standard
Median
Filter
Weighted
Median
Filter
Hybrid
Median
Filter
Salt and
Pepper
(Impulse)
Noise
SNR
(dB)
11.069 9.207 7.391 12.111 4.005 13.321
PSNR
(dB)
19.905 19.081 17.265 21.985 13.879 22.157
MSE 0.0102 0.0124 0.0188 0.0063 0.0409 0.0061
Speckle
Noise
SNR
(dB)
12.174 13.016 13.728 11.112 10.492 13.014
PSNR
(dB)
21.010 22.889 23.601 20.986 20.365 21.849
MSE 0.0079 0.0051 0.0044 0.0080 0.0092 0.0065
Gaussian
Noise
SNR
(dB)
8.781 7.565 5.384 9.578 2.524 6.191
PSNR
(dB)
17.616 17.438 15.257 19.451 12.398 15.026
MSE 0.0173 0.0180 0.0290 0.0113 0.0576 0.0314
Image Restoration Filters in Spatial Domain for various Noise Density Ranges
(IJSRD/Vol. 5/Issue 07/2017/062)
All rights reserved by www.ijsrd.com 254
Fig. 9: Bar Graphs for speckle noise filtering at 10% noise
density
Adaptive Wiener Filters and Mean Filters are also
quite good in removal of gaussian noise for low noise
(Figure.10).
Fig. 10: Bar Graphs for gaussian noise filtering at 10% noise
density
At low noise densities, Gaussian filters are the best
for speckle noise filtering. At higher noise densities, standard
median filter exhibits, superior performance than all others
for salt and pepper noise removal (Figure.11). For speckle
noise filtering at high noise densities, mean filters and
gaussian filters are efficient both in terms of SNR
improvement as well as minimum MSE (Figure.12).
Fig. 11: Bar Graphs for salt and pepper noise filtering at
30% noise density
Adaptive Wiener filters also provide decent results
in terms of minimizing the MSE, however SNR performance
is not that satisfactory. Standard median and hybrid median
filters perform reasonably well for speckle noise removal at
high noise densities.
Fig. 12: Bar Graphs for speckle noise filtering at 30% noise
density
At higher noise densities, linear filters behave quite
poorly in removal of gaussian noise, as they fail to minimize
the MSE.
Fig. 13: Bar Graphs for gaussian noise filtering at 30% noise
density
Standard median filters, however, concede
satisfactory results for gaussian noise filtering as compared to
other filters at higher noise densities both in terms of SNR as
well as MSE (Figure.13).
IV. CONCLUSION
Six different filters have been implemented in this work; with
an injection of lower as well as higher noise densities, in order
to test filter performance for the same. It is observed that for
lower and medium range noise densities, hybrid median
filters exhibit the best filter performance for salt and pepper
noise removal. However, their performance declines sharply
as noise densities are increased. At high noise densities, they
can give fair results only for speckle noise filtering. Weighted
median filters are inefficient for most noise densities as
compared to other filtering methods, hence they need certain
adaptations for enhanced performance [4][24]. Gaussian filters
perform best speckle noise filtering at low as well as higher
noise densities. Adaptive wiener filters are suitable for
gaussian noise removal at low as well as higher noise
densities, though they are not that effective in reducing the
blurring of edges at higher noise. Average filters give
reasonable results at higher noise ranges, but blurring
continues to be a major issue. Standard median filters provide
quite useful results in most cases, even at higher noise
densities. But they are computationally very expensive, time
consuming and quite hard to implement. Further research is
needed for better noise removal at very high noise levels by
suitable adaptive algorithms, especially for non-linear filters.
Image Restoration Filters in Spatial Domain for various Noise Density Ranges
(IJSRD/Vol. 5/Issue 07/2017/062)
All rights reserved by www.ijsrd.com 255
REFERENCES
[1] Muhammad Sailuddin Darus et. al, “Modified Hybrid
Median Filter for Removal of Low Density Random-
Valued Impulse Noise in Images”, 2016 6th IEEE
International Conference on Control System, Computing
and Engineering, 25–27 November 2016, Penang,
Malaysia.
[2] H. S. Yazdi and F. Homayouni, “Impulsive noise
suppression of images using adaptive median filter,”
International Journal of Signal Processing, Image
Processing and Pattern Recognition, vol. 3, no. 3, 2010.
[3] R. C. Gonzalez, R.E. Woods, “Digital Image
Processing”, Prentice Hall, New Jersey, 2002.
[4] Yiqiu Dong and Shufang Xu, “A new directional
weighted median filter for removal of random-valued
impulse noise,” Signal Processing Letters, IEEE, vol. 14,
no. 3, pp. 193–196, 2007.
[5] Yuning Xie, Xiaoguo Zhang, Zhu Zhu, and Qing Wang,
“An adaptive median filter using local texture
information in images,” in Computer and Information
Science (ICIS), 2014 IEEE/ACIS 13th International
Conference on. IEEE, 2014, pp. 177–180.
[6] Chang-Yo Wang, Yang Fu-ping, Li Lin-Lin, and Gong
Hui, “A new kind of adaptive weighted median filter
algorithm,” in Computer Application and System
Modelling (ICCASM), 2010 International Conference
on. IEEE, 2010, vol. 11, pp. V11–667.
[7] Changhong Wang, Taoyi Chen, and Zhenshen Qu, “A
novel improved median filter for salt-and-pepper noise
from highly corrupted images,” in Systems and Control
in Aeronautics and Astronautics (ISSCAA), 2010 3rd
International Symposium on. IEEE, 2010, pp. 718–722.
[8] Li Tan and Jean Jiang, “Digital Signal Processing:
Fundamentals and Applications”, 2nd edition, Academic
Press, 2013, 876 p.
[9] V. Jayaraj and D. Ebenezer, “A new switching-based
median filtering scheme and algorithm for removal of
high-density salt and pepper noise in images”, EURASIP
journal on advances in signal processing, volume 2010,
article ID 690218, 11 pages.
[10] P. S. Windyga, “Fast impulsive noise removal,” IEEE
Transactions on Image Processing, vol. 10, pp. 173–179,
2001.
[11] T. Chen, Hong Ren Wu “Adaptive impulse detection
using center-weighted median filters,” IEEE Signal
Processing Letters, vol. 8, pp. 1–3, 2001.
[12] Haidi Ibrahim, Nicholas Sia Pik Kong, Theam Foo Ng,”
Simple adaptive median filter for the removal of impulse
noise from highly corrupted images”, IEEE transactions
on consumer electronics, vol. 54, no. 4, November 2008.
[13] D. Suganya and S. Devi, "Effective noise reduction
techniques for despeckling ultrasound medical images,"
Journal of Computer Applications, vol. 5, pp. 52-58,
February 2012.
[14] P. S. Hiremath, P. T. Akkasaligar and S. Badiger, “Linear
regression model for gaussian noise estimation and
removal for medical ultrasound images,” International
Journal of Computer Applications, vol. 50, no. 3, pp. 11-
15, July 2012.
[15] R. Rosa and F. C. Monteiro, “Performance analysis of
speckle ultrasound image filtering”, Computer Methods
in Biomechanics and Biomedical Engineering: Imaging
& Visualization, pp. 1-9, 2014.
[16] M. Nitzberg, D. Mumford, and T. Shiota, “Filtering,
Segmentation and Depth”. Springer-Verlag, 1993.
[17] B. Chanda, D Dutta Majumder, “Digital Image
Processing and Analysis”, PHI 2002.
[18] K Mohan and I L. Aroquiaraj, “Comparative analysis of
spatial filtering techniques in ultrasound images,”
International Journal of Computational Intelligence and
Informatics, vol. 4, no. 3, pp. 207-213, December 2014.
[19] A. V. Oppenheim. Ed., “Applications of Digital Signal
Processing”, chapter 4. pp. 169-237, Prentice-Hall,
Englewood Cliffs, NJ, 1978.
[20] Pitas, I., and A.N. Venetsanopoulos, “Nonlinear Digital
Filters: Principles and Applications”, Kluwer Academic
Publishers: Boston., 1990.
[21] J. Astola, P. Kuosmanen, “Fundamentals of Nonlinear
Digital Filtering”, CRC Press Inc., Boca Raton, May
1997, pp. 288.
[22] W. K. Pratt, “Digital image processing”, Prentice Hall,
1991.
[23] John G. Proakis, Dimitris G. Manolakis, “Digital Signal
Processing: Principles, Algorithms, and Applications”,
Prentice Hall, 1996.
[24] H. Hwang and R.A. Haddad,1995, “Adaptive median
filters: New algorithms and results”, IEEE Trans Image
Process, 4(4):499-502.1995.
[25] Wang and D. Zhang, “Progressive median filter for the
removal of impulse noise from highly corrupted images”,
IEEE Trans Circuits Syst II, Analog Digit Signal
Process, 46(1):78-80, 1999.
[26] J. S. Lee, “Digital image enhancement and noise filtering
by use of local statistics,,” IEEE Trans. PAMI, vol. 2, pp.
165–168, 1980.
[27] Norbert Wiener, “The interpolation, extrapolation and
smoothing of stationary time series”, Report of the
Services 19, Research Project DIC-6037 MIT, February
1942.