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.

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 [314].

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. Section 2 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 Figure 1(a).

Figure 1(b) shows the working content of detector training. Those known noises we added have several characteristic: pixel’s value, pixel’s median in 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 Figure 1(c), we can see from the process how noise pixels are detected. We enter the noised image itself (target image), pixel’s median in 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 Figure 1(d).

2.2. Related Theory
2.2.1. Noise Model

The classical salt and pepper noise is added to the value interval in , where is 0 or a small positive integer. The model for images with noise is described as follows [15]: where is the image with noise, is the original part of , is the noise part of (with usual value of 0 or 255), and 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.

Map the gray value of image to a value of by linear transformation, that is, . This is the gray value of the pixel in image at position . The image has a window with its center on pixel , and its size is ; pixel is one pixel in the window. The distance between the two pixels and is defined as where . The best distinction is achieved when and .

Sort all in a window in a descending order. If noise density %, then ROLD is the sum of the biggest 12 values sorted under a window size. Otherwise, it is the sum of the biggest 4 values that are sorted under a 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 [1835]. 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 [1835]. These steps can be expressed as follows.

Step 1. Organize all weights and thresholds together by sequence order, and generate 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 Step 4.

Step 3. According to the fitness degree, select individuals and produce new individuals according to certain crossover probability and mutation probability. Return to Step 2.

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 Step 1; 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 Step 5; 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 pixels and comprises many 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.

We 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 window where the size is ( is an odd value with a value of ≥3); its original size is , and its center is on the pixel of the image. If the central point is not a noise point, shift the window to make its central point be the next pixel of the image. Go to Step when the central point is a noise point. (2)Calculate the sum of unpolluted pixels in . If or , go to Step . If not, go to Step .(3)Resize , , and go back to Step .(4)Using unpolluted pixels, calculate the output using formula (3), and replace the noise pixel. Consider the following:where represents an unpolluted pixel value, with position and window center on . is the weight; a pixel is more important if it is closer to the noise point. Therefore,

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) [2226]. 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.

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, where is the total number of color components, is the total number of image pixels, and and are the th component of the noisy image pixel channel and its original value at pixel position “”, 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 Table 2.
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.

Experiment 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 Figure 3.
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.

Experiment 3. Add 90% noise density to “Barbara.” Use several algorithms, including the proposed algorithm, to filter these noised images, and show them in Figure 4. 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.

Experiment 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.

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.

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.

Conflict of Interests

The authors declare that they have no conflict of interests.

Authors’ Contribution

All authors drafted the paper, read, and approved the final paper.

Acknowledgments

This paper was funded under a grant from the National Natural Science Foundation of P.R. China (no. 61105115, no. 61075068, and no. 61172029), a major project to cultivate science and technology innovation from the Ministry of Education of China (no. 708045), Nanjing University of Information Science and Technology Research (no. 20070063), Open Project (KDX1102) of Jiangsu Key Laboratory of Meteorological Observation and Information Processing, National Department Public Benefit Research Foundation (GYHY200806017), and Industry-academic Joint Technological Innovations Fund Project of Jiangsu Province (2012t026).