Next Article in Journal
Normalized Multivariate Time Series Causality Analysis and Causal Graph Reconstruction
Next Article in Special Issue
A Novel Hybrid Gradient-Based Optimizer and Grey Wolf Optimizer Feature Selection Method for Human Activity Recognition Using Smartphone Sensors
Previous Article in Journal
Stochastic Thermodynamics of a Piezoelectric Energy Harvester Model
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Hybrid Rao-NM Algorithm for Image Template Matching

1
School of Computer and Communication Engineering, University of Science and Technology Beijing, Beijing 100083, China
2
Shunde Graduate School, University of Science and Technology Beijing, Foshan 528300, China
3
Beijing Key Laboratory of Knowledge Engineering for Materials Science, Beijing 100083, China
*
Author to whom correspondence should be addressed.
Entropy 2021, 23(6), 678; https://doi.org/10.3390/e23060678
Submission received: 28 April 2021 / Revised: 24 May 2021 / Accepted: 26 May 2021 / Published: 27 May 2021
(This article belongs to the Special Issue Unconventional Methods for Particle Swarm Optimization II)

Abstract

:
This paper proposes a hybrid Rao-Nelder–Mead (Rao-NM) algorithm for image template matching is proposed. The developed algorithm incorporates the Rao-1 algorithm and NM algorithm serially. Thus, the powerful global search capability of the Rao-1 algorithm and local search capability of NM algorithm is fully exploited. It can quickly and accurately search for the high-quality optimal solution on the basis of ensuring global convergence. The computing time is highly reduced, while the matching accuracy is significantly improved. Four commonly applied optimization problems and three image datasets are employed to assess the performance of the proposed method. Meanwhile, three commonly used algorithms, including generic Rao-1 algorithm, particle swarm optimization (PSO), genetic algorithm (GA), are considered as benchmarking algorithms. The experiment results demonstrate that the proposed method is effective and efficient in solving image matching problems.

1. Introduction

Image matching is an important topic in image processing, and it has broad application prospects in the field of computer vision. Image matching typically includes Template Matching (TM), Feature Matching, and Dynamic Pattern Matching, among which TM is the most commonly used matching approach. TM is employed to measure whether an image patch matches a small area of the source image by sliding the template through the source image, and then use the coordinates of the upper-left corner of the corresponding window in the two images to determine the matching position [1].
TM is a fundamental problem of pattern recognition and has a wide range of applications in the field of image processing and computer vision, such as image recognition [2,3,4,5], remote sensing [6,7], social media analytics [8,9], medical image processing [10,11,12], biometric recognition [13,14,15], etc. In image analysis, matching technologies play an important role in image understanding and retrieval [16]. Two main operations, similarity measurement and best matching search [17,18] are often included in TM. Various similarity metrics are utilized to measure the similarity of two grayscale images, including Mean Absolute Differences (MAD), Sum of Absolute Differences (SAD), Sum of Squared Differences (SSD), and Mean Square Differences (MSD). Among these similarity measures, the normalized cross correlation (NCC) is commonly used for image matching, due to its robustness for the illumination variance and noise [19,20,21]. The NCC effectively reduces the influences of illumination on image comparison results, and it is more suitable for processing images with slightly deformed objects, blurred or unclear images, and textured images.
The full, exhaustive search algorithm [22] is the simplest TM approach. It can check each pixel candidate at once and has extremely high accuracy. However, this kind of exhaustive search has an extremely expensive computation cost because every pixel of the source image has to be compared with NCC values computed, which severely limits its use in image processing applications [23]. In this paper, to reduce the time of NCC computation and speed up image matching, TM algorithms based on computational intelligence algorithms were proposed in the literature.
Computational intelligence algorithms were extensively used for different optimization problems in previous studies. He et al. [24] developed a robust fuzzy programming approach to solve the multiple response optimization issues. Chen et al. [25] proposed an adaptive gradient method to ensure both the convergence and the communication efficiency of federated learning. Tang et al. [26] proposed an improvement in the stochastic optimization of the imaging inverse problems. Recently, the hybrid computational intelligence algorithms were developed and applied in various domains [27,28,29]. Computational intelligence-based algorithms were also employed in the area of image matching. Yan et al. [30] introduced the isolation niche technology into the traditional Cultural Algorithm (CA) and applied it to the image matching problem to improve stability and convergence precision. Liu et al. [31] proposed a Chaotic Quantum-behaved Particle Swarm Optimization Based on Lateral Inhibition (LI-CQPSO), which utilized the Chaos theory to ensure the PSO avoids premature convergence. Luo et al. [32] proposed a hybrid spotted hyena optimizer based on LI, which was applied for image pre-processing to make an intensity gradient in the image contrast-enhanced and enhanced the characters of the image. Huang et al. [33] discussed a hybrid bio-inspired evolutionary optimization approach incorporating the lateral inhibition mechanism and Imperialist Competitive Algorithm (ICA), addressing the limitation that the traditional ICA method is possibly trapped in the local minimum.
The above-mentioned methods often include algorithm-specific parameters, such as the cognitive and social factors in PSO, and tuning these parameters introduces additional computational cost. Meanwhile, they typically employ the correlation value as the fitness function to find the best matching point in the image through multiple iterations, thereby reducing the number of explorations and shortening the search time. However, these methods cannot search the entire solution space efficiently and are easy to converge prematurely. Therefore, they often fall into the optimal local state and miss the accurate position, resulting in low search precision and accuracy.
To address these limitations, a hybrid Rao-NM algorithm that combines the Rao-1 algorithm and the Nelder–Mead algorithm is proposed for the TM problem in this paper. The Rao-1 algorithm does not contain any algorithm-specific parameters, and only simple mathematical operations, addition, and multiplication, are included. The proposed method contains two search processes, global search, and local search. The Rao-1 algorithm is employed for the global search. The Rao-1 algorithm is a metaphor-less swarm intelligence method introduced by Rao [34] in 2019. The main idea of the Rao-1 algorithm is to iteratively update candidate solutions with the high probability of approaching the global best solution and leaving the worst solution. The optimal solution is obtained through the random interaction between the best and worst solutions. Meanwhile, the Rao-1 algorithm does not require any algorithm-specific parameters, and the computational cost of tuning parameters can be avoided. Recent research has proved its capability in solving different unconstrained and constrained optimization problems. During the local search process, the NM algorithm is utilized to further improve the search results of the Rao-1 algorithm. The NM algorithm is a popular nonlinear optimization search method without using derivative information introduced by Nelder and Mead [35,36]. The NM algorithm only considers function values to minimize the scalar-valued nonlinear function, without any derivative information [22]. It rescales the simplex of ( n + 1 ) vertices according to the local behaviors of the function through four basic processes: Reflection, expansion, contraction, and shrinkage. After these steps, the simplex can be self-improved and gradually approach to the optimal solution.
The rest of this paper is organized as follows. In Section 2, an optimization problem for TM is formulated. Section 3 presents the proposed hybrid Rao-NM algorithm. In Section 4, experiments and analyses are showed. Finally, the conclusion of this paper is provided in Section 5.

2. Problem Formulation

Image matching technologies are important in the field of airplane or missile map matching and positioning, medical image processing, and other related fields. The image matching process uses two sensors to get two images of different sizes from the same area. The image obtained in advance is called the source image, and the image obtained in real time or online during the matching process is called the template image. In this study, we use the NCC model [16] as the fitness function to compute the degree of matching between the template image and the source image and then determine the search position. Under the guidance of the fitness value, NCC coefficient, the hybrid algorithm can search the source image quickly until the area with the best similarity is found.
Image TM aims to locate a small area of the source image by searching for a target similar to the template image by sliding the template through the source image, shown in Figure 1. To facilitate computation, both the template image and the source image are transformed to grayscale images. Let the matrix X m × n and Y M × N represent the grayscale template and source images, respectively, where m and n denote the height and width, and X [ i , j ] and Y [ i , j ] represent the gray values of a certain pixel of images, respectively ( X [ i , j ] , Y [ i , j ]   [ 0 , 255 ] ).
The main idea of the TM problem is defined that search a point ( x ,   y ) in Y a × b , so that the similarity between X   ( 1 : m ,   1 : n ) and Y   ( x : ( x + m 1 ) , y : ( y + n ) 1 ) ) is the maximum in the feasible search space. The NCC metric can use the grayscale matrices of two images to compute the degree of matching between them through a normalized correlation measurement formula. Therefore, the TM problem can be presented as an optimization problem, depicted in (1).
m a x   F ( i , j ) = x = 1 m y = 1 n [ t e m p ( i + x 1 , j + y 1 ) ] × t e s t ( i , j ) × ( x = 1 m y = 1 n [ t e m p 2 ( i + x 1 , j + y 1 ) ]   · x = 1 m y = 1 n [ t e s t 2 ( i , j ) ] ) 1
  s . t .   1 i A a + 1 ,   i Z , 1 j B b + 1 ,   j Z
where ( i ,   j ) is the pixel position of the top-left corner of the grayscale template matching, when the original image matches the same area as the template image at (i*, j*), NCC (i*, j*) = 1.

3. The Proposed Hybrid Rao-NM Algorithm

In this paper, we combine the Rao algorithm and the Nelder–Mead simplex method to efficiently obtain the optimal solution. In the proposed algorithm, the Rao-1 algorithm is employed for global search, while the NM algorithm is utilized to conduct the local search. In this section, the Rao-1 and NM algorithms are introduced separately, and then the hybrid Rao-NM algorithm is described in detail.

3.1. Rao-1 Algorithm

The Rao-1 algorithm is a metaphor-less swarm intelligence-based optimization method without containing any algorithm-specific parameters [34]. Only two controlling parameters, population size and the number of iterations, need to be determined for the Rao-1 algorithm.
The solution updating procedure of the Rao-1 algorithm is illustrated as (2) and (3):
I j , k , i = I j , k , i + r 1 , j , i ( I j , b e s t , i I j , w o r s t , i )
I m , n = { I m , n     i f   F ( I m , n ) F ( I m , n ) I m , n     i f   F ( I m , n ) > F ( I m , n )
where I j , b e s t , i is the value of the variable j for the best candidate and I j , w o r s t , i is the value of the variable j for the worst candidate during the i th iteration. I j , k , i are the updated values of I j , k , i and r   1 , j , i and r   2 , j , i are two random numbers of the j th variable during the i th iteration, with their value range in [0, 1].
Based on the updating rule, the optimization process of the Rao-1 algorithm is summarized as follows:
  • Initialize the common controlling parameters, population size, number of design variables, and termination criteria.
  • Determine the best and worst solutions in the population.
  • Update the current solution based on the best, worst, and candidate solutions, random interaction according to (2)
  • Computer the objective function value for every updated solution. Next, the updated solution will be selected according to (3).
  • If the termination conditions are satisfied, the optimization process will stop. Otherwise, the process skips to Step 2.

3.2. NM Method

The NM search method is a local search method, and it parameterizes the function value through unconstrained optimization without using the gradient information. The objective function shrinks to optimal value by adapting to the local landscape with simplex. Since the TM problem can be regarded as a two-dimensional optimization problem, a simplex is a triangle composed of vertices. If a point is defined as the origin of a non-degenerate simplex, the other n points will define the vector direction across the N-dimensional vector space [37].
NM method uses four basic steps to readjust the scale of the simplex according to the local behavior of the function: Reflection, expansion, contraction, and shrinkage [38]. The simplex can approach the optimal value continuously through these procedures.
Before starting the algorithm, defining the complete NM method requires four scaling parameters: Coefficients of reflection ( α ), contraction ( γ ), expansion ( β ), and shrinkage ( σ ). According to the definition of the NM method, these parameters should satisfy (4):
α > 0 ,   γ > 1 ,   γ > α ,   0 < β < 1 ,   a n d   0 < σ < 1
As Image TM is actually a two-dimensional optimization problem, parameters are restricted to the standard case according to (5).
α = 1 ,   γ = 2 ,   β = 1 2 ,   a n d   σ = 1 2
The specific steps of the NM method are described as follow:
  • Initialization:
Randomly Generate initial n + 1 vertices within their respective search range. Compute the objective function value and the simplex constraint of each vertex, and then order these vertices to satisfy f ( x 1 )     f ( x 2 ) · · · f ( x n + 1 ) .
2.
Reflection:
Calculate the reflection point x r according to the (6):
  x r = x ¯ + α ( x ¯ x h )
where x ¯ = i = 1 n   x i n , β h and β l are the vertices with the highest and lowest function values, respectively, f ( x h ) and f ( x l ) represent the value of the observation function. Next, obtain the x c, which is the center of the simplex without x h in minimization case. If f ( x r ) < f ( x l ) , go to step 3; If f ( x r ) > f ( x h ) , go to step 4; otherwise, if f ( x r ) lies between f ( x l ) and f ( x h ) , x h is replaced by x r and go to step 6.
3.
Expansion:
To expand the search space in the same direction, the expansion point is expanded the simplex and computed as (7):
x e = γ x r + ( 1 γ ) x c
If f ( x e ) < f ( x r ) , x h is replaced by x e;
If f ( x e ) f ( x r ) , x h is replaced by x r;
Go to step 6.
4.
Contraction:
When f ( x r ) lies between f ( x l ) and f ( x h ) , then x h is replaced by x r and contraction is performed. When f ( x r ) >   f ( x h ) , perform contraction directly without any replacements. The contraction vertex is computed as follow (8):
x c o n t = β x h + ( 1 β ) x c e n t
If f ( x c o n t ) < f ( x h ) , x h is replaced by x c o n t and go to step 6. Otherwise, do shrinking in step 5.
5.
Shrinkage:
When the contraction is failed, shrinkage attempts to all vertexes of the entire simplex expect xl as (9):
x i = σ x i + ( 1 σ ) x l
Then go to step 6.
6.
If the termination condition is met, the computation is stopped and terminates the iteration. Otherwise, return Step 1 to start a new iteration.

3.3. The Hybrid Rao-NM Algorithm

The Rao-NM algorithm combines the adaptive Rao-1 algorithm and the NM method to balance the efficiency and accuracy of the optimization process with a higher probability of obtaining the optimal solution within limited iterations.
In the optimization process, the Rao-1 algorithm [34] is initially applied to finding a relatively optimal solution, and the search space is reduced for the continued search. Next, according to the solution obtained from the Rao-1 algorithm, the NM method [35] is utilized to search the best local solution near the initial solution. Compared with the generic Rao-1 algorithm, the proposed hybrid algorithm can offer better solutions thanks to the NM method. Meanwhile, the Rao-NM algorithm can converge quickly, inheriting the advantage of the Rao-1 algorithm. The main optimization process of the proposed Rao-NM algorithm is described in Algorithm 1.
As shown in Algorithm 1, considering the multiplication operation of the NCC computation as the basic operation, the time complexity of the proposed algorithm is O(M·N·w·h), where w and h are the weight and height of the template image, respectively. Thus, it is independent of the size of the source image.
Algorithm 1. Rao-NM Algorithm.
1: Input: Population Size: N, Number of Iterations: M, Tolerance: e, The ith individual solution at the jth iteration: Ii,j
2: Output: Optimal Solution: I*best
3: for each j: = 1 to N do
4:    Initialize Ii,1;
5: end
6: Let j = 1;
7: While (e or j value is satisfied)
8: Update solutions Ii,j based on (2);
9: Obtain the best solution Ibest;
10: Let e = j(Ibest);
11: Let m = m + 1.
12: Update Ibest via NM algorithm to I*best;
13: Return I*best;

4. Experiment and Analysis

4.1. Benchmarking Test Functions

To assess the performance of the proposed algorithm, four benchmarking test functions, as shown in (10)–(13), are utilized, and their images are shown in Figure 2, Figure 3, Figure 4 and Figure 5. The test functions include unimodal functions and multimodal functions with numerous local optimums in their images. Meanwhile, three algorithms—Rao-1, PSO, and the Genetic algorithm (GA)—are benchmarked to assess the performance of the proposed method.
Function 1: Schaffer function
m i n f ( x , y ) = 0.5 ( sin 2 x 2 + y 2 0.5 ) [ 1 + 0.001 ( x 2 + y 2 ) ] 2 , x i [ 10 , 10 ]
Function 2: Camel function
m i n f ( x , y ) = ( 4 2.1 x 2 + x 4 3 ) x 2 + x y + ( 4 + 4 y 2 ) y 2 ,   x , y [ 100 , 100 ]
Function 3:
m i n f ( x , y ) = [ x s i n ( 9 π y ) + y c o s ( 25 π x ) + 20 ] , x , y [ 10 , 10 ]
Function 4:
m i n f ( x , y ) = 20 + x 2 + y 2 10 × ( cos 2 π x + cos 2 π y ) , x i [ 4 , 4 ]
For the above four benchmark functions, four algorithms have experimented 50 times, respectively. According to the results presented in Table 1, The proposed hybrid Rao-NM algorithm achieves the best performance in terms of both efficiency and precision among all considered methods. Besides, though both the Rao-1 algorithm and the proposed hybrid Rao-NM algorithm can quickly converge to the optimal value, the Rao-NM algorithm has higher accuracy, especially for the F2 function, it can precisely converge to the optimal value. For the F3 function, many local optimal values in the solution space exist, and the proposed hybrid algorithm can find the optimal value accurately and efficiently. Therefore, the proposed algorithm outperforms other algorithms in searching for the optimal solution.

4.2. Sensitivity Analysis on Controlling Parameters

Since the two controlling parameters, the population size and the number of iterations, are included for all considered TM algorithms, they are tuned based on 368 images selected from the Oxford-IIIT Pet Dataset [39]. Nine parameter configurations are employed, and the grid search is utilized. All considered algorithms are implemented on a PC with AMD Ryzen 9 3950X CPU and 32 GB RAM. The programs are written by Python3, and they are executed o Windows 10. The algorithm-specific parameters of PSO and GA are set as follows:
(1) PSO parameter settings [40]: Cognitive and social acceleration constants C1 = 1.8, C2 = 1.8, self-weighting factor = 1.0, and independent random numbers r1 and r2 are distributed in the range of [0, 1].
(2) GA parameter settings [41]: The mutation probability = 0.05, the elite ratio = 0.01, the crossover probability = 0.75, and the parent portion = 0.1.
The matching accuracy and execution time of different algorithms are shown in Table 2, Table 3 and Table 4. In this study, the success rate is defined in (14) to depict the accuracy.
      R = T S × 100 %
where R is the success rate, T is the number of times that the matching pixel position is the same as the template image in the experiment, and S is the total number of experiments.

4.3. Template Matching Results

The Oxford Pets Dataset of 2580 images [39] is utilized to compare the performance of different algorithms based on the optimized parameters. Each algorithm is executed ten times, and the accuracy and execution time are presented in Table 5.
According to Table 5, it can be seen that the proposed method outperforms other benchmarking methods in terms of the highest accuracy and the shorter computing time. Meanwhile, the execution time of the proposed method is slightly longer than that of the Rao-1 algorithm. Thus, it is more practical to apply the proposed method for real applications.
To assess the performance of the proposed method on real biometrics recognition tasks, 94 images collected from the V47 dataset [42] and 100 images selected from the WIDER FACE dataset [43] are employed to evaluate the performance of the proposed method on person re-identification and face detection problems. The images from the WIDER FACE dataset are with a high degree of variability in scale, pose, and occlusion, as shown in Figure 6. The image matching results are obtained and shown in Table 6 and Table 7.
According to the results presented in Table 6 and Table 7, the proposed method dominates other methods with the highest accuracy for both two datasets. Therefore, the proposed method is applicable for face detection and person re-identification tasks. Since different scenes are included in these images, TM using the Rao-NM method offers more robust results.
Three large images of different sizes are employed to validate the actual performance of all considered algorithms, shown in Figure 7, Figure 8 and Figure 9. Each algorithm is executed 50 times independently based on three images to validate their average performance.
Table 8 shows the proposed hybrid Rao-NM algorithm dominates all the compared algorithms in terms of the highest success rate. Although the Rao-1 algorithm requires the least execution time, it performs badly in TM of these three images. Especially, the success rate is only 2% by using the Rao-1 algorithm for Image 2. Thus, it is not suitable to directly apply the Rao-1 algorithm for TM problems. Compared with PSO and GA algorithms, the search efficiency and accuracy of the proposed algorithm are greatly improved over all three images. As shown in Table 8, the hybrid Rao-NM algorithm matching accuracy can reach more than 85%, while PSO and GA algorithms can only offer success rates of less than 85%. The above comparison results show that it is more practical to apply the proposed hybrid algorithm for TM problems.

5. Conclusions and Future Work

In this paper, a novel hybrid optimization algorithm, combining the Rao-1 algorithm and the NM method, is proposed to address the image matching problem in an effective and efficient way. The proposed algorithm incorporates the powerful largescale global search ability of the Rao-1 algorithm and the thorough local search capability of the NM method. Thus, the Rao-NM algorithm can accurately search for high-quality optimal solutions.
To verify the robustness and the efficiency of the proposed Rao-NM algorithm, four commonly applied test functions, and three image datasets are utilized. Meanwhile, three benchmarking algorithms are considered. The experimental results demonstrate that the proposed algorithm is more accurate than other recently reported algorithms and takes less time to converge to the optimum. Considering the higher accuracy and shorter execution time, the proposed algorithm is practical for image matching problems.
The proposed method is implemented serially on the CPU. Since current image processing and computer vision algorithms can run on modern GPUs, the parallel version of the proposed method will be investigated, and thus, the multi-core CPUs and many-core GPUs can be employed to speed up the image matching task. Meanwhile, the elite mechanism can be incorporated into the Rao-1 algorithm to improve the global searchability.

Author Contributions

Conceptualization, L.W.; methodology, L.W. and Z.W.; investigation, X.L. (Xinran Liu) and Z.W.; resources, X.L. (Xiong Luo); writing—original draft preparation, X.L. (Xinran Liu); writing—review and editing, L.W. and C.H. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported in part by the National Key R&D Program of China under Grant 2018YFC0810601, in part by in part by the National Natural Science Foundation of China under Grants 62002016 and U1836106, in part by the Guangdong Basic and Applied Basic Research Foundation under Grants 2020A1515110431 and 2019A1515111165, in part by Scientific and Technological Innovation Foundation of Shunde Graduate School, USTB under Grants BK19BF006 and BK20BF010, in part by the Interdisciplinary Research Project for Young Teachers of USTB (Fundamental Research Funds for the Central Universities) under Grant FRF-IDRY-19-017, and in part by the Fundamental Research Funds for the Central Universities under Grants 06500078 and 06500103.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Goshtasby, A. Template Matching in Rotated Images. IEEE Trans. Pattern Anal. Mach. Intell. 1985, PAMI-7, 338–344. [Google Scholar] [CrossRef]
  2. Brunelli, R.; Poggio, T. Face recognition: Features versus templates. IEEE Trans. Pattern Anal. Mach. Intell. 1993, 15, 1042–1052. [Google Scholar] [CrossRef]
  3. An, L.; Zou, C.; Zhang, L.; Denney, B. Scalable attribute-driven face image retrieval. Neurocomputing 2016, 172, 215–224. [Google Scholar] [CrossRef]
  4. Wang, L.; Zhang, Z. Automatic Detection of Wind Turbine Blade Surface Cracks Based on UAV-Taken Images. IEEE Trans. Ind. Electron. 2017, 64, 7293–7303. [Google Scholar] [CrossRef]
  5. Wang, L.; Zhang, Z.; Xu, J.; Liu, R. Wind Turbine Blade Breakage Monitoring With Deep Autoencoders. IEEE Trans. Smart Grid 2018, 9, 2824–2833. [Google Scholar] [CrossRef]
  6. Yang, J.; Liu, J.; Dai, Q. An improved Bag-of-Words framework for remote sensing image retrieval in large-scale image databases. Int. J. Digit. Earth 2015, 8, 273–292. [Google Scholar] [CrossRef]
  7. Pisek, J.; Lang, M.; Kuusk, J. A note on suitable viewing configuration for retrieval of forest understory reflectance from multi-angle remote sensing data. Remote Sens. Environ. 2015, 156, 242–246. [Google Scholar] [CrossRef]
  8. Ionescu, B.; Popescu, A.; Radu, A.-L.; Müller, H. Result diversification in social image retrieval: A benchmarking framework. Multimed. Tools Appl. 2016, 75, 1301–1331. [Google Scholar] [CrossRef]
  9. Liu, Q.; Li, Z. Projective nonnegative matrix factorization for social image retrieval. Neurocomputing 2016, 172, 19–26. [Google Scholar] [CrossRef]
  10. Kalpathy-Cramer, J.; de Herrera, A.G.S.; Demner-Fushman, D.; Antani, S.; Bedrick, S.; Müller, H. Evaluating performance of biomedical image retrieval systems—An overview of the medical image retrieval task at ImageCLEF 2004–2013. Comput. Med. Imaging Graph. 2015, 39, 55–61. [Google Scholar] [CrossRef] [Green Version]
  11. Dimitrovski, I.; Kocev, D.; Kitanovski, I.; Loskovska, S.; Džeroski, S. Improved medical image modality classification using a combination of visual and textual features. Comput. Med. Imaging Graph. 2015, 39, 14–26. [Google Scholar] [CrossRef]
  12. Trojacanec, K.; Kitanovski, I.; Dimitrovski, I.; Loshkovska, S. Medical Image Retrieval for Alzheimer’s Disease Using Data from Multiple Time Points. In Advances in Intelligent Systems and Computing; Loshkovska, S., Koceski, S., Eds.; Springer International Publishing: Cham, Switzerland, 2016; pp. 215–224. [Google Scholar]
  13. Minaee, S.; Abdolrashidi, A. Highly accurate palmprint recognition using statistical and wavelet features. In Proceedings of the 2015 IEEE Signal Processing and Signal Processing Education Workshop (SP/SPE), Salt Lake City, UT, USA, 9–12 August 2015; pp. 31–36. [Google Scholar]
  14. Minaee, S.; Luo, P.; Lin, Z.; Bowyer, K. Going Deeper Into Face Detection: A Survey. arXiv 2021, arXiv:2103.14983. [Google Scholar]
  15. Gao, C.; Chen, Y.; Yu, J.-G.; Sang, N. Pose-guided spatiotemporal alignment for video-based person Re-identification. Inf. Sci. 2020, 527, 176–190. [Google Scholar] [CrossRef]
  16. Cuevas, E.; Echavarría, A.; Zaldivar-Navarro, D.; Pérez-Cisneros, M. A novel evolutionary algorithm inspired by the states of matter for template matching. Expert Syst. Appl. 2013, 40, 6359–6373. [Google Scholar] [CrossRef]
  17. Li, B.; Gong, L.-G.; Li, Y. A Novel Artificial Bee Colony Algorithm Based on Internal-Feedback Strategy for Image Template Matching. Sci. World J. 2014, 2014, 1–14. [Google Scholar] [CrossRef] [Green Version]
  18. Grailu, H.; Lotfizad, M.; Sadoghi-Yazdi, H. An improved pattern matching technique for lossy/lossless compression of binary printed Farsi and Arabic textual images. Int. J. Intell. Comput. Cybern. 2009, 2, 120–147. [Google Scholar] [CrossRef]
  19. Koutaki, G.; Yata, K.; Uchimura, K.; Kan, M.; Asai, D.; Takeba, M.; Kan, M. Fast and high accuracy pattern matching using multi-stage refining eigen template. In Proceedings of the 19th Korea-Japan Joint Workshop on Frontiers of Computer Vision, Incheon, Korea, 30 January–1 February 2013; pp. 58–63. [Google Scholar] [CrossRef]
  20. Yang, H.; Huang, C.; Wang, F.; Song, K.; Yin, Z. Robust Semantic Template Matching Using a Superpixel Region Binary Descriptor. IEEE Trans. Image Process. 2019, 28, 3061–3074. [Google Scholar] [CrossRef]
  21. Buniatyan, D.; Macrina, T.; Ih, D.; Zung, J.; Seung, H.S. Deep Learning Improves Template Matching by Normalized Cross Correlation. arXiv 2017, arXiv:1705.08593. [Google Scholar]
  22. Brunelli, R. Template Matching Techniques in Computer Vision: Theory and Practice; Wiley: Hoboken, NJ, USA, 2009; ISBN 978-0-470-51706-2. [Google Scholar]
  23. Lagarias, J.C.; Reeds, J.A.; Wright, M.H.; Wright, P.E. Convergence Properties of the Nelder--Mead Simplex Method in Low Dimensions. SIAM J. Optim. 1998, 9, 112–147. [Google Scholar] [CrossRef] [Green Version]
  24. He, Y.; He, Z.; Lee, D.-H.; Kim, K.-J.; Zhang, L.; Yang, X. Robust fuzzy programming method for MRO problems considering location effect, dispersion effect and model uncertainty. Comput. Ind. Eng. 2017, 105, 76–83. [Google Scholar] [CrossRef]
  25. Chen, X.; Li, X.; Li, P. Toward Communication Efficient Adaptive Gradient Method. In Proceedings of the 2020 ACM-IMS on Foundations of Data Science Conference, ACM, Seattle, WA, USA, 18–20 October 2020; pp. 119–128. [Google Scholar]
  26. Tang, J.; Egiazarian, K.; Golbabaee, M.; Davies, M. The Practicality of Stochastic Optimization in Imaging Inverse Problems. IEEE Trans. Comput. Imaging 2020, 6, 1471–1485. [Google Scholar] [CrossRef]
  27. Wang, L.; Wang, Z.; Liang, H.; Huang, C. Parameter estimation of photovoltaic cell model with Rao-1 algorithm. Optik 2020, 210, 163846. [Google Scholar] [CrossRef]
  28. Liu, M.; Cao, Z.; Zhang, J.; Wang, L.; Huang, C.; Luo, X. Short-term wind speed forecasting based on the Jaya-SVM model. Int. J. Electr. Power Energy Syst. 2020, 121, 106056. [Google Scholar] [CrossRef]
  29. Wang, Z.; Wang, L.; Huang, C.; Zhang, Z.; Luo, X. Soil Moisture Sensor-based Automated Soil Water Content Cycle Classification with a Hybrid Symbolic Aggregate Approximation Algorithm. IEEE Internet Things J. 2021, 1. [Google Scholar] [CrossRef]
  30. Yan, X.; Song, T.; Wu, Q. An improved cultural algorithm and its application in image matching. Multimed. Tools Appl. 2017, 76, 14951–14968. [Google Scholar] [CrossRef]
  31. Liu, F.; Duan, H.; Deng, Y. A chaotic quantum-behaved particle swarm optimization based on lateral inhibition for image matching. Optik 2012, 123, 1955–1960. [Google Scholar] [CrossRef]
  32. Luo, Q.; Li, J.; Zhou, Y. Spotted hyena optimizer with lateral inhibition for image matching. Multimed. Tools Appl. 2019, 78, 34277–34296. [Google Scholar] [CrossRef]
  33. Huang, L.; Duan, H.; Wang, Y. Hybrid bio-inspired lateral inhibition and Imperialist Competitive Algorithm for complicated image matching. Optik 2014, 125, 414–418. [Google Scholar] [CrossRef]
  34. Rao, R.V. Rao algorithms: Three metaphor-less simple algorithms for solving optimization problems. Int. J. Ind. Eng. Comput. 2020, 107–130. [Google Scholar] [CrossRef]
  35. Zahara, E.; Kao, Y.-T. Hybrid Nelder–Mead simplex search and particle swarm optimization for constrained engineering design problems. Expert Syst. Appl. 2009, 36, 3880–3886. [Google Scholar] [CrossRef]
  36. Nelder, J.A.; Mead, R. A Simplex Method for Function Minimization. Comput. J. 1965, 7, 308–313. [Google Scholar] [CrossRef]
  37. Li, B. An evolutionary approach for image retrieval based on lateral inhibition. Optik 2016, 127, 5430–5438. [Google Scholar] [CrossRef]
  38. Ali, A.F.; Tawhid, M.A. A hybrid cuckoo search algorithm with Nelder Mead method for solving global optimization problems. SpringerPlus 2016, 5, 473. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  39. Parkhi, O.M.; Vedaldi, A.; Zisserman, A.; Jawahar, C.V. Cats and dogs. In Proceedings of the 2012 IEEE Conference on Computer Vision and Pattern Recognition, Providence, RI, USA, 16–21 June 2012; pp. 3498–3505. [Google Scholar]
  40. Liu, X.; Jiang, W.; Xie, J.; Jia, Y. An image template matching method using particle swarm optimization. In Proceedings of the 2009 Asia-Pacific Conference on Computational Intelligence and Industrial Applications (PACIIA), Wuhan, China, 28–29 November 2009; Volume 1, pp. 83–86. [Google Scholar]
  41. Dong, N.; Wu, C.-H.; Ip, W.-H.; Chen, Z.-Q.; Chan, C.-Y.; Yung, K.-L. An improved species based genetic algorithm and its application in multiple template matching for embroidered pattern inspection. Expert Syst. Appl. 2011, 38, 15172–15182. [Google Scholar] [CrossRef]
  42. Wang, S.; Lewandowski, M.; Annesley, J.; Orwell, J. Re-identification of pedestrians with variable occlusion and scale. In Proceedings of the 2011 IEEE International Conference on Computer Vision Workshops (ICCV Workshops), Barcelona, Spain, 6–13 November 2011; pp. 1876–1882. [Google Scholar]
  43. Yang, S.; Luo, P.; Loy, C.C.; Tang, X. WIDER FACE: A Face Detection Benchmark. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 5525–5533. [Google Scholar]
Figure 1. Template matching geometry.
Figure 1. Template matching geometry.
Entropy 23 00678 g001
Figure 2. Image of Function 1.
Figure 2. Image of Function 1.
Entropy 23 00678 g002
Figure 3. Image of Function 2.
Figure 3. Image of Function 2.
Entropy 23 00678 g003
Figure 4. Image of Function 3.
Figure 4. Image of Function 3.
Entropy 23 00678 g004
Figure 5. Image of Function 4.
Figure 5. Image of Function 4.
Entropy 23 00678 g005
Figure 6. Example images of the WIDER FACE dataset.
Figure 6. Example images of the WIDER FACE dataset.
Entropy 23 00678 g006
Figure 7. (a) Predefined template image (160 x 70); (b) source image (960 × 540); (c) TM result.
Figure 7. (a) Predefined template image (160 x 70); (b) source image (960 × 540); (c) TM result.
Entropy 23 00678 g007aEntropy 23 00678 g007b
Figure 8. (a) Predefined template image (150 × 150); (b) source image (1000 × 1500); (c) TM result.
Figure 8. (a) Predefined template image (150 × 150); (b) source image (1000 × 1500); (c) TM result.
Entropy 23 00678 g008
Figure 9. (a) Predefined template image (100 × 150); (b) source image (1080 × 720); (c) TM result.
Figure 9. (a) Predefined template image (100 × 150); (b) source image (1080 × 720); (c) TM result.
Entropy 23 00678 g009
Table 1. Results comparisons of the benchmark.
Table 1. Results comparisons of the benchmark.
Algorithm F1F2F3F4
Theoretical Optimal Value0.0−1.0316−39.94500.0
Rao-1Average time6.9750 × 10−68.8250 × 10−60.00320.0033
Actual optimal0.0610−0.1943−39.84980.0003
PSOAverage time0.24210.27670.37270.2229
Actual optimal0.004857.6269−39.08972.6623
GAAverage time1.27411.27571.27391.2990
Actual optimal0.0024−0.9549−39.42690.0032
Rao-NMAverage time4.1650 × 10−53.7300 × 10−50.00320.0033
Actual optimal0.0025−1.0316−39.85005.2560 × 10−6
The bold indicates the best results.
Table 2. Test results of TM using Rao-NM algorithm.
Table 2. Test results of TM using Rao-NM algorithm.
Population SizeNo. of IterationsRTime (s)
505077.71%71.42
5010080.70%140.23
5020084.51%277.56
1005085.32%138.61
10010089.13%274.53
10020087.77%546.94
2005088.58%273.82
20010091.84%544.45
20020095.10%1085.16
Table 3. Test results of TM using PSO.
Table 3. Test results of TM using PSO.
Population SizeNo. of IterationsRTime (s)
505024.45%99.38
5010029.89%196.78
5020041.57%371.76
1005032.06%197.40
10010048.36%311.62
10020061.68%622.31
2005052.44%372.62
20010066.03%624.34
20020077.44%1194.61
Table 4. Test results of TM using GA.
Table 4. Test results of TM using GA.
Population SizeNo. of IterationsRTime (s)
505015.48%196.89
5010034.51%394.18
5020058.96%776.82
1005035.05%399.27
10010066.03%792.42
10020082.06%1567.83
2005067.39%798.36
20010088.31%1570.10
20020094.29%2951.44
Table 5. Performance of different methods on the Oxford Pets Dataset.
Table 5. Performance of different methods on the Oxford Pets Dataset.
ModelR (%)Time (s)
PSO49.76 ± 0.842616.38 ± 9.29
GA70.17 ± 0.824345.63 ± 151.69
Rao-154.17 ± 0.591666.08 ± 25.15
Proposed88.94 ± 0.641807.25 ± 30.69
Table 6. Performance of different methods for Person Re-identification.
Table 6. Performance of different methods for Person Re-identification.
ModelR (%)Time (s)
PSO16.91 ± 3.3497.067 ± 0.61
GA48.19 ± 3.54151.736 ± 4.06
Rao-119.68 ± 1.6086.23 ± 0.55
Proposed56.70 ± 3.1389.11 ± 1.09
Table 7. Performance of different methods for FaceDetector.
Table 7. Performance of different methods for FaceDetector.
ModelR (%)Time (s)
PSO15.2 ± 2.03126.533 ± 1.51
GA44.3 ± 4.59189.719 ± 2.26
Rao-119.5 ± 1.50116.022 ± 0.54
Proposed67.1 ± 3.95120.916 ± 0.67
Table 8. Results comparisons of TM.
Table 8. Results comparisons of TM.
Image 1Image 2Image 3
PSOAverage time5.6424.4427.86
Accuracy34%28%50%
GAAverage time9.3314.7524.59
Accuracy82%84%50%
Rao-1Average time4.2713.8611.72
Accuracy34%2%52%
Rao-NMAverage time4.2813.8711.73
Accuracy96%86%86%
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Liu, X.; Wang, Z.; Wang, L.; Huang, C.; Luo, X. A Hybrid Rao-NM Algorithm for Image Template Matching. Entropy 2021, 23, 678. https://doi.org/10.3390/e23060678

AMA Style

Liu X, Wang Z, Wang L, Huang C, Luo X. A Hybrid Rao-NM Algorithm for Image Template Matching. Entropy. 2021; 23(6):678. https://doi.org/10.3390/e23060678

Chicago/Turabian Style

Liu, Xinran, Zhongju Wang, Long Wang, Chao Huang, and Xiong Luo. 2021. "A Hybrid Rao-NM Algorithm for Image Template Matching" Entropy 23, no. 6: 678. https://doi.org/10.3390/e23060678

APA Style

Liu, X., Wang, Z., Wang, L., Huang, C., & Luo, X. (2021). A Hybrid Rao-NM Algorithm for Image Template Matching. Entropy, 23(6), 678. https://doi.org/10.3390/e23060678

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop