Abstract
In the field of digital image processing, denoising is one of the basic problems. The challenges faced in image denoising are detecting impulse noise and designing a suitable filter. In this paper, we propose a methodology to remove the random impulse noise on the color image using a novel switching median filter. By using this novel technique, the occurrence of color artifacts has been avoided after noise removal which depends on auto-tuning threshold detection and a vector-type median filter noise remover. In the proposed technique, the random valued impulse noises with uniform distribution have been dealt with switching median filter. L2 Norm is employed to calculate the distribution distance rather than L1 Norm which is used to identify the optimal threshold value for auto-tuning filter. The switching auto-tuning detector automatically tunes the noisy pixels based on distance information of pixels distribution. The Normalized Mean Square Error (NMSE) is found to decrease for L2 Norm when compared with L1 Norm. The Peak Signal to Noise Ratio (PSNR) value and True Positive Rate (TPR) value improved with L2 Norm signifying effective noise removal. The efficiency of the present method is verified by conducting experiments on digital images.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Avoid common mistakes on your manuscript.
1 Introduction
Image denoising is an important part of digital image processing. This process effectively removes or reduces the degradations that can creep in while the images are being obtained or transmitted. The impulse noises can be removed by using many different types of non-linear filters [1]. One of the prominent non-linear filters is a median filter. This can be used for the removal of impulse noise since it is having better denoising capability and better computational efficiency. Median filters can be classified as multi-state type [2,3,4] and pattern classification type filters [5,6,7].
Among the pattern classification-type filters, Switching Median Filter (SMF) is widely used in many applications [8]. This filter detects the pixel which is noisy based on the difference between the original noisy image and the output of the median filter. Median filtering is then carried out only for the detected pixel which is noisy. However, due to this median filtering, color distortions may occur.
To overcome the above problem, Vector Median Filter (VMF) which treats the given input signal as a vector which is having RGB components is widely used [9]. A Robust Switch type VMF (RSVMF) is also proposed in recent years [10]. It has high noise removal ability and high resistance to color distortions. But this is not reliable as the details are sometimes over smoothed.
An improved quantized adaptive switching median filter has been proposed for reducing impulse noise in gray-scale digital images [11]. The proposed filter has been implemented using five processing blocks. The experimental results show the median filter occupied low Mean Square Error (MSE) and high Structure Similarity Index (SSIM) for highly corrupted images. The quality of restored images can be measured using Peak Signal to Noise Ratio (PSNR) value, which is not measured in the quantized adaptive switching median filter.
Several researchers have recommended using Artificial intelligence (AI) for reducing impulse noise in digital images. The impulse noise levels in the digital images have been reduced using different approaches like Fuzzy [12,13,14], Artificial Neural Networks (ANN) [15,16,17], Support vector machines (SVMs) [18]. The artificial intelligence method is quite complex, as it takes more parameters for reducing the impulse noise signal which involves more processing time. It requires a large number of input images for the training phase which increases the complexity.
Zhang et al., proposed an adaptive switching median filter based on evidential reasoning for reducing impulse noise signal [19]. An uncertainty that happened in impulse noise detection has been reported using basic belief assignment (BBA) functions. The proposed median filter occupied more noise density and it attained a longer processing time. Therefore, an improved performance median filter is needed for digital images to reduce the impulse noise.
The impulse noise density signal has been removed by the combined filters methods like adaptive vector median filter and weighted mean filter for color images [20]. These filters are applied over noisy and non-noisy pixels in the noise removal process. The proposed filter achieved improved performance in impulse noise density, but it occupied high computational complexity in noise removal procedures. A cluster-based adaptive fuzzy median filter was proposed for reducing impulse noise signals [21]. Directional rank order absolute difference (DROD) method used in the adaptive fuzzy median filter provided effective impulse noise removal. This methodology utilized a smaller number of processing windows, which eventually reduced computation cost but color artifacts might be the problem.
Yan used the L0 norm to explain the sparsity of the impulse noise, but he handled the L0 norm by introducing a binary matrix that represents the set of pixels that are not affected by the impulse noise [22, 23].
The proposed methodology reduces random valued impulse noise without generating color artifacts in the processed image. Also, L2 norm-based distance calculation is employed in the noise detector rather than L1 norm, this improves the PSNR value and TPR and reduces the NMSE, thereby guarantees the efficient denoising strategy. There are two broad classifications of impulse noise [24]. They are Salt and Pepper Noise, and Random Valued Impulse Noise.
The other name for salt and pepper noise is intensity spikes. This can happen while an image is being transmitted. It can also occur due to faulty pixel elements in the sensors of the acquisition device such as a camera. Sometimes it happens due to defective locations in the memory which happens during the digitization process. The two possible values are 0 and 1. These two values have a probability of less than 0.1. For random valued impulse noise intensity level lies between 0 and 255. The entire image has randomly distributed noise. Any intensity level value can occur as noise which has an equal probability as that of the noise.
Mathematical representation of random valued impulse noise is given in Eq. 1.
where Yij represents the image affected by random valued impulse noise, n(i,j) represents the intensity of the noise corrupted pixel, X(i,j) represents the original image, p represents the probability of occurrence of the noise.
Based on the switching threshold, random valued impulse noises will be detected by Switching Median Filter (SMF). The absolute difference between the given input image and the output of the median filter is calculated and if it is greater than the switching threshold, that pixel will be considered as a noisy pixel. If it is not the case, the pixel will not be considered as a noisy pixel.
The input signal is considered as vectors unlike component-wise scalar processing [9]. Linear filtering is combined with the vector median operation. By doing so, the noise attenuation is improvised and filtering is done with appreciable edge response [25].
2 Methodology
To remove the random valued impulse, the switching median filter consists of a noise detector with auto tuning threshold function and a noise remover based on a vector median filter. The noisy pixels are identified by calculating the distance between the original image and the noisy image using L2 norm. The block diagram of the proposed methodology is shown in Fig. 1.
This SMF contains a detector which detects the noise and vector median filter which removes the noise. This detects if the particular pixel is noisy or not in each channel independently. Noise detector has a threshold auto-tuning function which is tuned depending on the performance of the filters. Then, VMF removes the particular detected pixel and replaces it.
2.1 Threshold method
The threshold value differs from image to image based on the image resolution, size, and intensity value and so on. The best threshold value cannot be predicted before noise detection in the spatial domain of color image processing. Best threshold value can be found using auto-tuning detector [8]. The threshold value is called the optimum threshold value for color image.
2.2 Noise detector
In the spatial domain process, the noise pixel detection uses a threshold value. Here, noise detection is based on distance distribution between noisy image and median filtered image. The noise pixel can be identified from the distance between two images based on the defined threshold value (\(\omega\)).
The noisy position image \({g}_{k}(i,j)\) is defined as
where YK(i,j) represents the random valued impulse noisy image at the position (i,j), YKmed(i,j) represents the output of the median filter at the position (i,j), \(\omega\) represents the threshold value.
In this proposed detector, the optimum threshold value is calculated as
where J is a function to calculate the distance of the distribution. \({P}_{d,\left(\omega \right)}\) represents the probability density function of the detected noise with the threshold \(\omega\). \({P}_{u}\) represents the uniform distribution of the random valued impulse noise.
To compute the distance of distribution, we employ L2 norm which is defined as
where \({P}_{d,\left(\omega \right)}(m)\) represents the probability density function of the detected noise with the threshold \(\omega\) for any random m. \({P}_{u}(m)\) represents the uniform distribution in the range of 1/256 for any random m.
If the distributions are same to each other, distance becomes less.
2.3 Noise remover
Pixel interpolation is one of the best methods for image signal power with reducing the occurrence of color artifacts. Noisy pixels are replaced by vector median filtered color image pixel in the noisy color image. The pixel interpolation is processed in Red, Green and Blue channels individually. The pixel interpolation can improve the PSNR value and also reduces the occurrence of color artifacts [26,27,28,29,30].
Here, the corrupted noisy pixel SR(i,j) in the red channel is replaced by VMF output pixel Yvmf,R(i,j). In the same manner, corrupted noisy pixels are removed in green and blue channels. The noise remover is defined by
where \({S}_{k }\left(i,j\right)\) is the output image of our methodology used in the current study with kth component. \({Y}_{\mathrm{VMF},k}\left(i,j\right)\) represents the vector median filter output. \({Y}_{k}\left(i,j\right)\) represents the random valued impulse noise.
3 Results and discussions
To carry out the simulation, images from the website called FreeImages were utilized [24]. The efficacy and the soundness of the projected method are confirmed by experiments using a test image which is given in Fig. 2.
Noise is added to the noise-free image with different noise probabilities such as 0.01, 0.03, 0.05 and 0.1 is added to the noise-free image shown in Fig. 2 and the obtained outputs are compared as shown in Fig. 3.
The outcomes obtained after filtering the above images are as follows:
3.1 Assessment of auto-threshold tuning methodology
3.1.1 Normalized mean square error
The normalized mean square error (NMSE) is calculated to validate the projected methodology. It is carried out for the original noise-free image which is shown in Fig. 2. The restored output image is shown in Fig. 4. Whenever the switching threshold is well tuned, NMSE becomes smaller. Figure 5 shows NMSE attained with altering the threshold of the Switching Median Filter.
3.1.2 PSNR
The PSNR is frequently used as a measure of the reconstruction quality of noisy images. It should be high for a good quality restored image. PSNR obtained with changing \(\omega\) of the Switching Median Filter is shown in Fig. 6.
3.1.3 L 2 Norm
The following Fig. 7 shows the graph between the L2 norm and the threshold.
The L2 norm between the presumed noise and the normalized histogram of the noises sensed by the detector with changing threshold is shown in Fig. 7. The minimum L2 norm represents the tuned value of the threshold which can be computed from Fig. 7.
3.1.4 True positive rate (TPR)
In the field of image denoising, TPR is defined as the number of detected noisy pixels to the total number of noisy pixels available in the image. The value of TPR lies between 0 and 1. If the value of the TPR is larger, it indicates the better performance of the proposed algorithm.
The proposed methodology utilizes L2 norm for tuning the threshold of the noise detector. The results have been compared with L1 norm which is employed by Kubota et al., in their research for a similar random valued impulse noise removal problem.
From Table 1, it is understood that L2 norm outperforms L1 norm in terms of NMSE, PSNR and TPR. When L2 norm is used, NMSE gets reduced, PSNR and TPR values get improved as evident from Table 1 for different noise probability values.
4 Conclusion
A modified SMF has been elucidated in this paper. In this methodology, L2 norm is used to identify the optimal threshold value for auto-tuning the noise detector. It is noted that L2 norm outperforms L1 norm by reducing NMSE and increasing PSNR and TPR for tuning the threshold function. Since NMSE is less and PSNR and TPR are high, this methodology is not affected by color artifacts much. This methodology is simple yet powerful in removing random impulse noise without introducing color artifacts and blurring. The efficiency of this method was illustrated using the experimental results. The feature scope of this research work is to employ nature mimic algorithms such as gray wolf optimization, whale optimization techniques for finding the optimal threshold value for auto-tuning the noise detector in SMF. This may improve the PSNR value and TPR value and decrease the NMSE value.
Data availability
Data used in the current is available on reasonable request to the corresponding author.
References
Pandey BK, Pandey D, Wariya S, Aggarwal G, Rastogi R (2021) Deep learning and particle swarm optimisation-based techniques for visually impaired humans’ text recognition and identification. Augment Hum Res 6(1):1–14
Chen T, Ma K, Chen LH (1999) Tri-state median filter for image denoising. IEEE Trans Image Process 8(12):1834–1838
Chen T, Wu HR (2001) Space variant median filters for the restoration of impulse noise corrupted images. IEEE Trans Circuits Syst II Analog Digital Signal Process 48(8):784–789
Chen CH, Chen CY (2009) Intelligent adaptive sub band based multi-state median filter in lowly corrupted images. Int J Innov Comput Inf Control 5(9):2917–2926
Pandey D, Pandey BK, Wariya S (2019) Study of various types noise and text extraction algorithms for degraded complex image. J Emerg Technol Innov Res 6(6):234–247
Kubota R, Onaga K, Suetake N (2014) Switching median filter with signal dependent thresholds designed by using genetic algorithm. In: International conference on computer vision theory and applications (VISAPP), Lisbon, pp 222–227
Ng P, Ma K (2006) A switching median filter with boundary discriminative noise detection for extremely corrupted images. IEEE Trans Image Process 15(6):1506–1516
Zhang X, Yin Z, Xiong Y (2008) Adaptive switching mean filter for impulse noise removal. IEEE Congr Image Signal Process 3:275–278
Pandey D, Pandey BK, Wariya S (2019) Study of various techniques used for video retrieval. J Emerg Technol Innov Res 6(6):850–853
Celebi ME, Aslandogan YA (2008) Robust switching vector median filer for impulse noise removal. J Electron Imaging 17(4):043006-1–043006-9
Ibrahim H, Abdal Ameer AK (2019) Improvement of quantized adaptive switching median filter for impulse noise reduction in gray-scale digital images. Turk J Electr Eng Comp Sci 27:580–595
Toh KKV, Mat Isa NA (2010) Noise adaptive fuzzy switching median filter for salt-and-pepper noise reduction. IEEE Signal Process Lett 17(3):281–284
Xiao L, Li C, Wu Z, Wang T (2016) An enhancement method for x-ray image via fuzzy noise removal and homomorphic filtering. Neurocomputing 195:56–64
Hussain A, Habib M (2017) A new cluster based adaptive fuzzy switching median filter for impulse noise removal. Multimedia Tools Appl 76(21):22001–22018
Li Y, Sun J, Luo H (2014) A neuro-fuzzy network based impulse noise filtering for gray scale images. Neurocomputing 127:190–199
Pandey BK, Mane D, Nassa VKK, Pandey D, Dutta S, Ventayen RJM, Rastogi R (2021). Secure text extraction from complex degraded images by applying steganography and deep learning. In: Multidisciplinary approach to modern digital steganography. IGI Global, pp. 146–163
Jena B, Patel P, Sinha G (2018) An efficient random valued impulse noise suppression technique using artificial neural network and non-local mean filter. Int J Rough Sets Data Anal 5:148–163
Roy A, Singha J, Devi SS, Laskar RH (2016) Impulse noise removal using SVM classification based fuzzy filter from grayscale images. Signal Process 128:262–273
Pandey D, Pandey BK, Wairya S (2021) Hybrid deep neural network with adaptive galactic swarm optimization for text extraction from scene images. Soft Comput 25(2):1563–1580
Roy A, Singha J, Manam L, Laskar RH (2017) Combination of adaptive vector median filter and weighted mean filter for removal of high-density impulse noise from colour images. IET Image Process 11(6):352–361
Madhumathy P, Pandey D (2022) Deep learning based photo acoustic imaging for non-invasive imaging. Multimedia Tools Appl 81(5):7501–7518
Yan M (2013) Restoration of images corrupted by impulse noise and mixed gaussian impulse noise using bling in painting. SIAM J Imaging Sci 6:1227–1245
Pimpale N (2016) A Khambra, Optimized Systolic Array Design for Median Filter in Image Filtration. Int J Electr, Electron Comput Eng 5(1):46–53
Pandey D, Wairya S, Sharma M, Gupta AK, Kakkar R, Pandey BK (2022) An approach for object tracking, categorization, and autopilot guidance for passive homing missiles. Aerospace Syst. https://doi.org/10.1007/s42401-022-00150-0
Kubota R, Suetake N (2011) Random-valued impulse noise removal based on component-wise noise detector with auto-tuning function and vector median interpolation. J Franklin Inst 348(9):2523–2538
Wang Z, Zhang D (1999) Progressive switching median filter for the removal of impulse noise from highly corrupted images. IEEE Trans Circuits Syst II Analog Digital Signal Process 46(1):78–80
Raghavan R, Verma DC, Pandey D et al (2022) Optimized building extraction from high-resolution satellite imagery using deep learning. Multimed Tools Appl. https://doi.org/10.1007/s11042-022-13493-9
Sharma M, Sharma B, Gupta AK et al (2022) Recent developments of image processing to improve explosive detection methodologies and spectroscopic imaging techniques for explosive and drug detection. Multimed Tools Appl. https://doi.org/10.1007/s11042-022-13578-5
Pandey BK et al (2023) Effective and secure transmission of health information using advanced morphological component analysis and image hiding. In: Gupta M, Ghatak S, Gupta A, Mukherjee AL (eds) Artificial intelligence on medical data. Lecture Notes in Computational Vision and Biomechanics, vol 37. Springer, Singapore. https://doi.org/10.1007/978-981-19-0151-5_19
Sharma M, Sharma B, Gupta AK, Khosla D, Goyal S, Pandey D (2021) A study and novel AI/ML-based framework to detect COVID-19 virus using smartphone embedded sensors. In: Agrawal R, Mittal M, Goyal LM (eds) Sustainability measures for COVID-19 pandemic. Springer, Singapore. https://doi.org/10.1007/978-981-16-3227-3_4
Funding
No funds.
Author information
Authors and Affiliations
Contributions
All authors contributed to the manuscript. Finally, all authors read and approved the manuscript.
Corresponding author
Ethics declarations
Conflict of interest
The authors declare no conflict of interest.
Rights and permissions
Springer Nature or its licensor holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Bruntha, P.M., Dhanasekar, S., Hepsiba, D. et al. Application of switching median filter with L2 norm-based auto-tuning function for removing random valued impulse noise. AS 6, 53–59 (2023). https://doi.org/10.1007/s42401-022-00160-y
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s42401-022-00160-y