Ant Algorithms for Adaptive Edge Detection

Edge detection is a pre-processing step in applications of computer and robot vision. It transforms the input image to a binary image that indicates either the presence or the absence of an edge. Therefore, the edge detectors represent a special group of search algorithms with the objective of finding the pixels belonging to true edges. The search is performed following certain criteria, as the edge pixels are found in regions of an image where the distinct intensity changes or discontinuities occur (e.g. in color, gray-intensity level, texture, etc.).


Introduction
Edge detection is a pre-processing step in applications of computer and robot vision.It transforms the input image to a binary image that indicates either the presence or the absence of an edge.Therefore, the edge detectors represent a special group of search algorithms with the objective of finding the pixels belonging to true edges.The search is performed following certain criteria, as the edge pixels are found in regions of an image where the distinct intensity changes or discontinuities occur (e.g. in color, gray-intensity level, texture, etc.).
In applications domains such as robotics, vision-based sensors are widely used to provide information about the environment.On mobile robots, images from sensors are processed to detect and track the objects of interest and allow safe navigation.The purpose of edge detection is to segment the image in order to extract the features and objects of interest.No matter what method is applied, the objective remains the same, to change the representation of the original image into something easier to analyze.Digital images may be obtained under different lighting conditions and using different sensors.These may produce noise and deteriorate the segmentation results.
In recent years, algorithms based on swarming behavior of animal colonies in nature have been applied to edge detection.Swarm Intelligence algorithms use the bottom-up approach; the patterns that appear at the system level are the result of local interactions between its lower-level components [2].The initial purpose of Swarm Intelligence algorithms was to solve optimization problems [7], but recent studies show they can be a useful image-processing tool.The emerging properties inherent to swarm intelligence make these algorithms adaptive to the changing image patterns.This is a useful feature for real-time image processing.
digital images, pixels define the discrete space in which the artificial ants move and the edge pixels represent the food.The edge detection operation is performed on a set of grayscale images.The first proposed method extracts the edges from the original grayscale image.The second method finds the missing broken-edge segments and can be used as a complementary tool in order to improve the edge-detection results.Finally, the study on the adaptability of the first edge detector is performed using a set of grayscale images as a dynamically changing environment.
The chapter is organized as follows.Section 2 provides an overview of the state-of-the-art edge detectors.Section 3 introduces the basic Ant System algorithm.In Section 4 the proposed Ant System-based edge detector is described.The discussion of the simulation results is also given in this section.Follows the description of the proposed broken-edge linking algorithm and the simulation results in Section 5.The study on the adaptability of the proposed Ant System-based edge detector is given in Section 6.Finally, in Section 7 the conclusions are made.

Related work
Edges represent important contour features in the image since they are the boundaries where distinct intensity changes or discontinuities occur.In practice, it is difficult to design an edge detector capable of finding all the true edges in image.Edge detectors give ambiguous information about the location of object boundaries for which they are usually subjectively evaluated by the observers [30].
Several conventional edge detection methods have been widely cited in literature.The Prewitt operator [25] extracts contour features by fitting a Least Squares Error (LSE) quadratic surface over an image window and differentiate the fitted surface.The edge detectors proposed in [31] and [3] use local gradient operators, sometimes with additional smoothing for noise removal.The Laplacian operator [9] applies a second order differential operator to find edge points based on the zero crossing properties of the processed edge points.
Although conventional edge detectors usually perform linear filtering operations, there are various nonlinear methods proposed.In [23], authors proposed an edge detection method based on the Parameterized Logarithmic Image Processing (PLIP) and a four directional Sobel detector, achieving a higher level of independence from scene illumination.In [10], an edge detector based on bilateral filtering was proposed, which achieves better performance than single Gaussian filtering.In [21], authors proposed using Coordinate Logic Filters (CLF) to extract the edges from images.CLF constitute a class of nonlinear digital filters that are based on the execution of Coordinate Logic Operations (CLO).An alternative method for calculating CLF using Coordinate Logic Transforms (CLT) was introduced in [4]; the authors presented a new threshold-based technique for the detection of edges in grayscale images.
In recent years, Swarm Intelligence algorithms have shown its full potential in terms of flexibility and autonomy, especially when it comes to design and control of complex systems that consist of a large number of agents.Metaheuristics such as Ant Colony Optimization (ACO) [6], Particle Swarm Optimization (PSO) [17] and Bees Algorithm (BA) [24] include sets of algorithms that demonstrate emergent behavior as a result of local interactions between the members of the swarm.They tend to be decentralized, self-organized, autonomous and adaptive to the changes in the environment.The adaptability and the ability to learn are very important for systems that are designed to be autonomous.
ACO is a metaheuristic that exploits the self-organizing nature of real ant colonies and their foraging behavior to solve discrete optimization problems.The learning ability, in natural and artificial ant colonies, consists in storing information about the environment by laying pheromone on the path that leads to a food source.The emerging pheromone structures serve as the swarm's external memory that can be used by any of its members.Although a single ant can only detect the local environment, the designer of a swarm-based system can observe the emergent global patterns that are a result of the cooperative behavior.
ACO algorithms have been applied to image processing.Some of the proposed applications include image retrieval [28] and image segmentation [11,14,18].Several ACO-based edge detection methods have also been proposed in literature.Among others, these include modifications to Ant System (AS) [22] or Ant Colony System (ACS) algorithms [1,8,32] for a digital image habitat, combined with local gray-intensity comparison for different pixel's neighborhood matrices.Some studies showed that an improved detection can be obtained using a hybrid approach with an artificial neural network classifier [26].
In order to apply artificial ant colonies to edge detection one needs to set the rules for local interactions between the ants and define the "food" that ants will search for.For the edge detection problem, the food are the edge pixels in digital images.

Ant System algorithm
Artificial ants, unlike their biological counterparts, move through a discrete environment defined with nodes, and they have memory.When traversing from one node to another, ants leave pheromone trails on the edges connecting the nodes.The pheromone trails attract other ants that lay more pheromone, which consequently leads to pheromone trail accumulation.Negative feedback is applied through pheromone evaporation that, importantly, restrains the ants from taking the same route and allows continuous search for better solutions.
Ant System (AS) is the first ACO algorithm proposed in literature and it was initially applied to the Travelling Salesman Problem (TSP) [5].A general definition of the TSP is the following.For a given set of cities with known distances between them, the goal is to find the shortest tour that allows each city to be visited once and only once.In more formal terms, the goal is to find the Hamiltonian tour of minimal length on a fully connected graph.
AS consists of a colony of artificial ants that move between the nodes (cities) in search for the minimal route.The probability of displacing the kth ant from node i to node j is given by: where τ ij and η ij are the intensity of the pheromone trail on edge (i, j) and the visibility of the node j from node i, respectively, and α and β are control parameters (α, β > 0; α, β ∈ ).The tabu k list contains nodes that have already been visited by the kth ant.The definition of the node's visibility is application-related, and for the TSP it is set to be inversely proportional to the node's Euclidean distance: It can be concluded from the equations ( 1) and ( 2) that the ants favor the edges that are shorter and contain a higher concentration of pheromone.
AS is performed in iterations.At the end of each iteration, pheromone values are updated by all the ants that have built a solution in the iteration itself.The pheromone update rule is described with the following equation: where ρ is the pheromone evaporation rate (0 < ρ < 1, ρ ∈ ℜ), m is the number of ants in the colony, and ∆τ k ij is the amount of pheromone laid on the edge (i, j) by the kth ant, and is given by: where L k is the length of the tour found by the kth ant, and The algorithm stops when the satisfactory solution is found or when the maximum number of iterations is reached.

Ant System-based edge detector
In this section, the AS-based edge detector proposed by [15] is described.The method generates a set of images from the original grayscale image using a nonlinear image enhancement technique called Multiscale Adaptive Gain [19], and then the modified AS algorithm is applied to detect the edges on each of the extracted images.The resulting set of pheromone-trail matrices is summed to produce the output image.Threshold and edge thinning, which are optional steps, are finally applied to obtain a binary edge image.The block diagram of the proposed method is shown in Figure 1.

Multiscale Adaptive Gain
Image enhancement techniques emphasize important features in the image while reducing the noise.Multiscale Adaptive Gain is applied to obtain contrast enhancement by suppressing pixels with the grey intensity values of very small amplitude and enhancing only those pixels with values larger than a certain threshold within each level of the transform space.The nonlinear operation is described with the following equation: where where I = I(i, j) is the grey value of the pixel at (i, j) of the input image and sigm(x) is defined as and B and k control the threshold and rate of enhancement, respectively.(0 The transformation function ( 5) relative to the original image pixel values is shown in Figure 2. It can be observed that G(I) is continuous and monotonically increasing; therefore, the enhancement will not introduce new discontinuities into the reconstructed image.

Ant System algorithm for edge detection
The generic Ant System algorithm described in Section 3 was used as a base for the proposed edge detector.In digital images, discrete environment in which the ants move is defined by pixels, i.e. their gray-intensity values, 0 ≤ I(i, j) ≤ I max , i = 1,2,. . .,N; j = 1,2,. . .,M. Possible ant's moves to the neighboring pixels are shown in Figure 3. Unlike the cities' visibility in the TSP, the visibility of the pixel at (i, j) is defined as follows: where I max is the maximum gray-intensity value in the image (0 ≤ I max ≤ 255).For the pixels in regions of distinct gray-intensity changes the higher visibility values are obtained, which makes those pixels more attractive to ants.
The AS algorithm is an iterative process which includes the following steps: 1. Initialization: the number of ants proportional to √ N • M is randomly distributed on the pixels in the image.Only one ant is allowed to reside on a pixel within the same iteration.Initial non-zero pheromone trail value, τ 0 , is assigned to each pixel, otherwise the ants would never start the search.Tabu k represents the list of pixels that the kth ant has already visited.If ant is found surrounded by the pixels that are either in the tabu list or occupied by other ants, it is randomly displaced to another unoccupied pixel that is not in the tabu list.Otherwise, the displacement probability of the kth ant to a neighboring pixel (i, j) is given by: ) and (u,v) are allowed nodes 0 otherwise (9) where τ ij and η ij are the intensity of the pheromone trail and the visibility of the pixel at (i, j), respectively, and α and β are control parameters (α, β > 0; α, β ∈ ℜ).
3. Pheromone update rule: Negative feedback is implemented through pheromone evaporation according to: where and T and kth ant displaces to pixel (i,j) T is a threshold value which prevents ants from staying on the background pixels hence enforcing the search for the true edges.The existence of the pheromone evaporation rate, ρ, prevents the algorithm stagnation.Pheromone trail evaporates exponentially from the repeatedly not-visited pixels.

Stopping criterion:
The steps 2 and 3 are repeated in a loop and algorithm stops executing when the maximum number of iterations is reached.

Simulation results and discussion
The proposed method was tested on four different grayscale images of 256 × 256 pixels resolution: "Cameraman", "Lena", "House" and "Peppers".As seen from the block diagram in Figure 1, first the Multiscale Adaptive Gain defined in ( 5) is applied to the input image:  Afterwards, the AS-based edge detector is applied to each of the nine enhanced images.The algorithm's parameters are set as proposed in [22]: τ 0 = 0.01, α = 1, β = 10, ρ = 0.05 and T = 0.08.The number of ants equal to √ N • M = 256 was randomly distributed over the pixels in the image with the condition that no two ants were placed on the same pixel.The memory (tabu list) length for each ant was set to 10.The algorithm was stopped after 100 iterations generating a pheromone-trail matrix of the same resolution as the original image.After each of the nine enhanced images was processed, the sum of the pheromone-trail matrices produced the final pheromone-trail image (Figure 5(e)-(h)).The parameters values such as the number of ants, the memory length, and the number of iterations were obtained as a result of trial and error and their further optimization will be a part of future work.
The effectiveness of the proposed method was compared with the ant-based edge detectors proposed by Tian et al. [32] and Nezamabadi-pour et al. [22], and the results are shown in Figure 6.To provide a fair comparison, the threshold and morphological edge-thinning operations are neglected.The simulation results show that the proposed method outperforms the other two methods in terms of visual quality of the extracted edge information and sensitivity to weaker edges.The qualitative results of the edge detector proposed in [8] were presented after applying the thinning step, hence a fair comparison with the here-presented results could not be made.It is worth mentioning that the number of iterations used in experiments in [8] was much higher (1000 iterations) than required by our algorithm.The performance evaluation is given in Subsection 4.3.1.
The main contribution of the proposed edge-detection method is the preprocessing step and the parallel execution of the Ant System-based edge detector on a set of images that finally produce the output edge image.The execution time of the proposed method is high for real-time image processing, which would require additional algorithm's code optimization in a different programming environment.The presented experiments were performed in Matlab software that offers an easy high-level implementation but is ineffective in terms of speed.

Performance evaluation
In the complexity-performance trade-off, it was found that varying the values of algorithm's parameters can affect its performance.A set of experiments was performed on a synthetic test image (Figure 7) to show how the number of ants and iterations will be related to the number of detected edge points.The results of this analysis are shown in Figure 8.The number of ants is proportional to the square root of the image resolution n = √ N • M. The number of edge points was 780.
It can be observed that when the number of ants was increased, the required number of iterations was reduced to achieve a similar performance.Figure 8 shows that the algorithm needs more than 130 iterations to reach good performance when the number of ants was  set to 1 • n.However, the results not presented here showed that the algorithm was able to detect the maximal number of edge pixels after 400 iterations.Future work may include the optimization of parameters with respect to the computation time.

Ant System-based broken-edge linking algorithm
Conventional image edge detection always results in missing edge segments.Broken-edge linking is an improvement technique that is complementary to edge detection.It is used to connect the broken edges in order to form the closed contours that separate the regions of interest.The detection of the missing edge segments is a challenging task.A missing segment is sought between two endpoints where the edge is broken.The noise that is present in the original image may limit the performance of edge-linking algorithms.
Many broken-edge linking techniques have been proposed to compensate the edges that are not fully connected by the conventional edge detectors.[16] applied morphological image enhancement techniques to detect and preserve thin-edge features in the low contrast regions of an image.[33] applied Sequential Edge-Linking (SEL) algorithm that provided full connectivity of the edges but for a rather simplified two-region edge-detection problem.Authors proposed this method to extract the contour of a breast as the region of interest in mammogram.[29] applied adaptive structuring elements to dilate the broken edges along their slope directions.[20] proposed improvement to the traditional Ant Colony Optimization (ACO) based method for broken-edge linking to reduce the computational cost.
In this section, the Ant System-based broken-edge linking algorithm proposed by [13] is presented.As inputs are used: the Sobel edge image and the original grayscale image.The Sobel edge image is a binary image obtained after applying the Sobel edge operator [31] to the original grayscale image.From this image the endpoints are extracted that will be used afterwards as the starting pixels for the ants' routes.
The original image is used to produce the grayscale visibility matrix, which for the pixel at (i, j) is calculated as follows: where I max is the maximum gray value in the image, so ξ ij is normalized (0 ≤ ξ ij ≤ 1).For the pixels in regions of distinct gray intensity changes the higher values are obtained.The matrix of grayscale visibility will be the initial pheromone trail matrix.It is also used to calculate the fitness value of a route chosen by ant.The resulting image will contain the routes (connecting edges) with the highest fitness values found as optimal routes between the endpoints.In order to discard non-optimal routes, a fitness threshold is applied.Finally, the output image is the improved image that is a sum of the Sobel edge image and the connecting edges.The block diagram of the proposed method is shown in Figure 9.
The proposed AS-based algorithm for broken-edge linking includes the following steps: 1. Initialization: The number of ants equals the number of endpoints found in the Sobel edge image, and each endpoint will be a starting pixel of a different ant.Initial pheromone trail for each pixel is set to its grayscale visibility value.
2. Pixel transition rule: Possible ant's transitions to the neighboring pixels are defined by 8-connection pixel transition model shown in Figure 3.The admissible neighboring pixels for the kth ant to move to are the ones not in the tabu k list.The probability for the kth ant to move from pixel (r, s) to pixel (i, j) is calculated as follows: Ant Algorithms for Adaptive Edge Detection 11 where τ ij and η ij are the intensity of the pheromone trail and the visibility of the pixel at (i, j), respectively, and α and β are control parameters (α, β > 0; α, β ∈ ℜ).The visibility of a pixel should not be misinterpreted as its grayscale visibility, and for the pixel at (i, j) it is defined as: where d ij is the Euclidean distance of the pixel at (i, j) from the closest endpoint.
3. Pheromone update rule: Negative feedback is demonstrated through the pheromone trails evaporation according to: where ρ is the pheromone evaporation rate (0 < ρ < 1; ρ ∈ ℜ), and where Search Algorithms The fitness value of a pixel, f k , is equal to the fitness value of the route it belongs to.The proposed fitness function is given by: where ξ and σ ξ are the mean value and the standard deviation of the grayscale visibility of the pixels in the route, and N p is the total number of pixels belonging to that route.Pheromone evaporation prevents algorithm stagnation.From the repeatedly not-visited pixels the pheromone trail evaporates exponentially.

Stopping criterion:
The steps 2 and 3 are repeated in a loop and algorithm stops executing when the maximum number of iterations is reached.An iteration ends when all the ants finish the search for the endpoints, by either finding one or getting stuck and being unable to advance to any adjacent pixel.

Simulation results and discussion
The simulation results of the proposed algorithm applied to the "Peppers" image of 256 × 256 pixels are shown in Figure 10.The algorithm detects the missing edge segments (Figure 10(c)) as the optimal routes consisted of the edge pixels.The initial pheromone trail for each pixel was set to its grayscale visibility value.In this manner, the pixels belonging to true edges have a higher probability of being chosen by ants on their initial routes, which shortens the time needed to find a satisfactory solution, or improves the solution found for a fixed number of iterations.The results were obtained after 100 iterations; this number was chosen on trial and error basis.
Designated values α = 10 and β = 1 were determined on trial and error basis.A large α/β ratio forces the ants to choose the strongest edges.The existence of the control parameter β is important since it inclines the ant's route towards the closest endpoint.Experimental results showed that, by setting the β value to zero, it took more steps for the ants to find the endpoints which made the computation time longer.In some cases, ants were not even able to find the satisfactory solution for a reasonable number of steps, or they just got stuck between already visited pixels.
The effect of the α/β parameter ratio on the resulting image is best presented in Figure 11.It can be observed that the endpoint in the upper-left corner of the ROI image (Figure 11(c)-(e)) was not connected to any of the closer endpoints, and that the ants successfully found the more remote endpoint which was the correct one.The existence of the β parameter keeps the ants away from the low-contrast regions, such as the region of low gray-intensity pixels between two closer endpoints.
The ant's memory, i.e. the length of the tabu list, was set to 10. Larger ant's memory values would improve the quality of the resulting binary image but would as well lead to the prolonged computation time.The designated value was large enough to keep the ants from being stuck in small pixel circles.
The fitness value of a route is dependent on the mean value and the standard deviation of the grayscale visibility of the pixels in the route, and the total number of pixels belonging to that route, as defined in (19).The routes that have higher grayscale visibility mean value are the stronger edges as the gray level contrast of their adjacent pixels is higher.The smaller standard deviation of the grayscale visibility of the pixels in the route results in a higher fitness value.By this, more importance is given to the routes consisted of pixels belonging to the same edge, thus avoiding the ants crossing between the edges and leaving pheromone trails on non-edge pixels.Finally, the shorter routes are more favorable as a solution, therefore by keeping the total number of pixels in the route smaller, the higher fitness values are obtained.
The number of iterations was set to 100, which gave satisfactory results within an acceptable computational time of execution.The lower resolution images, for example 128 × 128 pixels, allowed a larger number of iterations to be used, since a smaller number of ants was processed for a smaller number of relatively closer endpoints.The execution time of the algorithm was not optimal, and it was measured in minutes.One of the reasons is that the algorithm code was not written in an optimal manner since Matlab as a programming environment is not intended for a fast code execution, but rather for an easy high-level algorithm implementation.
In order to test the proposed method on different input images, simulations were performed on "House", "Lena" and "Cameraman" images of size 256 × 256 pixels.The results confirm the effectiveness of the method, as shown in Figure 12.It can be noticed that the found edge segments are often not unidirectional, which indicates that the fitness function was adequately defined and the ants found the true edges.The main contribution of the proposed broken-edge-linking method is in using a bottom-up approach that avoids using a global threshold to find the missing segments.

Adaptability of the proposed edge detector
The adaptability and the ability to learn are important features of autonomous systems.
In ant colonies, natural and artificial, learning consists in changing the environment by laying the pheromone trails while searching for food.The structures that emerge from the accumulated pheromone represent the stored information about the environment that can be used by any member of the swarm.Although a single ant has no knowledge of the global pattern, the designer of such a swarm-based system is a privileged observer of the emergence that comes as a result of the cooperative behavior.The resulting mass behavior in swarms is hard to predict.Although the adaptability can be demonstrated on a variety of applications such as in image segmentation [27], a general theoretical framework on design and control of swarms does not exist.Artificial swarms use bottom-up approach, meaning that the designer of such distributed multi-agent system needs to set the rules for local interactions between the agents themselves and, if required, between the agents and the environment.The indirect communication via environment is referred to as stigmergy, and in case of ant colonies, it consists in pheromone-laying and pheromone-following.For each specific application, the food that ants search for must also be defined.
This section presents a study on the adaptability of the algorithm proposed in Section 4 [12].Experiments with two different sets of grayscale images were performed.In the first experimental setup, a set of three different grayscale images was used to test the adaptability of the proposed AS-based edge detector.The images were obtained by applying The results show that the Ant System-based edge detector was capable of detecting the changes that occurred as a result of replacing one image from the set with another.The experiments were repeated for a set of four widely used test grayscale images: "Cameraman", "Lena", "House", and "Peppers".The images were used as inputs to the algorithm in that order.Every N i = 100 iterations one image was replaced by the next one from the set.Again, the change in the environment produced by the change of input image resulted in different pheromone patterns, which is shown in Figure 14.
It can be observed that the new pheromone trails accumulated on the pixels belonging to the newly-emerged edges, while the pheromone trails where the edges were no longer present gradually disappeared.In order to obtain a quicker transition between different pheromone distributions, the evaporation rate ρ was set to a higher value than for the edge-detection simulations (ρ = 0.5).This resulted in disappearing of the "weakest" edges and introduced slightly poorer overall performance of the proposed edge detector.The experimental results show that the algorithm is able to adapt to a dynamically changing environment resulting in different pheromone trail patterns.Even though the images were used in the experiments, the study could be extended to any other type of digital habitat which can lead to a new set of applications for the adaptive artificial ant colonies.
One of the possible applications for the adaptive edge detector could be real-time image processing where online image preprocessing could be used to obtain better image segmentation.By applying various image enhancement techniques, such as contrast enhancement, certain features in the image could be amplified while others could be reduced or even removed.This would enable easier detection of the regions of interest in the image.

Conclusions
Two edge-detection methods inspired by the ants foraging behavior were proposed.The first method uses a grayscale image as input and as output produces a pheromone image marking the location of the edge pixels.The second method finds the missing edge segments after the edge detection was applied and can be used as a complementary tool to any edge detector.
In our work, the Sobel edge detector was used to produce the binary edge image.
The first method combines a nonlinear contrast enhancement technique, Multiscale Adaptive Gain, and the Ant System algorithm inspired by the ants foraging behavior.The set of enhanced images was obtained after applying the Multiscale Adaptive Gain and the Ant System algorithm generated pheromone patterns where the true edges were found.The experiments showed that our method outperformed other ACO-based edge detectors in terms of visual quality of the extracted edge information and sensitivity in finding weaker edges.The quantitative analysis showed that the performance could further be optimized by varying the number of ants and iterations.
The adaptability of the proposed edge detector was demonstrated in a dynamically changing environment made of a set of digital grayscale images.The algorithm responded to the changes by generating pheromone patterns according to the distribution of the newly-created edges.It also proved to be robust since even an ant colony of a smaller size could detect the edges, even though the number of detected edge pixels was reduced.
The second proposed method uses the ant colony search for the edge segments that connect pairs of endpoints.A novel fitness function was proposed to evaluate the found segments.It depends on two variables: the pixels grayscale visibility and the edge-segment length.The fitness function produces higher values for the segments that consisted of smaller number of pixels, which had grayscale visibility of a higher mean value and a lower variance.Another novelty was to apply the grayscale visibility matrix as the initial pheromone trails matrix so that the pixels belonging to true edges have a higher probability of being chosen by ants on their initial routes, which reduced the computational load.The proposed broken-edge linking method was tested as a complementary tool for the Sobel edge detector, and it significantly improved the output edge image.
Future research will include optimization and automatic detection of the proposed methods' parameters for an improved edge detection results.Until now these parameters were experimentally obtained.An exhaustive analysis of the edge detection method's adaptability will be performed in order to apply it to other digital habitats.Also, the methods optimization for faster execution would make them suitable for real-time image processing.

Figure 1 .Figure 2 .
Figure 1.Block diagram of the proposed edge detection method

Figure 4 .
Figure 4. Effects of the transformation function G(I); "Cameraman", 256 × 256 pixels: (a) original image; (b) B = 0.2, k = 10; (c) B = 0.45, k = 20; (d) B = 0.7, k = 40.The effects of the transformation function on the image "Cameraman" are shown in Figure4.It can be observed that, by changing the transformation function's parameters, some features in the image become highlighted while others get attenuated.

Figure 8 .
Figure 8. Extracted features vs. number of iterations for different ant-colony size.

Figure 9 .
Figure 9. Block diagram of the proposed edge linking method

Figure 11 .
Figure 11.Effect of the control parameters on correct connection of the endpoints: "Peppers" 256 × 256 image: (a) original image with marked region of interest (ROI); (b) Sobel edge image with marked ROI; (c) enlarged ROI: Sobel edge image; (d) enlarged ROI: pheromone trails image; (e) enlarged ROI: improved edge image; (f) improved edge image with marked ROI.

Figure 13 .
Figure 13.Adaptive edge detection on enhanced "Cameraman" images, 256 × 256 pixels: (a) enhanced image 1; (b) t=5 iterations; (c) t=10 iterations; (d) t=50 iterations; (e) t=100 iterations; (f) enhanced image 2; (g) t=105 iterations; (h) t=110 iterations; (i) t=150 iterations; (j) t=200 iterations; (k) enhanced image 3; (l) t=205 iterations; (m) t=210 iterations; (n) t=250 iterations; (o) t=300 iterations.aMultiscale Adaptive Gain contrast enhancement to the 256 × 256 pixel "Cameraman" image (see Figure4).Every N i = 100 iterations one image from the set was replaced by another.The response of the artificial ant colony to the change in the environment was a different distribution of pheromone trails.The number of 100 iterations per image was enough for the new pheromone structure to be established.The algorithm parameters used in the experiments were determined empirically: τ 0 = 0.01, ρ = 0.5, α = 1, β = 10, T = 0.08 and the tabu list length was set to 10. Parameters could be optimized for a better edge detection, but it is of no importance for this study.It would not affect the adaptability of the algorithm since every image change would result in a change of the pheromone trail structure.Simulation results are shown in Figure13.