# Stochastic Fractal Search Algorithm for Template Matching with Lateral Inhibition

Authors: Qifang Luo; Sen Zhang; Yongquan Zhou
Journal: Scientific Programming
 (2017)

---

## Abstract

Template matching is a basic and crucial process for image processing. In this paper, a hybrid method of stochastic fractal search (SFS) and lateral inhibition (LI) is proposed to solve complicated template matching problems. The proposed template matching technique is called LI-SFS. SFS is a new metaheuristic algorithm inspired by random fractals. Furthermore, lateral inhibition mechanism has been verified to have good effects on image edge extraction and image enhancement. In this work, lateral inhibition is employed for image preprocessing. LI-SFS takes both the advantages of SFS and lateral inhibition which leads to better performance. Our simulation results show that LI-SFS is more effective and robust for this template matching mission than other algorithms based on LI.


---

## Body

## 1. Introduction

Template matching is a way of getting a measure of similarity between two image sets that are superimposed on one another. It is a hot issue in the field of face recognition [1], pulmonary nodules detection [2], handwriting identification [3], and road detection [4]. Template matching techniques involve the translation of the template to every possible position in the original image and the evaluation of the match between the template and the source image at that position [5, 6].The existing template matching techniques can be divided into two categories: the intensity-based approach and the feature-based approach [7]. The intensity-based method can be regarded as an optimization process of finding the maximum similar degree between the template and the original image. On the other hand, feature-based method matches the basis of image feature such as border, unique point, texture, entropy, and energy [8]. Compared with the feature-based method, the intensity-based method provides better performance and is widely used as it is independent of extensive feature extractions and has superior ability to restrain noise [9].In recent years, researchers have gradually shifted their interests towards the utilization of intelligent algorithms, such as artificial bee colony (ABC) [10], internal-feedback artificial bee colony (IFABC) [11], balance-evolution artificial bee colony (BEABC) [12], states of matter search (SMS) algorithm [13], and imperialist competitive algorithm (ICA) [7] which have been proposed for this template matching problem. Although these algorithms aim to reduce the computation load of the global optimums searching, none of them can completely guarantee the derivation of suboptimal matching results. It is important to note that most intelligent algorithms are generally suitable for the optimization of convex or nearly convex functions [11, 12]. However, the template matching field contains a finite number of feasible matching locations. Such a discrete function is not smooth, but extremely ill-conditioned actually. In other words, the solution surface may drastically oscillate along the domain, which critically restricts the advantages of such intelligent algorithms. Therefore, it needs a new way to modify these existing intelligent algorithms in order to accommodate the discreteness and oscillation in the objective function.In our paper, we utilize a recently proposed SFS, which was inspired by random fractals. SFS was firstly proposed by Salimi [14] who used such algorithm to solve the continuous optimization problems. By using the diffusion phenomenon that reveals fractals, SFS offers a new insight to solve complex optimization problems with fast convergence rate and high search accuracy. Because of these merits, SFS is attracting more and more attention and it has been successfully used for frame structure optimization problems [15, 16], target recognition [17], precise trajectory optimization [18], distributed database queries optimization [19], and so on.Moreover, LI approach is utilized to preprocess the original and template images before using SFS for matching. The hybrid method is named LI-SFS. Lateral inhibition mechanism is firstly discovered and verified by Hartline and his research group when they conducted an electrophysiology experiment on the limulus’ vision [20]. This mechanism, which provides great help to detect object in cluttered background, can enhance the contrast of sensory information and reduce low-frequency noises [10]. Experimental results confirm that SFS is more capable than several intelligent algorithms such as IFABC [11], BEABC [12], SMS [13], and ICA [7] in this LI-based template matching scheme. The rest of the paper is structured as follows.Section2 discusses the principles of SFS. Section 3 describes lateral inhibition mechanism. Section 4 details the implementation procedures of the hybrid method LI-SFS. Then, several cases of comparative experiments have been conducted in Section 5. Finally, Section 6 concludes the study and advises some directions for future studies.


## 2. The Basic Principle of SFS

SFS [14] algorithm is a new metaheuristic optimization method, which is proposed by Salimi and inspired by random fractals. Two main processes to perform the SFS are the diffusion process and the update process. In the first process, each particle diffuses around to current position so as to ensure exploitation ability. With this process the chances of achieving global optimal increase and being trapped in local optimal is prevented. For SFS we consider a static diffusion process that means that only the best particle generated from diffusion process is considered, and the rest of the particles are discarded. Moreover, SFS utilizes some random update processes that results in exploration properties. To generate new particles from the diffusion procedure, a statistical method called Gaussian walk is applied, which is more promising in finding global optimal solution. A series of Gaussian walks proceeding in diffusion process is as follows:(1)GW1=GaussianμBP,σ+ε·BP-ε′·Pi,(2)GW2=GaussianμP,σ,where ε and ε′ are uniformly distributed random numbers restricted to [0,1], BP is the position of the best point, and Pi is the ith point in the group. μBP,μP,σ are Gaussian parameters where μBP is exactly equal to BP; also μP is equal to Pi. The standard deviation is shown as follows:(3)σ=log⁡gg·Pi-BP.In order to encourage a more localized search as individuals and get closer to the solution, (log(g))/g in (3) is used for decreasing the size of Gaussian jumps with the increase of the number of generations.Assume that our optimization problem isD dimensional problem; thus each individual particle is based on D dimensional vector. In time of initialization, each particle is initialized randomly on the basis of problem constraints. In our problem each individual particle is a vector whose length is equal to 2; namely, D=2. Initialization equation of jth point, Pj, is addressed as follows:(4)Pj=LB+ε·UB-LB,where LB and UB are the lower and the upper bounds of problem constrained vectors, respectively.After initialization, the fitness function of each point is calculated to obtain the best pointBP. In accordance with exploitation ability in the diffusion process, all the points roam around their current position to exploit problem search space. In addition, two statistical procedures are considered to increase the better space exploration. The first statistical method is applied to each individual vector index, while the second method performs on all points. In the first statistical procedure, at first, we sort all the points based on the fitness value of each individual. Each point i in the group is then assigned a probability through the following formula:(5)Pai=rankPiN,where rank(Pi) is regarded as the rank of point Pi among the other points in the group and N is the number of all points in the group. According to this approach described in (5), the individual with a higher rank will have a larger probability to be selected.Equation (5) serves two main functions. The first is used to increase the chance of changing the position of points that have not obtained a good solution. In the second generation, the good solutions will increase. For each point Pi in group, if Pai<ε, thejth component of Pi is updated using (6); otherwise it remains invariant. (6)Pi′j=Prj-ε·Ptj-Pij,where Pi′ is the new modified position of Pi, Pr and Pt are random selected points in the group, and ε is a random number in [0,1].The first update statistical procedure is carried out on the components of the points, while the second statistical update is applied in which the position of a point is changed considering the position of other points in the group. Through this property, the quality of exploration is improved and diversification property is satisfied. Before performing the second procedure, all points attained from the first update process are ranked according to (5). In the same manner as the first statistical procedure, if Pai<ε for a new point Pi′, the present position of Pi′ is changed according to (7) and (8) as follows; otherwise there is no update.(7)Pi′′=Pi′-ε^·Pt′-BP∣ε′≤0.5,Pi′′=Pi′+ε^·Pt′-Pr′∣ε′>0.5,where Pt′ and Pr′ are random points selected from the first procedure and ε^ are generated by the Gaussian normal distribution. The new point Pi′′ is replaced by Pi′ if its fitness function value is better than Pi′. A more detailed description of SFS method can be found in [14].The standard SFS can be shown in Algorithm1.Algorithm 1:SFS pseudo algorithm.
Initialize a population ofN points
While  g < maximum generation  Do
For  each Point Pi in the system  Do
Call Diffusion Process with the following process:
q = (maximum considered number of diffusion).
For  j=1 to q  Do
If  (user uses Gaussian walk to solve the problem)
Create a new point based on Eq. (1).
Else  (user uses another Gaussian Walks to solve the problem)
Create a new point based on Eq. (2).
Call Updating Process with the following process
First Updating Process:
First, all points are ranked based on Eq. (5).
For  each Point Pi in the system  Do
For  each component j in Pi  Do
If  (rand[0,1]≥Pai)
Update the componentj in Pi based on Eq. (6).
Else
Do nothing.
Second Updating Process:
Once again, all points obtained by the first update Process are ranked based on Eq. (5).
For  each new point Pi′ in the system  Do
If  (rand[0,1]≥Pai′)
Update the position based on Eqs. (7).
Else
Do nothing.


## 3. Lateral Inhibition Mechanism

Hartline et al. found that every microphthalmia of limulus’ ommateum is regarded as a receptor that is restricted by its adjacent receptors, and the inhibited effect is mutual and spatially summed [9]. The nearer the receptors are close to each other, the stronger the inhibited effect is.In retinal images, intensively excited receptors in illuminatingly light area inhibit those in dark area more strongly than the latter to the former [21]. Therefore, lateral inhibition effectively increases the contrast and the distortion of sensory information. By this means, the important information of the image, namely, the edge of image including the intensity gradient in retinal image and the important characters of vision scene, is strongly strengthened. In this paper, we apply the mechanism to preprocess the template and the original images in order to improve the spatial resolution and increase the efficiency and accuracy of the template matching.The classical lateral inhibition model is shown as follows:(8)rp=ep+∑j=1nkp,j·rj-rp,j,p=1,2,…,n;j≠p.In order to apply this mechanism to image processing, the model is modified into a two-dimensional and gray form. Gray value of the pixel(m,n) in image is expressed with the following equation:(9)Rm,n=I0m,n+∑i=-MM∑j=-NNαi,j·I0m+i,n+j,where αi,j is the lateral inhibition coefficient of the pixel (i,j) to the central pixel, I0(m,n) represents the original gray value of pixel (m,n), and R(m,n) is the gray value of pixel (m,n) after being processed by lateral inhibition. A schematic instance of such a receptive field under the condition that M=N=2 is shown in Figure 1.Figure 1
Schematic diagram of lateral inhibition model under the condition thatM=N=2.In this paper, for the convenience of analysis, it is set toM=N=2. Recalling (9) yields(10)Rm,n=I0m,n+∑i,j∈S2α2·I0m,n+∑i,j∈S1α1·I0m,n+α0·I0m,n,where S1 and S2, respectively, denote location sets of the surrounding 16 and 8 pixels as shown in Figure 1. Because there is no expectation whether I0(m,n)>I0(i,j) or not when [i,j]∈S1∪S2, it is unbiasedly expected that (11)ERm,n=EI0m,nwhich implies balanced inhibition energy. So, (12)E∑i,j∈S2α2·I0m,n+∑i,j∈S1α1·I0m,n+α0·I0m,n=16α2+8α1+α0·const≡0.Therefore, in order to ensure an unbiased preprocessing result, a natural constraint on lateral inhibition coefficients is satisfied as follows.(13)α0+8α1+16α2≡0.Some parameters of LI model are set following the similar works reported in [7, 9, 10]. In detail, M=N=2 and the matrix U that contains lateral inhibition coefficients αi,j are set as follows:(14)U=-0.025-0.025-0.025-0.025-0.025-0.025-0.075-0.075-0.075-0.025-0.025-0.0751-0.075-0.025-0.025-0.075-0.075-0.075-0.025-0.025-0.025-0.025-0.025-0.025.The modulus templateU is combined with R(m,n) and then a new gray scale of the image is obtained. Finally, the image’s edge is extracted by the following equation.(15)Fm,n=0Rm,n≤T255Rm,n>T,where T is a user-defined threshold value according to practical situations and F(m,n) is the final obtained gray value of pixel (m,n).


## 4. Hybrid SFS and Lateral Inhibition

### 4.1. Template Matching Principle and the Fitness Function of LI-SFS

Image template matching aims to concern about locating a given template image over an original image, so that they can best match each other. In this section, the template matching is converted to a numerical optimization problem, during which the lateral inhibition mechanism is implemented to promote the subsequent matching process. It is generally assumed that the predefined template image and original image are given in RGB format. Figure2 shows how a template image is overlapped onto an original image at a candidate location (a,b). The template matching scheme can be expressed as finding an optimal location (a,b) for the gray template image so that the similarity between template and original image is maximized within the feasible searching region.Figure 2
Schematic diagram of template process.In Figure2, the pink box denotes original image (A×B); the small blue box represents template image (P×Q). The red dotted lines surround the searching region where all feasible solutions exist. The template image is shifted across the original image by an offset (a,b) by using the origins of the two images as reference points. The dimensions of the original image (A×B) and the template image (P×Q) determine the maximal feasible searching region for the comparison.In this paper, the proposed LI-SFS is introduced to conduct the searching task. The fitness function is defined to calculate the fitness of every agent according to different situations and real practices. Template matching based on gray cross-correlation measurement has strong ability to suppress noise and the performance of simple calculation, while it is time-consuming [22]. Our work follows the custom of criterion selection as in [22, 23]; the fitness value of template matching is shown in Algorithm 2.Algorithm 2:Fitness value pseudocode.
Begin
fitness=0
Fori=0:P-1
Forj=0:Q-1
IfF(m+i,n+j)=Ft(i,j) then
fitness=fitness+1
End If
End For
End For
Endf
i
t
n
e
s
s increases by 1 only when F(m+i,n+j)=Ft(i,j), where fitness is the similar degree between the template and the pattern whose starting point is pixel (m,n) in the original image. So the maximum fitness denotes the best solution of the template matching problem. The similarity measurement can reduce the calculation time and is easy to program. (m+i,n+j) and (i,j), respectively, represent the coordinates of the pixel in the original image and the template image. F(m+i,n+j) and Ft(i,j) are the gray values of pixel (m+i,n+j) and pixel (i,j) processed by (15). The scope of the coordinates in the original image for matching is 1≤m≤A-P+1 and 1≤n≤B-Q+1.Therefore, we definelow1=1,low2=1,up1=A-P+1,up2=B-Q+1 in our experiments.


### 4.2. The Procedure of LI-SFS

The proposed LI-SFS absorbs the efficiency of SFS and the accuracy of lateral inhibition mechanism. The main procedures of the LI-SFS are given as follows.Step 1 (image preprocessing).
We obtain the original image and the template image and transform both of them into gray scale format. Then, we filter images to suppress noises and apply lateral inhibition mechanism to preprocess these images according to (10)–(15) and save the new matrixes of images.Step 2 (initialize the LI-SFS parameters).
We initialize the size of the populationN, the dimension of the problem D, and the maximum function evolution number (MaxFEs) which is defined to terminate the process. In this paper, D is defined as two, that is, the dimension of images.Step 3 (diffusion process).
In this step the maximum diffusion number in SFS algorithm is set to 1.Step 4 (Gaussian walk method).
Note here that in this step we apply the first Gaussian walk to solve the problem. By using this Gaussian walk method to solve the problem, the new position of search agent is defined.Step 5 (updating process).
In this step the position of search agents is updated. In starting stage all search agents are ranked as per their optimum position. After that, using two updating processes, the best search agent is identified. These search agents are given the optimum location of particles.


## 4.1. Template Matching Principle and the Fitness Function of LI-SFS

Image template matching aims to concern about locating a given template image over an original image, so that they can best match each other. In this section, the template matching is converted to a numerical optimization problem, during which the lateral inhibition mechanism is implemented to promote the subsequent matching process. It is generally assumed that the predefined template image and original image are given in RGB format. Figure2 shows how a template image is overlapped onto an original image at a candidate location (a,b). The template matching scheme can be expressed as finding an optimal location (a,b) for the gray template image so that the similarity between template and original image is maximized within the feasible searching region.Figure 2
Schematic diagram of template process.In Figure2, the pink box denotes original image (A×B); the small blue box represents template image (P×Q). The red dotted lines surround the searching region where all feasible solutions exist. The template image is shifted across the original image by an offset (a,b) by using the origins of the two images as reference points. The dimensions of the original image (A×B) and the template image (P×Q) determine the maximal feasible searching region for the comparison.In this paper, the proposed LI-SFS is introduced to conduct the searching task. The fitness function is defined to calculate the fitness of every agent according to different situations and real practices. Template matching based on gray cross-correlation measurement has strong ability to suppress noise and the performance of simple calculation, while it is time-consuming [22]. Our work follows the custom of criterion selection as in [22, 23]; the fitness value of template matching is shown in Algorithm 2.Algorithm 2:Fitness value pseudocode.
Begin
fitness=0
Fori=0:P-1
Forj=0:Q-1
IfF(m+i,n+j)=Ft(i,j) then
fitness=fitness+1
End If
End For
End For
Endf
i
t
n
e
s
s increases by 1 only when F(m+i,n+j)=Ft(i,j), where fitness is the similar degree between the template and the pattern whose starting point is pixel (m,n) in the original image. So the maximum fitness denotes the best solution of the template matching problem. The similarity measurement can reduce the calculation time and is easy to program. (m+i,n+j) and (i,j), respectively, represent the coordinates of the pixel in the original image and the template image. F(m+i,n+j) and Ft(i,j) are the gray values of pixel (m+i,n+j) and pixel (i,j) processed by (15). The scope of the coordinates in the original image for matching is 1≤m≤A-P+1 and 1≤n≤B-Q+1.Therefore, we definelow1=1,low2=1,up1=A-P+1,up2=B-Q+1 in our experiments.


## 4.2. The Procedure of LI-SFS

The proposed LI-SFS absorbs the efficiency of SFS and the accuracy of lateral inhibition mechanism. The main procedures of the LI-SFS are given as follows.Step 1 (image preprocessing).
We obtain the original image and the template image and transform both of them into gray scale format. Then, we filter images to suppress noises and apply lateral inhibition mechanism to preprocess these images according to (10)–(15) and save the new matrixes of images.Step 2 (initialize the LI-SFS parameters).
We initialize the size of the populationN, the dimension of the problem D, and the maximum function evolution number (MaxFEs) which is defined to terminate the process. In this paper, D is defined as two, that is, the dimension of images.Step 3 (diffusion process).
In this step the maximum diffusion number in SFS algorithm is set to 1.Step 4 (Gaussian walk method).
Note here that in this step we apply the first Gaussian walk to solve the problem. By using this Gaussian walk method to solve the problem, the new position of search agent is defined.Step 5 (updating process).
In this step the position of search agents is updated. In starting stage all search agents are ranked as per their optimum position. After that, using two updating processes, the best search agent is identified. These search agents are given the optimum location of particles.


## 5. Experimental Results

In this section, we verify the performance of our proposed algorithm through a series of comparative experiments with those produced by the IFABC method [11], BEABC method [12], SMS method [13], and ICA method [7]. Simulations have been executed across seven images 1–7 that are shown in Figures 3–9, respectively. All the simulations were carried out in a Matlab R2012a environment and executed on a 4-core Intel Core i5-4590 CPU with 4 GB RAM running at 4×3.30GHz under Windows 7 operating system. In this work, all images are from Google Earth®.Figure 3
Experimental results for image 1. (a) Original image (684× 591). (b) Template image (43 × 34). (c) Original image processed by the lateral inhibition. (d) Template image processed by the lateral inhibition. (e) The final template matching result. (f) Evolution curves of experimental results for image 1.
(a)
(b)
(c)
(d)
(e)
(f)Figure 4
Experimental results for image 2. (a) Original image (690× 405). (b) Template image (57 × 45). (c) Original image processed by the lateral inhibition. (d) Template image processed by the lateral inhibition. (e) The final template matching result. (f) Evolution curves of experimental results for image 2.
(a)
(b)
(c)
(d)
(e)
(f)Figure 5
Experimental results for image 3. (a) Original image (687× 405). (b) Template image (26 × 27). (c) Original image processed by the lateral inhibition. (d) Template image processed by the lateral inhibition. (e) The final template matching result. (f) Evolution curves of experimental results for image 3.
(a)
(b)
(c)
(d)
(e)
(f)Figure 6
Experimental results for image 4. (a) Original image (690× 402). (b) Template image (54 × 47). (c) Original image processed by the lateral inhibition. (d) Template image processed by the lateral inhibition. (e) The final template matching result. (f) Evolution curves of experimental results for image 4.
(a)
(b)
(c)
(d)
(e)
(f)Figure 7
Experimental results for image 5. (a) Original image (749× 507). (b) Template image (51 × 45). (c) Original image processed by the lateral inhibition. (d) Template image processed by the lateral inhibition. (e) The final template matching result. (f) Evolution curves of experimental results for image 5.
(a)
(b)
(c)
(d)
(e)
(f)Figure 8
Experimental results for image 6. (a) Original image (684× 588). (b) Template image (42 × 47). (c) Original image processed by the lateral inhibition. (d) Template image processed by the lateral inhibition. (e) The final template matching result. (f) Evolution curves of experimental results for image 6.
(a)
(b)
(c)
(d)
(e)
(f)Figure 9
Experimental results for image 7. (a) Original image (749× 347). (b) Template image (49 × 30). (c) Original image processed by the lateral inhibition. (d) Template image processed by the lateral inhibition. (e) The final template matching result. (f) Evolution curves of experimental results for image 7.
(a)
(b)
(c)
(d)
(e)
(f)In this test, the population sizeN is set to 100. The maximum function evolution numbers (MaxFEs) are set to 300. Such a standard of stopping has been carefully selected to assure compatibility between similar works reported in the literature [8, 13].Initial parameters for each algorithm that is used in the comparison are listed as follows.(
1) LI-IFABC. The parameters are set to α=0.1 and Limit=10.(
2) LI-BEABC. The parameters are set to Limit=10.(
3) LI-SMS. The parameters are set in gas ρ∈[0.8,1],β=0.8,α=0.8 and H=0.9; in liquid ρ∈[0.3,0.6]β=0.4,α=0.2 and H=0.2; in solid ρ∈[0,0.1],β=0.1,α=0 and H=0.(
4) LI-ICA. The parameters are set toNumOfCountries = 100,NumOfImper = 10, andNumOfColony = 90.(
5) LI-SFS. The algorithm has been configured by using maximum diffusion number MDN=1.The threshold for image edge extracting was set toT=110. These experiments are designed to successfully match the template image to the original image. The coordinate of the template image fixed in the original image determines the success of matching. The experimental results are listed in Table 1. The results are averaged over 50 independent runs, and the best results are denoted in bold type. The comparisons are analyzed considering four performance indexes: the average (Avg), the converged iteration, the correct rate, and the average CPU Time. The average indicates the mean fitness value. The converged iteration exhibits the times of iterations that have been visited during a single experiment. The correct rate represents the number of executions in percentage for which the algorithm successfully locates the optimal detection point. The average CPU Time indicates the time in seconds which is employed during the execution of each single experiment. All these performance indexes are averaged considering a determined number of executions, aiming to assure statistical consistency.Table 1
Comparative optimization results obtained using LI-SFS and other algorithms.
Image
Result
LI-IFABC [11]
LI-BEABC [12]
LI-SMS [13]
LI-ICA [7]
LI-SFS
Image 1
Avg
1069.88
1046.40
924.60
881.86
1143.28
Converged iter
186
199
287
246
137
Correct rate (%)
66
60
26
20
98
CPU Time (sec)
1.07
1.04
2.27
2.27
2.24
Image 2
Avg
1859.12
1786.40
1749.80
1570.30
2064.66
Converged iter
212
247
263
272
90
Correct rate (%)
52
36
30
10
94
CPU Time (sec)
1.73
1.72
2.97
3.25
2.88
Image 3
Avg
497.74
500
431.32
459.48
500
Converged iter
106
94
291
133
67
Correct rate (%)
96
100
10
60
100
CPU Time (sec)
0.66
1.32
1.74
1.75
0.61
Image 4
Avg
1712.16
1862.40
1757.58
1570.70
2089.88
Converged iter
266
231
278
284
90
Correct rate (%)
26
42
22
6
98
CPU Time (sec)
1.69
2.88
3.39
2.88
1.58
Image 5
Avg
1847.82
1879.04
1584.42
1690.24
1884
Converged iter
136
111
283
201
72
Correct rate (%)
88
98
20
60
100
CPU Time (sec)
1.66
1.59
3.08
2.73
2.88
Image 6
Avg
1561.54
1561.2
1440.82
1316.42
1610
Converged iter
183
187
288
285
92
Correct rate (%)
72
70
12
6
100
CPU Time (sec)
2.64
1.36
2.69
2.72
1.34
Image 7
Avg
1019.60
1027.60
1021.64
973.74
1051.16
Converged iter
272
262
284
300
231
Correct rate (%)
22
24
18
0
44
CPU Time (sec)
0.98
1.97
2.24
2.28
0.96To improve the performance evaluation of evolutionary algorithms, statistical tests should be conducted [24]. In order to determine whether the results of LI-SFS differ from the best results of other algorithms in a statistical method, a nonparametric test which is known as Wilcoxon’s rank-sum test [25, 26] is performed at 5% significance level. The calculated p values in Wilcoxon’s rank-sum test comparing LI-SFS and other algorithms over all the simulation cases are given in Table 2. In Table 2, N/A indicates “not applicable” which means the statistical test cannot be done because both algorithms found the optimum successfully in all the runs. Usually, p values < 0.05 can be considered as sufficient evidence against the null hypothesis.Table 2
p values calculated for the Wilcoxon rank-sum test via comparing LI-SFS versus LI- IFABC, LI- BEABC, LI-SMS, and LI-ICA on seven test images (p≥0.05).
LI-SFS versus
LI-IFABC
LI-BEABC
LI-SMS
LI-ICA
Image 1
5.5131
E
-
05
6.6687
E
-
06
1.5868
E
-
12
5.4321
E
-
14
Image 2
4.8973
E
-
06
8.9744
E
-
09
2.9742
E
-
10
1.9117
E
-
16
Image 3
1.5939E − 01
N/A
1.9534
E
-
17
7.9373
E
-
07
Image 4
1.2671
E
-
12
4.0174
E
-
09
2.7785
E
-
13
2.9243
E
-
18
Image 5
1.2283
E
-
02
3.2709E − 01
7.0990
E
-
15
7.8020
E
-
07
Image 6
6.4921
E
-
05
3.2246
E
-
05
6.7811
E
-
17
1.5605
E
-
18
Image 7
3.5032
E
-
02
4.6496E − 01
2.6490
E
-
02
7.7858
E
-
12Table1 shows the results for all images. As can be seen in this table, the LI-SFS outperforms the other algorithms on images 1-2 and images 4–7 in terms of the Avg, converged iteration, and correct rate. For image 3, it turns out that the converged iteration of LI-SFS is 67, while LI-IFABC is 106, LI-BEABC is 94, LI-SMS is 291, and LI-ICA is 133, apparently showing that the proposed LI-SFS has the fastest convergence. From image 3, we see that, on Avg and correct rate, LI-BEABC and LI-SFS are well capable of providing the best values. From above analyses about images 1–7, we can conclude that the proposed LI-SFS demonstrates superiority in solving template matching optimization problem.In addition, LI-SFS usually consumes less time than the other algorithms. This is because LI-SFS neither adds complicated outside-world strategy nor changes the conventional algorithm framework.According to thep values in Table 2, LI-SFS achieves significant improvement in images 1, 2, 4, and 6 compared to other algorithms. For images 3, 5, and 7, the p values show that the results of LI-SFS are significantly better in three out of four groups. Therefore, this is evidence that LI-SFS results are statistically significant and that it has not occurred by coincidence.The results of the experiment with the original images shown in Figures3(a)–9(a) and the template images shown in Figures 3(b)–9(b) are given. Original and template images processed by the lateral inhibition are shown in Figures 3(c)–9(c) and Figures 3(d)–9(d), respectively. It is obvious that the edges of these images are enhanced. So we can say that lateral inhibition has the ability to enhance the characters of image, which can improve the success rate of template matching. Figures 3(e)–9(e) illustrate matching results for all images. From the matching results, it is clear that LI-SFS method can successfully find the precise location of the template fixed in the original image. Further experiments are given in Figures 3(f)–9(f) to investigate the advantage of LI-SFS.Figures3(f)–9(f) illustrate the averaged evolution curves of all algorithms dealing with all images over 50 independent runs. As can be seen from Figures 4(f) and 6(f)–9(f), the LI-SFS has the fastest convergence rate. Through carefully looking at Figures 3(f) and 5(f), LI-ICA has a fast convergence initially towards the known maximum; however, it is outperformed by LI-SFS after 50 generations and 60 generations, respectively. As the procedure proceeds, LI-SFS gets closer and closer to the maximum, when the Li-ICA becomes premature and trapped into local maximum.According to this comprehensive study, the superior exploration and local maxima avoidance of SFS are able to solve complicated template matching problem efficiently and accurately under different environments.


## 6. Conclusions and Future Works

Template matching is a fundamental and important problem in pattern recognition, image analysis, and computer vision. The central problem in template matching is to determine an efficient and effective approach to characterize image features and measure the degree of similarity between two images. In this work, the innovation of our approach rests with applying SFS to dispose the LI-based template matching problem. Experimental results clearly demonstrate the efficiency of SFS in comparison with other intelligent algorithms involved in this work.Moreover, theoretical analyses have proved that it is necessary for using LI model in template matching [12]. Such a preprocessing procedure is theoretically inefficient or misleading when the original reference image suffers from two kinds of nonuniform illumination changes. In particular, when a reference image is distorted by Gaussian noise, LI model will make the situation even worse.Our future work will focus on adopting SFS to deal with more complicated applications in the field of aeronautics and astronautics. Besides that, we will pay more attention to theoretical analyses in order to thoroughly reveal the advantages/disadvantages of LI model in template matching problem.



---

*Source: 1803934-2017-08-23.xml*