Journal of Engineering and Applied Sciences

Year: 2011
Volume: 6
Issue: 2
Page No. 180 - 184

Image Enhancement Using Spatial Filtering Technique

Authors : M. Sreedevi and P. Jenopaul

Abstract: The goal of image enhancement technique is to improve a characteristics or quality of an image such that the resulting image is better than the original image. Histogram Equalization (HE) is widely used for contrast enhancement. However, it tends to change the brightness of an image and hence, not suitable for consumer electronic products where preserving the original brightness is essential to avoid annoying artifacts.

How to cite this article:

M. Sreedevi and P. Jenopaul, 2011. Image Enhancement Using Spatial Filtering Technique. Journal of Engineering and Applied Sciences, 6: 180-184.

INTRODUCTION

Contrast of an image is determined by its dynamic range which is defined as the ratio between the brightest and the darkest pixel intensities. Contrast enhancement techniques have various application areas for enhancing visual quality of low contrast images. Histogram Equalization (HE) is a very popular technique for enhancing, the contrast of an image (Kim, 1997). Its basic idea lies on mapping, the gray levels based on the probability distribution of the input gray levels. It flattens and stretches the dynamics range of the image’s histogram, resulting in overall contrast improvement. HE has been applied in various fields such as medical image processing and radar image processing (Wang and Ye, 2005).

In many signal and image processing applications, it is necessary to smooth the noisy signals while at the same time preserving the edge information. The most commonly used smoothing techniques are linear filtering, averaging filtering and spatial filtering. The linear filters smooth, the noisy signals but also the sharp edges. In addition, the impulsive noise components cannot be suppressed sufficiently by linear filtering and digital implementation of the linear filters can be bulky and slow. The averaging filters have some undesirable features like outlier points that distort the filtered and edge information loss.

The spatial filters have proved to be good alternatives because they have some very interesting properties; they can smooth the transient changes in signal intensity (e.g., noise); they are very effective for removing the impulsive noises from the signals; they can preserve the edge information in the filtered signal and they can be implemented by using very simple digital nonlinear operations (Wang et al., 1999). Because of these properties of the spatial filters, they are frequently used in various signal and image processing applications such as seismic signal processing, speech processing, computerized tomography, medical imaging, robotic vision, pattern recognition, peak detection, coding and communication. In this study, histogram equalization is followed by spatial filter to get enhanced image.

IMAGE ENHANCEMENT

Image enhancement operation improves the qualities of an image. They can be used to improve an image’s contrast and brightness characteristics, reduce its noise content or sharpen its details. Image enhancement techniques may be grouped as either subjective enhancement or objective enhancement. Subjective enhancement technique may be repeatedly applied in various forms until the observer feels that the image yields the detail necessary for particular application. Objective image enhancement corrects an image for known degradations (Fitch et al., 1984). Here, distortions are known and enhancement is not applied arbitrarily. This enhancement is not repeatedly applied but applied once based on the measurements taken from the system. Image enhancement fall into two broad categories as follows:

Spatial domain technique
Frequency domain technique

Spatial domain refers to the image plane itself and approaches in this category are based on direct manipulation of pixels in an image. Frequency domain processing techniques are based on modifying the Fourier transform of an image. Spatial domain refers to the aggregate of pixels composing an image. They operate directly on these pixels (Ataman et al., 1980). Spatial domain processes will be denoted by the expression:

Where:

f(x, y) = Input image
g(x, y) = Processed image
T = Operator on f

HISTOGRAM EQUALIZATION

For a given image X, the probability density function p(Xk) is defined as:

(1)

for k = 0, 1, …, L - 1 where, nk represents the number of times that the level Xk appears in the input image X and n is the total number of samples in the input image. Note that p(Xk) is associated with the histogram of the input image which represents the number of pixels that have a specific intensity Xk. In fact, a plot of nk vs. Xk is known histogram of X. Based on the probability density function, the cumulative density function is defined as:

(2)

where, Xk = x for k = 0, 1, …, L - 1. Note that c(XL - 1) = 1 by definition. HE is a scheme that maps the input image into the entire dynamic range (X0, XL-1) by using the cumulative density function as a transform function. Let’s define a transform function f(x) based on the cumulative density function as:

(3)

Then the output image of the HE, Y = {Y(i, j)} can be expressed as:

(4)

(5)

The high performance of the HE in enhancing the contrast of an image as a consequence of the dynamic range expansion. Besides, HE also flattens a histogram. Based on information theory, entropy of message source will get the maximum value when the message has uniform distribution property (Chen and Ramli, 2003).

SPATIAL FILTERING

Spatial filtering works with the value of the image pixels in the neighborhood and the corresponding values of a sub image that has the same dimensions as the neighborhood. The subimage is called filter, mask, template, window or kernel.

The values in the filter subimage are referred to as coefficients (Karaman et al., 1990). The process consists of moving the filter mask from point to point in an image. At each point (x, y), the response of the filter at that point is calculated using a predefined relationship.

Spatial filters may be linear or nonlinear. For linear spatial filtering, the response is the sum of the products of the filter coefficients and the corresponding image pixels in the area spanned by the filter mask.

Nonlinear spatial filters: Nonlinear spatial filters also operate on neighborhood and the filtering operation is based on the values of the pixels in the neighborhood and they do not use the coefficients in the sum of products manner.

Here, noise reduction is achieved with a nonlinear filter whose basic function is to compute the gray level value in the neighbourhood in which the filter is located.

Nonlinear spatial filters whose response is based on ordering, the pixels contained in the image area encompassed by the filter and then replacing the value of the center pixel with the value determined by ranking result (Gonzales and Woods, 2003). Some of the examples of nonlinear filters are as follows:

Median filter
Midpoint filter
Trimmed filter

AVERAGE FILTERING

The output of a smoothing linear spatial filter is the average of the pixels contained in the neighborhood of the filter mask. These filters are called as averaging filters.

They also referred to as low pass filters. By replacing the value of every pixel in an image by the average of the gray levels in the neighborhood defined by the filter mask. This process results in an image with reduced sharp transitions in gray levels. Because random noise typically consists of sharp transitions in gray levels.

However, edges are characterized by sharp transitions in gray levels so, averaging filters have the undesirable side effect that they blurred edges. Another application of this type of process includes, the smoothing of false contours that result from using an insufficient number of gray levels:

Which is the average of the gray levels of the pixels in the 3x3 neighbourhood defined by the mask. In this study, histogram equalization followed by the average filter is designed using VHDL language.

RESULTS

The conventional histogram-based contrast enhancement technique is limited in real time application due to large computational and storage requirements.


Fig. 1: MRI image with Gaussian noise

Fig. 2: Filtered MRI image from average filter

In addition to the hardware complexity, conventional techniques also exhibit quality degradation caused by possible loss of infrequently distributed pixel intensities which may result in disastrous loss of important information.


Fig. 3: MRI image from histogram equalization

Fig. 4: Enhanced MRI image from histogram equalization followed by average filter

Fig. 5: CT brain image with Gaussian noise

Fig. 6: Filtered CT brain image from average filter

Fig. 7: CT brain image from histogram equalization

Fig. 8: Enhanced CT brain image from histogram equalization followed by average filter

In this study, we proposed a contrast enhancement system for image sequences which can enhance local contrast with suppressing undesired noise amplification based on average filtering processing is shown in Fig. 1-12. This can be extended to 3-D medical images and it is possible to apply the algorithm for color images also.


Fig. 9: CT heart image with Gaussian noise

Fig. 10: Filtered CT heart image from average filter

Fig. 11: CT heart form histogram equalization

Fig. 12: Enhanced CT heart image from histogram equalization

CONCLUSION

The spatial filtering technique is an effective method for the removal of impulse based noise on video signals. This is due to the partial averaging effect of the filter and its biasing of the input stream, rather than straight mathematical averaging. Modern imaging devices such as Computed Tomography (CT) and Magnetic Resonance (MR) scanners provide images with a large range of contrast information.

Design and power by Medwell Web Development Team. © Medwell Publishing 2024 All Rights Reserved