Nonparametric Switching Median Filter for the Removal of Low Level Impulse Noise

DOI : 10.17577/IJERTV2IS110654

Download Full-Text PDF Cite this Publication

Text Only Version

Nonparametric Switching Median Filter for the Removal of Low Level Impulse Noise

V.Jayaraj & S.Natrajan

Signal Processing Laboratory, Department of ECE, Nehru Institute of Engineering and Technology

Abstract

Most image processing applications are greatly affected by the quality of the images. However, noise is ubiquitous and often contaminates images during acquisition. In order to overcome this drawback, a new switching-based median filter technique called nonparametric switching median filter (NPSWM) is proposed for impulse noise detection and suppression in digital images. The proposed algorithm is developed based on the nonparametric framework to determine noise and noise-free pixels. In the second stage, recursive restoration technique is used to replace the detected noise pixel by the median value of the surrounding pixels. The performance of the proposed algorithm is tested and compared with some state-of- the-art switching-based median filters existing in literature. Experimental results show that the proposed algorithm achieves superior outcomes, both in terms of subjective and objective evaluations, particularly for the cases where the images are corrupted by low level of impulse noise densities (up to 30% noise level).

Index terms image processing, nonparametric switching median filter, impulse noise.

  1. Introduction

    Digital images in many consumer electronic products are inevitably contaminated by impulse noise during image acquisition or transmission through noisy communication channels [1]. Fortunately, digital images acquired from many electronic devices are lowly corrupted by impulse noise due to the advancement in digital imaging systems. However, even at low densities, the occurrence of impulse noise can severely damage the information or data in the original image; therefore the need to remove or reduce impulse noise is imperative before subsequent image processing tasks such as image segmentation, object identification and edge detection etc. are carried out. The most effective approach to cater the occurrence of impulse noise is by using denoising-based algorithm, which also applicable to be embedded in consumer electronic products system. A large number of median- based filters have been proposed to remove the impulse noise. Among them, the standard median filter (MED)

    [1] and its modification are widely used. Clearly, the

    conventional median filter is implemented uniformly across the image while its variants (e.g. see [2]) inherited this clumsy-smoothing property; thus, they tend to modify both noise and noise-free pixels simultaneously. Consequently, the detailed regions such as object edges and fine textures in image are smeared and appear blurry and/or jittered. To get rid of the problem, various filters of parametric scheme such as switching-based and hybrid switching- based have been studied and experimented.

    The switching-based median filters are introduced by some published works [4], [5] in order to avoid the damage of noise-free pixels. In this framework, a fixed- size filtering window and predefined threshold are used to distinguish between noise and noise-free pixels. The switching median filter (SWM) [4] determines the difference between the current pixel and the median pixel in the corresponding filtering window and then uses a threshold to distinguish between noise and noise-free pixels. Similarly, based on weight adjustment to the centre pixel, the centre weighted switching median filter (CWSWM) is introduced in [4] for the removal of impulse noise without degrading the image details. In addition, Zhang and Karim in [5] proposed the Laplacian switching median filter (LSM) to preserve the edge including thin lines. It detects the details and preserves the details by using a set of four1-dimensional Laplacian kernels that is convolved with the input image. One of the main disadvantages of these filtering classes is that its fixed predefined threshold used in the impulse noise detection process in certain circumstances, prone in yielding pixel misclassification.

    To address the aforementioned drawbacks, the hybrid switching-based median filters have been proposed in [6]-[7]. Many researchers have embedded other order statistics (e.g. rank- order statistic, median of absolute deviations, etc.) into the hybrid switching based methodologies as part of its filtering mechanism. Combination of the centre weighted median filter (CWM) [3] and SWM techniques formed the tri-state median filter (TSM) [6] has been developed on purpose to preserve the image details. Briefly, the TSM uses two predefined thresholds to determine whether the current pixel should be retained or replaced by the output of median or of centre weighted median.

    In the filter proposed in [7], a second impulse detection process is added into SWM framework. The proposed impulse noise detector is established based on

    the rank order arrangement of the pixels in the filtering window. Unfortunately, the incorporation of different methods only increases the complexity of the filters, thus requires longer processing time to complete its task.

    In general, the performances of these filtering methods discussed in [4]-[7] are very much dependent on the predefined parameters. Such rigid modelling under the parametric framework only limits the performance of the filter because the responses towards varying noise density are dependent on the fixed parametric framework. Based on the aforementioned observation, we introduce a more flexible switching- based algorithm called nonparametric switching median filter (NPSWM). This method is a combination of variance thresholding based on local measurements in the impulse noise detection module and recursive pixel restoration technique in the filtering module.

    The remaining of the paper is organized as follows.

    yi,j = mi,j, xi,j – mi,j T (1) xi,j, xi,j – mi,j< T

    mi,j= Median{xik,jl, .., xi, j,.., xi+k, j+l} (2)

    where yi,j is the filtered pixel locating at position (i, j) and T is a predefined threshold.

      1. Centre Weighted Switching Median Filter (CWSWM)

        For CWSWM, some modifications have been made to the impulse detection process. Theoretically, this filter gives more weight to the central value within the filtering window. The restoration term of CWSWM is given by:

        yi,j = mwi,j, xi,j – mwi,j, T (3) xi,j, otherwise

        Section 2 discusses the implementation of the

        mi,j = Median{x ,

        ,.. , w x

        ,.., x ,

        } (4)

        conventional parametric filtering algorithms namely

        ik

        jl

        i, j

        i+k

        j+l

        SWM, CWSWM, TSM and MSWM. Section 3 introduces and explains the proposed algorithm in detail. In Section 4, simulations and experimental results are presented to show the feasibility of the proposed algorithm by using both qualitative and quantitative analyses. Finally, Section 5 concludes the work in this paper.

  2. Conventional Parametric Switching-based Median Filter

    In this section, a total of four different types of impulse noise filter namely SWM, CWSWM, TSM and MSWM will be discussed in detail. These filters are selected since they have been receiving much attention in the field of impulse noise filtering. For explanation of all filters implementation, consider

    {x , ,, x ,, x , } which represents the input

    Where w xi, j denotes that there are w copies of xi, j in the array. yi, j refers to the filtered pixel, while T indicates the predefined threshold value.

      1. Tri-state Median Filter (TSM)

    In TSM, its noise detection is realized by an impulse detector, which takes the outputs from the SWM and CWM filters and compares them with the centre pixel value in order to make a tri-state decision. For instance, consider a filtering window of size (2N+1) × (2N+1) cantered at xi, j. The output of TSM is obtained by:

    xi,j , T d1

    yi,j = mCWMi,j, d2 T < d1 (5) mSWMi,j, T < d2

    where mi, jCWM and mi, jSWM are the median of

    ik

    sa

    jl i,j j

    in th

    i+k j+l

    +

    +1) filtering wi

    j

    w where

    CWM and SWM, respectively. Mathematically d1= |x

    mple

    e (2N

    1)×(2N

    ndo

    i, j

    xi,j is the current pixel location at position (i, j) in the

    image.

    m SWM| and d2= |x , m

    i, j i j

    i, j i j

    pred ned parameter us d to

    CWM|. Yet, T is a

    i, j

    i, j

    e any presence of

    efi e trac

    2.1 Switching Median Filter (SWM)

    Basically, the impulse detection in the SWM filter is based on the assumption that a noise- free image consists of locally smooth varying areas which are separated by edges while a noise pixel takes a gray value substantially larger or smaller than those of its neighbours. In order to determine whether the current pixel, xi, j is an impulse noise, the absolute

    difference value between x and m is calculated

    impulse noise in the filtering window.

    2.4 Modified Switching Median Filter (MSWM) MSWM filter represents a broad spectrum of impulse noise filter based on the parametric approach and can be considered as a dexterous filter. As an illustration, let xi, j and yi, j represent the pixel values at position (i, j) in the corrupted and restored image,

    respectively. The median pixel mi, j in the filtering window of size (2N+1) × (2N+1) centred at xi, j is

    i, j i, j

    and compared with a pre ined t hold T. The

    given by (2). In order to determine whether xi, j is

    def output of SWM is defined as:

    hres

    an impulse noise, the MSWM measures the

    absolute difference value between xi, j and mi, j and compares it with a predefined threshold T1.

    The argument is based on

    yi,j = mi,j, xi,j – mi,j T1 (6)

    (2).

    After the median pixel is found, the absolute luminance difference di, j between all pixels within the filtering window and the median pixel is computed by using:

    xi,j

    , xi,j

    – mi,j

    < T1

    di±k,j±l = xi±k,j±l- mi,j for -NK, lK, (k,l)(0,0)

    (9)

    Next, each value computed in di±k,j±l will be

    where | xi, j mi, j| T1 denotes that the current pixel is much more different from its neighbours and can be treated as a noise. For the

    sorted in ascending order once again. To increase the robustness of this filter towards noise, the predefined threshold TNPSWM is assigned as the

    cases where | xi, j mi, j| < T1 the current pixel will

    undergo a second noise detection process that is given

    median value in the sorted array. The term T

    defined by:

    NPSWM is

    by:

    yi,j = mi,j, R( xi,j) R(mi,j) T2 (7)

    xi,j, R( xi,j) R(mi,j)< T2

    Where T2 is another threshold. R(xi, j) and R(mi, j) refer to rank order value of current pixel and median pixel in the filtering window, respectively. The case |R(xi, j) R(mi, j)| T2 means that the rank order of the current pixel xi, j is larger than corresponding m and it denotes that x is a noise

    TNPSWM = Median(di±k,j±l)for -NK, lK, (k,l)(0,0)

    (10)

    This is an attractive merit of the proposed NPSWM filtering scheme since it provides a variable TNPSWM according to the local measurements of each filtering window. By employing this nonparametric concept, the possibility of pixel misclassification can be reduced in a proper manner. Then the impulse detector will measure the absolute difference value between xi, j and mi, j and compare

    i, j

    i, j

    the resultant value with T

    , in order to determine

    pixel and must be filtered. Otherwise, the xi, j remains unchanged.

  3. The Proposed Nonparametric Switching Median Filter

    NPSWM

    whether xi, j is an impulse noise. Thus, the impulse noise detection process can be realized by:

    Mi,j = 1, xi,j – mi,j T ,

    The proposed NPSWM filter is a recursive double-stage filter where initially it will perform the impulse noise detection based on a

    0, xi,j

    – mi,j<

    NPSWM

    TNPSWM, (11)

    nonparametric framework. Yet, the meaning of nonparametric refers to the technique which a function that has no dependency on a fixed predefined parameter (i.e. the parameter is flexible and not fixed in advance). When a noise pixel is detected, it is subjected to the next filtering stage. Otherwise, when a pixel is classified as noise free, it will be retained and the filtering action is spared to avoid altering any fine details and textures. The combination of these features (i.e. nonparametric

    where Mi, j is a noise mask created to mark the

    location of impulse noise. |xi, j mi, j| TNPSWM (or Mi, j

    = 1) represents noise pixel subjected to the next filtering stage, while |xi, j mi, j| < TNPSWM (or Mi, j = 0) represents noise-free pixel to be retained.

    3.2 Filtering Stage

    The correction term to restore a detected

    noise pixel is a linear combination between the current processing pixel xi, j and median pixel mi, j. The

    NPSWM

    noise detection and recursive pixel restoration), allows

    restoration term denoted as yi, j

    is defined by:

    the filter to be more versatile and stable.

    yi,j NPSWM = ( [1- M

    i, j

    ]* x

    i, j

    )+ mi, j

    (12)

    3.1 Detection Stage

    The proposed NPSWM filter uses a square filtering window Wi, j with odd (2N+1) × (2N+1) dimensions (i.e. N = 1) and centred at xi, j. It is given as:

    mi,j={xik,jl,.., ,xi, j,.., xi+k, j+l}; for -NK, lK,

    (8)

    The detection process begins by sorting all pixels within the filtering window in ascending order as to find the median pixel mi, j, which is defined by

    As to enhance the filtering process, a recursive restoration concept is applied to the data (i.e. a processed pixel is immediately replaced by the filtered pixel, and the filtered pixel is used in further calculations).

    142

    139

    139

    139

    165

    140

    32

    134

    134

    (Step 1); 3×3 filtering window, xi, j = 165

    32

    134

    134

    139

    139

    139

    140

    142

    165

    (Step 2); mi, j = 139

    107

    5

    5

    0

    0

    1

    3

    26

    (Step 3); di±k, j±l

    0

    0

    1

    3

    5

    5

    26

    107

    (Step 4); TNPSWM = 4, i.e. (5+3)/2

    |xi, j mi, j| = |165 139|

    = 26

    (Step 5); absolute luminance difference between the centre pixel and the median pixel

    implementation of all tested filtering algorithms has been verified accordingly with the corresponding reference papers.

      1. Qualitative Analysis

        Since quality of image is subjective to the human eyes, visual inspection is carried out on the filtered images as to judge the effectiveness of the filters in removing impulse noise. A total of three out of numerous tested standard real images obtained from public internet database are chosen in this analysis. The chosen set of Flower, Fruits and Yacht images contains varous characteristics suitable to test the performance of the implemented filters. The simulation results for these images are presented in Figs. 2, 3 and 4 respectively. In all figures, a portion of each image is used. In each figure, image (b) represents the noise corrupted images. Flower, Fruits and Yacht images are corrupted with 10%, 20% and 30% density of impulse noise respectively.

        As can be seen in Fig. 2, at 10% impulse noise density, the noise filtering performance of NPSWM filter is basically similar to those of the conventional noise filtering algorithms. All filters are found to be able of producing perceptible reconstructed image at this noise level.

        (Step 6); yi, j

        142

        139

        139

        139

        139

        140

        32

        134

        134

        142

        139

        139

        139

        139

        140

        32

        134

        134

        NPSWM

        = 139

        * Since |xi, j mi, j| > TNPSWM, i.e. 26 > 4; therefore the current processing pixel is replaced by the median pixel of intensities 139.

        Fig. 1 An illustrative example on NPSWM filters impulse noise detection and filtering operation. The justification of making the proposed NPSWM filter to behave recursively is to increase its ability in selecting a more accurate median pixel. The whole process of the proposed algorithm is illustrated

        in Fig. 1.

  4. Experimental Results

    In this section, the feasibility of the proposed NPSWM filter will be compared to the conventional switching-based median filters based on their simulation results. The following conventional methods with their suggested tuning parameter are used to compare with the proposed algorithm; SWM (T=50) [4], CWSWM (T=30, w=3) [4], TSM (T=20, w=3) [6] and MSWM (T1=30, T2=3) [7]. Several

    standard real images corrupted with the impulse noise have been used in this experiment as to test the effectiveness and efficiency of the filters. The

    1. (b) (c)

(d) (e) (f)

(g)

Fig. 2 Simulation results on a portion of Flower with 10% density of impulse noise using; (a) original image, (b) noisy image, (c) SWM, (d) CWSWM, (e) TSM, (f) MSWM and (g) NPSWM

(a) (b) (c)

(d) (e) (f)

(g)

Fig. 3 Simulation results on a portion of Fruits with 20% density of impulse noise using; (a) original image, (b) noisy image, (c) SWM, (d) CWSWM, (e)

TSM, (f) MSWM and (g) NPSWM

(a) (b) (c)

However, in the Fruits image which is contaminated with 20% of impulse noise (as shown in Fig. 3), we can visualize that the results produced by the conventional switching-based median filters are still influenced by the noise. We may be able to notice that some small noise patches are remained intact on the resultant images. On contrary, the proposed NPSWM filtering algorithm can significantly remove the effect of noise added to the images and at the same time preserve the object shapes.

The similar results are obtained for the Yacht image (shown in Fig. 4), where the proposed NPSWM filtering algorithm outperforms the conventional SWM, CWSWM, TSM and MSWM algorithms by giving clearer image; even the density of noise in this image is higher (i.e. 30% of impulse noise).

The proposed NPSWM filtering algorithm has successfully reduced the noise patches, created less corrupted image. This is due to the ability of the proposed algorithm to distinguish between the noise pixels and the noise-free pixels dexterously.

Although the conventional filtering algorithms can also suppress the noise but it is found that the image regions are still has minor distortion. The inability for the conventional switching-based median filters to effectively remove impulse noise can be attributed to several reasons. The main reason is the use of fixed parametric framework in the detection stage. This parametric framework is deemed unsuitable because it may lead to misclassification of noise pixels as noise-free pixels.

    1. Quantitative Analysis

      In this section, we tabulate a quantitative evaluation of the filtering results obtained in Figs. 2 to

      1. Peak signal-to-noise ratio (PSNR) is used as a benchmark this analysis. The PSNR is defined by:

        PSNR=

        2552 =

        MAX 2 (13)

        10 log 10 MSE

        10 log 10

        MSE

        (d) (e) (f)

        Where MAX is the maximum pixel value of the image. When the pixels are represented using 8 bits per sample, this is 255. Higher the PSNR better is the

        2

        2

        quality. MSE

        1 M N

        rij

        – xij

        (14)

        (g)

        Fig. 4 Simulation results on a portion of Yacht with 30% density of impulse noise using; (a) original image, (b) noisy image, (c) SWM, (d) CWSWM, (e) TSM, (f) MSWM and (g) NPSWM

        MN i1 j1

        where ri j is the original image, xi j is the restored image The numerous results for images of Flower, Fruits and Yacht are tabulated in Table 1, 2, and 3, respectively. In all tables, the best results obtained are made bold.

        Overall, it is shown that the proposed NPSWM consistently outperforms the other conventional algorithms except for the Flower image with 10% noise level. A further analysis of this study has been conducted against 50 standard real images. These images are contaminated with impulse noise

        ranging from 10% – 30%. Using the same aforementioned PSNR quality assessment, the average PSNR values obtained for all algorithms are tabulated in Table 4. As expected, it can be seen from the table that the proposed NPSWM algorithms provides the highest PSNR value among other filtering algorithms. It is evident that NPSWMs filtering performance is tremendously consistent.

        Table 1 Comparison of PSNR on Different Noise Level Restoration for Image Flower

        Images

        Algorithms

        10%

        20%

        30%

        Flower

        SWM

        32.7222

        28.6679

        25.2900

        CWSWM

        35.2000

        28.7135

        23.8703

        TSM

        38.6550

        31.9417

        26.6947

        MSWSM

        37.7154

        33.0015

        27.2426

        NPSWM

        38.1313

        35.2274

        32.1274

        Table 2 Comparison of PSNR on Different Noise Level Restoration for Image Fruits

        for 50 standard real images after applying with the proposed NPSWM filter and other conventional filters is shown in Fig. 5.

        Overall, the processing time of each filter remains almost constant at all level noise density. The MSWM filter which uses more complex noise detection mechanism (i.e. double detection stage), takes longer time to complete its filtering task as compared to the rest of the others filters. Except for SWM, consistently, our proposed method outperforms other filters across a wide range of noise level with a relatively fast average processing time. Even though the SWM is shown to have a better processing time compared to the NPSWM (with a slightly lower value, of 0.2 s) but it is unable to produce a desirable filtering quality. Thus, as far as denoising performance is concerned, the proposed NPSWM can be regarded as the best filter.

        14

        28.8246

        Images

        Algorithms

        10%

        20%

        30%

        Fruits

        SWM

        32.3881

        28.7971

        25.2900

        CWSWM

        35.5065

        23.9414

        TSM

        35.7822

        31.9417

        26.5623

        MSWSM

        35.6073

        32.1356

        27.3501

        NPSWM

        36.1214

        33.5335

        31.3619

        Images

        Algorithms

        10%

        20%

        30%

        Fruits

        SWM

        32.3881

        28.7971

        25.2900

        CWSWM

        35.5065

        28.8246

        23.9414

        TSM

        35.7822

        31.9417

        26.5623

        MSWSM

        35.6073

        32.1356

        27.3501

        NPSWM

        36.1214

        33.5335

        31.3619

        12

        SWM

        CWSWM

        10 TSM

        MSWM NPSWM

        8

        Table 3 Comparison of PSNR on Different Noise Level Restoration for Image Yacht

        Images

        Algorithms

        10%

        20%

        30%

        Yacht

        SWM

        30.3851

        26.9915

        24.2694

        CWSWM

        31.2182

        27.1082

        23.3062

        TSM

        31.4804

        28.9658

        25.4419

        MSWSM

        31.3725

        28.6268

        25.3878

        NPSWM

        31.5160

        29.1585

        26.6862

        Table 4 Comparison of Average PSNR on Different Noise Level Restoration for 50 Standard Real Images

        Algorithms

        10%

        20%

        30%

        SWM

        29.4315

        26.4265

        23.7212

        CWSWM

        30.1703

        26.6879

        22.9766

        TSM

        30.0141

        27.1672

        24.3427

        MSWSM

        29.5292

        27.6866

        24.9529

        NPSWM

        30.2504

        29.3089

        26.5629

    2. Processing Time Efficiency

We also carry out processing time analysis for each filter to perform its denoising task. Such measure is important especially for application in consumer electronic products as the processing time is one of the criteria often considered in the design of noise filter. The graph of average processing time in seconds (s)

6

4

2

0 10 15 20 25 30

Impluse Noise Density(%)

Fig. 5 The graph of average processing time (sec) versus impulse noise density (%) computed from a total 50 standard real images.

  1. CONCLUSION

    In this paper, a NPSWM filter for effective impulse noise detection and suppression is presented. The variance thresholding and recursive pixel restoration techniques that involved in the design of the filter make it able to suppress impulse noise effectively, at the same time preserving fine image edges and textures. Furthermore, this filter does not require any special tuning of parameter since its predefined threshold is established based on nonparametric framework. The simulation results indicate that a better noise filtering performance is achieved with fairly efficient processing time. It is a feasible approach for reducing the low noise effect in digital images.

  2. References

  1. R. C. Gonzalez, R. E. Woods: Digital image processing (New York: Addison- Wesley, 1992).

  2. H. Hwang and R.A. Haddad, Adaptive Median Filters: New Algorithms and Results, IEEE Transactions on Image Processing, 1995, 4, (4), pp. 499-502.

  3. J. K. Sung, H. L. Yong, Center Weighted Median Filters and Their Applications to Image Enhancement, IEEE Transactions on Circuits and Systems, 1991, 38, (9), pp. 984-983.

  4. T. Sun, Y. Neuvo, Detail-Preserving Median Based Filters in Image Processing, Pattern Recognition Letter, 1994, 15, pp. 341347.

  5. S. Zhang and M. A. Karim, A New Impulse Detector for Switching Median Filters, IEEE Signal Processing Letters, 2002, 9, (11), pp. 360-363.

  6. T. Chen, K.K. Ma and L.H. Chen, Tri-State Median Filter for Image Denoising, IEEE Transactions on Image Processing, 1999, 8, (12), pp.1834-1838.

  7. C.C. Kang, W.J. Wang, Modified Switching Median Filter with One More Noise Detector for Impulse Noise Removal, Int. J. Electronic Communications (AEU), 2009, 63, pp. 998-1004.

  8. J. Astola and P. Kuosmanen, Fundamentals of Non- linear Digital Filtering (CRC Press Inc., Boca Raton, 1997).

  9. R.H. Chan, C. Hu and M. Nikolove, An Iterative Procedure for Removing Random- Valued Impulse Noise, IEEE Signal Processing Letter, 2005, 11, (12), pp. 921- 924.

  10. W Luo, An Efficient Detail-Preserving Approach for Removing Impulse Noise in Images, IEEE Signal Processing Letters, 2006, 13, (7), pp. 413 416.

  11. W. Luo, An Efficient Algorithm for The Removal of Impulse Noise from Corrupted Images, International Journal of Electronics and Communications (AEU), 2007, 61, pp. 551-555.

  12. T. Chen and H.R. Wu, Adaptive Impulse Detection Using Centre-Weighted Median Filters, IEEE Signal Processing Letters, 2010, 8, (1), pp. 1-3.

  13. T. Chen and H.R. Wu, Space Variant Median Filters for the Restoration of Impulse Corrupted Images, IEEE Transactions on Circuits and Systems II, 2010, 48, (8), pp. 784-789.

  14. K. K. V. Toh, H. Ibrahim, and M. N. Mahyuddin,

Salt-and-Pepper Noise Detection and Reduction Using Fuzzy Switching Median Filter, IEEE Transactions on. Consumer Electronic, 2008, 54, (4), pp. 1956-1961.

Leave a Reply