Advances on image interpolation based on ant colony algorithm

This paper presents an advance on image interpolation based on ant colony algorithm (AACA) for high resolution image scaling. The difference between the proposed algorithm and the previously proposed optimization of bilinear interpolation based on ant colony algorithm (OBACA) is that AACA uses global weighting, whereas OBACA uses local weighting scheme. The strength of the proposed global weighting of AACA algorithm depends on employing solely the pheromone matrix information present on any group of four adjacent pixels to decide which case deserves a maximum global weight value or not. Experimental results are further provided to show the higher performance of the proposed AACA algorithm with reference to the algorithms mentioned in this paper.

blurring artefacts which make the interpolated image look smoother than the original, thus reducing its resolution. As a solution, we propose a global weighting scheme which employs the pheromone matrix information solely, present on any group of four adjacent pixels, to decide which case deserves a maximum global weight value or not. This paper is organized as follows: first section is the "Background"; second section introduces the "Ant colony (optimization) algorithm"; third section presents "The proposed global weighting scheme"; fourth section gives the "Experimental results" and last section the "Conclusion and recommendations". Dorigo and Gambardella (1997) introduced modifications in ant system (AS) to increase its performance (Dorigo et al. 1991), and be able to find a very good solution to difficult optimization problems. Such modifications are: (a) a different transition rule; (b) different pheromone trail updating rules: global and local; and (c) a candidate list to restrict the choice of the next node to visit (Dorigo and Gambardella 1997), (Dorigo and Stutzle 2004). Figure 1 shows an ant arriving in node i, while Table 1 shows the pseudocode of the implementation process. As shown in Fig. 1, the ant chooses the next node to move to as a function of the pheromone values τ i,j and the heuristic values η i,j on the arcs connecting node i to the nodes j the ant has not visited yet.

Ant colony optimization state transition rule
The next node is chosen among the non-visited nodes according to the following pseudorandom proportional rule, in which the transition probability depends on a random variable q that is uniformly distributed over [0, 1] and a control parameter q 0 (0 ≦ 0 ≤ 1) If q ≤ q 0 , then the transition that maximizes τ i,j (η) β is chosen otherwise, and the probabilistic decision rule, Eq. (1) with α = 1, is used. The value of q 0 determines the degree of exploration of the ants: with probability q 0 , the ant chooses the transition with the highest τ i,j (η) β , while with probability 1 − q 0 , it performs a biased exploration of the edges.
else (Exploration) Fig. 1 The selection of the node The balance between biased exploration and pheromone exploitation can be tweaked by adjusting the value of q 0 .
In Eq. (1), τ i,j is the amount of pheromone deposited for transition from state i to state j. α ≥ 0 and β ≤ 1 are parameters to control the influence of τ i,j and η i,j , respectively. η i,j is the desirability of the state transition i, j and is equal to 1/d i,j where d is the distance in Traveling Salesman Problem (TSP). The k i represents an acceptable neighborhood for an ant k while being at city i (here, the probability of selecting a city outside acceptable neighborhood is zero).

Local updating
Ants use a local pheromone update rule after leaving the arc (i, j) during the construction process as follows: where ϕ, (0 < ϕ < 1), τ i,j is the current value of the pheromone trails at i, j, and τ 0 is the initial value for the pheromone trails.

Global updating
The best ant reinforces its tour by depositing additional pheromone trails along the tour length where �τ bs i,j = 1/C bs (here, C bs is the best-so-far tour) and ρ represent the pheromone evaporation. For this case, the computational complexity is reduced from ∂(n 2 ) to ∂(n) (where n is the instance being solved) by only performing the pheromone updates to the arc of T bs (not to all arcs as in ant system).
(1) Apply the global updating rule using the best visited pixels' pheromones end Decide a global weight based the best visited pixel's pheromone information

Ant colony optimization candidate list
A candidate list is a list of preferred cities to visit. Instead of examining all the cities, non-visited cities are examined first. This list is ordered by increasing distance and helps to select the next city when other cities have been visited. Tian et al. (2011) proposed a wavelet-based technique, employing ant colony optimization, for image interpolation. Firstly, a J-level wavelet decomposition was applied on the input low-resolution image. The proposed TCEM model was used to formulate the statistical distribution of the above J-level wavelet coefficients and the model parameters of the proposed TCEM model were estimated using the ant colony optimization. The distribution of the desired high-pass filtered wavelet coefficient in the 0th level subband was estimated and then generated the 0th level wavelet coefficients. Finally, the (J + 1)-level inverse wavelet transform was applied to produce the final reconstructed image. Experiments, using grayscale test images, were conducted to compare the performance of the proposed approach with that of algorithm mentioned. However, the basic wavelet based technique idea used in Tian et al. (2011) is beyond the scope of this paper. Rukundo et al. (2011) applied ant colony optimization pheromone information to supplement the bilinear isotropic weighting scheme in order to achieve improved (or higher) resolution results. Here, ant colony optimization was used to construct the pheromone matrix and then find the pixels on which more pheromone information was deposited. This pheromone matrix information was used to strengthen the traditional bilinear algorithm weighting scheme shown in Eq. (4).

Previous works on ant colony optimization for image interpolation
where (x, y) represents the coordinates of unknown-value location, (u, v), (u + 1, v), (u, v + 1), and (u + 1, v + 1) are coordinates of each of the four (known-value) pixels surrounding (x, y) location.
Our previous OBACA algorithm used the pheromone matrix information (obtained after both updates were performed), to create additional but necessary weights. In other words, the pheromone matrix information was assigned on every pixel with reference to the neighboring pixels intensity variations. The pheromone information attached to each pixel became its weight, to locally supplement the traditional bilinear weighting scheme, as shown in Eq. (6), where p 4 , p 2 , p 3 , p 1 represent the pheromone information at (u, v), (u + 1, v), (u, v + 1) and (u + 1, v + 1), respectively. In this way, OBACA achieved higher PSNR or image quality when compared to that of the traditional bilinear. However, it could not avoid the influence of isotropic weighting of the conventional bilinear which is responsible for smoothing/blurring the output/interpolated images, thus reducing their resolutions.
(4) P x,y = w 4 P u,v + w 2 P u,v+1 + w 3 P u+1,v + w 1 P u+1,v+1 This is the aim of our research to develop a global weighting scheme whose basic function is shown by Eq. (7), where w g the global weight produced by ant colony optimization algorithm.
Furthermore, the developed weighting scheme considers "the characteristics of pheromone information locality" in order to assign that global weight thus achieves a higher resolution image interpolation.

The proposed global weighting scheme
As shown by Eq. (7), w g is the global weight which is applied to a group of pixels surrounding directly an unknown-value location. This global weight is a function of pheromone matrix information on that/each group of four pixels (see Fig. 2b). Now, the problem is how to find the pheromone information present on each group. To solve this problem, we started by constructing the pheromone matrix and then we checked possibilities of the partial or full simultaneous presence of the pheromone trails information at the four pixels/locations surrounding directly the unknown-value location P x,y .

Pheromone matrix construction
Initially a pheromone value τ init is assigned to every pixel location (see Fig. 3a) and, ants are randomly distributed on image before moving artificial ants for a certain number of steps on that image.
The ants' movements are/will be steered by the intensity variation of the grayscale pixels (within a permissible range of 8-connectivity neighborhood around P (i,j) , as shown in Fig. 3b.
The nth ant's move from a departing pixel's position i 0 , j 0 located within acceptable (8-connectivity) neighborhood depends on the attractiveness η i,j of any adjacent pixel [e.g.i, j] and the pheromone trail information τ (n−1) i,j on it. Therefore, an ant will make a (7) P x,y = w g w 4 P u,v + w 2 P u,v+1 + w 3 P u+1,v + w 1 P u+1,v+1 Fig. 2 a Lenna image. b Example of a two-dimensional representation with the pheromone information P assigned on each image pixel location nth move from any pixel i 0 , j 0 to an adjacent pixel (i, j) according to the pseudorandom proportional rule. The transition probability will be given by Eq. (8) where τ (n−1) i,j is the pheromone value on the pixel (i, j); � (i 0 ,j 0 ) is an acceptable neighborhood for the pixel (i 0 , j 0 ); η i,j is the heuristic information on the pixel (i, j); the pheromone and heuristic information constants α and β are always positive. Each time an ant visits a pixel, it automatically performs a local update on the adjacent pixel. The amount of pheromone on the pixel (i, j) at the nth iteration, τ (n) i,j is calculated using the local pheromone update Eq. (9) where ϕ ∈ [0, 1] is the pheromone decay coefficient. In each iteration, the pheromone trail value changes because local updates are provided together with the solution construction process. As mentioned, the ant's permissible range of movements is situated within the 8-connectivity neighborhood, see Fig. 3b. An ant can move to an adjacent pixel on the condition that it moves to a pixel that was not recently visited by any other ants. This condition is backed by an artificial memory assigned to each ant so that it can keep records of every visited pixel. After all ants have completed the construction process, a global pheromone update is performed only on the pixels that have been visited by at least one ant according to Eq. (10) i,j is the amount of pheromone deposited by the kth ant on the pixel (i, j). This amount �τ (k) i,j is equal to the average of heuristic information associated with the pixels that belong to the tour of the kth ant if the pixel (i, j) was visited by the kth ant in its current tour, otherwise the amount �τ (k) i,j = 0; ρ is the pheromone evaporation rate; K is the number of ants which can be determined by Eq. (11).
As the value for �τ (k) i,j depends on the heuristic information, η i,j at the (i, j) can be given by Eq. (12) where P (i,j) is the intensity value of a pixel at (i, j), V max is the normalization factor; V c (P i,j ) is the function that operates on the 8-connectivity pixels neighborhood. The value of that function depends on the variation of the pixel's intensity values and can be given by Eq. (13)

Max and mean global weighting scheme
This is a very important step of our proposed algorithm. The max function returns the greatest element value in a data set whereas the mean returns the average of elements values. Equation (10) gives the pheromone value or level on mostly visited pixel locations. However, it has been experimentally upgraded to Eq. (14) in order to yield viewable results.
Intuitively, assigning a direct the global weight, as shown by Eq. (7), would not permit to reduce the low-pass filtering process which reduces image resolution. However, in order to achieve higher resolution or quality image interpolation, we have introduced a weighting scheme which employs solely the Eq. (14) pheromone information, present on any group of four adjacent pixels, to decide which interpolated pixel that needs the maximum global weight or not. Now, with reference to Fig. 4 and Eq. (12), we can estimate the desirability of an ant to select the next pixel using the function V c (P i,j ).
For instance, Fig. 4 shows that an ant belonging to the upper left black pixel dot 30 (15), where 30 is the pixel value and 15 is V c (P i,j ) value, has eight choices in which the best one (i.e. one having the highest V c (P i,j ) value) is acceptable, if and only if it has not been chosen by any (other) ants. In this way, the ant will follow the blue, purple or green arrows depending on where it was initially put or randomly distributed. Their moves along those arrows shows that the pheromone information can be present (at least) at three, two and one locations in a group (of four pixels), because every time an ant moves, it drops the pheromone trails on the visited pixel or location.
Now, the next problem is how reasonably to assign the global weight in each (simultaneous pheromone trails presence) case. To settle this, we label p 1 , p 2 , p 3 and p 4 as the pheromone information on each pixel position surrounding directly the unknown-value location P x,y shown in Fig. 5, and that A, B, C and Dare different levels or value that p 1 , p 2 , p 3 and p 4 can have. Let us now make S a set containing the pheromone trails information p 1 , p 2 , p 3 and p 4 as shown by Eq. (15).
(15) S = [p1, p2, p3, p4]  In order to reduce reasonably the low-pass filtering process in our algorithm we used max and mean functions to assign reasonably the global weight with reference to possible partial or full simultaneous presence of the pheromone trails information at the four locations surrounding directly the unknown-value location P x,y .
Assumption 1 When p 1 = p 2 = p 3 = p 4 = A (all pheromone trails information around P x,y have the same level).

And
Here, there is no special requirement for assigning the highest level of pheromone trails. Therefore, any of two weighting procedures can be used, my experimental choice is given by Eq. (18) Assumption 2 When p 1 = p 2 = p 3 = A and p 4 = B (one of the four pheromone trails information around P x,y has a different level).

And
Here, a highest level of pheromone trails can be assigned reasonably only when p 3 > p 4 , since it is only in this case where you can find one location having the lowest pheromone trail level. For this reason, the global weight is given by Eq. (21) Assumption 3 When p 1 = p 2 = A, p 3 = C and p 4 = B(only two of the four pheromone trails information around P x,y have the same level).

And
A highest level of pheromone trails can be assigned reasonably only when p 2 > p 3 & p 2 > p 4 , because it is in this case where you can only find a biggest number of locations with the highest pheromone trail level, at the same time. Therefore, the max weighting is given by Eq. (24) Assumption 4 When p 1 = A, p 2 = D, p 3 = C and p 4 = B (all pheromone trails information around P x,y have different levels).

And
Here, a mean-based weighting procedure is preferable in order to avoid any possible influence of a strong noise intrusion. Therefore, the global weight is given by Eq. (27) Assumption 5 When p 1 = p 2 = A, p 3 = p 4 = B (every two pheromone trails information around P x,y have the same level).

And
A highest level of pheromone trails can be assigned reasonably only when p 2 > p 3 &p 2 < p 3 and therefore, the max weighting is given by Eq. (29)

Parameter selection
The ant colony optimization has many parameters that need to be properly selected in order to increase the strength of the proposed algorithm. In this regard, the proper selection of parameters α and β helps to determine the relative influence of the pheromone trail and the path visibility. Information in image content is always more important than in pheromone trail, thus, β > α is a general selection and our experiments adopt α = 1, β = 2 as in Tian et al. (2011). Other parameters such as τ init , ϕ and ρ determine the pheromone trail change, where τ init is the initial value for the pheromone trails and this value is always non-zero though very close to zero. ϕ and ρ are adaptation parameters. Our experiment adopt τ init = 0.0001, ϕ = 0.00001 and ρ = 0.1. Finally, the number of iterations, ants and memory size are also important parameters which deserve a proper selection. Note that a large number of iterations tend to increase the image edges sharpness but at very high computational load plus a possibility of generating too many false edge pixels. Furthermore, with a higher number of iterations, the change in image quality is not significant as it can be imagined intuitively. Artificial ant's memory size can be determined by Eq. (31) to ensure that each ant is assigned a big enough memory to record all 'visitable' pixels.
Experimentally, we found that the number of iterations ranging from 1 to 10, the number of ants given by Eq. (11) and the memory size given by Eq. (31) are adequate parameter values for yielding interpolated images in their most pleasant way within a tolerable computational load. Figure 6 shows a summary of the proposed AACA algorithm. The proposed algorithm includes two important steps namely, the pheromone matrix construction and global weighting scheme.

Summary of the proposed algorithm
The proposed approach provides better results than our previously proposed methods as well as the interpolation algorithms mentioned in this paper. The novelty in this approach is a weighting scheme involved in its process. This scheme is based on global weight assignment rather than local. It uses the max and mean functions to adapt adequately the global weight to an interpolated pixel with reference to partial or full simultaneous presence of the pheromone trails information (at the four locations). This is done to reduce reasonably the low-pass filtering process thus achieve a HR image interpolation.

Experimental results
This section presents the results from the experiments conducted. The performance of the proposed approach was compared with that of the previous works, two traditional (31) Memory size = m * n K Fig. 6 Summary of the proposed algorithm interpolation algorithms executed by MATLAB toolbox and new edge directed interpolation algorithm proposed/whose details are given in Li and Orchard (2001

Conclusions and recommendations
An advance on image interpolation based on ant colony algorithm has been presented in this paper. Unlike our previous OBACA algorithm, which employed a local weighting scheme, the presented AACA algorithm used however a novel global weighting scheme. The strength of the proposed global weighting depended on employing solely the pheromone matrix information, present on any group of four adjacent pixels, to decide which case deserves a maximum global weight value or not. The use of max and mean global weight values has shown that the proposed AACA algorithm is able to reduce the interpolation errors with reference to the original image. This was proved by the experiments conducted on full and partial Cameraman, Lenna, Lake and Peppers test images. More