Pattern Recognition Letters 31 (2010) 1868–1875

Contents lists available at ScienceDirect

Pattern Recognition Letters
journal homepage: www.elsevier.com/locate/patrec

Template matching using chaotic imperialist competitive algorithm
Haibin Duan a,*, Chunfang Xu a,b, Senqi Liu a,b, Shan Shao c
a

State Key Laboratory of Virtual Reality Technology and Systems, Beihang University, Beijing 100191, China National Key Laboratory of Science and Technology on Holistic Control, Beihang University, Beijing 100191, China c Shenyang Aircraft Design and Research Institute, Shenyang 110035, China
b

a r t i c l e

i n f o

a b s t r a c t
Image matching plays an important role in feature tracking, object recognition, stereo matching, digital photogrammetry, remote sensing, and computer vision. Imperialist competitive algorithm (ICA) is inspired by imperialistic competition mechanism. In this paper, we present a novel template matching method based on chaotic ICA. Based on the introduction of the principle of ICA, the correlation function used in this approach is proposed. The chaos can improve the global convergence of ICA, and the phenomena of falling into local best solution can be prevented. The detailed process for chaotic ICA-based template matching is also presented in detail. The three typical comparative results show that our proposed chaotic ICA image matching approach is more efficient and effective than the basic ICA. Ó 2009 Elsevier B.V. All rights reserved.

Article history: Available online 11 December 2009 Keywords: Image matching Imperialist competitive algorithm (ICA) Chaotic Normalized cross-correlation (NCC)

1. Introduction Template matching, which measures the degree of similarity between two image sets that are superimposed on one another, is one of the most important and challenging subjects in digital photogrammetry, object recognition, stereo matching, feature tracking, remote sensing, and computer vision (Brunelli, 2009). It relies on calculating at each position of the image under examination a correlation or distortion function that measures the degree of similarity to the template image, and the best matching is obtained when the similarity value is maximized. Generally, template matching involves two typical aspects: similarity measurement and search strategy (Hadi et al., 2009). Among the similarity measurements, Normalized cross-correlation (NCC) is widely used due to its robustness in template matching (Krattenthaler et al., 1994). In our work, the NCC function is adopted as the similarity measurement. The matching process needs to move the template image to all possible positions in the source image and compute the similarity value respectively, and the time cost can be very tremendous. In order to solve this problem, many global optimizing algorithms, such as genetic algorithm (GA) (Holland, 1975), ant colony optimization (ACO) (Colorni et al., 1991; Duan, 2005), particle swarm optimization (PSO) (Kennedy and Eberhart, 1995), and other hybrid learning approaches (Francisco et al., 2009), have been applied as the searching strategy to reduce the time cost. Unlike the above algorithms that mimic the natural behaviors, imperialist competitive algorithm (ICA), which was inspired by imperialistic competition
* Corresponding author. Tel.: +86 10 8231 7318; fax: +86 10 8231 7305. E-mail address: hbduan@buaa.edu.cn (H. Duan). 0167-8655/$ - see front matter Ó 2009 Elsevier B.V. All rights reserved. doi:10.1016/j.patrec.2009.12.005

mechanism, is a new evolutionary algorithm for optimization problems. ICA was firstly proposed by Esmaeil (Esmaeil and Lucas, 2007), which was used to solve the continuous optimization problems. In our paper, we mainly introduced an improved ICA based on chaos theory, and utilized this algorithm to solve the template matching problem. The matching results obtained by our approach are also compared with the basic ICA. The simulation results showed that our method proposed in this paper manifests good matching accuracy and performs better than the original ICA. The rest of this paper is organized as follows. Section 2 introduces the basic principle of ICA, and Section 3 presents the correlation function used in our algorithm. Section 4 proposes our template matching method based on chaotic ICA, and the detailed process is also presented in this section. Then, in Section 5, three comparative experiments between the basic ICA and the chaotic ICA are conducted. Our conclusions and future work are presented in the final section.

2. The basic principle of ICA The optimization problem can be easily described as to find an argument x whose relevant cost f(x) is optimum, and it has been extensively applied in many different situations such as industrial planning, resource allocation, scheduling, pattern recognition and so on. Different methods have been proposed to solve the optimization problem. For example, GA is a particular evolutionary algorithm that evolves a population of candidate solutions to a given problem, using operators inspired by natural genetic variation

2008). Fig. then we can have ICA has been proved to have a satisfactory converging speed. Duan et al. Also the inspiration source of PSO which was formulated by Kennedy and Kennedy in 1995 was the social behavior of animals (Kennedy and Eberhart. 2008). and the moving model is shown in Fig. By finding the maximum value of the correlation function. which means the algorithm converges to the best solution. 3 (Esmaeil et al. such as bird flocking or fish schooling.. Correlation function 4. however.y f ðu þ x. it is assumed to be collapsed. y Þ ð 1Þ where u. 3. There are two types of countries. Chaos optimization is realized through chaos variables which can be obtained by many ways. v are the coordinates. Then. During this competition. weak empires collapse and powerful ones take possession of their colonies. 2 (Esmaeil et al. Simulated annealing (SA) is another example which simulates the annealing process in materials (Johnston. 1.1 6 y 6 N. Begin Initialize the empires Move the colonies to their relevant imperialist Is there a colony in an empire which has higher cost than that of imperialist ? Yes Exchange the positions of that imperialist and colony No Compute the total cost of all empires Pick the weakest colony from the weakest empire and give it to the empire that has the most likelihood to possess it Is there an empire with no colonies? Yes Eliminate this empire No No Stop condition satisfied ? Yes Output Fig. Z nþ1 ¼ 1 À 2 Á Z 2 n ð2Þ . 1 shows the flowchart of the basic ICA. the grey function of the matching image is t(x. In this ideal new world all the colonies have the same positions and same costs and they are controlled by an imperialist with the same position and cost as themselves. in our application of this algorithm in template matching experiment. this algorithm is easily to be trapped into local optimum. Then the algorithm will continue by the imperialist in the new position and then colonies start moving toward this position. ICA begins with initial empires. which depends on both the power of the imperialist country and the power of its colonies.. which represents the found best solution of the matching problem. In this case. y t ð x. Any individual of an empire is called a country. Then. Chaotic ICA for template matching The correlation tracking method is based on the calculation of cross correlation function. To further improve this algorithm.. 1995). And when an empire loses all of its colonies. 1 6 x 6 M. yÞ qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi hðu. y are integers (Lai et al. we adopt the logistic map: P x. calculate the total power of each empire.H. As is shown in Fig. v þ yÞ x . In our paper. 2008). the best matching image can be obtained. The imperialistic competition gradually brings about a decrease in the power of weaker empires and an increase in the power of more powerful ones. Flowchart of the basic ICA. / Pattern Recognition Letters 31 (2010) 1868–1875 1869 and natural selection (Melanie. v þ yÞt ðx. v Þ ¼ qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi P 2 P 2 x. and x. all empires try to take the possession of colonies of other empires and control them.y f ðu þ x. the colonies in each of them start moving toward their relevant imperialist country. y). the bigger empires have greater number of colonies while weaker ones have less. which is modeled by just picking some (usually one) of the weakest colonies of the weakest empires and making a competition among all empires to possess these (this) colonies. 1999). y). initialize a number of countries which represent possible solutions of the matching problem. while the rest form the colonies of these imperialists. colony and imperialist state that collectively form empires. in the imperialistic competition process. 2004). Imperialistic competitions among these empires form the basis of the ICA. First. the imperialist and the colony change their positions. After a while all the empires except the most powerful one will collapse and all the colonies will be under the control of this unique empire. and select those with relative high fitness to be the imperialist states. Similar to the other evolutionary algorithms that start with initial populations. it can be defined as follows: let the pixels of the template image be M Â N and the grey function is f(x. While moving toward the imperialist. After the exchanging step. a colony might reach to a position with higher cost than that of imperialist. Imperialistic competitions converge to a state in which there exist only one empire and its colonies are in the same position and have the same cost as the imperialist. the optimization concepts based on chaotic sequences instead of random sequences is a powerful strategy to diversify the population of particles and improve the ICA’s performance in preventing premature convergence to local maximum. after forming initial empires.

Initialize the countries of geometric transformation parameters. the normalized cost of an imperialist is defined by Fitnessn ¼ fitnessn À 0:7à minffitnessi g i ð4Þ where fitnessn is the similarity value of the nth imperialist and Fitnessn is its normalized similarity value. which include the horizontal translation parameter tx and the vertical translation parameter ty. The initial empires.. and the number of colonies NumOfColony.h in this figure is a random amount of deviation between Àc and c. h  UðÀc. Imperialist N Colony 1 Colony 2 Colony 3 Colony N Fig.. and average_fitness as the average similarity value of all countries. and Z0 – 0.ty). (1). The bigger empires have greater number of colonies while weaker ones have less. The implementation procedure of our proposed matching strategy based on improved ICA are described as follows. the number of imperialists NumOfImper.1) under the conditions that the initial Z0 2 (À1. the colonies are divided among imperialists based on their power. b  dÞ ð6Þ where b is a number greater than 1 and d is the distance between colony and imperialist. calculate their similarity values fitness. Zn 2 (À1. If max_fitness-average_fitness < e1. b > 1 causes the colonies to get closer to the imperialist state from both sides. which we consider to be uniformly distributed between 0 and b  d. based on the defined similarity function as shown in Eq. Step 3. Duan et al.1). With normalized cost of all imperialists. Fig. That is. To proportionally divide the colonies among imperialists. . . / Pattern Recognition Letters 31 (2010) 1868–1875 Imperialist 1 Imperialist 2 Imperialist 3 .. cÞ ð7Þ . the initial colonies can be divided among empires according to the following equation NumOfCountries ¼ NumOfImper þ NumOfColony ð 3Þ ( ) Fitnessn Á NumOfColony N:C :n ¼ round PNumOfColony Fitnessi i¼ 1 ð5Þ Denote the largest iteration with Tmax and current iteration with T. also max_fitness < e2. The colonies move toward the imperialist by x units. e1 = 0. .. which represents the direction of the movement. Then x  U ð0. then the better solution generated from chaotic system substitute random number of the countries. and NumOfColony is the number of initial colonies.n is the initial number of colonies of the nth empire. which is calculated through Eq.. as well as the number of the countries NumOfCountries. where Zn is the nth chaotic number. (1). each of which belongs to an empire. which satisfy the condition shown as follows: Step 2. Initialize the parameters of ICA. In our chaotic ICA approach.1870 H. 3. The colonies are randomly chosen and given to the nth imperialist. respectively. the initial number of colonies of an empire should be directly proportionate to its power. e2 = 0. In this way. where e1e2 are both positive constants (in our experiment.To form the initial empires. Assume max_fitness as the max similarity value of all countries. The goal is to find the optimal combination of parameters Country = (tx.. Then select NumOfImper of the most powerful countries to form the empires. 2.. the global convergence can be improved. the ICA is firstly utilized to find the global best position as a candidate solution. . In this figure x is a random variable with uniform. and the phenomena of falling into local best solution can be prevented. The new position of colony is shown in a darker color.. Step 1. Initialize the starting iteration T = 1. Obviously.. and these colonies along with the nth imperialist form the nth empire. and n denotes the iteration number. The remaining NumOfColony of the initial countries will be the colonies.9). which can provide the best similarity value.15. where N. Movement of colonies toward their relevant imperialist in a randomly deviated direction. According to the geometric parameters of the countries. .C.

. and replace a random country with the optimized particle No No No T=T+1 Yes T < Tmax ? No Output Fig.H. 4. Duan et al. in most of implementations a value of about 2 for b and about p/4 (rad) for c results in good convergence of countries to the global minimum. The detailed procedure of our proposed chaotic ICA for template matching. Nevertheless the values of b and c are arbitrary. where c is a parameter that adjusts the deviation from the original direction. / Pattern Recognition Letters 31 (2010) 1868–1875 1871 Begin Initialize the countries and parameters of ICA Calculate the similarity value and form the initial empire system according to their similarity T= 1 Move the colonies to their relevant imperialist Is there a colony in an empire which has higher fitness than that of imperialist ? Yes Exchange the positions of that imperialist and colony Compute the total cost of all empires Pick the weakest colony from the weakest empire and give it to the empire that has the most likelihood to possess it Is there an empire with no colonies? Yes Eliminate this empire Is the chaotic condition satisfied? Yes Conduct optimization operation.

4 0. if the colony reaches to a position with higher similarity value than that of its imperialist.Calculate the total power of the empires according to the following equation T :f :n ¼ fitnessðimperialistn Þ þ n meanffitnessðcolonies of empiren Þg ð8Þ where T.05 0 0 50 100 150 200 250 300 (c) Matching result using basic ICA Iteration (d) Matching evolution curve using basic ICA 1 Maximum Average 0. and n is a positive number which is considered to be less than 1.1872 H. A little value for n .3 Maximum Average Fitness 0. and in the moving process.8 Fitness 0. 5. Step 4.1 0.35 0.2 0 0 50 100 150 200 250 300 Iteration (e) Matching result using chaotic ICA (f) Matching evolution curve using chaotic ICA Fig.4 0. Calculate the similarity value of the new colony.45 0.2 0.25 0.15 0.6 0. Duan et al. change the positions between them.f.n is the total cost of the nth empire. Comparative results for Case 1. / Pattern Recognition Letters 31 (2010) 1868–1875 (a) Template image (57×42) (b) Original image (778×583) 0.

35 Maximum Average Fitness 0. Step 5.5 0. then go to the chaotic system to find a better solution as a substitute of random number of used country. / Pattern Recognition Letters 31 (2010) 1868–1875 1873 (a) Template image (56×38) (b) Original image (500×288) 0.15 0. 6.4 0. 4.8 Fitness 0. output the optimal parameters and optimal fitness value. where e1 and e2 are both positive constants (in our experiment. and also max_fitness < e2.1 for n is a proper value in most of the implementations. e2 = 0. Conduct the imperialistic competition work by just picking one of the weakest colonies of the weakest empires and making a competition among all empires to possess this colony.05 0 0 50 100 150 200 250 300 Iteration (d) Matching evolution curve using basic ICA 1 Maximum Average 0.25 0. go to Step 3. Otherwise. Step 6. .45 0.4 0.The above-mentioned procedure is shown with Fig.3 0. If T < Tmax.15. Each of empires will have a likelihood of taking possession of the mentioned colony.6 0. the probability of which is proportional to its power calculated above. e1 = 0. causes the total power of the empire to be determined by just the imperialist and increasing it will add to the role of the colonies in determining the total power of an empire. Calculate the max and average similarity value of all the countries.1 (c) Matching result using basic ICA 0. and once if max_fitness-average_fitness < e1. Step 7. Duan et al.9).2 (e) Matching result using chaotic ICA 0 0 50 100 150 200 250 300 Iteration (f) Matching evolution curve using chaotic ICA Fig. The value of 0. Step 8. Comparative results for Case 2.2 0. An empire is assumed to be collapsed when it loses all of its colonies.H.

1 0 0 50 100 150 200 250 300 (e) Matching result using chaotic ICA Fig.6 0.05 0 50 100 150 200 250 300 (c) Matching result using basic ICA 1 0.5 0. The parameters for the basic ICA and chaotic ICA were set to the following values: NumOfCountries = 100.3 Maximum Average Fitness 0. Experimental results In order to investigate the feasibility and effectiveness of the proposed novel chaotic ICA approach to the template matching. 7.1 0.7 Iteration (d) Matching evolution curve using basic ICA Maximum Average Fitness 0. which are also compared with the basic ICA. Duan et al.9 0.3 0. / Pattern Recognition Letters 31 (2010) 1868–1875 (a) Template image (120×122) (b) Original image (992×744) 0. NumOfImper = 10.35 0.2 0.25 0.2 0. Comparative results for Case 3. Iteration (f) Matching evolution curve using chaotic ICA 5.45 0.4 0.15 0. series of experiments are conducted. NumOf- .4 0.1874 H.8 0.

The central problem in template matching is to find an efficient and effective approach to characterize image features and measure the degree of similarity between two images that are superimposed on one another. M. 2008. 2009. It is obvious that the basic ICA can hardly obtain the correct matching template. Conclusions and future work Template matching plays a very important role in pattern recognition..Y.. In: Proceedings of the 2007 IEEE Congress on Evolutionary Computation. It is noted that chaotic parallelism provides more powerful computing ability for template matching where simple operations on large set of data is required.. Hadi. NCET-10-0021). R. Particle swarm optimization. Zeiler.. Melanie. vol.. Distributed optimization by ant colonies. 2007. pp.B. Intell. Colonial competition algorithm: A novel approach for PID controller design in MIMO distillation column process. Program for New Century Excellent Talents in University of China (Grant No. Springer-Verlag. 2 (1). image analysis and computer vision. In: Proceedings of the 2008 International Conference on Information and Automation.H. A. In: Proceedings of the 1995 IEEE Conference on Neural Networks. H. Comput. Cybernet. MIT Press. F. J.. Intell. Berlin Heidelberg. Imperialist competitive algorithm: An algorithm for optimization inspired by imperialistic competition... 1991. the Fundamental Research Funds for the Central Universities (Grant No. Eberhart. A hybrid learning approach to tissue recognition in wound images. Lai. Int.D. the proposed chaotic ICA can find the correct matching template each time. Int. There is still some work which requires further investigation in order to reduce the time consumption to a level of real-time. J. 2009. 208–212. L. 2 GB memory. Open Fund of the State Key Laboratory of Virtual Reality Technology and Systems. 1994. G.V.. Duan et al. References Brunelli. Point correlation: A reduced-cost template matching technique..C. Héctor. 2005. Lucas... 60975072 and 60604009). M. In: Proceedings of the First European Conference on Artificial Life. A fast template matching algorithm based on central moments of images. Massachusetts. S. 327–347.L. R. A. 1975. Johnston. Comput. 596–600. 4661–4667. Rajabioun.G. Beijing NOVA Program Foundation of China (Grant No. 1942–1948.9. Hadi. e2 = 0. and is executed by the computer with 2.J. 1999. Int.0 GHZ CPU. F. J.. 1995. A..15. the Aeronautical Science Foundation of China (Grant No. J. V. Maniezzo.. Holland.. . R.. R. and Open Fund of the Provincial Key Laboratory for Information Processing Technology. 2004. 4. X. 120–147. pp. Paris. An Introduction to Genetic Algorithms. 2009. Esmaeil. 1 (3). Cybernet. An improved pattern matching technique for lossy/lossless compression of binary printed Farsi and Arabic textual images. Template Matching Techniques in Computer Vision: Theory and Practice.. C. However. Duan. Mayer. Laura. ISBN: 978-0-470-51706-2. Cybernet. M. J. R.. Dorigo.. Ann Arbor. 5–7.. In: Proceedings of the First IEEE International Conference on Image Processing. 134–142. M. The experimental results confirm the effectiveness and the advantages of the proposed method over the basic ICA. pp. Acknowledgements This work is partially supported by Natural Science Foundation of China (Grant Nos. Suzhou University. K.1. 6. even the evolution time is rather short. Science Press. Applications of Evolutionary Computation in Chemistry. e1 = 0. YWF-1001-A18). The experimental results confirm the effectiveness of the proposed method for solving template matching problems under different environments. 2008. Three experimental results are given in Figs. We will also focus on applying this technique to stereo matching and feature tracking under complicated noisy environments. Beijing. Colorni. Intell. Krattenthaler. Kennedy. / Pattern Recognition Letters 31 (2010) 1868–1875 1875 Colony = 90. M.. the innovation of our approach lies in applying the proposed chaotic ICA to solve the template matching problem. In this paper. 2008ZC01006). Hashemzadeh. 2007A017).. Comput. Esmaeil. 2 (2). Liu. n = 0. Ant Colony Algorithms: Theory and Applications.H.. Tmax = 300.. Mojtaba. Francisco. and operation system of Windows Vista. The procedure of the algorithm simulation is implemented in Matlab 2008. Ohkawa. W.. pp. pp. and the convergence and the suitability of chaotic ICA for image matching should be further studied theoretically. Adaptation in Natural and Artificial Systems.G. University of Michigan Press. J. Wiley.. 337–355.

Sign up to vote on this title
UsefulNot useful