An Image Filter Based on Shearlet Transformation and Particle Swarm Optimization Algorithm

Digital image is always polluted by noise and made data postprocessing difficult. To remove noise and preserve detail of image as much as possible, this paper proposed image filter algorithm which combined the merits of Shearlet transformation and particle swarmoptimization (PSO) algorithm. Firstly, we use classical Shearlet transform to decompose noised image intomany subwavelets under multiscale and multiorientation. Secondly, we gave weighted factor to those subwavelets obtained. Then, using classical Shearlet inverse transform, we obtained a composite image which is composed of those weighted subwavelets. After that, we designed fast and rough evaluation method to evaluate noise level of the new image; by using this method as fitness, we adopted PSO to find the optimal weighted factor we added; after lots of iterations, by the optimal factors and Shearlet inverse transform, we got the best denoised image. Experimental results have shown that proposed algorithm eliminates noise effectively and yields good peak signal noise ratio (PSNR).


Introduction
Images are frequently contaminated by noise on the processes of formation, transmission, and reception and make following processes such as segmentation, recognition difficult.This phenomenon makes noise reduction one of the most important problems in image processing.
Basically, there are three common methods to solve this problem, such as transform domain method [1,2], spatial domain method [3], and partial differential equations (PDE) [4] method; here, our work is one branch of transform domain method.In transform domain method, because of its good performance in both time domain and frequency domain, wavelet transform has become one of the most active research fields in image enhancing.In this field, multiscale geometric analysis theory is the hottest and the most advanced research area.Under this theory, many famous achievements are proposed, for example, ridgelet [5], curvelet [6], contourlet [7], and bandlet [8].However, with these achievements, there are also many problems to overcome.
Recently, Labate et al. proposed a novel class of multidimensional representation systems, which is called Shearlet.One advantage of this approach is that these systems can be constructed using generalized multiresolution analysis and implemented efficiently using a classical cascade algorithm [1,[9][10][11][12][13][14][15].Due to the fact that Shearlet transforms have multiscale and multidirection feature, simple hard threshold denoising method could not yield bad performance in its practical application of image denoising [16].Fan and Zhao [17][18][19] researched the problem of how to calculate the best threshold in this denoising method; they proposed a good idea that used optimal algorithm to get best threshold, but, in their papers, they did not research the fitness function.We hold this opinion that this last step is worth studying and the finding has theoretical value and practical directive meaning.
Among many optimal algorithms [20][21][22][23][24][25][26][27][28][29][30][31][32][33], PSO algorithm has been the most famous global optimization algorithm which is based on swarm intelligence.And it is easy to be realized and already applied to many fields.In this paper, 2 Mathematical Problems in Engineering we adopted PSO algorithm to optimize the problem we mentioned above.In this process, as an important part of PSO algorithm, an objective fitness function should be built to evaluate quality of reconstructed image, so we adopted a fast and rough method to evaluate noise level of image, and this method is just asked to be able to reflect the change trend of noise level in image.Many experiments data have shown that proposed algorithm can achieve better performance than classical Shearlet transform, but like all optimization algorithms, it also has drawback of slow computation speeds.
The remaining paper is organized as follows.Section 2 introduces related theories.Section 3 explains our algorithm, including workflow, Section 4 presents the experiment results of proposed algorithm, and Section 5 concludes this paper.

Particle Swarm Optimization Algorithm.
The classical PSO algorithm is described as follows [34].
Step 1. Initialize a population of particles with random positions and velocities in a -dimension problem space.
Step 2. For each particle, evaluate its fitness value.
Step 3. Compare each particle's fitness evaluation with the current particle's pbest.If current value is better than pbest, set its pbest value to the current value and the pbest location to the current location in -dimensional space.
Step 4. Compare fitness evaluation with the population's overall previous best.If current value is better than gbest, then reset gbest to the current particle's array index and value.
Step 5. Change the velocity and position of particle according to Step 1 and Step 2, respectively: Step 6. Loop to Step 2 until a stopping criterion is met.

The vector 𝑥
is the velocity of the th particles, and   = [ 1 ,  2 , . . .,   ]  is the best previous position (the position giving the best fitness value) of the th particles.The index  is the index of the best particle among all the particles in the swarm.Variable  is the inertia weight,  1 and  2 are positive constants, and rand is random number in range [0, 1] generated according to a uniform probability distribution.Particles' velocities along each dimension are clamped to a maximum velocity  max .If the sum of acceleration causes the velocity on that dimension to exceed  max , which is a parameter specified by the user, then the velocity on that dimension is limited to  max .
The inertia weight  represents the degree of the momentum of the particles.The second part is the "cognition" part, which represents the independent behavior of the particle itself.The third part is the "social" part, which represents the collaboration among the particles.The constants  1 and  2 represent the weighting of "cognition" and "social" parts that pull each particle towards pbest and gbest positions.

Proposed Algorithm
This chapter is divided into 3 parts.Section 3.1 introduced the new threshold rule we designed which is based on classical Shearlet theory.And the fitness function we quoted is shown in Section 3.2.Then, our all algorithm workflow (Figure 1) is detailed and introduced in Section 3.3.

Threshold Rule.
Threshold rule is the most important problem in image denoising of transform domain, and the hard threshold and the soft-threshold approach are two options.Fan et al. [18] proposed a threshold rule: Here,  is the pixels number of image and  is noise level.
Research shows that Fan et al. threshold is not the optimal threshold.Considering this, Fan et al. [18] proposed improved threshold rules: All formula (9) and formula (10) are intended to get better denoising performance by setting good threshold to each subwavelet, but they can not find the best threshold.Based on this idea, here, we proposed a new idea that adopts optimization algorithm to find the best performance; that is, give weighted factor to each subwavelet; then, use PSO algorithm to find the best factors.
However, in optimization algorithm, the key problem is how to design an objective and good fitness.[17][18][19] proposed the way to get best threshold by optimal algorithm, but in their papers, they did not introduce where to get fitness function.

Fitness Function. Fan and Zhao
Wang [35] proposed a fast and rough evaluated method to noise level of noisy image, and we used as our fitness parameter of PSO algorithm.We defined our fitness as follows: where   is estimate of signal intensity in image and ∂ is estimate of noise intensity in image.Define (, ) as an unpolluted gray image with size of  × , and define an area ]}; with the same form, we can define a noisy image (, ) as follows: where (, ) is noise model; in this paper, it is Gaussian noise model.From formula (12), we designed and evaluated methods of   and ∂ : Here, let us suppose the classical Gaussian filter is perfect; its output is noiseless, so we can suppose the median data of signal to be the estimate of signal intensity in image.
Then, we suppose signal in image is at low frequencies, and  grad is perfect; its output is signal-free totally, so we can suppose the standard variance ∂ in image to be the estimate of noise intensity in image: Here, std(⋅) is standard variance.
Based on this definition of fitness, we proposed our algorithm.algorithm which adopts PSO algorithm to decide coefficients  , of each subwavelet  , in different scale and direction of Shearlet transform, intended to get optimal denoising performance.

Proposed
Our algorithm main routine is as follows.
Step 1. Use classical Shearlet transform to decompose noised image into many pieces under multiscale and multiorientation, get subwavelet  , ,  is scale, and  is direction.
Step Step 3. Output the best image  op which is reconstructed by Our PSO subroutine is shown as follows.
Step 1. Initialize a population of particles with random positions and velocities.
Step 3.For each particle, reconstruct image  ite by   , .
Step 4. For each  ite , evaluate its fitness by formula (11).
Step 5. Compare each particle's fitness evaluation with the current particle's pbest.If current value is better than pbest, set its pbest value to the current value and the pbest location to the current location in 2-dimensional space.
Step 6. Compare fitness evaluation with the population's overall previous best.If current value is better than gbest, then reset gbest to the current particle's array index and value.
Step 7. Change the velocity and position of particle, respectively: Step 8. Loop to Step 2 until a stopping criterion is met.If one stopping condition in the following is satisfied, go to Step 9; if not, return to Step 2.
(i) Maximum iterations are exceeded.
(ii) The optimal target value is achieved.

Experimental Results and Analysis
4.1.Fitness Function Performance Test.For the sake of evaluating the performance of fitness function in proposed algorithm, we added Gaussian noise in several classical images with different variance and then calculated their fitness function data and plotted in Figure 2.
In Figure 2, as we can see from this output, despite the existence of some small fluctuation, those lines can basically reflect the trend that image's quality is moving in the worse direction, and that is exactly what we need in our optimal algorithm.
These two images are 512 * 512 pixels, and the test platform is window 7, Matlab 2012a; CPU is i7-3770 3.4 GHz, 16 G RAM.By using "tic" and "toc" function, its average elapsed time is 0.001612 seconds, so this fitness function can be calculated very fast.
Based on the above, we can draw a conclusion that this fitness function (formula (11)) is able to be applied in our algorithm basically.

Total Algorithm Performance Test.
In order to validate the performance of this algorithm, 4 images were filtered by proposed algorithm and classical Shearlet algorithm that we downloaded code from website [36].These 4 test images are head MRI (Figure 3(a)), baboon (Figure 3(b)), Barbara (Figure 3(c)), and brain MRI (Figure 3(d)) image; we added different noise level into them, filtered these noisy images by two algorithms, and listed their filtered results PSNR (peak signal noise ratio) in Figure 2. Here, PSNR has the same classical definition in [3]; it has no relationship with SNR  which we defined by ourselves.
Figures 3(e), 3(g), 3(i), and 3(k) are comparison charts of two algorithms PSNR output and we can see that all red line is higher than all blue line totally, though all two lines are similar.In order to get a better view, we listed these differences of two-group data by bar charts of Figures 3(f), 3(h), 3(j), and 3(l).From these bar charts, we can directly find that our proposed algorithm is better than classical Shearlet algorithm, and this better performance will decrease when noise level is higher.So the result of these experiments data had shown that our proposed algorithm has better denoising performance than classical Shearlet algorithm, and this advantage will decrease when noise level increased.

Mathematical Problems in Engineering
To show the "improved PSNR" data in Figure 3 better, Table 1 is show; in this table, from those average data, we can see that our algorithm has good performance, but those worst data reflect our algorithm that has drawback; we guess that is caused by the small fluctuation of our fitness function.
In all above experiments, 9 main PSO algorithm's parameters adopted are shown in Table 2.

Conclusions
In order to eliminate Gaussian noise and preserve image details as much as possible, this paper proposed a novel image filter algorithm which combined merit of PSO algorithm and classical Shearlet transform.It decomposes noised image into many subwavelets under multiscale and multiorientation by classical Shearlet transform; design a fitness functions in PSO and give weighted factors to each subwavelet; use PSO to  find optimal weighted factors; after that, reconstruct new and denoised image.It has two contributions: one is proposing PSO to optimal Shearlet transform and another is quoting a rough, objective, fast fitness function to measure images quality.Computer simulations results are given to verify the effectiveness of this algorithm.

Table 1 : 3
Improved PSNR of Figure

Figure 2 :
Figure 2: Performance of our fitness function.

6 XFigure 3 :
Figure 3: Comparison chart of two algorithms on some images.
Algorithm.The most critical problem is how to find the best weighted factor  , .Here, we proposed our