1 Introduction

An X-ray bio-image would be interfered by impulse noise. This interference may be caused by malfunctioning pixels in X-ray receiver sensors, transmission in a noisy channel, bit errors in transmission, and fault memory locations in hardware. Salt-and-pepper (SAP) noise is a major type of impulse noise which can seriously impact X-ray bio-images. This noise significantly corrupts pixels, causing the gray levels of the interfered pixels to be either the minimum or maximum values. This noise deteriorates the quality of an X-ray bio-image. How to remove the SAP noise effectively is an important research task for bio-image processing.

Recently, plenty of novel methods were proposed for the reconstruction of the images corrupted by SAP noise [119]. Wang et al. [1] proposed an adaptive fuzzy-switching-weighted-mean filter to remove SAP noise. They computed the maximum absolute luminance difference of processed pixels next to possible noise pixels to classify them into three categories: uncorrupted pixels, lightly corrupted pixels, and heavily corrupted pixels. The gray level of a lightly corrupted pixel is replaced by the weighted average value of the weighted mean and its own value. A heavily corrupted pixel is modified by the weighted mean. Deivalakshmi and Palanisamy [2] proposed a tolerance based adaptive masking selective arithmetic mean filter which is combined with wavelet thresholding. This method can cope with a heavy noise-corrupted image. Lu et al. [3] proposed a three-values-weighted approach to denoising. Non-extreme pixels in an analysis window are classified and placed into the minimum, middle, or maximum group. The distribution ratios of the three groups were utilized to weight the neighbor noise-free pixels, enabling a noise-interfered pixel to be reconstructed. In [4], a directional-weighted-median (DWM) filter was proposed to remove random-valued noise and SAP noise. The method selects the variation direction of neighbor pixels in four directions. The noise-corrupted center pixel was modified by the weighted median on the selected direction. In [8], a modified DWM (MDWM) filter was proposed. This method utilized twelve directions to find a better pixel variation direction for noise removal. The experimental results showed that this method can improve the performance of the DWM filter [4] significantly. Deng et al. [5] proposed an adaptive noise removal method by a multilayered pulse coupled neural network (PCNN). SAP noise was located by the PCNN and removed by a modified median filter which only utilizes noise-free pixels to determine the median value. SAP noise is removed iteratively. Wang et al. [6] proposed an iterative nonlocal mean filter which exploits the image non-local similarity feature in the procedure of SAP noise removal. In addition, this method iteratively updates the similarity weights and the estimated values to improve the performance. Ahmed and Des [7] proposed using an adaptive fuzzy detector to detect noise-corrupted pixels. They employed a weighted mean filter on the noise-free neighbor pixels to modify the noise-corrupted pixels iteratively, enabling SAP noise to be removed. This method performs well in heavy noise densities. Xiao et al. [8] proposed a denoised method for an X-ray image. They utilized region and degree detection to fuzzily detect noise-corrupted pixels which are filtered by a modified weight median filter. Hence, the denoised image is sharpened by a high-pass enhancement filter. Esakkirajan et al. [9] proposed using a modified decision based unsymmetric trimmed median (MDBUTM) filter [9] for noise removal. This approach replaces a noise-corrupted pixel by trimmed median value of non-extreme values in an analysis window. In [10], a non-recursive local window was proposed for noise removal. This method adaptively obtains the weighted mean of a non-recursive or recursive analysis window to reconstruct a noise-corrupted pixel according to the noise density. In [11], a block-based method was proposed for noise detection and noise density estimation. This method considers global image information for noise removal. A weighted mean filter with two-phase noise detection was proposed in [12]. Initially, noise candidates are detected by the rank-ordered difference. Hence, the minimum pixel difference is utilized to identify the edge pixels from the noise candidates. In turn, SAP noise was iteratively removed by a weighted mean filter.

Based on the above analysis, most image denoising methods utilize the sliding window to process noise-corrupted pixels from the top-left corner to the bottom-right corner of an image. The regions first processed will affect the subsequent image area. If a heavily noise-corrupted region is firstly reconstructed, restored pixels will deteriorate subsequent processed pixels. This enables the denoised image quality to be reduced. In this paper, the variation direction of a pixel and the number of noise-free pixels are considered as confidence measures which are employed to determine the process order for bio-image denoising. When the variation directions of pixels in a region are consistent, this region is located on an edge line. In addition, if the number of noise-free pixels in a region is large, there are sufficient clean pixels to reconstruct noise-corrupted pixels. Thus this region is defined as a high degree of confidence region. The region is prioritized to perform image reconstruction, enabling the quality of the restored image to be improved. The experimental results showed that the proposed method of using noise-free pixel number and consistency of change direction as the confidence measures can improve the performance of using the sliding window from the top-left corner to the bottom-right corner of an image.

The remainder of this paper is organized as follows: Sect. 2 describes the proposed non-sequential process order approach. Section 3 demonstrates the experimental results. Conclusions are finally drawn in Sect. 4.

2 Proposed Non-sequential Process Order Approach

Figure 1 shows the block diagram of the proposed method. Firstly, a noise-corrupted bio-image is windowed and analyzed with the size of 3 × 3. In each 3 × 3 window, if the center pixel has a non-extreme gray value (pixel value is neither 0 nor 255 for an 8-bit gray bio-image), it is noise-free; no processing is performed to maintain the quality of reconstructed image. Conversely, the gray level of the center pixel is extreme; the center pixel is classified as suspected noise and the direction and clean-pixel confidence analyses are performed. If the direction changes in the neighbor pixels of the center pixel are consistent and the quantity of noise-free pixels is sufficient, the center pixel is determined to be a high confidence one, and directional mean filtering is performed to reconstruct the center pixel. Conversely, the center pixel is left unchanged if the confidence is not sufficient. This pixel will be processed in the next stage. In the second stage, the sliding window is moved to the top-left corner of an image. Low-confidence pixels are sequentially processed from the top-left to the bottom-right of the image. The center pixel is median filtered when its gray value in the analysis window is extreme. On the contrary, the center pixel is kept unchanged when its value is non-extreme.

Fig. 1
figure 1

Block diagram of the proposed approach for X-ray bio-image denoising

2.1 Direction Confidence Measure

A local window is employed to analyze the neighbor properties for noise-like pixels in which the center pixel with extreme gray values. The non-extreme pixels are utilized to reconstruct the noise-like center pixel in the window. The local window \(W_{2s + 1} (u,v)\) can be expressed as

$$W_{2s + 1} \left( {u,v} \right) = \left\{ { \, x(u + \Delta u,v + \Delta v)|{\text{ where }}\Delta u, \, \Delta v \in [ - s\sim s]} \right\}$$
(1)

where s controls the size of the local window. \(x(u,v)\) represents the pixel at the location with the uth row and vth column of an X-ray bio-image. The size of the local window is equal to \((2s + 1) \times (2s + 1)\); s = 1 corresponds to the 3 × 3 window.

Figure 2 shows the directions of the pixel change for the 3 × 3 analysis window. The directions are constituted of four categories. The direction with the minimum pixel distance is selected as the optimum one.

Fig. 2
figure 2

Variation directions of a pixel

The pixel distance of each direction can be computed by Eqs. (25), given as

$$d_{1} = \left\{ \begin{array}{l} \left| {x(u - 1,v - 1) - x(u + 1,v + 1) \, } \right|, {\text{if}}\quad x(u - 1,v - 1), x(u + 1,v + 1) \notin {\text{extreme pixels}} \\ D_{{\max} }, {\text{otherwise}} \\ \end{array} \right.$$
(2)
$$d_{2} = \left\{ \begin{array}{l} \left| { \, x(u,v - 1) - x(u,v + 1)}\right|, {\text{if}}\quad x(u,v - 1), x(u,v + 1) \, \notin {\text{extreme pixels}} \\ D_{{\max} }, {\text{otherwise}} \\ \end{array} \right.$$
(3)
$$d_{3} = \left\{ \begin{array}{l} \left| { \, x(u - 1,v + 1) - x(u + 1,v - 1) \, } \right|, {\text{if}}\quad x(u - 1,v + 1), x(u + 1,v - 1) \, \notin {\text{extreme pixels}} \\ D_{{\max} }, {\text{otherwise}} \\ \end{array} \right.$$
(4)
$$d_{4} = \left\{ \begin{array}{l} \left| { \, x(u - 1,v) - x(u + 1,v) \, } \right|, {\text{if}} \quad x(u - 1,v), x(u + 1,v) \, \notin {\text{extreme pixels}} \\ D_{{\max} } , {\text{otherwise}} \\ \end{array} \right.$$
(5)

where \(D_{\hbox{max} }\) denotes the maximum value of the pixel distance.

The optimum direction of the center pixel \(k^{*}\) can be expressed by

$$k^{*} = \mathop {\arg \hbox{min} }\limits_{k} \, \left\{ { \, d_{k} , \, 1 \le k \le 4 \, } \right\}$$
(6)

In Eqs. (25), when the gray level of a neighbor pixel of the center point is an extreme value, the corresponding direction with the extreme pixels is impossible to be the optimum direction, so the pixel distance is set to the maximum value \(D_{\hbox{max} }\). This prevents the optimum direction containing an extreme pixel for the restoration of the center pixel. The consistency of pixel directions is employed to preserve the edge lines which can enhance the quality of reconstructed images. If the number of identical-pixel-variation-direction (IPVD) increases, these neighbor pixels can be regarded as at the same edge position. The direction confidence increases, thus the noise-corrupted pixels are denoised prior to which the pixels have less number of the IPVD pixels. A direction flag of direction k can be defined as

$$F_{k} (u,v) = \left\{\begin{array}{ll} 1, & \quad {\text{if }}x (u,v )\in {\text{direction }}k \, \\ 0, & \quad {\text{otherwise}} \\ \end{array} \right.$$
(7)

The number of each direction \(N_{k} (u,v)\) can be computed by

$$N_{k} (u,v) = \sum\limits_{\Delta u = - 1}^{1} {\sum\limits_{\Delta v = - 1}^{1} {F_{k} (u + \Delta u,v + \Delta v)} }$$
(8)

The larger the value of \(N_{k} (u,v)\), the higher the direction confidence. The value of \(N_{k} (u,v)\) is regarded as direction confidence. We will perform the prior denoising processing for the pixels with high direction confidence.

2.2 Clean-Pixel Confidence Measure

In low noise density environments, many noise-free pixels can be employed for the restoration of noise pixels, yielding the quality of the denoised image being better. Conversely, only a few noise-free pixels can be employed to reconstruct noise-corrupted pixels in high noise density conditions, enabling the quality of the denoised image to be poor. Therefore, the quality of the reconstructed images can be further improved by giving the priority to reconstruct noise-corrupted pixels according to the number of noise-free pixels.

The number of noise-free pixels is roughly estimated by using the non-extreme pixels. If the gray level of a pixel is not extreme, it can be regarded as a noise-free pixel that is not disturbed by noise. Thus we set a clean pixel flag \(F^{clean} (u,v)\) to 1, representing this pixel as being noise-free. In contrast, if the gray level of a pixel is extreme, the pixel may be disturbed by noise, and its clean pixel flag \(F^{clean} (u,v)\) is set to 0, given as

$$F^{clean} (u,v) = \left\{ \begin{array}{ll} 1, \quad {\text{if }}x(u,v) \, \notin {\text{ extreme pixels}} \\ 0, \quad {\text{otherwise}} \\ \end{array} \right.$$
(9)

Equation (9) can be employed to calculate the number of noise-free pixels in an analysis window, given as

$$N^{clean} (u,v) = \sum\limits_{\Delta u = - 1}^{1} {\sum\limits_{\Delta v = - 1}^{1} {F^{clean} (u + \Delta u,v + \Delta v)} }$$
(10)

If the eight neighbor pixels in a 3 × 3 analysis window are noise-free, the window is regarded as the lowest degree of interference by noise. This window is defined as a high-confidence one. The value of \(N^{clean} (u,v)\) can be regarded as the clean-pixel confidence. We give priority for the reconstruction of noise-corrupted pixels according to the clean-pixel confidence. Employing the priority to denoise a noise-corrupted image can improve the performance of using the sequential method which processes each noise pixel from the top-left to the bottom-right pixels.

2.3 Denoised Pixel

Here we only employ non-extreme pixels to reconstruct the center pixel with the extreme value in an analysis window. A neighbor pixel with extreme values of 0 or 255 is excluded, given as

$$\tilde{x}(u,v) = \{ x(u,v), \, x(u,v) \ne 0{\text{ and }}x(u,v) \ne 255 \, \}$$
(11)

where \(\tilde{x}(u,v)\) represents the non-extreme pixel.

In order to remove noise-corrupted pixels in an image, an extreme pixel is regarded as a noise-like and will be modified. The gray level of the denoised pixel is obtained by

$$\hat{x}(u,v) = \left\{ \begin{array}{ll} \hat{x}_{dir} (u,v), & {\text{if direction confidence}} \ge \delta_{\text{dir}} {\text{ and clean-pixel confidence}} \ge \delta_{\text{clean}} \\ \hat{x}_{median} (u,v), & {\text{otherwise}} \\ \end{array} \right.$$
(12)

where \(\hat{x}_{dir} (u,v)\) and \(\hat{x}_{median} (u,v)\) denote the denoised pixel obtained by using the directional-median filtering and median filtering, respectively. \(\delta_{\text{dir}}\) and \(\delta_{\text{clean}}\) represent the thresholds of direction confidence and clean-pixel confidence, respectively. These two thresholds vary from 8 to 1 for a 3 × 3 window. \(\hat{x}_{median} (u,v)\) is computed by

$$\hat{x}_{median} (u,v) = median \, \{ \, \tilde{x}(u + \Delta u,v + \Delta v),{ - 1} \le \Delta u \le 1,{ - 1} \le \Delta v \le 1\}$$
(13)

In (12), if an analysis window is confident enough, i.e., direction confidence is greater than \(\delta_{\text{dir}} \,\) and clean-pixel confidence is greater than \(\delta_{\text{clean}}\), the denoised pixel is obtained by using the directional-median filtering in the optimum direction \(k^{*} (u,v)\) defined by Eq. (6), given as

$$\hat{x}_{dir} (u,v) = \left\{ \begin{aligned} \frac{{\tilde{x}(u - 1,v - 1) + \tilde{x}(u + 1,v + 1)}}{2}{\text{ , if }}k^{*} (u,v) = 1\hfill \\ \frac{{\tilde{x}(u,v - 1) + \tilde{x}(u,v + 1)}}{2}{\text{ , if }}k^{*} (u,v) = 2 \hfill \\ \frac{{\tilde{x}(u + 1,v - 1) + \tilde{x}(u - 1,v + 1)}}{2}{\text{ , if }}k^{*} (u,v) = 3 \hfill \\ \frac{{\tilde{x}(u - 1,v) + \tilde{x}(u + 1,v)}}{2}{\text{ , if }}k^{*} (u,v) = 4 \hfill \\ \end{aligned} \right.$$
(14)

Conversely, the center pixel of the analysis window is replaced by the median value of the neighbor non-extreme pixels as given in (13).

A bio-X-ray image contains many extreme pixels with values of either 0 or 255. The pixel values are the same as those of SAP noise. An analysis window may contain some noise-free pixels. However the pixel values are all extreme, there is no non-extreme pixel for reconstruction. In order to retain the noise-free pixels from being deteriorated by the median or mean filtering, we employ the majority property to determine the gray level of the center pixel in the analysis window, given as

$$\hat{x}(u,v) = \left\{ \begin{array}{l} 0, \quad{\text{if }}N_{0} (u,v) \ge N_{255} (u,v) + \sigma \\ 255, \quad {\text{ otherwise}} \\ \end{array} \right.$$
(15)

where \(N_{0} (u,v)\) and \(N_{255} (u,v)\) denote the numbers of extreme pixels with the values 0 and 255 in an analysis window, respectively. \(\sigma\) represents the bias factor between black and white pixels, it is empirically chosen to be 2.

The number of black noise-free pixels (pixel value = 0) is greater than that of white pixels (pixel value = 255) in an X-ray bio-image. We utilize a bias factor \(\sigma\) to determine the gray level of the center pixel in the analysis window.

3 Experimental Results

In the experiments, X-ray test bio-images were employed to measure the performance of a denoising method. The test bio-images are with size 512 × 420 and were corrupted by SAP noise with various noise densities (from 10 to 90%). The standard median filter (Median), the DWM filter [4], and the MDBUTM filter [9] were implemented for performance comparisons. The proposed method is similar to the MDBUTM filter with further consideration on confidence measure. Restoration results were quantitatively measured by the peak signal-to-noise ratio (PSNR) and the mean structural similarity (MSSIM) index [20]. The best performance among the compared methods is represented by boldface in Tables 1, 2, 3, and 4.

3.1 PSNR Measure

The PSNR is one of the objective measures for image quality. It can be employed to measure the quality of a restored X-ray bio-image. The PSNR is expressed as [21]

$${\text{PSNR(dB) = 10}}\; \times \;{ \log }_{ 1 0} \left( {\frac{\text{MAX}}{\text{MSE}}} \right)$$
(16)

where MAX represents the largest value of the energy of gray level, it is \(255^{2}\) for an 8-bit gray level image. The MSE denotes the mean-square-error between the original and the reconstructed images. It is computed by

$${\text{MSE = }}\frac{ 1}{M \times N}\sum\limits_{u = 0}^{M - 1} {\sum\limits_{v = 0}^{N - 1} {|s(u,v) - \hat{x}(u,v)|^{2} } }$$
(17)

where \(s(u,v)\) represents the original clean pixels. M and N are the sizes of an image for the width and height; they are 512 and 420, respectively.

Tables 1 and 2 present the performance comparisons for various filters in terms of the PSNR for a chest X-ray bio-image (named as a Chest1 image). According to (17), the larger the value of the PSNR, the better is the quality of the restored image. We can find that the proposed approach outperforms the other methods in most conditions where the noise density ranges from 20 to 90%. In the cases of slight noise corruption, such as noise density equaling 10%, the MDBUTM filter outperforms the other methods. However, this method cannot work well in the environments of heavy noise corruption (noise density greater than 80%). The proposed approach is superior to the other approaches in which the noise density is greater than 80%.

Table 1 Comparisons of restoration results in PSNR (dB) for the Chest1 X-ray bio-image
Table 2 Comparisons of restoration results in PSNR (dB) for the Chest2 X-ray bio-image

Table 2 presents the performance comparisons for another chest X-ray bio-image (named as a Chest2 image). This table shows that the proposed approach is superior to the other methods in all noise densities, in particular at heavy noise density (noise density greater than 80%). This result is consistent with that as presented in Table 1. Therefore, the proposed confidence measure can improve the performance of the MDBUTM filter by further consideration on direction confidence and clean-pixel confidence.

3.2 Mean Structural Similarity Index Measure

The structural similarity between the noise-free image and restored image can be reflected by a mean structural similarity (MSSIM) index, which is given as [20]

$$MSSIM (s,\hat{x} ) { = }\frac{ 1}{{N_{w} }}\; \times \;\sum\limits_{w = 0}^{{N_{w} - 1}} { \, \left( {\frac{{(2\mu_{{s_{w} }} \mu_{{\hat{x}_{w} }} + C_{1} )\; \times \;(2\sigma_{{s_{w} \hat{x}}} + C_{2} )}}{{(\mu_{{s_{w} }}^{2} + \mu_{{\hat{x}_{w} }}^{2} + C_{1} )\; \times \;(\sigma_{{s_{w} }}^{2} + \sigma_{{\hat{x}_{w} }}^{2} + C_{2} )}}} \right)}$$
(18)

where w denotes the index of the analysis window. \(\mu_{{s_{w} }}\) and \(\mu_{{\hat{x}_{w} }}\) represent the means of the noise-free pixels \(s_{w}\) and the restored pixels \(\hat{x}_{w}\). \(\sigma_{{s_{w} }}\) and \(\sigma_{{\hat{x}_{w} }}\) represent the standard deviations of \(s_{w}\) and \(\hat{x}_{w}\). \(\sigma_{{s_{w} \hat{x}}}\) is the square root of the covariance of \(s_{w}\) and \(\hat{x}_{w}\). The constant values of \(C_{1}\) and \(C_{2}\) are \((0.01 \times 255)^{2}\) and \((0.03\; \times \;255)^{2}\), respectively.

In (18), the value of MSSIM is between 0 and 1. The higher value of the MSSIM represents better quality of the restored image. Tables 3 and 4 present the performance comparisons for various approaches in terms of the MSSIM for the Chest1 and Chest2 X-ray bio-images. Observing Table 3 can find that the proposed approach achieves the largest scores of the MSSIM among the four methods in all conditions. The results ensure that the proposed approach not only can effectively remove SAP noise for a noise-corrupted X-ray bio-image, but also preserves the structures of the body tissue well in the reconstructed bio-image.

Table 3 Comparisons of restoration results in mean structural similarity (MSSIM) for the Chest1 X-ray bio-image
Table 4 Comparisons of restoration results in mean structural similarity (MSSIM) for the Chest2 X-ray bio-image

3.3 Reconstructed Images

Figures 3, 4, 5, and 6 show the restored images of various approaches for the Chest1 and Chest2 X-ray bio-images. The noise densities are equal to 50 and 90%. Figure 3 shows the Chest1 X-ray bio-images. The original bio-image is corrupted by SAP noise with a 50% noise density (Fig. 3b). In Fig. 3a, the noise-free bio-image contains many pixels with extreme values shown as black or white color. It can be found that there is a lot of residual noise in the denoised bio-image by using the median filter (Fig. 3c). Thus the performance is the worst among the four methods. The DWM (Fig. 3d), MDBUTM filters (Fig. 3e) and the proposed method (Fig. 3f) can effectively remove the interference noise; meanwhile the edge details of the ribs are better preserved than the other methods.

Fig. 3
figure 3

Restored X-ray bio-images of compared approaches for the Chest1 bio-image with 50% noise density. a Noise-free bio-image, b noise-corrupted bio-image, c denoised bio-image using the median filter, d denoised bio-image using the DWM filter, e denoised bio-image using the MDBUTM filter, f denoised bio-image using the proposed method

Fig. 4
figure 4

Restored X-ray bio-images of compared approaches for the Chest1 bio-image with 90% noise density. a Noise-free bio-image, b noise-corrupted bio-image, c denoised bio-image using the median filter, d denoised bio-image using the DWM filter, e denoised bio-image using the MDBUTM filter, f denoised bio-image using the proposed method

Fig. 5
figure 5

Restored X-ray bio-images of compared approaches for the Chest2 bio-image with 50% noise density. a Noise-free bio-image, b noise-corrupted bio-image, c denoised bio-image using the median filter, d denoised bio-image using the DWM filter, e denoised bio-image using the MDBUTM filter, f denoised bio-image using the proposed method

Fig. 6
figure 6

Restored X-ray bio-images of compared approaches for the Chest2 bio-image with 90% noise density. a Noise-free bio-image, b noise-corrupted bio-image, c denoised bio-image using the median filter, d denoised bio-image using the DWM filter, e denoised bio-image using the MDBUTM filter, f denoised bio-image using the proposed method

Figure 4 shows the Chest1 X-ray bio-image, which is corrupted by SAP noise with 90% noise density (Fig. 4b). Because the noise density is extremely heavy, the median (Fig. 4c) and DWM (Fig. 4d) filters failed to reconstruct the Chest1 X-ray bio-image. Although the MDBUTM filter (Fig. 4e) can restore the bio-image, the quantity of residual noise is great. This phenomenon deteriorates the quality of the denoised bio-image. Observing Fig. 4f can find that the proposed approach can effectively remove background noise, while the ribs are well restored. Therefore, the quality of the denoised bio-image for the proposed approach significantly outperforms the other methods.

Figure 5 shows the Chest2 X-ray bio-image, which is corrupted by SAP noise with 50% noise density (Fig. 5b). The median filter cannot restore the noise-corrupted bio-image well. A great quantity of residual noise exists in the denoised bio-image (Fig. 5c). The DWM filter can effectively remove the background noise (Fig. 5d). However, the denoised bio-image suffers from a blurred effect. Many white lines inside the bones cannot be restored well. The MDBUTM filter (Fig. 5e) and the proposed approach (Fig. 5f) can restore the noise-corrupted bio-image well. The regions outside the tissue of the human body are restored, however, failed in which the color of the original bio-image is black. Accordingly, the performance is not satisfactory.

Figure 6 shows the Chest2 X-ray bio-image, which is corrupted by SAP noise with 90% noise density (Fig. 6b). The body tissue cannot be identified due to heavy noise corruption. The median filter (Fig. 6c) and DWM filter (Fig. 6d) failed to reconstruct the Chest2 X-ray bio-image. Only the MDBUTM filter (Fig. 6e) and the proposed approach (Fig. 6f) can restore this bio-image. By using the MDBUTM filter (Fig. 6e) the denoised bio-image suffers from a great quantity of residual noise and blurred effect, thus the quality is not satisfactory. The proposed method firstly rejects the extreme pixels in a local window for the restoration of the extreme pixels as given in Eqs. (1114). Thus the value of a restored pixel is non-extreme. The SAP noise is removed. Because there are many extreme pixels in the Chest2 bio-X-ray image, we employ the majority property of extreme pixels to determine the gray level of the center pixel in the local window as given in Eq. (15). The denoised image is free from the grayed effect in the black or white regions. Accordingly, the Chest2 bio-X-ray image can be restored well. Additionally, by further employing direction and clean-pixel confidence measures to determine the process order of the noise-corrupted pixels can improve the performance. This is due to the prior restoration of the noise-corrupted pixels in which the number of IPVD and the number of noise-free pixels are high for reconstructing the noise-corrupted center pixel, yielding the quality of the restored bio-image being improved.

3.4 Discussions

By comparing the performance of the MDBUTM filter and the proposed method in noise density equaling 10% shown in Table 1, the MDBUTM filter slightly outperforms the proposed method in terms of the PSNR measure. This may be due to the MDBUTM filter is better able to slightly remove SAP noise than the proposed method. On the contrary, the proposed method outperforms the MDBUTM filter in terms of the MMSIM measure as shown in Table 3. It is attributed to the reservation of the extreme pixels in the proposed method, rather than performing median filtering as that in the MDBUTM filter. The proposed method is better able to restore the details of an image than the MDBUTM filter. Consequently, the proposed method achieves a higher MSSIM score than the MDBUTM filter.

As shown in Tables 1, 2, 3, and 4, the proposed method significantly outperforms the compared methods at heavy noise corruption conditions, such as noise density is greater than 80%. The major reason is that the proposed method not only rejects the extreme pixels in a local window for the restoration of noise-corrupted pixels as given in Eqs. (1114), but also employs two confidence measures as given in Eqs. (1114) to determine the process order of noise-corrupted pixels and the majority property of extreme pixels to determine the gray level of the center pixel in the local window as given in Eq. (15). The denoised image is free from the grayed effect in the black or white regions for the bio-X-ray images. Accordingly, the proposed method can significantly outperform the other methods in heavy noise corruption conditions.

By observing Eqs. (1114), the proposed method can be regarded as the combination method of the DWM and MDBUTM filters. Thus the proposed method is a median-based/mean-based filter. However, the performance is not satisfactory. Herein we further employ two confidence measures to determine the process order of noise-corrupted pixels, resulting in the quality of the denoised image being much improved. In addition, the majority property of extreme pixels is also utilized to determine the gray level of the center pixel when all pixels are extreme in a local window. This property is particularly beneficial to process a bio-X-ray image. Therefore, the original noise-free pixels with black or white regions, where the pixel values are all extreme, are free from the grayed effect. The quality of the denoised image can be further improved. Moreover, the proposed confidence measures and the majority property can be embedded to state-of-the-art image denoising algorithms [13, 6, 7, 1012], enabling further improvement of the restoration performance.

4 Conclusions

This paper presents a modified switching median filter with further consideration on the direction confidence and clean-pixel confidence to define the process order on noise-corrupted pixels. An analysis window both with a greater quantity of noise-free pixels and with consistent pixel change direction is defined as a high confidence region. The pixels at high confidence regions are restored prior to that with lower confidence, enabling the subsequent pixels to suffer less deterioration by the prior restored pixels. A pixel with low confidence does not affect the restoration of noise-corrupted pixels with high confidence. The experimental results show that the proposed method can effectively improve the performance of using the sliding window from the top-left to the bottom-right for denoising.