Sei sulla pagina 1di 8

International Journal of Advanced Science and Technology

Vol. 29, No. 4s, (2020), pp. 1495-1502

Modified Median Filter for Image Denoising


Narendra Kumar1# , Anil Kumar Dahiya2# Krishna Kumar 3
# Department of Information Technology, D.I.T. University , Dehradun, Uttarakhand,
INDIA*
3
UJVN Ltd., Uttarakhand, India

Abstract
The retrieval of the original image quality is always a challenging task in the area of image processing.
A huge number of techniques were used to denoising the image. A new approach is proposed for
eliminating salt and paper noise. The methodology suggested is based on a different median filter
applied. This paper describe the methodology and logical notations of purposed technique and finally
image quality is measures based on PSNR of images and results are compared with some proven
method of filtering.
Keywords: Salt and Pepper; Median Filter; Symmetric, Image Processing, Different Applied Median
Filter (DAMF).

1. Introduction

A large number of studies in image denoising and image recovery has been undertaken in image
processing. Recovering the original image is a difficult task. Photo denoising target is to obtain a
noiseless photo by eliminating the noise closest to the source. DAMF used to filter salt and pepper noise
with different densities [1]. Protecting edges, textures and other details are very important tasks in the
denoising image [2]. Images are degraded by impulse noise [3]. Impulse noise is of two different types,
salt and pepper and randomly valued noise [4]. Sharp and unexpected fluctuations in the object signal
are the one cause for salt and pepper noise [5]. Median filter is the useful and popular filters to eliminate
salt and pepper noise. Use the median filter to eliminate the speckles of black and white in the images
[7]. If the pixel intensity value is less than or equal to zero in salt and pepper noise, then pepper noise
occurs and if the pixel intensity value is greater than or equal to 255 than a salt noise occurs. Here we
have used a minimal filter to remove white (salt) dots and maximum filter to remove black (dots).
Digital images are generated using different devices. The quality of the image generated depends on the
quality of the optical sensors. It is possible to distinguish object noises into Gaussian noise, speckle
noise, Poisson noise, and so on [8]. Bounded Self-Weights Estimating Process for Non-Local Means,
Image Denoising Using Minimax Estimators provide a heuristic mechanism for finding suitable
universal smoothing parameters, In our method PSNR values are similar to optimal values and yield
better results than state-of - the-art algorithms. A quick version of the non-locally centralized algorithm
is used to achieve better performance in both quantitative and visual quality measurements [10]. Image
decomposition system provides a new image denouncing paradigm with better results [11]. A novel
impulse detection approach based on fuzzy sets is used to eliminate noise from images [12]. Non-local
means opposing method that exploits the affine invariant self-similarities present in actual scene images
[13]. The adaptive window size is determined by a new adaptive weighted mean filter by continuously
increasing the window size until the maximum and minimum values of two windows are equal [14]. A
new dynamic window size method enhances image quality and is used to remove salt-and-pepper noise
[15]. Most basic gray-level and binary image processing methods and the essential tools of image
analysis, Fourier and linear convolution systems are used to solve image processing problems [16]. To
remove the salt-and-pepper signal, a three-value-weighted approach is used. The local variable-size
window is used in this method to analyze each extreme pixel and each non-extreme pixel is classified
and placed in the local window in the maximum, middle, or minimum groups [17]. This paper uses

ISSN: 2005-4238 IJAST


Copyright ⓒ 2020 SERSC 1495
International Journal of Advanced Science and Technology
Vol. 29, No. 4s, (2020), pp. 1495-1502

mean filter to substitute the target pixel intensity with the arithmetic mean of the intensity value of the
corresponding pixel. The default parameters are used by the median filter. Block replaces the central
value of the 3-by-3 neighborhood with the neighborhood pixel median value in the median filter. This
procedure is used to eliminate the object noise. The standard median filter is used to eliminate impulse
noise, but the standard median filter often adjusts uncorrupted pixel intensity values. The super Mean
Filter is used for electronic noise reduction of high-density impulse noise. The Super Mean Filter
operates in two steps, the first phase distinguishes noisy pixels and noise-free pixels, and the second
phase eliminates noisy pixels used to solve a class of linear inequalities, Optimal Weighted Filter is
proposed for one-dimensional use. To deal with impulse noise, an adaptive median filter is based on
the adaptive window width. Median filter is used for removing impulse noise in progressive switching.
Impulse detector and noise filters are implemented gradually in iterative ways in the linear switching
median filter. Using adaptive windows and width to detect noise pixels, Fuzzy-based median filter
approach is used to eliminate high-density noise.

2. Background
Let 𝐶: = [𝑐𝑖𝑗 ]𝑥𝑋𝑦 is an image matrix (img), where 𝑐𝑖𝑗 is an unsigned integer and if the values lies
between 0 𝑡𝑜 255 (0 ≤ 𝑐𝑖𝑗 ≤ 255), then 𝑐𝑖𝑗 is called as noisy entry of C and if 𝑐𝑖𝑗 =0 or 𝑐𝑖𝑗 =255 then
it is called a regular entry. If C is noisy image then the matrix 𝐷: = [𝑑𝑖𝑗 ]𝑚𝑋𝑛 will be binary matrix of
C where:
0, 𝑐𝑥𝑦 𝑖𝑠 𝑎 𝑛𝑜𝑖𝑠𝑦 𝑒𝑛𝑡𝑟𝑦 𝑜𝑓 𝐶
𝑑𝑖𝑗 ={ (1)
1, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

Method Used in Pad Array:

‘Symmetric’ the size the image is


extended by mirror-reflecting it across
its border

‘Replicate’ the size of the image is


extended by replicating the values in
its outer border.

‘Circular’ the size of the image is


extended by treating by treating the
image as one period of a 2-D period of
a 2D periodic function

Fig 1. Pad Array

When the padded border is black. We can deal these difficulties by using replicate option. The borders
of a filtered image appear as expected. In this case, expected results are obtained by Symmetric option.
𝑘
Let 𝑅𝑥𝑦 :=[𝑟1𝑣 ]1×𝑤 𝑏𝑒 𝑡ℎ𝑒 𝑟𝑒𝑔𝑢𝑙𝑎𝑟 𝑒𝑛𝑡𝑟𝑦 𝑚𝑎𝑡𝑟𝑖𝑥 𝑜𝑓 𝐶𝑖𝑗𝑘 . Then the value

ISSN: 2005-4238 IJAST


Copyright ⓒ 2020 SERSC 1496
International Journal of Advanced Science and Technology
Vol. 29, No. 4s, (2020), pp. 1495-1502

𝑟1 (𝑤+1) , 𝑤+1 ∈𝑍
𝑘 2 2
𝑚𝑅𝑖𝑗 :={1 (2)
(𝑟 𝑤 + 𝑟1(𝑤+2) ,
2 12
𝑤 ∈𝑍
2 2

𝑘
It is called media of 𝑅𝑖𝑗

3. Proposed Algorithm:
Step1. Read the noise image matrix 𝐶: = [𝑐𝑖𝑗 ]𝑥𝑋𝑦 , 𝑤ℎ𝑒𝑟𝑒 {𝑥, 𝑦} ≥ 1
Step 2.Write the binary matrix 𝐷: = [𝑑𝑖𝑗 ]𝑚𝑋𝑛 𝑜𝑓 𝐶
Step 3. Write 𝑃𝐶1 and 𝑃𝐷1
Step 4. For all I and j.
If 𝑑𝑖𝑗 = 1, then keep the value of 𝑐𝑖𝑗
Else
1
If 𝐷𝑖𝑗 ≠ [0], then
1
a. Find 𝑅𝑖𝑗 for 𝑐𝑖𝑗
1
b. Evaluate the median of 𝑅𝑖𝑗
c. Replace this value to the 𝑎𝑖𝑗
Else keep the value of 𝑐𝑖𝑗

Fig 2.Proposed Modified Median Filter Algorithm


4. Results and Conclusions:
Algorithm evaluation criteria: The results of proposed algorithm is compared with DAMF Filter,
Median Filter, BPDF Filter, HMF Filter, NAFSM Filter by using two images with 256𝑋256 pixels.
Peak Signal to Noise Ratio (PSNR) of an image is defined as;
2552
𝑃𝑆𝑁𝑅: = 10 𝑙𝑜𝑔 ( 𝑀𝑆𝐸 ) (3)
1
𝑀𝑆𝐸: = 𝑚𝑛 ∑𝑚 𝑛
𝑖=1 ∑𝑗+1(𝑥𝑖𝑗 − 𝑦𝑖𝑗 )
2
(4)

For images 𝑋 = [𝑥𝑖𝑗 ]𝑚×𝑛 𝑎𝑛𝑑 𝑌 = 𝑦𝑖𝑗 ]𝑚×𝑛

ISSN: 2005-4238 IJAST


Copyright ⓒ 2020 SERSC 1497
International Journal of Advanced Science and Technology
Vol. 29, No. 4s, (2020), pp. 1495-1502

Fig 3: Simulation results of methods for image 1 of size 256𝑋 256 with Salt & Pepper noise ratio of
90%. (a) Original image (b) Noised image (c) MDAMF (d) DAMF (e) Median Filter (f) BPDF (g)
HMF (h) Proposed filter

Fig 4: Simulation results of methods for image 2 of size 256𝑋 256 with Salt & Pepper noise ratio of
90%. (a) Original image (b) Noised image (c) MDAMF (d) DAMF (e) Median Filter (f) BPDF (g)
HMF (h) Proposed filter

Fig 5: Simulation results of methods for image 1 of size 256X 256 with Salt & Pepper noise ratio of
80%. (a) Original image (b) Noised image (c) MDAMF (d) DAMF (e) Median Filter (f) BPDF (g)
HMF (h) Proposed filter

Fig 6: Simulation results of several methods for image 2 of size 256X 256 with Salt & Pepper noise
ratio of 80%. (a) Original image (b) Noised image (c) MDAMF (d) DAMF (e) Median Filter (f) BPDF
(g) HMF (h) Proposed filter

ISSN: 2005-4238 IJAST


Copyright ⓒ 2020 SERSC 1498
International Journal of Advanced Science and Technology
Vol. 29, No. 4s, (2020), pp. 1495-1502

Fig 7: Simulation results of several methods for image 1 of size 256X 256 with Salt & Pepper noise
ratio of 60%. (a) Original image (b) Noised image (c) MDAMF (d) DAMF (e) Median Filter (f)
BPDF (g) HMF (h) Proposed filter

Fig 8: Simulation results of several methods for image 2 of size 256X 256 with Salt & Pepper noise
ratio of 60%. (a) Original image (b) Noised image (c) MDAMF (d) DAMF (e) Median Filter (f)
BPDF (g) HMF (h) Proposed filter

Fig 9: Simulation results of several methods for image 1 of size 256X 256 with Salt & Pepper noise
ratio of 40%. (a) Original image (b) Noised image (c) MDAMF (d) DAMF (e) Median Filter (f)
BPDF (g) HMF (h) Proposed filter

Fig 10: Simulation results of several methods for image 2 of size 256X 256 with Salt & Pepper noise
ratio of 40% (a) Original image (b) Noised image (c) MDAMF (d) DAMF (e) Median Filter (f) BPDF
(g) HMF (h) Proposed filter

ISSN: 2005-4238 IJAST


Copyright ⓒ 2020 SERSC 1499
International Journal of Advanced Science and Technology
Vol. 29, No. 4s, (2020), pp. 1495-1502

Fig 11: Simulation results of several methods for image 1 of size 256X 256 with Salt & Pepper noise
ratio of 20%. (a) Original image (b) Noised image (c) MDAMF (d) DAMF (e) Median Filter (f)
BPDF (g) HMF (h) Proposed filter

Fig 12: Simulation results of methods for image 2 of size 256X 256 with Salt & Pepper noise ratio of
20% (a) Original image (b) Noised image (c) MDAMF (d) DAMF (e) Median Filter (f) BPDF (g) HMF
(h) NAFSM

Table 1: Results of Filters on Different Noise Levels


Noise image PSNR(in db)
level (%)
Proposed DAMF Median BPDF HMF NAFSM
Filter Filter Filter Filter Filter Filter
90 1 71.9373 71.7323 56.1027 56.2430 54.3660 69.8912
2 69.1809 69.1395 56.9348 57.9503 54.8944 68.7022
80 1 74.4320 74.7376 56.7103 64.2058 55.8591 73.5115
2 70.6671 70.6563 57.4990 65.5292 56.2699 74.8226
70 1 75.8647 75.8630 57.3561 69.1435 57.6030 74.8226
2 71.8431 71.8393 58.0989 68.6892 58.0187 71.5401
60 1 77.4545 77.4535 58.0568 72.0209 59.7557 75.8743
2 73.0457 73.0433 58.7958 70.8430 60.1746 72.5039
40 1 80.3914 80.3914 59.8994 76.6946 65.9426 78.4173
2 75.4086 75.4079 60.5421 73.8082 65.8310 74.3881
20 1 84.5168 84.5168 63.0564 81.9021 75.8197 81.7099
2 79.0244 79.0244 63.4766 77.5481 72.3243 77.5933

ISSN: 2005-4238 IJAST


Copyright ⓒ 2020 SERSC 1500
International Journal of Advanced Science and Technology
Vol. 29, No. 4s, (2020), pp. 1495-1502

Fig 13: Noise removal chart for different noise variances.

The simulation results show that the proposed filter provide better quality of image retrieval on
the parameter of PSNR than any other existing filters for salt and pepper denoising techniques.

References
[1] U Erkan, L Gokrem and S Enginoglu, Different applied a median filter in salt and pepper noise,
Computers & Elect. Engineering.70 (2018) 789-798, doi:10.1016/j.compeleceng.2018.01.019.
[2] N. Kumar, Dual ascent based median filter for image restoration, International Conference on
Advanced Computing and Software Engineering, Vol. 2, KNIT Sultanpur, 2019.
[3] H. S. Shukla, R.P. Tripathi, N. Kumar, Multilevel Filtering techniques for Gaussian Noise, VLSI
communication and network, Vol. 2, IET Alwar, 2015, pp 101-104.
[4] H. S. Shukla, R.P Tripathi, N.Kumar, Image Restoration using modified binary particle Swarm
Optimization Richardson-Lucy (MBSO-RL) algorithm, International Journal of Applied
Engineering Research,10 (2015) 43077.
[5] N. Kumar, H. S. Shukla, R.P Tripathi, Image Restoration in Noisy Free Images Using Fuzzy
Based Median Filtering and Adaptive Particle Swarm Optimization - Richardson-Lucy
Algorithm, International Journal of Intelligent Engineering and Systems,10 (2017) 2185-3118,
DOI: 10.22266/ijies2017.0831.06.
[6] H. S. Shukla, R.P Tripathi, N.Kumar, Gaussian Noise Filtering Techniques using New Median
Filter, International Journal of Computer Applications, 95 (2014) 12.
[7] H. S. Shukla, R.P Tripathi, N.Kumar, Median Filter based Wavelet Transform for Multilevel
Noise, International Journal of Computer Applications, 107 (2014) 11.
[8] D.N.H. Thanh, S.D. Dvoenko , A method of total variation to remove the mixed Poisson–
Gaussian noise. Pattern Recognit Image Anal, 26 (2016) 285.
[9] M.P. Nguyen, S.Y. Chun, Bounded self-weights estimation method for non-local means image
denoising using minimax estimators. IEEE Trans Image Process, 26 (2017) 1637.
[10] S. Xu , X. Yang , S. Jiang, A fast nonlocally centralized sparse representation algorithm for
image denoising. Signal Process, 131 (2017) 99 .
[11] Glimpse ¸G. teanu, Batard T, Bertalmío M, Levine S. A decomposition framework for image
denoising algorithms. IEEE Trans Image Process, 25 (2016) 388.
[12] V.P. Ananthi, P. Balasubramaniam, A new image denoising method using interval-valued
intuitionistic fuzzy sets for the removal of impulse noise. Signal Process, 121 (2016) 81.
[13] V. Fedorov, C. Ballester, Affine non-local means image denoising. IEEE Trans Image Process
26 (2017) 2137.

ISSN: 2005-4238 IJAST


Copyright ⓒ 2020 SERSC 1501
International Journal of Advanced Science and Technology
Vol. 29, No. 4s, (2020), pp. 1495-1502

[14] P. Zhang, F. Li, A new adaptive weighted mean filter for removing salt-and-pepper noise. IEEE
Signal Process Lett 21 (2014) 1280.
[15] U. Erkan, A. Kilicman. Two new methods for removing salt-and-pepper noise from digital
images. Sci Asia, 42 (2016) 28.
[16] A.C. Bovik, Handbook of image and video processing. (San Diego, USA: Academic Press; 2000)
.
[17] C.T. Lu, Y.Y. Chen, L.L. Wang, C.F. Chang, Removal of salt-and-pepper noise in a corrupted
image using the three-values-weighted approach with variable-size window. Pattern Recognit
Lett, 80 (2016) 188.
[18] X. Denga, Y. Ma, M. Dong, A new adaptive filtering method for removing salt and pepper noise
based on multilayered PCNN, Pattern Recognit Lett, 79 ( 2016) 17.
[19] R.H. Chan, C.W. Ho, Nikolova M, Salt-and-pepper noise removal by median-type noise detectors
and detail-preserving regularization. IEEE Trans Image Process, 14 (2005) 1479.
[20] S. Esakkirajan, T. Veerakumar, A..N. Subramanyam, C.H. Prem Chand, Removal of high-
density salt and pepper noise through a modified decision based unsymmetric trimmed median
filter. IEEE Signal Process Lett, 18 (2011) 287.
[21] G. Wanga, D. Li, W. Pan, Z. Zang, Impulse noise removal using SVM classification based fuzzy
filter from grayscale images. Signal Process 128 (2016) 262.
[22] G. Wanga, D. Li, W. Pan, Z. Zang, Modified switching median filter for impulse noise removal.
Signal Process, 90 (2010) 3213.
[23] H. Hwang, R.A. Haddad, Adaptive median filters: new algorithms and results, IEEE Trans Image
Process, 4 (1995) 499.
[24] Y. Wang, J. Wang, X. Song, L. Han, An efficient adaptive fuzzy switching weighted mean filter
for salt-and-pepper noise removal, IEEE Signal Process Lett, 23 (2016) 1582.
[25] Z. Wang, D. Zhang, Progressive switching median filter for the removal of impulse noise from
highly corrupted images, IEEE Trans Circuits Syst II, 46 (1999) 78.
[26] A. Pattnaik, S. Agarwal, S. Chand, A new and efficient method for removal of high-density salt
and pepper noise through cascade decision-based filtering algorithm, Procedia Technol 6 (2012)
108.
[27] K.K.V. Toh, N.A.M. Isa, Noise adaptive fuzzy switching median filter for salt-and-pepper noise
reduction, IEEE Signal Process Lett, 17 (2010) 281.
[28] W. Zhou, A.C. Bovik, H.R. Sheikh, E.P. Simoncelli, Image quality assessment: from error
visibility to structural similarity, IEEE Trans Image Process, 13 (2004) 600.
[29] Shraddha Tripathi, Krishna Kumar, B.K.Singh and R.P.Singh “Image Segmentation: A Review”,
International Journal of Computer Science and Management Research, Vol:1(6), November
2012,pp. 838-843.
[30] Priyanka Khandelwal, Krishna Kumar, B.K.Singh and R.P.Singh “A Review on Medical Image
Modalities”, International Journal of Computer Science and Management Research, Vol:1(6),
November 2012,pp. 844-853.
[31] Krishna Kumar, Rajeev Gupta, Basant Kumar, Chandrahas Kumar “Effect of wavelet filters on
SFQ encoder performance for medical images” 38th IEEE International Conference on
Telecommunications and Signal Processing (TSP), 2015.
[32] N. Lal, M. Singh, S. Yadav “Rule-Based Wrappers for a Dataspace System” IJITEE, Volume-8
Issue-6C, pp. 80-90, 2019.
[33] N. Lal, S. Qamar “Power Efficient Data Collection in Wireless Sensor Networks” International
Journal of Innovative Technology and Exploring Engineering (IJITEE), Volume-8 Issue-6C, pp.
133-137, April 2019.
[34] Partibha, Niranjan Lal, Manoj Diwakar “Text Security using 2D Cellular Automata Rules”
Presented in World Conference on Advances in Communication & Control System (CACCS) at
DIT University on 6th – 8th April 2013, pp. 363-368, Published by Atlantis Press

ISSN: 2005-4238 IJAST


Copyright ⓒ 2020 SERSC 1502

Potrebbero piacerti anche