Abstract

This paper presents a robust de-noising model for image enhancement using adaptive median filtering. In this approach image noise is detected with a standard median filter using an adaptive window. Within the window, the original value of the center pixel is changed to a newer that is closer to or same as the standard median. A comparison has been arranged among the proposed method, the standard median (SM) filter and the center weighted median (CWM) filter, which proves the superiority of the proposed filtering method.

1. Introduction

Image de-noising or filtering is a technique to reduce noises from a corrupted image. In many applications of image processing, the input image may be corrupted by noise and thus may not show the features or colors clearly. Thus, a major task in image processing is to extract information from the noisy images. The main objective of image filtering is to improve contrast of the image or perception of information in images for human viewers, or to provide better input for other automated image processing techniques. By image filtering some sort of enhancement in images can be achieved. Here, each pixel in the output image is computed as a function of one or several pixels in the original image, usually located near the location of the output pixel. Image filtering can be very useful in many applications like machine vision, robot navigation, aircrafting, digital mammography and so on [1].

Digital images may be contaminated by a variety of noise sources. Impulse noise is one most common kind of noise that usually occurs when we transform digital image data through electronic communication channel and it is caused by unstable voltage such as lightning. It changes some bits or pixels of an image and can sometimes turn a white spot into black or black into white. If it happens to a gray-level image, the affected pixel values will change into other values randomly distributed between 0 and 255, and the changed spots would look like a nevus popped up on someone’s face or sands fall on a white paper.

Some researchers have proposed de-noising algorithms for removal of this kind of noise to enhance image quality, such as the median filter [2], the weighted median filter [3], the center weighted median filter [4], the tri-state median filter [5], the noise adaptive soft-switching median filter [6, 7, 8] and others [9-18][9]. From the study of these researches, it is evident that the median filter is a useful technique to resist the effect of impulse noise on an image. This research proposes a new adaptive median filter that incorporates the mechanism of standard median filtering and an adaptive window.

2. Median Filtering

Median filter is a popular low-pass filter, attempting to remove noisy pixels while keeping the edge intact [19]. Average filtering or Gaussian smoothing will tend to blur edges because the high frequencies in the image are attenuated. However, the median is a more robust average than the mean and so a single very unrepresentative pixel in a neighborhood will not affect the median value significantly. Median filters are great at preserving edges and eliminating impulse noise. The values of the pixel in the window are stored and the median – the middle value in the sorted list (or average of the middle two if the list has an even number of elements)-is the one plotted into the output image. The median filtered image g(x, y) can be obtained from the median pixel values in a neighborhood of (x, y) in the input imagef(x, y), as defined by the following formula:

(1)

For example, consider a 3x3 window of pixels of a noisy image as shown in Figure 1. The noisy pixel value 58 will be replaced by the median pixel value.

So, the candidate noisy pixel value 58 is replaced with the value of 50. Similarly we can replace all noisy pixel values of the original (noisy) image and get a median filtered image.

3. Proposed Adaptive Median Filtering Algorithm

This section describes the proposed adaptive median filtering method for removal of impulse noise from the images. This filter employs the standard median filtering technique and considers a variable or adaptive window for selecting neighboring pixels in the image. The algorithm includes the following steps:

1. An n×n window (or subimage) is taken on the original image.

2. The gray values of the neighborhood pixels within the window are stored in an array.

3. Then, the pixel values are sorted in ascending or descending order.

4. The median value (Imed) is selected from the sorted pixel values. The median is the middle value in the sorted list (or average of the middle two if the array has an even number of elements).

5. Now, the adaptive median value (Iam) is selected according to the following steps and placed as output:

a) if Imin < Imed < Imax, then go to step 6.

else increase the window size.

b) if window size ≤ Smax, repeat steps 2 to 5.

else go to step 6.

6. Output Iam = Imed.

7. Repeat steps 1 to 6 across the whole image.

Here,

Wxy=the window or sub-image centered at location (x,y)

Imin = minimum intensity value in Wxy

Imax= maximum intensity value in Wxy

Imed = median of the intensity values in Wxy

Iam = adaptive median of the intensity values in Wxy

Ixy = intensity value at coordinates (x, y).

Smax= maximum window size of the adaptive filter.

4. Results and Discussions

A new adaptive median filtering method for image de-noising has been proposed and implemented in this research. The effectiveness of the proposed method has been justified using different noisy images. The algorithm has been implemented using Visual C++ on an Intel Core i3 3.3 GHz PC with 4 GB RAM. The test images are captured with a SONY VISCA camera. Figure 2shows an original test image, a noised image and the corresponding filtered images with different methods. Another experimental result with adaptive median de-noising method is shown in Figure 3 It is evident that the output image processed by the proposed method is improved compared to others.

To justify the effectiveness of the proposed algorithm, several quality measurement variables like peak signal to noise ratio (PSNR) and mean square error (MSE) have been estimated. Assume M×N initial image f(x, y), noised image f '(x, y), then the measure of peak signal-to-noise ratio (PSNR) can be defined by the following formula:

Table 1 demonstrates the performance of the proposed technique compared to other techniques. A comparison of PSNR for the filtered images with standard median, center weighted median and proposed filtering methods is illustrated in Figure 4. This method can successfully reduce noises from the image especially corrupted by impulse noise.

Figure 5 shows the impact of mask or window size on output image (for baby image) using the proposed adaptive median filter, which reveals that a 3x3 mask is suitable for selecting the neighborhood pixels.

5. Conclusions

In this paper, a new adaptive median filtering method is proposed. This filter is used to redeem the damage caused by the impulse noise that occurs when we transform a digital image data in any kind of electronic communication channel.

The effectiveness of the proposed filtering method has been tested with different types of gray scale images with simple and complex backgrounds. Experimental results predict that the proposed filtering model has better performance in image de-noising. The next approach is to extend the algorithm for color images.