You are on page 1of 5

A modified ACO algorithm for Image edge detection

Kesava Rao Seerapu1, R. Srinivas2


*(Department of CSE, AITAM TEKKALI, INDIA) Email: kesav546@gmail.com) (H-B-F), which is therefore automatically preferred by the ants and consequently all ants will follow the shortest path.The darkness of shade is approximately proportional to the amount of pheromone deposited by ants. Our method uses the ant colony system. The edge information in our proposed method is directly extracted by ACO and thus it finds the best solution of the above problem through the movements of a number of ants over the image space I iteratively, and there by constructing and updating the pheromone information. Suppose totally K ants are applied to find the solution in a image space I that consists of M1 M2 nodes (each pixel constitutes a node).

ABSTRACT
ANT colony optimization (ACO) is a meta-heuristic optimization algorithm , inspired by occurrence of the natural phenomenon [1],[2],that ants deposit pheromone in on their way in order to mark some favorable path that should be followed by other ants of the colony. ACO has been widely applied in various problems [7]-[16], like Traveling Sales Person(TSP).Number of ACO algorithms have been developed, such as ANT system, the Max-Min ant system [5], and the ant colony system .Now we apply ACO on image edge detection problem, where our aim is to extract the edge information from the image. The ACO approach utilizes a number of artificial ants, which move on the image driven by the variation in intensity values of image, to form a pheromone matrix, which represents the edge information at each pixel location of the image

I. INTRODUCTION
The source of ACO algorithms are real ant colonies. Ants often find the shortest path between a food source and the nest of the colony. In order to exchange information about which path should be followed, ants communicate with each other by means of a chemical substance called pheromone. As ants move, a certain amount of pheromone is dropped on the ground, creating a pheromone trail. The more ants follow a given trail, the more attractive that trail becomes to be followed by other ants. This process involves a loop of positive feedback, in which the probability that an ant chooses a path is proportional to the number of ants that have already passed by that path. Hence, individual ants, following very simple rules, interact to produce an intelligent behavior at the higher level of the ant colony. Let H be home, F be food source, and A-B be an obstacle in the route. (a) at time t=0, ants choose left and right side paths uniformly in their search for food source. (b) at time t=1, ants which have chosen the path F-B-H reach the food source earlier and are retuning back to their home, whereas ants which have chosen path H-A-F are still halfway in their journey to the food source. (c) at time t=2, since ants move at approximately constant speed, the ants which chose the shorter, right side path (H-B-F) reach the home faster, depositing more pheromone in H-B-F route. (d) at time t=4, pheromone accumulates at a higher rate on the shorter path

Fig 1: Illustration of ant colony principle Below is the procedure for ACO [4] K= Max(M1,M2) ie number of ants assigned to K Initialize the positions of all K ants and the pheromone matrix (0) . For the construction-step index n = 1 : N , For the ant index k = 1 : K, move the k-th ant according to a probabilistic transition matrix p(n) for L - steps Update the pheromone matrix (n) . Make the decision according to the final pheromone matrix (N ) .

ACO method mainly depends upon of the probabilistic transition matrix p(n) and the update of the pheromone matrix (n), below we discuss about pheromone matrix and the probabilistic transition matrix. First, the k-th ant in the nth construction-step moves from the node i to the node j. The movement is in accordance with probabilistic action rule and is given by

A. Initialization of positions and pheromone matrix each of the K ants are randomly assigned some positions on an image I , each pixel of which can be treated as a node. The initial value of each component of the pheromone matrix (0) is set to be a constant B. Construction one ant is randomly selected from total K ants in the nth step, and it will consecutively move on the image for L movement-steps. This ant moves from the node (l, m) to its neighboring node (i, j) and this movement is governed by transition probability that is defined as

(i,j) is the amount of pheromone on edge i,j is a parameter to control the influence of (i,j) (i,j) is the desirability of edge i,j is a parameter to control the influence of (i,j) The constants and represent the influence of pheromone information and heuristic information, respectively , (i,j) (n-1) is pheromone information value of the arc where (i,j) linking the node i to the node j. i is the neighborhood nodes for the ant k given that it is on the node i;. (i,j) represents the heuristic information for going from node i to node j, which is same for each constructionstep and the pheromone matrix needs to be updated twice during the ACO procedure. The first update is performed after the movement of each ant within each constructionstep. Pheromone matrix is updated as

The main issue in the construction process is the determination of the heuristic information (i,j). Which is determined by the local variations at the pixel position (i, j) as

where is the evaporation rate, the determination of best tour is subject to the user-defined criterion, it could be either the best tour found in the current construction-step, or overall algorithm from start, or a combination of both of the above two. The next update is performed after all the K ants move within each construction-step, here the pheromone matrix is updated as

is the intensity value of the pixel at the position (i, j) of the image I, the function Vc is a function of a local group of pixels and its value depends on the variation of images intensity values of those pixels. The following functions are considered in our method to determine heuristic information.

(n) = (1 ) (n1) + (0)


where is the pheromone decay coefficient. Next we need to determine the allowable range of the ants movement, it is either the 4-connectivity neighborhood or the 8-connectivity neighborhood, both of which are demonstrated in the below figure

II. PROPOSED ACO BASED I MAGE E DGE D ETECTION


ACO based image edge detection method utilize a number of ants to move on image space I for constructing a pheromone matrix, the content of which represents the edge information at each pixel location of the image and also the movements of the ants are guided by the local variation of the images intensity values. In the above method we initialize parameters, and then construct the pheromone matrix by iteratively performing both the construction and the updation. Finally, the decision is performed to determine the edge. Each of this process is presented in detail as follows, respectively.

Fig 2 (a) 4- connectivity neighborhood C. Update pheromone matrix (b) 8- connectivity neighborhood

The pheromone matrix is to be updated twice.

The first update is performed after the movement of each


ant within each construction-step. Each component of the pheromone matrix is updated according to the following equation(if (I,j) belongs to the best tour)

where is evaporation rate , i,j(k) is determined by the heuristic matrix that is, i,j(k)= (i,j) . The second update is carried out after all the ants move ,within each construction-step according to

(n) = (1 ) (n1) + (0) ,


where is decay constant. The decision is needed to judge the edge information from the pheromone matrix and it is made at each pixel location to determine whether it is edge or not, by applying a threshold T on the final pheromone matrix (N ) . The initial threshold T (0) is selected as the mean value of the pheromone matrix. Next, the entries of the pheromone matrix is classified into two categories according to the criterion that its value is lower than T (0) or larger than T (0).Then the new threshold is computed as the average of two mean values of each of above two categories. The above process is repeated until the threshold value does not change any more. The above procedure is summarized as follows. 1: Initialize as and set the iteration index as l = 0. 2: The pheromone matrix (N ) is divided into two class using T (l) , the fist class consists entries of that have smaller values than T (l) , while the second class consists the rest entries of .Next, calculate the average of each of the above two categories by PARAMETERS K =MAX(M1, M2 ) number of ants K is equal to maximum value between M1 and M2 init = 0.0001: the initial value of each component of the pheromone matrix. = 1: the weighting factor of the pheromone information in (4). = 0.05: the weighting factor of the heuristic information in (4).

: Set the iteration index l = l + 1, and update the threshold as

4: If |T (l) T (n1) | > , then go back to Step 2 otherwise, the iteration process is stopped and a decision is made on each pixel position (i, j) to determine whether it is edge (i.e., Ei,j = 1) or not (i.e., Ei,j = 0), based on the user defined criterion

III. EXPERIMENTAL RESULTS


Experiments are conducted to evaluate the performance of the proposed approach using two functions

Fig 3. Input image of size 128X128

a nonstationary Markov modeling, IEEE Trans. on Image Processing, vol. 16, pp. 865878, Mar. 2007. [15] A. T. Ghanbarian, E. Kabir, and N. M. Charkari, Color reduction based on ant colony, Pattern Recognition Letters, vol. 28, pp. 1383 1390, Sep. 2007.

Fig 4a. Output with f(x) =x Fig 4b. Output with f(x) =

REFERENCES
[1] M. Dorigo and S. Thomas, Ant Colony Optimization. Cambridge: MIT Press, 2004. [2] H.-B. Duan, Ant Colony Algorithms: Theory and Applications. Beijing: Science Press, 2005. [3] M. Dorigo, V. Maniezzo, and A. Colorni, Ant system: Optimization by a colony of cooperating agents, IEEE Trans. on Systems, Man and Cybernetics, Part B, vol. 26, pp. 2941, Feb. 1996. [4] M. Dorigo, M. Birattari, and T. Stutzle, Ant colony optimization, IEEE Computational Intelligence Magazine, vol. 1, pp. 2839, Nov. 2006. [5] T. Stutzle and H. Holger H, Max-Min ant system, Future Generation Computer Systems, vol. 16, pp. 889 914, Jun. 2000. [6] M. Dorigo and L. M. Gambardella, Ant colony system: A cooperative learning approach to the traveling salesman problem, IEEE Trans. On Evolutionary Computation, vol. 1, pp. 5366, Apr. 1997. [7] M. Dorigo, G. D. Caro, and T. Stutzle, Special Issue on Ant Algorithms, Future Generation Computer Systems, vol. 16, Jun. 2000. [8] O. Cordon, F. Herrera, and T. Stutzle, Special Issue on Ant Colony Optimization: Models and Applications, Mathware and Soft Computing, vol. 9, Dec. 2002. [9] M. Dorigo, L. M. Gambardella, M. Middendorf, and T. Stutzle, Special Issue on Ant Colony Optimization, IEEE Transactions on Evolutionary Computation, vol. 6, Jul. 2002. [10] H. Zheng, A. Wong, and S. Nahavandi, Hybrid ant colony algorithm for texture classification, in Proc. IEEE Congress on Evolutionary Computation, Canberra, Australia, Dec. 2003, pp. 26482652. [11] D. Martens, M. D. Backer, R. Haesen, J. Vanthienen, M. Snoeck, and B. Baesens, Classification with ant colony optimization, IEEE Trans. on Evolutionary Computation, vol. 11, pp. 651665, Oct. 2007. [12] R. S. Parpinelli, H. S. Lopes, and A. A. Freitas, Data mining with an ant colony optimization algorithm, IEEE Trans. on Evolutionary Computation, vol. 6, pp. 321 332, Aug. 2002. [13] S. Ouadfel and M. Batouche, Ant colony system with local search for Markov random field image segmentation, in Proc. IEEE Int. Conf. on Image Processing, Barcelona, Spain, Sep. 2003, pp. 133136. [14] S. L. Hegarat-Mascle, A. Kallel, and X. Descombes, Ant colony optimization for image regularization based on

You might also like