Mathematical Problems in Engineering

Volume 2015, Article ID 138930, 10 pages

http://dx.doi.org/10.1155/2015/138930

## Quaternion-Based Improved Artificial Bee Colony Algorithm for Color Remote Sensing Image Edge Detection

^{1}College of Geophysics, Chengdu University of Technology, Chengdu 610059, China^{2}School of Computer Science, Sichuan University of Arts and Science, Dazhou 635000, China^{3}State Key Laboratory of Wireless Mobile Communications, China Academy of Telecommunications Technology, Beijing 100191, China

Received 12 June 2014; Revised 13 August 2014; Accepted 24 August 2014

Academic Editor: Wai Yuen Szeto

Copyright © 2015 Dujin Liu et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

As the color remote sensing image has the most notable features such as huge amount of data, rich image details, and the containing of too much noise, the edge detection becomes a grave challenge in processing of remote sensing image data. To explore a possible solution to the urgent problem, in this paper, we first introduced the quaternion into the representation of color image. In this way, a color can be represented and analyzed as a single entity. Then a novel artificial bee colony method named improved artificial bee colony which can improve the performance of conventional artificial bee colony was proposed. In this method, in order to balance the exploration and the exploitation, two new search equations were presented to generate candidate solutions in the employed bee phase and the onlookers phase, respectively. Additionally, some more reasonable artificial bee colony parameters were proposed to improve the performance of the artificial bee colony. Then we applied the proposed method to the quaternion vectors to perform the edge detection of color remote sensing image. Experimental results show that our method can get a better edge detection effect than other methods.

#### 1. Introduction

Edge detection in remote sensing image is very important for a wide range of applications such as environment monitoring [1], image analysis and classification [2, 3], change detection [4], and geographic image retrieval [5].

With the development of remote sensing technology, a large number of remote sensing images with high spectral and spatial resolutions are acquired by the satellites, and the revisiting time is greatly reduced. As a result, the users obtain the larger archives of digital remote sensing image, which facilitates the edge detection of remote sensing image. However, there is still a challenging problem to achieve reliable image edges in remote sensing image, not only due to the large amount of data and the rich image details, but also because of the containing of too much noise.

Artificial bee colony algorithm (ABC) [6] is widely used in image processing [7, 8] and engineering optimization [9, 10]. For example, Draan and Bouaziz [11] proposed a new artificial bee colony (ABC) algorithm for image contrast enhancement. The proposed algorithm has been extended to color image enhancement and given very promising results. Szeto and Jiang [12] proposed a hybrid enhanced artificial bee colony algorithm (HEABC) for solving the problem of bus network design. The HEABC relies mainly on the enhanced artificial bee colony algorithm to determine the route structure and could produce a design that was better than the existing design for maximum intermediate stops, total travel time, number of transfers, maximum headway, and total fuel cost. But it has not yet been improved to solve remote sensing image edge detection problem. This study enhances the ABC algorithm to solve this problem.

The color image can provide a large amount of appearance information of the object. However, conventional ABC cannot take full advantage of the color image. Now, there are many kinds of color remote sensing image edge detection methods [13, 14], but each method performed remote sensing image edge detection by splitting the strong spectral relationship between each channel of the color image [15]. The vector method [16] takes a color image pixel as a three-dimensional vector, which to some extent considered each channel nature of the color image making the effect better than the synthetic method [17]. But the vector method does not process a color as a whole in transformation, operation, and treatment of the image vector, which lead to some edges undetected, local color uncoordinated, and local edge details damaged. It is even worse for the effect when the complex noise exists [18].

How to choose a mathematic tool to effectively represent a color image, which makes the three color components be considered simultaneously as a whole without loss of the spectral relation that is present in them, is a challenging problem.

It is a good way to use a quaternion [19] representing a color pixel. A quaternion can be seen as a composition of four real numbers. We can let the first one of the four real numbers be zero for representing a pixel, and let the other three real numbers be, respectively, the values of the three entries of a color pixel. Through quaternion representation of color image, you can make full use of the whole color information for each pixel of the image. A color image can be represented as a quaternion matrix, while each pixel of the color image is represented by a quaternion vector. Then according to quaternion vector rotation principle and tone offset mechanisms, the edge points can be determined [20], which implements the whole processing of each quaternion pixel. In recent years, there have been a number of studies on the quaternion [21, 22].

In this paper, we aim at using the quaternion to represent the color pixel and reducing the dimension for multispectral remote sensing images by using PCA (principal component analysis) [23, 24]. Then we propose a novel ABC method called IABC (improved artificial bee colony) and use it for the image edge detection, based on which, aquaternion-based improved artificial bee colony algorithm for edge detection of color remote sensing image will be introduced.

The remainder of the paper is organized as follows. In Section 2, quaternion representation for a color image edge will be present. In Section 3, we introduce our algorithm. In Section 4, we do some experiments and analyze their results. In Section 5, conclusion is offered.

#### 2. Quaternion Representation for the Color Image Edge

Although the quaternion theory [19] still has some issues to be resolved, its representation is convenient, simple, and widely used in image processing. Based on quaternion theory, a quaternion is a four-dimensional number, which consists of a real part and three imaginary parts. For example, the quaternion can be expressed as follows: where , , , and are four real coefficients. And , , and are three orthogonal imaginary units that satisfy the following rules:

Let the real part of quaternion ; then is a pure quaternion. Let represent the real part of quaternion , and let represent imaginary part of quaternion . Thus . Mold and conjugate of quaternion are defined as follows:

Denote each color pixel of a color image by quaternion as follows: , , , and are set as , , , and . , , and stand for the first, second, and third components of the color pixel, respectively.

Addition or subtraction with two quaternions is addition or subtraction of their respective components, and according to the rules of quaternion multiplication, the quaternion does not satisfy the multiplication commutative law.

##### 2.1. Polar Coordinates for Quaternions

Feature axis and feature angle of quaternion are defined as follows: where .

Where can be derived after calculation as follows: , meanwhile denotes the eigenaxis, and denotes the eigenangle.

If vector rotating angle becomes vector and denotes unit vector of rotating shaft direction perpendicular to the plane which includes vectors , , rotating shaft direction meets the right-hand rule, and then a quaternion will be represented in polar coordinates as follows:

And the corresponding formula of the reverse rotation is as follows:

If the vector is not perpendicular to the rotary shaft and it rotates angle about the axis of rotation becoming the vector , the quaternion in polar coordinates is expressed as where every color pixel denoted by a quaternion is a three-component vector of integer values in the interval .

Let , where , , . For reasons of symmetry, we transfer the RGB color space from the coordinate origin to the center of the RGB space. Then pure imaginary quaternion of a color pixel is expressed as , and any unit quaternion can be represented as . According to the three-dimensional rotation quaternion principle mentioned above, indicates a three-dimensional vector (represented by purely imaginary quaternions) rotating an angle around the* U*-axis [25, 26].

##### 2.2. Quaternion Representation of Color Image Edge Points

If color pixels in RGB three-dimensional space are expressed as vectors, the vector modulus value of every pixel would indicate brightness of this pixel, of which direction means the color hue and saturation of the pixel. In order to detect image edge, grayscale pixel vector would be regarded as the rotation axis; that is, when , it can be expressed in polar coordinates as . So for any pure imaginary quaternion vector , indicates three-dimensional vector rotating angle (180°) around the axis , which means is relative to the vector on the axis of symmetry in the opposite direction. According to this principle, for any one of the color pixel vector , there is being a purely imaginary quaternion and . Then for any two color pixel vectors and , we assume . If the two vectors , are of the same color pixel, will be a gray pixel vector, which means the direction coincides with the direction of the rotation axis . If the two vectors , are not identical, the resultant vector will deviate from the rotation axis and be a color pixel. If the hues of and are close, will be located near the gray vector . In other words, if there is an arbitrarily small positive number , there is ( is an arbitrary small positive number). By this method, if these two color pixel vectors and correspond with the pixels in the image edge, it can be naturally judged [27].

In fact, for grayscale images, the edges can be considered as brightness discontinuous jump, and for color images, the edge not only has the mutation of the brightness (even the same color on both sides of the border), but also should meet the condition that different color regions are on both sides of the edges (even if the same brightness on both sides of the border). Thus the edge detection problem is to find out the pixel points meeting these two conditions, that is, to detect a pixel set not in the local area of the same color but connecting the pixels of local same color area. If there are two pixels, when a pixel is on the edge, the other pixel is outside the edge, we rotate one pixel 180° around the gray axis and add it to the other one. The result represents a pixel which must be color. On this basis, for any pixel , in order to determine whether the pixel is on the edge, we can use the left template and the right template [28] to perform convolution operation as follows: where are pixels in the image, while

Equation (8) means that the pixels , , and around the gray axis rotate 180° according to the right hand rule, and then , , and will be, respectively, added. Finally, the result obtained is as follows:

If the three color components of the vector are equal or approximately equal, then it will be a local pixel of the same color, and if not, it will be an edge pixel. According to this method, we can determine whether a color pixel is an edge point. Our algorithm will be established on the basis of this method.

#### 3. Quaternion-Based Improved Artificial Bee Colony Algorithm for Color Remote Sensing Image Edge Detection

In order to solve the optimization problems characterized by the nonconvex, the discontinuous, as well as the nondifferentiable, and so on, much effort has been made during the past decades, which lead to some great success in evolutionary algorithms. The most prominent evolutionary algorithms are particle swarm optimization (PSO) [29], ant colony optimization (ACO) [30], genetic algorithm (GA) [31], biogeography-based optimization (BBO) [32], and so on.

ABC has better performance comparing with population-based algorithms such as GA, DE, and PSO. Now, there have been several types of improvements for conventional ABC algorithms. Here we mention a few. The first type of improvement is Rosenbrock ABC (RABC) [33], whose main idea is giving two alternative phases of RABC: the exploration phase realized by ABC and the exploitation phase completed by the rotational direction method. The second one is taking advantage of the information of the best solutions [34, 35]. The third one [36] proposed an interactive ABC, which introduced the concept of universal gravitation into the consideration of the affection between the employed bees and the onlooker bees. But cannot obtain the desired balance between the exploration and the exploitation, convergence of all ABC algorithms is relatively poor when solving complex problems.

##### 3.1. Artificial Bee Colony Algorithm

In ABC, bee behavior has the features of autonomy, division of labor, self-organization, and other features. Colony system includes the following elements: bees, honey, and information exchange mechanisms between individuals. Quality of nectar is mainly decided by several aspects: the abundance of nectar, the distance between the point of nectar and bee, and the angle formed between the nectar and sunlight. Worker bees in colonies can be divided into employed bees, onlookers, and scouts. Half of the colony consists of employed bees, and the other half includes onlooker bees. Gathering honey is the basis of survival of swarm, and the basic behaviors of bees are searching nectar, guiding employed bees to the qualified nectar and abandoning the inferior one. The quality and quantity of nectar represent the honey benefits. Finding the most effective source of nectar is a process of exploring the optimal solution. Employed bees master the information of nectar source with high efficiency indexes. Then they pass their food information to the onlooker bees and guide them. But sometimes they exploit the bee nectar themselves. Onlookers are obliged to select good food sources from those found by employed bees to further search the foods. If the food source is abandoned by its employed bees, the employed bees will become the scouts and start to search for a new food source in the vicinity of the hive. Exchange of information between individuals is achieved by the individual dance in the hive dance area.

In ABC, location of a food source corresponds to a possible optimal solution. The quantity of the sources of honey represents their fitness of a possible solution. The number of employed bees equals* *to the number of food sources. At the initialization step, ABC generates a randomly distributed initial population of EB solutions* *(food source positions), where EB denotes the size of employed bees or onlooker bees. The initial solution as follows:

is produced randomly in the range of the borders with the parameters as follows: where , , and is the problem dimension; and are the lower and upper borders for the dimension , respectively.

After the initialization step, the population is constantly changing. The employed bees, onlooker* *bees, and scout bees constantly repeat their search process, which means each employed bee constantly explores new locations and remembers the old best position. If an employed bee finds a new food source that has equal or better quality than the old food source, the old food source will be replaced by the new food source. Otherwise, the old food source will be retained. Each onlooker chooses a food source depending on the probability associated with its fitness :
where is fitness of solution .

ABC finds a new food location from the old best food location by the following equation: where . and are randomly chosen indexes, is a random number, and .

If a position cannot be improved further over a predetermined number of cycles, then that food source will be abandoned, and the scout will try to discover a new food source randomly as in (13) to replace .

##### 3.2. Two New Improved Search Equations

How to improve the performance of the ABC algorithm for balancing between two contradictory aspects of their performance: exploration and exploitation? The key is to improve the search equation. So far there has appeared several improved search equation [35, 37]. But they only improve the performance in certain specific areas. The most representative algorithm is Gbest-guided artificial bee colony algorithm GABC [34]. It proposed the search equation as follows:

The method add the second term in the right side of (14), is the* j*th element of the global best solution, and is a random number within . But the experiment results show that this algorithm improvement of the performance is not obvious.

Convergence performance of all the current search equations is not ideal. In this paper, inspired by PSO and combining (13) with (14), we proposed a new improved ABC algorithm (IABC), where two novel search equations are proposed for employed bees and onlookers, respectively, as follows: where , , , and best are not equal to each other, , and . is a random number in the range of . is a random number in the range of . is a random number, , and .

The main difference is that the GABC algorithm employs one search equation (14), but the IABC algorithm employs two different search equations (15) and (16) based on different emphases.

Note that (15) has some similarity with (14). Only the third term is different in (14) and (15); in other words, only the subscripts of the third term and are different in (14) and (15). In (15), is a randomly selected individual from the population, which is more diversity and easier to converge. It can bring a more promising candidate solution compared with (15) and (14). Equation (16) is proposed for onlookers. The first term and the second term have changed in (16) compared with (14), while the subscripts of the first term and are different in (14) and (16). instead of can improve the exploration capability. Experimental results show that the larger value for coefficient leads to the worse solution quality in a certain range, that is why instead of can improve the quality of the solution. In (16), instead of can not only enhance the exploitation but also improve search efficiency. Thus, (16) may be beneficial to not only the convergence, but also the quality of the solution. That is to say, (15) focuses on the exploration, while (16) emphasizes on the exploitation. The emphases of (15) are consistent with the employed bees stage, and the ones of (16) are consistent with the onlookers stage.

##### 3.3. We Proposed the Algorithm

Based on the improved colony algorithm, firstly we set the conditions for the end of the cycle (according to actual situation, we probably set a smaller number of cycles, different times, or the conditions for the end of the first -effectiveness values, which are greater than a present threshold). According to the conditions, if IABC does not converge and gets some local optimal solutions, these local optima will correspond to the point on the edge of the image. Continue searching until we get the global optimal solution. The global optimal solution and all the local optima constitute edge points of this remote sensing image. Mark all these points, and then we can form the edge of the image.

Algorithm process is as follows.(1)At initialization colony step, we randomly generate bees including employed bees and onlookers and all the employed bees randomly search the nectars. At last we set the stopping condition (subjective effects or maximum number of iterations).(2)According to the fitness function, we evaluate the (corresponding nectar sources) fitness indicators of individual bees.(3)When the stopping condition is not satisfied, we select the first bees with the highest value of fitness to be the employers. Then the employed bees hired onlookers, which will follow the employed bees to the neighborhood of nectar sources to search for new nectar source locations, and assess the efficiency indicators.(4)If a position cannot be improved further over a predetermined number of cycles, then that food source will be abandoned, and the current position will be retained; otherwise, the employer bees will become scout ones.(5)Scouts randomly search the nectars and evaluate their value of fitness.(6)When setting condition, we update all the local nectar pbest () () and the global nectar gbest () ().(7)Set and return to (2) until or reach the stop condition.(8)Mark position corresponding to the global optimal solution and all the local optima.(9)End.

##### 3.4. The Fitness Function

In the image, the function which is strongly associated with the information of edge points can be used for IABC algorithm fitness. Pixel values correspond to the higher fitness, the greater possibility that the pixel can be the edge point. Fitness function can refer to pheromone function of the literature [38].

##### 3.5. Parameter Settings

In the conventional ABC, the colony of artificial bees contains three types of bees: employed bees, onlookers, and scouts. Half of the colony consists of employed bees, and the other half includes onlooker bees. But in fact, we use ABC to perform image edge detection, and changing the parameters has a greater impact on the image edge detection effect. Above all parameter setting is crucial. Based on the experimental results, we adjust the parameters of the conventional ABC as follows.

Let the number of all the worker bees be with a more reasonable value range 600 ≤ ≤ 1600. Let the number of employed bees be , where 0.35 ≤ ≤ 0.55. If and are too small, it will result in the detection of the image that has missed too many points. If is too large for image edge detection without obvious contribution, that will only waste more time. Set onlookers scale , where 0.40 ≤ ≤ 0.60; let the number of scouts be , where 0.05 ≤ ≤ 0.10. If is too small, it will increase the algorithm difficulties for jumping out of local optimal solution. If too large, it will increase search computation. In each iteration, bees can be moved along 8-direction of the neighborhood. After calculating the maximum probability for bees of 8-direction of the neighborhood, we select the next locations and steps. Fitness values of bees on each pixel constitute a matrix of fitness values. After the bees had flied to the appropriate number of steps, the fitness value matrix is updated.

#### 4. Experiments and Results

To verify the efficiency of the proposed method in color remote sensing image edge detection, experiments have been carried on with a lot of color remote sensing images, which are obtained in actual experiments. In this section, there are two experiments. In the first experiment, we assess the impact caused by the various numbers of different bees on the image edge detection. In the second experiment, we compare our method to other methods on color remote sensing image edge detection. However the results always show that our method is better.

##### 4.1. Assess the Impact Caused by the Various Numbers of Different Bees on Color Remote Sensing Image Edge Detection

In this experiment, we use the remote sensing image of an island. Select a pixel area as the study area. Set the number of employed bees , the number of onlookers , and the number of scouts ; when the bees’ scale was 600, 800, 1200, and 1600, we perform the image edge detection. In Figures 1(b)–1(e), it, respectively, shows the image edge detection result with , , , and . In Figure 1, when the colony size is relatively small such as , , the edge of the island is affected by noise and image texture as shown in Figures 1(b)-1(c). There is a clear phenomenon of false edges and missed points leading to rough edges. Additionally, color contrast of shallow water area at the edge of the island is not obvious making it unable to be extracted. However when the number of bees is set 1200 and 1600, not only the island edges can be more clearly extracted and much less noise exists, but also the shallow edge of the island can be extracted. As seen from Figure 1, when the remote sensing image detail in the image is not too complicated or rich, the colony number can be reduced appropriately.