Refer to a paper "an Ant colony optimization algorithm for image edge detection" to try to clarify the approximate process of ant colony optimization algorithm.
Ant colony Algorithm is a swarm intelligent algorithm, which mainly relies on random selection plus (objective function) to broaden the search ability of the solution. I personally think that this kind of group algorithm in the probability does not guarantee that the results are optimal, so there will be an uncontrolled. However, it has a strong representation ability, many problems can not be described by mathematical functions, with the help of swarm intelligence algorithm to solve the line skillfully, and can get a satisfactory solution, the other advantage of swarm intelligence algorithm is easy to achieve parallelization. 1. Initialize
In the initial case, ant colony algorithm randomly appears a certain number of ants to search for food. For example: In the Nrowxncol nrow\times ncol size of the image, randomly generated K (ant_total_num) only ants:
temp = rand (Ant_total_num, 2);
Ant_pos_idx (:, 1) = round (1 + (nrow-1) * TEMP (:, 1));
The pheromone that the ant carries during the movement is initially:
p = 0.0001. * Ones (Size (IMG)); 2. Structural Solutions
In the
Thesis, the solution to the problem of edge detection (which is also the reference basis for the next move-the transfer probability) is defined as:
P (N) (l,m), (i,j) = (Tau (n−1) i,j) α (ηi,j) β∑ (i,j) ∈ω (l,m) (Tau (n−1) I, j) α (Ηi,j) βp^{(n)}_{(l,m), (i,j)}=\frac{(\tau_{i, j}^{(n-1)}) ^\alpha (\eta_{i,j) ^\beta}{\sum_{(i,j) \in\omega_{(L, m)}} (\tau_{i, j}^{(n-1)}) ^\alpha (\eta_{i,j}) ^\beta}
Ω (l,m) \omega_{(l,m)} indicates the neighborhood of the current pixel (i,j), Ηi,j \eta_{i,j} is the heuristic information and the decision part that detects the edge.
Ηi,j \eta_{i,j} is defined in this article:
η (i,j) =1ZVC (ii,j),    Z=∑VC (i