You are on page 1of 6

JOURNAL OF COMPUTING, VOLUME 3, ISSUE 5, MAY 2011, ISSN 2151-9617

HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 171

Image Enhancement Using Nonlinear


Filtering Based Neural Network
Feras N. Hasoon, Jabar H. Yousif, Nebras N.Hasson, and
Abd Rahman Ramli

Abstract— the aim of this paper is to propose an enhancement method to solve the problem of Impulsive noise in image
processing An optimization technique utilize a nonlinear filter based neural network is presented and design, a novel filter to
reduce the impulsive noise has been developed as well as. The implementation of a weight median filter (WMF) and neural
network gives efficient impulsive noise suppression and an excellent image detail-preserving capability. The adjustment of the
weight coefficients of the WMF have been done using a back-propagation (BP) learning techniques with supervised multi-layer
perceptron (MLP) feed-forward networks. A user interface using MATLAB software is designed and implemented.

Index Terms— Impulsive noise, weight median filter, Image processing, artificial intelligence application, soft computing.

——————————  ——————————

1 INTRODUCTION

O ne of the aims of image processing is to enhance the


visual appearance of images. Besides, it helps organ-
izing the images for measurement of the features
networks are consisting of a number of highly intercon-
nected processing elements called neurons, which takes a
number of inputs and giving an individual output [5, 6].
and structures. Currently, a digital image is acquired These neurons divided into three types known as input
through a suitable digital imaging system [9]. Although layer, hidden layer and output layers. The network has
the current technology has enormously advanced, no im- one input and one output layer. The hidden layers can
aging system is idealistic in producing images that are differ from 0 to any number. The exception of the input
identical to their originals since of the inherent physical layer is that it does not consist of a transfer function. Neu-
limitations [11]. rons are function in parallel, with decentralized control to
The noise repression or noise removal is an essential give the solution for specific problems. The neurons are
process in images processing [12]. The nonlinear filters organized in a specific structure, which is usually con-
have been successfully implemented in smoothing images nected in layers. In image processing, median filtering has
corrupted by impulses and substituted for linear filters been proved a very powerful method in removing impul-
because of their better edge preservation and impulse sive noise [16]. The median filter is not, however, neither
rejection capabilities [8]. On other hand, the Artificial a perfect filtering operation nor it is very flexible. It may
Neural Network (ANN) is a computational system that cause edge jitter, streaking and may remove important
emulated the human brain mechanism [2]. A neural net- image details.
work is an influential data modeling tools which is capa- In standard images forms, the noise can be modeled
ble to utilize and illustrate a data sets has complex rela- with either a Gaussian ("normal"), uniform, or salt-and-
tionships either linear or non-linear data. There are par- pepper ("impulse") distribution. The Gaussian Noise
ticular characteristics that stimulate scientists to approve model is most often used to model natural noise process-
neural network modeling in the different application es, such as those occurring from electronic nose in the
fields. The most important features are full computation, image acquisition system. Uniform Noise is useful be-
massive parallelism, uniformity, distribution and cause it can be used to generate any other type of noise
knowledge representation, learn, train and, generalization distributed and is often used to degrade images for the
ability, [5]. evaluation of image restoration algorithms because it
Neural networks successfully applied in a numerous ap- provides the most unbiased or neutral noise model. In
plications such as data classifications, resource allocation addition, Salt and Pepper noise is naturally caused by
and scheduling, data analysis and mining, speech pro- errors in the data transmission, malfunctioning pixel ele-
duction and recognition, pattern recognition, etc. Neural ments in camera sensors, faulty memory locations, or tim-
ing errors in the digitization process.
————————————————
Weighted median filter is an extension of the median
 Feras N. Hasoon is Assistant Professor at Sohar University, Sohar, Sultan-
ate of Oman filter. It introduces the concept of weight coefficient into
 Jabar H. Yousif is Assistant Professor at Sohar University, Sohar, Sultan- the median filter. Weighted median filters are used to
ate of Oman reduce impulsive noise and to preserve sharp edges in
 Nebras N. Hasson is Lecturer at Sohar University, Sohar, Sultanate of
Oman
image signal efficiently [13].
 Engineering, University Putra Malaysia,43400 UPM, Serdang, Selan- Design of the WMF is believed to be a difficult prob-
gorDE, Malaysia lem, since there are no general methods to determine and
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 5, MAY 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 172

design the WMF. A method of determining the weight One of the most important extensions of the median filter
coefficients by designing the property for image features is the Weighted Median filter (WMF) [10]. With a proper
within a window has been suggested [1]. weight set, the WMF has efficient impulsive noise sup-
This paper aims to design and utilze a method for de- pression and an excellent image detail-preserving capa-
temining prpopoer weight coefficients based on super- bility. It has been successfully applied in various areas
vised MLP feed-forward networks which use back- such as noise reduction [7], image restoration, field inter-
propagation learning techniques. The learning algorithm
has been needed a training set of a pair of images; a noisy
X1
input and ideal output images. W1

X2 Y
2 WEIGHT MEDIAN FILTER W2 MED
Output
Salt and pepper noise common image processing prob-
lem, the noise is caused by errors in the data transmis-
sion, malfunctioning pixel elements in camera sensors, XN
WN
faulty memory locations, or timing errors in the digitiza-
tion process and most scanned images contains noise in Figure 1: Weight Median Filter
form of darker dots and disturbances caused by the scan-
ning process. In case we cannot reduce the noise that is polation, and image differential pulse code modulation
mean, the image could be wrongly interpreted. Noise is (DPCM) coding. Figure 1 show a structure of a WMF.
any undesired information that contaminates an image. The weight median filter, which is the most commonly
Noise appears in images from various sources. The digital used one, assumes positive integer weights with odd
image acquisition process is transforming an optical im- sum. For the discrete-time continuous-valued input vec-
age into a continuous electrical signal. Thus, the sampling
tor
X   X , X , , X
1 2 
N , the output Y of the WMF of
of electrical signal will consider as a primary source of the
noise in the digital [18]. span associated with the integer weights.
There are several sources of noise, which appears in W  W1 ,W2 ,,W N 
(1)
the images, depending on how the image is created. For is given by
example: Y  MED W1  X 1 , W2  X 2 ,  , WN  X N  (2)
-If the image created using a scanned photograph of a
made film, then the film grain is consider as a source of where MED
 denotes the median operation and  de-
noise. Noise can also be the result of damage to the film, notes duplication, i.e.,
or be introduced by scanner itself. K times
 
-If the image is acquired directly in a digital format, the K  X  X , , X
mechanism for gathering the data (such as a Charge (3)
Couped Diode (CCD) detector) can introduce noise. The filtering procedure can be stated as follows:
-Electronic transmission of image data can introduce -sort the samples inside the filter window.
noise [14]. -duplicate each sample Xi to the number of the corre-
On other hand, there are different ways to remove or sponding weight Wi and choose the median value from
reduce noise in an image. Different methods are better for the new sequence, for example, consider a length 5 WM
different kinds of noise. The methods available include filter with integer weights (1, 2, 3, 2, 1).
Average filter, Median filter. -Now apply the filter to the following sequence so that
The averaging filter is useful to remove certain types of the window is centered at the sample value 8, X = (-1, 5,
noise; it is good with white noise. The average filter is 8, 11, -2).
replacing the value of every pixel in an image by the av-
erage of the gray levels in the neighborhood defined by 3 IMAGE RESTORATION MODEL
the filter mask [9]. The Disadvantages of the Average
The image restoration model has three stages, as de-
Filter is tend to blur sharp edges and to destroy lines,
picted in Figure 2.
edges and other fine image details, fail to remove heavy
tailed distribution noise effectively.
The Median filters are especially good at removing im-
pulsive noise from images. The particular nonlinearity of
the median filter permits it to smooth an image without
the degree of blurring that a linear filter with similar
smoothing characteristics can introduce [15]. The Disad-
vantage median filter is not a perfect filtering operation Figure 2: The Image Restoration Model
and not very flexible. It may cause edge jitter, streaking
and may remove important image details.
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 5, MAY 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 173

 1 
Y  f   W (i ) X (i )   W ( i )  1 
 i T 2 i T

The additive noise to actual image in the first stage im-


plemented using the Salt and pepper noise, Figure 3
shows additive noise N(n) to the image I(n), the degrada-
tion operation g(n) produces a degraded image D(n). 4 NEURAL NETWORK MODEL DESIGN
The architecture of network is the arrangement of neu-
rons into layers and the connection pattern within and
g(n) between layers. This pattern is demonstrated as: ‘R-S1-S2-
I(n) D(n)
S3’, which means that the input layer consists of R inputs.
And, there are two hidden layers named S1 and S2 neu-
N(n) rons respectively [6]. The output layer is referred as S3
neurons. In the instant, we need to define the architecture
and the transfer function of each neuron in the network.
Figure 3: Degradation Model In addition, the values of its weights should also be de-
fined. The process of adjust of weights of the NN to
The output of this stage is noisy image, which will use ‘match’ set of samples is called training.
as an input for the neural network (second stage). The On the authority of network generalization, the
neural network helps to determine the weight of coeffi- ‘match’ of training sets enables us to conclude from un-
cients for the median filter, which will use in the final seen samples. Multi layer perceptrons (MLP) it is a kind
stage to restore the image. Each neuron in the neural net- of networks comprise of several layers of computational
work used to configure a pixel into the image. The opera- neurons, commonly organized in a feed-forward tech-
tion of neuron represents the binary weight median filter, nique. Each neuron in a single layer has directed connec-
the output of neuron is 1 if the summation of pixel values tions to the neurons of the successive layer (one or more
multiplied by the corresponding weight coefficients is hidden layers) [2,5]. The sigmoid function is the most
greater than a half of the summation of the weight coeffi- popular used as an activation function in many applica-
cients, otherwise its 0. Consider we have the following tions.
example: Our model the network architecture has three layers;
the first layer is correspond the input binary noisy image,
Weight coeffi- Binary pixel second layer represents the weight, and the third layer is
cients value the output image, as depicted in Figure 5.

2 1 2 0 1 0
N
1 3 1 0 1 1
N x1
w
2 1 2 1 0 0 y1
N

Therefore, it computes as follows: N xn


w
 Pixel value  weighted coefficients yn

 0 + 1 + 0 + 0 + 31 + 1 + 2 1 + 0 + 0 = 7 . N
xN
Figure 4 shows the mechanism of computation of Binary w yN
Weighted Median Filter and output of Neuron. N
Input layer Weight Layer of
of source layer output
Input image nodes neurons
Border N N

Figure 5: Fully Connected Feed-forward Neural Network

Where:
x1 ,  , x N represent a window (3  3),

(5 5),………(N N). 
Figure 4: Binary Weighted Median Filter and Neuron y1 ,  , y N the output neurons, each of which represents
one pixel.
The output of neuron is determined as follows:
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 5, MAY 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 174

w the weights of neural network model represent a win-  Then a specific filter will be chosen to restore im-
dow size of (3  3), (5  5),………(N  N), the size of age, more than one filter can be used for checking
weight is equivalent to the size of input layer. the program package.
 More than one image can be chosen for checking
A number of learning algorithms are proposed and the program procedure.
amongst them the back-propagation learning algorithm is
the broadly used [5]. In this method, an error signal is The experiments under taken are used 5  5, filtering
computed the difference between outputs that generated window and 256  256  8 bits “text” standard image are
by the network and desired output which is propagated used; text image has been figured in this paper.
in the backward direction to correct the synaptic weights Figure 7 shows original image, and Figure 8 shows
according to the error signal. Throughout the learning noisy image corrupted by salt and pepper noise of proba-
procedure, the purpose is to diminish an objective func- bility 5%. These images are used as the training set. Initial
tion such as the mean-squared error (MSE), values of the weight coefficients, 1 for W(0) and 0 for the
others, and   0.35 has been set. The trained set of
1 2 weight coefficients is shown in Figures 9.
MSE  X L (i )  X A (i )
N (4)

The aim of the learning optimization of the weight co-


efficient W (i) is making the difference between the filter
output and the actual output as small as possible. Let the

input noisy image


X I (i ) , the intermediate output of the
X L (i )
network under the learning process is denoted ,
A
X (i )
and the output actual image . The learning process
to find proper weight is expressed as follows:

W N (i )  W O (i )   (i )
(5)

Where:
W N (i ) represents new weight coefficients
W O (i)
represents old weight coefficients
 (i ) represents correction term defined as follows:
Figure 6: User interface of proposed Program

(i) 
1
 
  X A (i)  X L (i) X I (i)
N i (6)
Where:
 represents learning factor.
N represents total pixel number of the image.

5 EXPERIMENTAL RESULTS
A MATLAB application is designed and implemented to
utilize a feed forward neural network and the weight
median filter as shown in figure 6. The procedure of Pro-
gram Package Steps is as follows:

 Choose First image, this program provides the flex-


ibility to choose image format.  
 Next step will be adding salt and pepper noise to
the chosen image.
Figure 7: Original Image
 Then determine the size-filtering windows.
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 5, MAY 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 175

Figure 8: Salt and Pepper Noisy Image


Figure 12: Result of Median Filter Using 5  5
Filtering Window (MSE = 0.0588)

0.01 1.67 0.19 0.35 0.20


0.22 0.30 0.21 0.16 0.72
0.23 2.60 4.79 2.60 0.13
0.01 0.00 0.05 0.86 0.23
0.00 0.69 0.01 0.03 0.91
Figure 9: Trained Result of Weight Coefficients

0 2 0 0 0
0 0 0 0 1
0 3 5 3 0
0 0 0 1 0
0 1 0 0 1
Figure 10: Approximate Weight Coefficients

Figure 13: Result of WMF Using 5  5


Filtering Window (MSE = 0.0132)

As shown in figures 9 to 11 the MSE of WMF is signif-


icantly less than other filters, besides it have been ob-
served that the using of WMF removes the noise in im-
age. Moreover, the details of image are preserved effec-
tively.

6 CONCLUSION
A new method for getting the weight coefficients
based WMF techniques has been design and implement-
ed. A multi-layer perceptron feed-forward networks is
used to find the best size of filtering window. The Back-
propagation learning method is used to adjust and adapt
Figure 11: Result of Average Filter Using 5  5 the network. The using of weight median filter based
Filtering Window (MSE = 0.0360) neural network not only shows efficient impulsive noise
suppression and an excellent image detail-preserving
capability, but also are suitable for implementing it in
other applications such as speech signal processing, dif-
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 5, MAY 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 176

ferential pulse code modulation (DPCM) coding, parallel


processing and implementation by VLSI. As a future
work for the sake of finding the best solution for the mod-
ification of the weights of networks, genetic algorithms
(GA) can be used [3]. This evolutionary technique helps
to adapt the data set to the best possible solution accord-
ing to the inputs and the outputs of the system [4]. Be-
sides, it can determine the best filtering window dimen-
sions

REFERENCES
[1] Asano, A., et al, 1991. Optimization of the weighted median fitler by
learning. Optics Letters, Vol. 16, No. 3, pp. 168-170.
[2] Barrios, D., Carrascal, A., Manrique, D., & Ríos, J. (2000). Neural net-
work training using real-coded genetic algorithms. Proceedings of V
Ibero American Symposium on Pattern Recognition, Lisboa, Portugal
(pp. 337–346).
[3] Barrios, D., Carrascal, A., Manrique, D., & Ríos, J. (2003). Cooperative
binary-real coded genetic algorithms for generating and adapting artifi-
cial neural networks. Neural Computing and Applications, 12(2), 49–60.
[4] Barrios, D., Manrique, D., Plaza, M.R., & Ríos, J.(2001). An algebraic
model for generating and adapting neural networks by means of opti-
mization methods. Annals of Mathematics and Artificial Intelligence,
33, 93-111.
[5] Bornholdt, S., & Graudenz, D. (1992). General asymmetric neural net-
works and structure design by genetic algorithms. Neural Networks, 5,
327-334.
[6] Brown, A.D., & Card, H. C. (2000). Cooperative co-evolution of neural
representations. International Journal of Neural Systems, 10(4), 311-320.
[7] Chen, C. et al, 1996. A self-adjusting weighted median filter for remov-
ing impulse noise in images. IEEE International Conference on Image
processing, Switzerland, Vol. 1, pp. 419-422.
[8] Chen T. et al, 2001. Application of partition-based median type filters
for suppressing noise in images. IEEE Transactions on Image Pro-
cessing, Vol. 10, No. 6, pp. 829 –836.
[9] Gonzalez, R. et al, 2009. Digital Image Processing Using Matlab.
Gatesmark Publishing, USA, 2009.
[10] Haavisto, P. 1992. Median Filters. Technical Notes, Tampere University
of Technology, Tampere, Finland.
[11] Hasoon, F. N. et al, 2010. Image Restoration Technique Using Nonline-
ar Filter Combined With Machine Learning. International Conference
on Intelligent Network and Computing, Kuala Lumpur, Malaysia.
[12] Koschan A. et al, 2001. A comparison of Median Filter Techniques for
noise removal in color image, 7th German workshop on color image
processing. Erlangen, Germany, Vol.34, No. 15, pp.69-79.
[13] Kowalski, J. 2002. Analogue weighted median filter based on cellular
neural network for standard video signal processing, Proceedings of
the 7th IEEE International Workshop on Cellular Neural Networks and
Their Applications, Frankfurt, Germany, pp. 638 –645.
[14] Matlab, 2011. Image Processing Toolbox User’s Guide, The Math
works, Inc.
[15] Senel, H. G. et al, 2002. Topological Median Filters. IEEE Transaction on
image processing, vol.11, no.2. 89 – 104.
[16] Xu, X. et al, 2002. Adaptive two-pass median filter to remove impulsive
noise. Image Processing. 2002. International Conference of Image pro-
cessing. USA, pp. 808-811.
[17] Yin, L. et al, 1996. Weighted Median Filters: A Tutorial. IEE Transac-
tions on circuit and systems: analog and digital signal processing, Vol.
43, No. 3, pp. 157 - 192.
[18] Umpaugh, S. E. 1998. Computer Vision and Image Processing: A Prac-
tical Approach Using CVIPTools, Prentice-Hall International, Inc.

You might also like