# An Adaptive Filtering Algorithm Based on Genetic Algorithm-Backpropagation Network

Authors: Kai Hu; Aiguo Song; Min Xia; XiaoLing Ye; YanYan Dou
Journal: Mathematical Problems in Engineering
 (2013)

---

## Abstract

A new image filtering algorithm is proposed. GA-BPN algorithm uses genetic algorithm (GA) to decide weights in a back propagation neural network (BPN). It has better global optimal characteristics than traditional optimal algorithm. In this paper, we used GA-BPN to do image noise filter researching work. Firstly, this paper uses training samples to train GA-BPN as the noise detector. Then, we utilize the well-trained GA-BPN to recognize noise pixels in target image. And at last, an adaptive weighted average algorithm is used to recover noise pixels recognized by GA-BPN. Experiment data shows that this algorithm has better performance than other filters.


---

## Body

## 1. Introduction

Digital images are frequently corrupted by impulse noise during image gaining or transmission. Preservation of image details and attenuation of noise are the two important requirements of image processing, but they are contradictory in nature. So this research emphasis is on the removal of impulse noise while lessening the loss of details as low as possible.Compared with traditional algorithms, nonlinear techniques have superiority and provide more satisfactory results while preserving image details. The most basic nonlinear filter is the standard median (SM) filter [1]. It replaces each pixel in the image by the median value of the corresponding neighborhood window centered at this pixel. The SM filter works effectively for low noise densities but at the cost of blurring the image. One solution to this problem is the weighted median (WM) filter [2] which gives more weight to some values within the window than others. It emphasizes or deemphasizes specific samples, because in most applications, not all samples are equally important. The special case of the WM filter is the centre weighted median (CWM) [3] filter which gives more weight only to the centre value of the window. However, these filters do not perform well at higher noise densities. Besides, the filtered image is blurred with poor preservation of the image details. Each pixel of the image is considered to be noisy which may not be in practice. These filters do not detect whether a pixel in the image is actually corrupted by impulse or not and simply replace each pixel by the median value. A better tactic to avoid this drawback is to incorporate some decision making or switching action in the filtering. Firstly, it finds out whether each pixel is contaminated or not. Then, recovery method is applied on the pixel only if it is corrupted by noise. Corrupted pixels are replaced by the median values, while the noise-free pixels are left unaltered. Since not every pixel is filtered, undue distortion can be avoided as far as possible.In recent years, there been haveing many researchers try to combine GA with Artificial Neural Networks (ANNs), to find an effective solution to complex problem and have a better understanding to the relations between learning and evolution, which become an active topic in the field of artificial life [3–14].This paper proposes making use of gene algorithm to improve backpropagation neural networks to find the most suitable network connection weights and network, then form a GA-BP model and apply it to image filtering. The experiment points out that it gains good performance in image recovery.The rest of the paper is organized as follows. Section2 impresses our work, including workflow and theories adopted. And Section 3 presents the experiment results of the proposed algorithm. Finally, Section 4 concludes this paper.


## 2. Our Work

### 2.1. Workflow

According to the function, the proposed algorithm can be divided into 3 stages: detector training, noise detection, and image recovery. It is shown in Figure1(a).Our workflow.
(a)
Total workflow
(b)
Detector training
(c)
Noise detection
(d)
Image recoveryFigure1(b) shows the working content of detector training. Those known noises we added have several characteristic: pixel’s value, pixel’s median in 3*3 window size, pixel's ROLD, pixel's position. We used value, median and ROLD as input, and use position as output, intending to train a GA-BPN as a detector. After this step, we get a well-trained detector which is capable of noise pixels position detection.In Figure1(c), we can see from the process how noise pixels are detected. We enter the noised image itself (target image), pixel’s median in 3*3 window size, and pixel’s ROLD into the detector mentioned above; then, we can estimate noised pixels position in target image.At last, we used an adaptive weighted average algorithm which varies for windows size and distance to recover noise pixels which are recognized by GA-BPN. It is shown in Figure1(d).


### 2.2. Related Theory

#### 2.2.1. Noise Model

The classical salt and pepper noise is added to the value interval in[0,δ]∪[255-δ,255], where δ is 0 or a small positive integer. The model for images with noise is described as follows [15]:
(1)Ii,j={Ni,jpSi,j1-p,
where Ii,j is the image with noise, Si,j is the original part of Ii,j,  Ni,j is the noise part of Ii,j (with usual value of 0 or 255), and p is the noise density.


#### 2.2.2. Rank-Ordered Logarithmic Difference

In the literatures [15], Dong et al. proposed a new local image statistic ROLD which is based on ROAD feature [16]. It can identify more noisy pixels with less false hits and can be well applied to deal with random-valued impulse noise. Simulation results show that it outperforms a number of existing methods both visually and quantitatively. Based on this report, we adopt it in our algorithm. Its definition is shown as follows.(
1
) Map the gray value of image Ii,j to a value of [0,1] by linear transformation, that is, u(m)∈[0,1]. This is the gray value of the pixel in image u at position m. The image has a window with its center on pixel u(m), and its size is (2d+1)×(2d+1); pixel u(n) is one pixel in the window. The distance between the two pixels n and m is defined as
(2)Dm,n=1+max{loga|u(m)-u(n)|,-b}b,n∈Nm0(d),
where a,b>0. The best distinction is achieved when a=2 and  b=5.(
2
) Sort all Dm,n in a window in a descending order. If noise density p>25%, then ROLD is the sum of the biggest 12 values sorted under a 5*5 window size. Otherwise, it is the sum of the biggest 4 values that are sorted under a 3*3 window size.For a variation between the noise pixel and its adjacent pixel in the window, the ROLD value will be a high integer. Based on this value, the ROLD of a normal pixel should be smaller for the consistency between itself and its adjacent pixel. Therefore, ROLD serves as an important definition of pixels and distinguishes between noise pixels and normal pixels.


#### 2.2.3. GA-BPN

Neural networks are parallel-processing-structures consisting of nonlinear processing elements interconnected by fixed or variable weights [17]. These structures can be designed to generate arbitrarily complex decision regions for specific mappings, so ANNs are well suited for use as detectors and classifiers. Classic pattern recognition algorithms require assumptions concerning the underlying statistics of the environment that generated the available data. Neural networks are nonparametric and effectively address a broad class of problems. Furthermore, neural networks have an intrinsic fault tolerance. Some “neurons” may fail, but the overall network can still perform well because the information relating the mapping from input to output is distributed across all of the elements of the network.The process of training neural networks by the implementation of a gradient-based optimization algorithm (e.g., backpropagation) will lead to locally optimal solutions which may be far removed from the global optimum. However, evolutionary optimization methods offer a procedure to stochastically search for suitable weights and bias terms given a specific network topology [18–35]. In consequence, so as to solve our problem, we can adopt GA-BPN as a noise detector.Ye et al. designed a GA-BPN model in currency recognition and got good research result [32]. We used its steps in our algorithm. To improve BP neural networks global optimum by gene algorithm, we use all search characteristics of gene algorithm to find the most suitable network connection weights and network. Different network has different network weight numbers and thresholds. Thus, according to different networks, their best individuals can be generated by GA algorithm. Then, the fitness value of those best individual will be compared to select the best individual whose training times are fewer and fitness value is the largest to be used to build BP neural networks. By comparison, we adapted a three-layer neural network, while the number of input layer and output layer was determined by the original image samples. So our main work is to optimize hidden-layer nodes number [18–35]. These steps can be expressed as follows.Step 1.
Organize all weights and thresholds together by sequence order, and generateN chromosomes randomly.Step 2.
Design a fitness function which represents the reciprocal of the sum-squared error between network output, actual value, and desired value. Use it to calculate the fitness degree of each chromosome, and then determine whether it accords with the optimization criteria or cycles times. If it accords with it, then go to Step4.Step 3.
According to the fitness degree, select individuals and produce new individuals according to certain crossover probability and mutation probability. Return to Step2.Step 4.
Save the best individual. If cycle times are less than the number of networks, change hidden layer nodes number, and then return to Step1; otherwise, comparison will be executed among the best individuals to select the best individual.Step 5.
Split the best individual to gain the initial weights and thresholds of BPN.Step 6.
Carry forward propagation for BP neural networks, and calculate overall error, and then determine whether it accords with the request. If it is, then stop training.Step 7.
If less than cycle times, then carry backpropagation for BP neural network; adjust the weights; return to Step5; otherwise, stop network’s training.


### 2.3. Our Work

#### 2.3.1. Detector Training

Ye et al. proposed a method applying to train the networks to improve their generalization of noise detection [32]. The method created a set of primitive chessboard images in [Pt1], which has a total size of 128*128 pixels and comprises many 4*4 pixels grids, whereby the values of 16 inner pixels are the same and random. Add noise with a different density to [Pt1], so we get a set of noised images [Pt2]. Compare [Pt1] and [Pt2], we get [Pt3], which represent the information of noise pixels. For example, Figure 1 is one group which we used to train the network which is adapted to upper 25% noise density. Figure 2(a) (belong to [Pt1]) is an original chessboard image. Add noise with different noise density level, we get Figure 2(b) (belonging to [Pt2]); then, by comparing Figures 2(a) and 2(b), we get Figure 2(c) (belonging to [Pt3]); which represent the noise information we added.Training sample.
(a)
Original image
(b)
Noised image
(c)
Target imageWe use [Pt2] as input and [Pt3] as output to train GA-BPN. The so-called network training is an attempt to make its output closes to [Pt3] by adjusting the inner parameters under several iterative calculations.


#### 2.3.2. Recovery Method

Noise pixels should be replaced by estimating the original value, and better noise filtering is generally achieved when the estimated value is closer to the original value. In this paper, we used an adaptive weighted average algorithm which varies for windows size and distance. This algorithm works as follows.(1)
Set a filter windowWf where the size is Ws×Ws (Ws is an odd value with a value of ≥3); its original size is 3*3, and its center is on the pixel of the image. If the central point is not a noise point, shift the window Wf  to make its central point be the next pixel of the image. Go to Step (2) when the central point is a noise point.(2)
Calculate the sumM of unpolluted pixels in Wf. If M>9 or M>(Ws×Ws+1)/2, go to Step (4). If not, go to Step (3).(3)
ResizeWf, Ws=Ws+2, and go back to Step (2).(4)
UsingM unpolluted pixels, calculate the output L(i+s,j+t) using formula (3), and replace the noise pixel.  Consider the following:(3)L(i+s,j+t)=∑n=1MWp(s,t)I(i,j)0(i+s,j+t)∑n=1MWp(s,t),where I(i,j)0(i+s,j+t) represents an unpolluted pixel value, with position (i+s,j+t) and window center on (i,j). Wp(s,t) is the weight; a pixel is more important if it is closer to the noise point. Therefore,(4)Wp(s,t)=1|s|+|t|.


## 2.1. Workflow

According to the function, the proposed algorithm can be divided into 3 stages: detector training, noise detection, and image recovery. It is shown in Figure1(a).Our workflow.
(a)
Total workflow
(b)
Detector training
(c)
Noise detection
(d)
Image recoveryFigure1(b) shows the working content of detector training. Those known noises we added have several characteristic: pixel’s value, pixel’s median in 3*3 window size, pixel's ROLD, pixel's position. We used value, median and ROLD as input, and use position as output, intending to train a GA-BPN as a detector. After this step, we get a well-trained detector which is capable of noise pixels position detection.In Figure1(c), we can see from the process how noise pixels are detected. We enter the noised image itself (target image), pixel’s median in 3*3 window size, and pixel’s ROLD into the detector mentioned above; then, we can estimate noised pixels position in target image.At last, we used an adaptive weighted average algorithm which varies for windows size and distance to recover noise pixels which are recognized by GA-BPN. It is shown in Figure1(d).


## 2.2. Related Theory

### 2.2.1. Noise Model

The classical salt and pepper noise is added to the value interval in[0,δ]∪[255-δ,255], where δ is 0 or a small positive integer. The model for images with noise is described as follows [15]:
(1)Ii,j={Ni,jpSi,j1-p,
where Ii,j is the image with noise, Si,j is the original part of Ii,j,  Ni,j is the noise part of Ii,j (with usual value of 0 or 255), and p is the noise density.


### 2.2.2. Rank-Ordered Logarithmic Difference

In the literatures [15], Dong et al. proposed a new local image statistic ROLD which is based on ROAD feature [16]. It can identify more noisy pixels with less false hits and can be well applied to deal with random-valued impulse noise. Simulation results show that it outperforms a number of existing methods both visually and quantitatively. Based on this report, we adopt it in our algorithm. Its definition is shown as follows.(
1
) Map the gray value of image Ii,j to a value of [0,1] by linear transformation, that is, u(m)∈[0,1]. This is the gray value of the pixel in image u at position m. The image has a window with its center on pixel u(m), and its size is (2d+1)×(2d+1); pixel u(n) is one pixel in the window. The distance between the two pixels n and m is defined as
(2)Dm,n=1+max{loga|u(m)-u(n)|,-b}b,n∈Nm0(d),
where a,b>0. The best distinction is achieved when a=2 and  b=5.(
2
) Sort all Dm,n in a window in a descending order. If noise density p>25%, then ROLD is the sum of the biggest 12 values sorted under a 5*5 window size. Otherwise, it is the sum of the biggest 4 values that are sorted under a 3*3 window size.For a variation between the noise pixel and its adjacent pixel in the window, the ROLD value will be a high integer. Based on this value, the ROLD of a normal pixel should be smaller for the consistency between itself and its adjacent pixel. Therefore, ROLD serves as an important definition of pixels and distinguishes between noise pixels and normal pixels.


### 2.2.3. GA-BPN

Neural networks are parallel-processing-structures consisting of nonlinear processing elements interconnected by fixed or variable weights [17]. These structures can be designed to generate arbitrarily complex decision regions for specific mappings, so ANNs are well suited for use as detectors and classifiers. Classic pattern recognition algorithms require assumptions concerning the underlying statistics of the environment that generated the available data. Neural networks are nonparametric and effectively address a broad class of problems. Furthermore, neural networks have an intrinsic fault tolerance. Some “neurons” may fail, but the overall network can still perform well because the information relating the mapping from input to output is distributed across all of the elements of the network.The process of training neural networks by the implementation of a gradient-based optimization algorithm (e.g., backpropagation) will lead to locally optimal solutions which may be far removed from the global optimum. However, evolutionary optimization methods offer a procedure to stochastically search for suitable weights and bias terms given a specific network topology [18–35]. In consequence, so as to solve our problem, we can adopt GA-BPN as a noise detector.Ye et al. designed a GA-BPN model in currency recognition and got good research result [32]. We used its steps in our algorithm. To improve BP neural networks global optimum by gene algorithm, we use all search characteristics of gene algorithm to find the most suitable network connection weights and network. Different network has different network weight numbers and thresholds. Thus, according to different networks, their best individuals can be generated by GA algorithm. Then, the fitness value of those best individual will be compared to select the best individual whose training times are fewer and fitness value is the largest to be used to build BP neural networks. By comparison, we adapted a three-layer neural network, while the number of input layer and output layer was determined by the original image samples. So our main work is to optimize hidden-layer nodes number [18–35]. These steps can be expressed as follows.Step 1.
Organize all weights and thresholds together by sequence order, and generateN chromosomes randomly.Step 2.
Design a fitness function which represents the reciprocal of the sum-squared error between network output, actual value, and desired value. Use it to calculate the fitness degree of each chromosome, and then determine whether it accords with the optimization criteria or cycles times. If it accords with it, then go to Step4.Step 3.
According to the fitness degree, select individuals and produce new individuals according to certain crossover probability and mutation probability. Return to Step2.Step 4.
Save the best individual. If cycle times are less than the number of networks, change hidden layer nodes number, and then return to Step1; otherwise, comparison will be executed among the best individuals to select the best individual.Step 5.
Split the best individual to gain the initial weights and thresholds of BPN.Step 6.
Carry forward propagation for BP neural networks, and calculate overall error, and then determine whether it accords with the request. If it is, then stop training.Step 7.
If less than cycle times, then carry backpropagation for BP neural network; adjust the weights; return to Step5; otherwise, stop network’s training.


## 2.2.1. Noise Model

The classical salt and pepper noise is added to the value interval in[0,δ]∪[255-δ,255], where δ is 0 or a small positive integer. The model for images with noise is described as follows [15]:
(1)Ii,j={Ni,jpSi,j1-p,
where Ii,j is the image with noise, Si,j is the original part of Ii,j,  Ni,j is the noise part of Ii,j (with usual value of 0 or 255), and p is the noise density.


## 2.2.2. Rank-Ordered Logarithmic Difference

In the literatures [15], Dong et al. proposed a new local image statistic ROLD which is based on ROAD feature [16]. It can identify more noisy pixels with less false hits and can be well applied to deal with random-valued impulse noise. Simulation results show that it outperforms a number of existing methods both visually and quantitatively. Based on this report, we adopt it in our algorithm. Its definition is shown as follows.(
1
) Map the gray value of image Ii,j to a value of [0,1] by linear transformation, that is, u(m)∈[0,1]. This is the gray value of the pixel in image u at position m. The image has a window with its center on pixel u(m), and its size is (2d+1)×(2d+1); pixel u(n) is one pixel in the window. The distance between the two pixels n and m is defined as
(2)Dm,n=1+max{loga|u(m)-u(n)|,-b}b,n∈Nm0(d),
where a,b>0. The best distinction is achieved when a=2 and  b=5.(
2
) Sort all Dm,n in a window in a descending order. If noise density p>25%, then ROLD is the sum of the biggest 12 values sorted under a 5*5 window size. Otherwise, it is the sum of the biggest 4 values that are sorted under a 3*3 window size.For a variation between the noise pixel and its adjacent pixel in the window, the ROLD value will be a high integer. Based on this value, the ROLD of a normal pixel should be smaller for the consistency between itself and its adjacent pixel. Therefore, ROLD serves as an important definition of pixels and distinguishes between noise pixels and normal pixels.


## 2.2.3. GA-BPN

Neural networks are parallel-processing-structures consisting of nonlinear processing elements interconnected by fixed or variable weights [17]. These structures can be designed to generate arbitrarily complex decision regions for specific mappings, so ANNs are well suited for use as detectors and classifiers. Classic pattern recognition algorithms require assumptions concerning the underlying statistics of the environment that generated the available data. Neural networks are nonparametric and effectively address a broad class of problems. Furthermore, neural networks have an intrinsic fault tolerance. Some “neurons” may fail, but the overall network can still perform well because the information relating the mapping from input to output is distributed across all of the elements of the network.The process of training neural networks by the implementation of a gradient-based optimization algorithm (e.g., backpropagation) will lead to locally optimal solutions which may be far removed from the global optimum. However, evolutionary optimization methods offer a procedure to stochastically search for suitable weights and bias terms given a specific network topology [18–35]. In consequence, so as to solve our problem, we can adopt GA-BPN as a noise detector.Ye et al. designed a GA-BPN model in currency recognition and got good research result [32]. We used its steps in our algorithm. To improve BP neural networks global optimum by gene algorithm, we use all search characteristics of gene algorithm to find the most suitable network connection weights and network. Different network has different network weight numbers and thresholds. Thus, according to different networks, their best individuals can be generated by GA algorithm. Then, the fitness value of those best individual will be compared to select the best individual whose training times are fewer and fitness value is the largest to be used to build BP neural networks. By comparison, we adapted a three-layer neural network, while the number of input layer and output layer was determined by the original image samples. So our main work is to optimize hidden-layer nodes number [18–35]. These steps can be expressed as follows.Step 1.
Organize all weights and thresholds together by sequence order, and generateN chromosomes randomly.Step 2.
Design a fitness function which represents the reciprocal of the sum-squared error between network output, actual value, and desired value. Use it to calculate the fitness degree of each chromosome, and then determine whether it accords with the optimization criteria or cycles times. If it accords with it, then go to Step4.Step 3.
According to the fitness degree, select individuals and produce new individuals according to certain crossover probability and mutation probability. Return to Step2.Step 4.
Save the best individual. If cycle times are less than the number of networks, change hidden layer nodes number, and then return to Step1; otherwise, comparison will be executed among the best individuals to select the best individual.Step 5.
Split the best individual to gain the initial weights and thresholds of BPN.Step 6.
Carry forward propagation for BP neural networks, and calculate overall error, and then determine whether it accords with the request. If it is, then stop training.Step 7.
If less than cycle times, then carry backpropagation for BP neural network; adjust the weights; return to Step5; otherwise, stop network’s training.


## 2.3. Our Work

### 2.3.1. Detector Training

Ye et al. proposed a method applying to train the networks to improve their generalization of noise detection [32]. The method created a set of primitive chessboard images in [Pt1], which has a total size of 128*128 pixels and comprises many 4*4 pixels grids, whereby the values of 16 inner pixels are the same and random. Add noise with a different density to [Pt1], so we get a set of noised images [Pt2]. Compare [Pt1] and [Pt2], we get [Pt3], which represent the information of noise pixels. For example, Figure 1 is one group which we used to train the network which is adapted to upper 25% noise density. Figure 2(a) (belong to [Pt1]) is an original chessboard image. Add noise with different noise density level, we get Figure 2(b) (belonging to [Pt2]); then, by comparing Figures 2(a) and 2(b), we get Figure 2(c) (belonging to [Pt3]); which represent the noise information we added.Training sample.
(a)
Original image
(b)
Noised image
(c)
Target imageWe use [Pt2] as input and [Pt3] as output to train GA-BPN. The so-called network training is an attempt to make its output closes to [Pt3] by adjusting the inner parameters under several iterative calculations.


### 2.3.2. Recovery Method

Noise pixels should be replaced by estimating the original value, and better noise filtering is generally achieved when the estimated value is closer to the original value. In this paper, we used an adaptive weighted average algorithm which varies for windows size and distance. This algorithm works as follows.(1)
Set a filter windowWf where the size is Ws×Ws (Ws is an odd value with a value of ≥3); its original size is 3*3, and its center is on the pixel of the image. If the central point is not a noise point, shift the window Wf  to make its central point be the next pixel of the image. Go to Step (2) when the central point is a noise point.(2)
Calculate the sumM of unpolluted pixels in Wf. If M>9 or M>(Ws×Ws+1)/2, go to Step (4). If not, go to Step (3).(3)
ResizeWf, Ws=Ws+2, and go back to Step (2).(4)
UsingM unpolluted pixels, calculate the output L(i+s,j+t) using formula (3), and replace the noise pixel.  Consider the following:(3)L(i+s,j+t)=∑n=1MWp(s,t)I(i,j)0(i+s,j+t)∑n=1MWp(s,t),where I(i,j)0(i+s,j+t) represents an unpolluted pixel value, with position (i+s,j+t) and window center on (i,j). Wp(s,t) is the weight; a pixel is more important if it is closer to the noise point. Therefore,(4)Wp(s,t)=1|s|+|t|.


## 2.3.1. Detector Training

Ye et al. proposed a method applying to train the networks to improve their generalization of noise detection [32]. The method created a set of primitive chessboard images in [Pt1], which has a total size of 128*128 pixels and comprises many 4*4 pixels grids, whereby the values of 16 inner pixels are the same and random. Add noise with a different density to [Pt1], so we get a set of noised images [Pt2]. Compare [Pt1] and [Pt2], we get [Pt3], which represent the information of noise pixels. For example, Figure 1 is one group which we used to train the network which is adapted to upper 25% noise density. Figure 2(a) (belong to [Pt1]) is an original chessboard image. Add noise with different noise density level, we get Figure 2(b) (belonging to [Pt2]); then, by comparing Figures 2(a) and 2(b), we get Figure 2(c) (belonging to [Pt3]); which represent the noise information we added.Training sample.
(a)
Original image
(b)
Noised image
(c)
Target imageWe use [Pt2] as input and [Pt3] as output to train GA-BPN. The so-called network training is an attempt to make its output closes to [Pt3] by adjusting the inner parameters under several iterative calculations.


## 2.3.2. Recovery Method

Noise pixels should be replaced by estimating the original value, and better noise filtering is generally achieved when the estimated value is closer to the original value. In this paper, we used an adaptive weighted average algorithm which varies for windows size and distance. This algorithm works as follows.(1)
Set a filter windowWf where the size is Ws×Ws (Ws is an odd value with a value of ≥3); its original size is 3*3, and its center is on the pixel of the image. If the central point is not a noise point, shift the window Wf  to make its central point be the next pixel of the image. Go to Step (2) when the central point is a noise point.(2)
Calculate the sumM of unpolluted pixels in Wf. If M>9 or M>(Ws×Ws+1)/2, go to Step (4). If not, go to Step (3).(3)
ResizeWf, Ws=Ws+2, and go back to Step (2).(4)
UsingM unpolluted pixels, calculate the output L(i+s,j+t) using formula (3), and replace the noise pixel.  Consider the following:(3)L(i+s,j+t)=∑n=1MWp(s,t)I(i,j)0(i+s,j+t)∑n=1MWp(s,t),where I(i,j)0(i+s,j+t) represents an unpolluted pixel value, with position (i+s,j+t) and window center on (i,j). Wp(s,t) is the weight; a pixel is more important if it is closer to the noise point. Therefore,(4)Wp(s,t)=1|s|+|t|.


## 3. Experiment Data

### 3.1. Detection Performance

The accuracy of noise detection is an important condition for recent filters. The main indicators are wrong detected number (Wn) and false alarm ratio (FAR) [22–26]. The performance of the proposed detector could be seen in Table 1, which shows data on the images taken of Lena, baboon, peppers, cameraman, and Barbara as test images, with 10% to 90% of noise density added.Table 1
Noise detection performance test.
rd%
Lena
Baboon
Pepper
Cameraman
Barbara
Wn
FAR%
Wn
FAR%
Wn
FAR%
Wn
FAR%
Wn
FAR%
10
0
0.0503
0
0.0507
0
0.0502
0
0.0498
0
0.0497
20
0
0.1002
0
0.0996
0
0.1009
0
0.1018
0
0.0993
30
0
0.1492
0
0.1493
0
0.1506
0
0.1504
0
0.1498
40
0
0.1999
0
0.2004
0
0.1993
0
0.2020
0
0.2003
50
0
0.2501
0
0.2510
0
0.2502
0
0.2494
0
0.2504
60
0
0.3009
0
0.3002
0
0.3002
0
0.2957
0
0.2993
70
0
0.3506
0
0.3500
0
0.3489
0
0.3523
0
0.3508
80
0
0.3990
0
0.4004
0
0.4012
0
0.4042
0
0.3988
90
0
0.4485
0
0.4487
0
0.4521
0
0.4470
0
0.4497
Wrong detected number (Wn), false alarm ratio (FAR).A statistical analysis revealed that the Wn and FAR of Lena, Cameraman, and Barbara are almost zero, but those of baboon and peppers are relatively large. These images, which have rich texture and detail, could still be improved; this issue will be the basis of our future study. The above indicators showed that the proposed method performs robustly in noise detection; therefore, it can be used for the next filtering experiment.


### 3.2. Recovery Performance

The qualitative assessment of the recovered image is done by forming a different (between the original and the recovered) image. For quantitative assessment of the restoration quality, the commonly used peak signal-to-noise ratio (PSNR) was used. Therefore,(5)PSNR=20log10(255MSE),MSE=∑i=1N∑k=1m(xik-oik)2Nm,
where m is the total number of color components, N is the total number of image pixels, and xik and oik are  the kth component of the noisy image pixel channel and its original value at pixel position “i”, respectively.Experiment 1.
Add noise of 10%, 50%, and 90% densities to classical images. Use standard median filter (SMF), progressive switching median filter (PSMF), and adaptive median filter (AMF), including the proposed algorithm, to filter these noised images. Then, calculate their PSNR values, and data are shown in Table2.
It is easy to see that, for every image, the PSNR value of the proposed algorithm is higher than those of others; indicating the universality of the proposed algorithm’s excellent performance.
In removing noise and preserving details, our algorithm showed a robust performance, which became more obvious under a higher noise density.Table 2
PSNR of different algorithm when the image is corrupted by different noise density.
Noised image
SMF
PSMF
AMF
Proposed
Improved
Lena
10%
32.94
37.11
30.95
42.07
4.96
50%
15.35
20.71
24.22
32.59
8.37
90%
6.65
6.64
7.54
25.95
18.41
Baboon
10%
22.95
24.41
20.93
32.06
7.65
50%
14.41
18.27
19.08
24.07
4.99
90%
6.72
6.69
7.56
20.20
12.64
Boat
10%
29.52
31.89
26.96
38.22
6.33
50%
15.13
20.14
22.63
29.21
6.58
90%
6.65
6.64
7.58
23.47
15.89
Barbara
10%
24.58
26.01
23.12
34.19
8.18
50%
14.69
19.30
20.76
26.31
5.55
90%
6.64
6.57
7.45
22.81
15.36
Peppers
10%
33.02
36.61
29.38
40.03
3.42
50%
14.92
21.08
23.37
31.13
7.76
90%
6.32
6.3
7.23
25.16
17.93Experiment 2.
Add 10% to 90% of noise densities to image Lena. Use several algorithms, including the proposed algorithm, to filter these noised images. Then, calculated their PSNR values, data are shown in Figure3.
All PSNR data of the proposed method are higher than those of others, the last column titled “Improved degree” turn out the excellent improvement. It means that our algorithm’s filter performance is comprehensively better than other algorithms. The biggest improvement is observed in extremely high noise densities, at 90% noise density, it improved to 14.68 which made us surprised. The smallest improvement is obtained at 40% noise density; it raised 7.47 which also made us excities. In other different noise density, it also has an excellent improvement.
So proposed algorithm increased filter performance in all level noise densities considerably.Figure 3
PSNR of several algorithms.Experiment 3.
Add 90% noise density to “Barbara.” Use several algorithms, including the proposed algorithm, to filter these noised images, and show them in Figure4. Compare the results subjectively; Figures 4(b), 4(c), and 4(d) are blurred seriously. In contrast, our method performs better and can suppress the noise successfully while preserving more details.  It is obvious that Figure 4(e) has amazing performance in recovery compared to other traditional algorithms. This points out that our algorithm has better performance than other traditional algorithms when the normal image is highly corrupted.Barbara with 90% noise density.
(a)
Noised image (90%)
(b)
SMF(3×3)
(c)
AMF
(d)
PSMF
(e)
Our algorithm
(f)
Original imageExperiment 4.
To further compare the capability of preserving image details [15], in Figure 5, we give the restored results for “baboon” with rich details but corrupted by 50% impulse noise. Restore it by SMF, AMF, PSMF, and the proposed algorithm, and show results in Figure 5. It is obvious that our algorithm is better than others. The experimental results show that the approach gives good results in highly complex and detail-rich images. We see that for the other methods, there are still some noticeable noises unremoved, and there exists some loss and discontinuity of the details, such as the hair around the mouth of the baboon and the edges of the bridge. In contrast, the visual qualities of our restored images are quite good, even with the abundance of image details and the high noise level present in the images.Baboon with 50% noise density.
(a)
Noised image (50%)
(b)
SMF(3×3)
(c)
AMF
(d)
PSMF
(e)
Our algorithm
(f)
Original image


### 3.3. Computation Time

Computation time is an important indicator when weighing an algorithm; for it reflects whether the algorithm can be practically applied or not [15]. The proposed algorithm includes two: noise detection and noise filtering. Two independent experiments were done on these. Ten experiments were done on image Lena under 10% to 90% noise densities, and average results are shown in Figures 6 and 7. It shows that time of noise filtering is much greater than time of noise detection, and it grows when noise density grows. Totally, its computation time is acceptable. The running used was Pentium IV 2.0 G and 1 G RAM, and MATLAB 7.6 was also utilized.Figure 6
Detection time.Figure 7
Recovery time.


## 3.1. Detection Performance

The accuracy of noise detection is an important condition for recent filters. The main indicators are wrong detected number (Wn) and false alarm ratio (FAR) [22–26]. The performance of the proposed detector could be seen in Table 1, which shows data on the images taken of Lena, baboon, peppers, cameraman, and Barbara as test images, with 10% to 90% of noise density added.Table 1
Noise detection performance test.
rd%
Lena
Baboon
Pepper
Cameraman
Barbara
Wn
FAR%
Wn
FAR%
Wn
FAR%
Wn
FAR%
Wn
FAR%
10
0
0.0503
0
0.0507
0
0.0502
0
0.0498
0
0.0497
20
0
0.1002
0
0.0996
0
0.1009
0
0.1018
0
0.0993
30
0
0.1492
0
0.1493
0
0.1506
0
0.1504
0
0.1498
40
0
0.1999
0
0.2004
0
0.1993
0
0.2020
0
0.2003
50
0
0.2501
0
0.2510
0
0.2502
0
0.2494
0
0.2504
60
0
0.3009
0
0.3002
0
0.3002
0
0.2957
0
0.2993
70
0
0.3506
0
0.3500
0
0.3489
0
0.3523
0
0.3508
80
0
0.3990
0
0.4004
0
0.4012
0
0.4042
0
0.3988
90
0
0.4485
0
0.4487
0
0.4521
0
0.4470
0
0.4497
Wrong detected number (Wn), false alarm ratio (FAR).A statistical analysis revealed that the Wn and FAR of Lena, Cameraman, and Barbara are almost zero, but those of baboon and peppers are relatively large. These images, which have rich texture and detail, could still be improved; this issue will be the basis of our future study. The above indicators showed that the proposed method performs robustly in noise detection; therefore, it can be used for the next filtering experiment.


## 3.2. Recovery Performance

The qualitative assessment of the recovered image is done by forming a different (between the original and the recovered) image. For quantitative assessment of the restoration quality, the commonly used peak signal-to-noise ratio (PSNR) was used. Therefore,(5)PSNR=20log10(255MSE),MSE=∑i=1N∑k=1m(xik-oik)2Nm,
where m is the total number of color components, N is the total number of image pixels, and xik and oik are  the kth component of the noisy image pixel channel and its original value at pixel position “i”, respectively.Experiment 1.
Add noise of 10%, 50%, and 90% densities to classical images. Use standard median filter (SMF), progressive switching median filter (PSMF), and adaptive median filter (AMF), including the proposed algorithm, to filter these noised images. Then, calculate their PSNR values, and data are shown in Table2.
It is easy to see that, for every image, the PSNR value of the proposed algorithm is higher than those of others; indicating the universality of the proposed algorithm’s excellent performance.
In removing noise and preserving details, our algorithm showed a robust performance, which became more obvious under a higher noise density.Table 2
PSNR of different algorithm when the image is corrupted by different noise density.
Noised image
SMF
PSMF
AMF
Proposed
Improved
Lena
10%
32.94
37.11
30.95
42.07
4.96
50%
15.35
20.71
24.22
32.59
8.37
90%
6.65
6.64
7.54
25.95
18.41
Baboon
10%
22.95
24.41
20.93
32.06
7.65
50%
14.41
18.27
19.08
24.07
4.99
90%
6.72
6.69
7.56
20.20
12.64
Boat
10%
29.52
31.89
26.96
38.22
6.33
50%
15.13
20.14
22.63
29.21
6.58
90%
6.65
6.64
7.58
23.47
15.89
Barbara
10%
24.58
26.01
23.12
34.19
8.18
50%
14.69
19.30
20.76
26.31
5.55
90%
6.64
6.57
7.45
22.81
15.36
Peppers
10%
33.02
36.61
29.38
40.03
3.42
50%
14.92
21.08
23.37
31.13
7.76
90%
6.32
6.3
7.23
25.16
17.93Experiment 2.
Add 10% to 90% of noise densities to image Lena. Use several algorithms, including the proposed algorithm, to filter these noised images. Then, calculated their PSNR values, data are shown in Figure3.
All PSNR data of the proposed method are higher than those of others, the last column titled “Improved degree” turn out the excellent improvement. It means that our algorithm’s filter performance is comprehensively better than other algorithms. The biggest improvement is observed in extremely high noise densities, at 90% noise density, it improved to 14.68 which made us surprised. The smallest improvement is obtained at 40% noise density; it raised 7.47 which also made us excities. In other different noise density, it also has an excellent improvement.
So proposed algorithm increased filter performance in all level noise densities considerably.Figure 3
PSNR of several algorithms.Experiment 3.
Add 90% noise density to “Barbara.” Use several algorithms, including the proposed algorithm, to filter these noised images, and show them in Figure4. Compare the results subjectively; Figures 4(b), 4(c), and 4(d) are blurred seriously. In contrast, our method performs better and can suppress the noise successfully while preserving more details.  It is obvious that Figure 4(e) has amazing performance in recovery compared to other traditional algorithms. This points out that our algorithm has better performance than other traditional algorithms when the normal image is highly corrupted.Barbara with 90% noise density.
(a)
Noised image (90%)
(b)
SMF(3×3)
(c)
AMF
(d)
PSMF
(e)
Our algorithm
(f)
Original imageExperiment 4.
To further compare the capability of preserving image details [15], in Figure 5, we give the restored results for “baboon” with rich details but corrupted by 50% impulse noise. Restore it by SMF, AMF, PSMF, and the proposed algorithm, and show results in Figure 5. It is obvious that our algorithm is better than others. The experimental results show that the approach gives good results in highly complex and detail-rich images. We see that for the other methods, there are still some noticeable noises unremoved, and there exists some loss and discontinuity of the details, such as the hair around the mouth of the baboon and the edges of the bridge. In contrast, the visual qualities of our restored images are quite good, even with the abundance of image details and the high noise level present in the images.Baboon with 50% noise density.
(a)
Noised image (50%)
(b)
SMF(3×3)
(c)
AMF
(d)
PSMF
(e)
Our algorithm
(f)
Original image


## 3.3. Computation Time

Computation time is an important indicator when weighing an algorithm; for it reflects whether the algorithm can be practically applied or not [15]. The proposed algorithm includes two: noise detection and noise filtering. Two independent experiments were done on these. Ten experiments were done on image Lena under 10% to 90% noise densities, and average results are shown in Figures 6 and 7. It shows that time of noise filtering is much greater than time of noise detection, and it grows when noise density grows. Totally, its computation time is acceptable. The running used was Pentium IV 2.0 G and 1 G RAM, and MATLAB 7.6 was also utilized.Figure 6
Detection time.Figure 7
Recovery time.


## 4. Conclusions

This paper proposes making use of GA-BPN as noise detector and ROLD feature as input, to do image filtering. From experiment data, compared with some other traditional filters, the proposed algorithm performed robustly in aspects of noise removal and detail preservation, and its merit will be more obvious under higher noise densities.



---

*Source: 573941-2013-04-16.xml*