CN111814839B - Template matching method of longicorn group optimization algorithm based on self-adaptive variation - Google Patents

Template matching method of longicorn group optimization algorithm based on self-adaptive variation Download PDF

Info

Publication number
CN111814839B
CN111814839B CN202010553460.2A CN202010553460A CN111814839B CN 111814839 B CN111814839 B CN 111814839B CN 202010553460 A CN202010553460 A CN 202010553460A CN 111814839 B CN111814839 B CN 111814839B
Authority
CN
China
Prior art keywords
iteration
individual
group
image
optimization algorithm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010553460.2A
Other languages
Chinese (zh)
Other versions
CN111814839A (en
Inventor
都海波
沈涵
周俊
魏佳佳
俞波
刘昊磊
王鹤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei University of Technology
Original Assignee
Hefei University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei University of Technology filed Critical Hefei University of Technology
Priority to CN202010553460.2A priority Critical patent/CN111814839B/en
Publication of CN111814839A publication Critical patent/CN111814839A/en
Application granted granted Critical
Publication of CN111814839B publication Critical patent/CN111814839B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Multimedia (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Mathematical Physics (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a template matching method of a longicorn group optimization algorithm based on self-adaptive variation, and belongs to the technical field of computer image processing. The method comprises the steps of firstly obtaining gray value information of an image to be detected and a target template image; then, the possible positions of the best matched candidate template images are represented by individual positions in a self-adaptive variation longhorn beetle group optimization algorithm, algorithm parameters are set, and the longhorn beetle group is randomly initialized in a search space; and finally, searching a best matched candidate template image in the search space by using a self-adaptive variant longicorn group optimization algorithm as a template matching result. According to the invention, historical information and current surrounding information of particles are combined by using a longicorn group optimization algorithm based on self-adaptive variation, and the characteristics of a self-adaptive multidimensional disturbance variation mode based on the seed group aggregation degree and the iteration number are introduced, so that the convergence speed and the matching precision in the template matching process are improved.

Description

Template matching method of longicorn group optimization algorithm based on self-adaptive variation
Technical Field
The invention relates to the technical field of computer image processing, in particular to a template matching method of a longicorn group optimization algorithm based on self-adaptive variation.
Background
The process of searching the corresponding best matched candidate template image from the confirmed target template image to the image to be detected is called template matching, namely, the template matching refers to the process of searching the matched sub-image from the known template image to the other image, and the template matching is an important technology in the technical field of computer image processing. Template matching is widely applied to the fields of intelligent robot environment sensing, target tracking, medical image analysis and the like. With the development of modern electronic information technology, higher and higher requirements are put on the accuracy and rapidity of the template matching technology.
In recent years, many researchers have made a great deal of research on improvement of template matching technical performance. The similarity of each point is calculated by adopting a point-by-point traversal strategy, so that the matching accuracy can be guaranteed, but the calculated amount is too large, the running time is long, the instantaneity is difficult to guarantee, and the method is inconvenient to use in real-time image processing. Part of researchers improve the real-time performance of the method, and provide a method of coarse and fine search [ Zhu Yongsong, national clarity, research on related matching algorithm based on related coefficients [ J ]. Signal processing, 2003 (06): 531-534 ], out-of-order matching [ to guard, han Genjia, application of target tracking algorithm based on template matching in infrared thermal imaging tracking technology [ J ]. Electronic technology application, 2003 (05): 12-14 ], and the like. However, there is still room for great improvement in terms of operating speed and accuracy. At present, the improvement on template matching is mainly on the aspects of reducing the algorithm operand and improving the matching precision. Therefore, the optimization algorithm is applied to a template matching method, such as a template matching method [ Li Jie, zhou Hao, zhang Jin ] based on particle swarm optimization, a template matching tracking algorithm [ J ] based on particle swarm optimization is applied to a computer, 2015,35 (09): 2656-2660 ] ], and the operation speed of the algorithm can be greatly improved by combining the optimization algorithm with the template matching, but the optimization algorithm is easy to be trapped into local optimization in the optimizing process, so that the optimal solution cannot be matched.
Disclosure of Invention
In order to overcome the defects in the prior art, the invention provides a template matching method of a longicorn group optimization algorithm based on self-adaptive variation, which combines historical information with current surrounding information of particles by using the longicorn group optimization algorithm based on self-adaptive variation, introduces the characteristics of a self-adaptive multidimensional disturbance variation mode based on seed aggregation degree and iteration times, and improves convergence speed and matching precision in the template matching process.
In order to achieve the above purpose, the present invention adopts the following technical scheme, including:
the template matching method of the longicorn group optimization algorithm based on the self-adaptive variation comprises the following specific steps:
s1, acquiring gray value information of an image to be detected and a target template image, and searching a corresponding matched candidate template image from the image to be detected according to the target template image;
s2, representing the positions of the matched candidate template images by individual positions in a self-adaptive variant longicorn group optimization algorithm, setting parameters of the self-adaptive variant longicorn group optimization algorithm, and randomly initializing the longicorn group in a search space;
the pixel size of the image to be measured is recorded as (H, W); the pixel size of the target template image is marked as (M, N); the upper left corners of the image to be detected and the target template image are marked as starting points (0, 0);
at the t iteration, the coordinate position of the ith individual in the Tianniu group is expressed as a vectorThe speed of the ith individual is expressed as +.>Wherein (1)>Representing the position information of the ith individual in dimension 1 at the t-th iteration, +.>Representing the position information of the ith individual in dimension 2 at the t-th iteration, +.>Information representing the speed of the ith individual in dimension 1 at the t-th iteration, +.>Speed information representing the ith individual in dimension 2 at the t-th iteration;
the candidate template image corresponding to each individual is obtained by cutting from the image to be detected, the size of the pixels of the candidate template image is the same as that of the target template image, and the upper left part of the candidate template image corresponding to the ith individual is obtainedThe angle is marked as the starting pointround (·) represents a rounded rounding function;
the search space satisfies the following equation:
the initialization of the coordinate position and the speed of the ith individual is as follows:
wherein rand is a random number between [0,1 ];
and S3, searching a best matched candidate template image in the search space by using a self-adaptive variation longhorn beetle group optimization algorithm as a template matching result.
The step S3 comprises the following specific steps:
s31, at the t-th iteration, the optimal position of the group isThe optimal position of the ith individual isWherein (1)>1 st dimension information representing the optimal position of the population at the t-th iteration, < >>2 nd dimension information representing the optimal position of the population at the t-th iteration, +.>Represents the ith iteration at the t th timeThe 1 st dimension information of the optimal position of the individual,2 nd dimension information representing an i-th individual optimal position at the t-th iteration; subscript g represents the population, subscript i represents the ith individual, and superscript represents the number of iterations;
calculating the optimal group position when the iteration times t=0 are the initial timeThe i-th individual optimal position is +.>
Wherein f (·) is the function to be optimized; i is population scale;corresponding +.>
The normalized similarity between the target template image and the candidate template image obtained by clipping in the image to be detected is gamma, and the functional relation between the function f (·) to be optimized and the normalized similarity gamma is established as follows:
s (m, n) and T (m, n) are pixel point gray values corresponding to the position coordinates (m, n) in the image to be detected and the target template image respectively; f (·) e [0,1], when the candidate template image and the target template image are more similar, the smaller the value of the function f (·) to be optimized is, and conversely, the larger is;
s32, judging whether the adaptive variation longicorn group optimization algorithm meets a convergence condition, namely judging whether the adaptive variation longicorn group optimization algorithm finishes iteration;
if the optimal solution X best Corresponding function value f (X) best ) When the iteration times T is smaller than the set threshold or the set iteration times T and reaches the maximum iteration times T, namely, the convergence condition is met, iteration is ended, the optimal solution of the matching value is output, and the adaptive variation longicorn group optimization algorithm is ended;
if the optimal solution X best Corresponding function value f (X) best ) If the number of iterations T is not less than the set threshold and the maximum number of iterations T is not reached, that is, the convergence condition is not satisfied, step S33 is executed;
s33, updating the speed and the position of the individual:
randomly generating normalized direction vectors for the ith individualThe method comprises the following steps:
wherein, rand (1, 2) is a two-dimensional vector formed by random numbers of [0,1 ];
establishing a functional relation between the spacing between the group optimal position and the individual optimal position and the whisker length, and calculating the whisker length of the ith individual in the t-th iterationThe method comprises the following steps:
wherein β is a scaling factor; the length of the left and right beards of the ith individual at the t-th iteration is
Calculating the left whisker coordinate of the ith individualRight whisker coordinate->The method comprises the following steps of:
the update method of the speed and position of the ith individual is as follows:
wherein ω is inertial weight; c 1 、c 2 Are learning factors, and the symbols represent the corresponding elements of two matrixes with the same shape to be multiplied one by one;
the calculation mode of the parameters, namely the inertia weight omega and the scaling factor beta, in the speed updating method is as follows:
s34, updating the individual optimal position and the group optimal position, wherein the updating method of the individual optimal position and the group optimal position is as follows:
s35, function optimal solution X to be optimized best Matching value optimal solution X best The update method of (2) is as follows:
s36, calculating the population standard deviation sigma and the variation probability p, wherein the calculation mode of the population standard deviation sigma and the variation probability p is as follows:
wherein sigma 0 For normalization factor, σ 0 The value of (1) is the standard deviation of the non-normalized population during the initialization of the particle swarm; omega The standard deviation weight of the variation probability; omega pt The variation probability iteration number is weighted; b is a variation probability offset constant;for mass center of population->The calculation mode of (2) is as follows:
s37, judging whether to perform mutation operation, if rand is less than p, executing step S38, otherwise, returning to execute step S32;
s38, performing disturbance variation on the optimal position of the group, randomly selecting alpha% of dimensions of the optimal position of the group to perform random disturbance, wherein the random disturbance mode of the kth dimension is as follows:
wherein A is the disturbance amplitude; randn is a random variable subject to standard normal distribution;
and after the disturbance variation of the group optimal position, returning to the step S32.
The invention has the advantages that:
the method converts the template matching problem into the function optimization problem, adopts the adaptive variant longicorn group optimization algorithm to find the optimal solution of the optimization problem, namely the target of the template matching, and has the characteristics of good optimizing effect and high convergence rate by the adaptive variant longicorn group optimization algorithm.
Drawings
Fig. 1 is a flowchart of a template matching method of the longicorn group optimization algorithm based on adaptive variation.
Fig. 2 is a diagram of an image to be tested for template matching in the present embodiment.
Fig. 3 is a target template image for template matching in the present embodiment.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 1, the template matching method of the longicorn group optimization algorithm based on the adaptive variation comprises the following specific steps:
s1, acquiring gray value information of an image to be detected and a target template image;
s2, representing possible positions of the best matched candidate template images by individual positions in a self-adaptive variant longhorn beetle group optimization algorithm, setting parameters of the self-adaptive variant longhorn beetle group optimization algorithm, and randomly initializing the longhorn beetle group in a search space;
the pixel size of the image to be measured is recorded as (H, W); the pixel size of the target template image is marked as (M, N); the upper left corner of the image to be detected and the target template image are marked as starting points (0, 0);
at the t-th iteration, the coordinate position of the ith individual is expressed as a vectorThe speed is expressed as +.>Wherein (1)>Representing the position information of the ith individual in dimension 1 at the t-th iteration, +.>Representing the position information of the ith individual in dimension 2 at the t-th iteration, +.>Information representing the speed of the ith individual in dimension 1 at the t-th iteration, +.>Speed information representing the ith individual in dimension 2 at the t-th iteration;
the candidate template image corresponding to each individual is obtained by cutting from the image to be detected, the size of the pixels of the candidate template image is the same as that of the target template image, and the left upper corner of the candidate template image is marked as the starting pointround (·) represents a rounded rounding function;
the search space satisfies the following equation:
the ith individual initialization method is:
wherein rand is a random number between [0,1 ];
s3, searching a best matched candidate template image in a search space by using a self-adaptive variation longhorn beetle group optimization algorithm as a template matching result;
step S3 comprises the following specific steps:
s31, at the t-th iteration, the optimal position of the group isThe optimal position of the ith individual isWherein (1)>1 st dimension information representing the optimal position of the population at the t-th iteration, < >>2 nd dimension information representing the optimal position of the population at the t-th iteration, +.>1 st dimension information representing the optimal position of the ith individual at the t-th iteration,2 nd dimension information representing an i-th individual optimal position at the t-th iteration; subscript g represents the population, subscript i represents the ith individual, and superscript represents the number of iterations;
calculating the optimal group position when the iteration times t=0 are the initial timeThe i-th individual optimal position is +.>
Wherein f (·) is the function to be optimized; i is population scale;refers to->Corresponding +.>
The normalized similarity between the target template image and the candidate template image obtained by cutting in the image to be detected is gamma, and a functional relation between a function f (·) to be optimized and the normalized similarity gamma is established:
s (m, n) and T (m, n) are pixel point gray values corresponding to the position coordinates (m, n) in the image to be detected and the target template image respectively; f (·) e [0,1], when the candidate template image and the target template image are more similar, the smaller the value of the function f (·) to be optimized is, and conversely, the larger is;
s32, judging whether the adaptive variation longicorn group optimization algorithm meets a convergence condition, namely judging whether the adaptive variation longicorn group optimization algorithm finishes iteration;
if the optimal solution X best Corresponding function value f (X) best ) When the iteration times T is smaller than the set threshold or the set iteration times T and reaches the maximum iteration times T, namely, the convergence condition is met, iteration is ended, the optimal solution of the matching value is output, and the adaptive variation longicorn group optimization algorithm is ended;
if the optimal solution X best Corresponding function value f (X) best ) If the number of iterations T is not less than the set threshold and the maximum number of iterations T is not reached, that is, the convergence condition is not satisfied, step S33 is executed;
s33, updating the speed and the position of the individual:
randomly generating normalized direction vectors for the ith individualThe method comprises the following steps:
wherein, rand (1, 2) is a two-dimensional vector formed by random numbers of [0,1 ];
establishing a functional relation between the spacing between the group optimal position and the individual optimal position and the whisker length, and calculating the whisker length of the ith individual in the t-th iterationThe method comprises the following steps:
wherein β is a scaling factor; the length of the left whisker and the right whisker of the ith individual at the t-th iteration are all Lt i
Calculating the left whisker coordinate of the ith individualRight whisker coordinate->The method comprises the following steps of:
the update method of the speed and position of the ith individual is as follows:
wherein ω is inertial weight; c 1 、c 2 Are learning factors, and the symbols represent the corresponding elements of two matrixes with the same shape phase by phaseMultiplying;
the calculation mode of the parameters, namely the inertia weight omega and the scaling factor beta, in the speed updating method is as follows:
s34, updating the individual optimal position and the group optimal position, wherein the updating method of the individual optimal position and the group optimal position is as follows:
s35, function optimal solution X to be optimized best Matching value optimal solution X best The update method of (2) is as follows:
s36, calculating the population standard deviation sigma and the variation probability p, wherein the calculation mode of the population standard deviation sigma and the variation probability p is as follows:
wherein sigma 0 For normalization factor, σ 0 The value of (1) is the standard deviation of the non-normalized population during the initialization of the particle swarm; omega The standard deviation weight of the variation probability; omega pt The variation probability iteration number is weighted; b is a variation probability offset constant;is a groupBarycenter (x)>The calculation mode of (2) is as follows:
s37, judging whether to perform mutation operation, if rand is less than p, executing step S38, otherwise, returning to execute step S32;
s38, performing disturbance variation on the optimal position of the group, randomly selecting alpha% of dimensions of the optimal position of the group to perform random disturbance, wherein the random disturbance mode of the kth dimension is as follows:
wherein A is the disturbance amplitude; randn is a random variable subject to standard normal distribution;
and after the disturbance variation of the group optimal position, returning to the step S32.
In this embodiment, MATLABR2016a is used as simulation software, and the template matching method based on the adaptive variation longhorn beetle group optimization algorithm of the present invention is compared with the traditional template matching method based on traversal search and the template matching method based on particle swarm optimization. The image to be measured is shown in fig. 2, and the size is 512×512; the target template image is shown in fig. 3, taken from the image to be measured, and has a size of 70×60.
The principle of the traditional template matching method based on traversal search is that similarity is calculated for each pixel point, the best matching is found, and parameters, population scale and convergence conditions are not required to be set in the method;
the parameters of the traditional template matching method based on particle swarm optimization are set as follows: omega= [0.4,0.9 ]],c 1 =c 2 =2;
The parameters of the template matching method of the longicorn group optimization algorithm based on the adaptive variation are set as follows: omega= [0.5,0.65 ]],c 1 =c 2 =1.4962,β∈[0.1,0.25],α%=50%,A=0.34,ω =1.5,ω pt =2,b=0;
The population scale of the traditional template matching method based on particle swarm optimization, the template matching method based on traversal search and the template matching method based on the adaptive variation longhorn beetle swarm optimization algorithm of the invention are set as follows: i=200; the convergence conditions of the three template matching methods are all target template image parts accurately matched into the image to be detected, namely, the convergence conditions of the three template matching methods are all as follows: the optimal solution of the function to be optimized is smaller than a set threshold value 0, or the iteration number reaches the maximum iteration number T=200.
The three template matching methods were independently run 30 times, and the exact matching rates and the running times of the three template matching methods were obtained as shown in table 1 below:
TABLE 1
From the results in table 1, it can be seen that the conventional template matching method based on the traversal search has an exact matching rate of 100%, because the method calculates the similarity for each pixel point, and there is no missing situation, but the running time of the method is too long. The traditional template matching method based on particle swarm optimization alleviates the problem of overlong operation time of the template matching method based on traversal search to a certain extent, but the accurate matching rate of the method only reaches 73.3%.
The template matching method based on the adaptive variation longhorn beetle group optimization algorithm is more applicable to the aspects of the accurate matching rate and the running time than the traditional two methods, has high accurate matching rate and high running speed, and can better cope with the problem of image template matching.
The above embodiments are merely preferred embodiments of the present invention and are not intended to limit the present invention, and any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (1)

1. The template matching method of the longicorn group optimization algorithm based on the self-adaptive variation is characterized by comprising the following specific steps of:
s1, acquiring gray value information of an image to be detected and a target template image, and searching a corresponding matched candidate template image from the image to be detected according to the target template image;
s2, representing the positions of the matched candidate template images by individual positions in a self-adaptive variant longicorn group optimization algorithm, setting parameters of the self-adaptive variant longicorn group optimization algorithm, and randomly initializing the longicorn group in a search space;
the pixel size of the image to be measured is recorded as (H, W); the pixel size of the target template image is marked as (M, N); the upper left corners of the image to be detected and the target template image are marked as starting points (0, 0);
at the t iteration, the coordinate position of the ith individual in the Tianniu group is expressed as a vectorThe speed of the ith individual is expressed as +.>Wherein (1)>Representing the position information of the ith individual in dimension 1 at the t-th iteration, +.>Representing the position information of the ith individual in dimension 2 at the t-th iteration, +.>Information representing the speed of the ith individual in dimension 1 at the t-th iteration, +.>Speed information representing the ith individual in dimension 2 at the t-th iteration;
the candidate template image corresponding to each individual is obtained by cutting from the image to be detected, the size of the pixels of the candidate template image is the same as that of the target template image, and the upper left corner of the candidate template image corresponding to the ith individual is marked as a starting pointround (·) represents a rounded rounding function;
the search space satisfies the following equation:
the initialization of the coordinate position and the speed of the ith individual is as follows:
(W-N)·rand);
wherein rand is a random number between [0,1 ];
s3, searching a best matched candidate template image in a search space by using a self-adaptive variation longhorn beetle group optimization algorithm as a template matching result;
the step S3 comprises the following specific steps:
s31, at the t-th iteration, the optimal position of the group isThe optimal position of the ith individual isWherein the method comprises the steps of,/>1 st dimension information representing the optimal position of the population at the t-th iteration, < >>2 nd dimension information representing the optimal position of the population at the t-th iteration, +.>1 st dimension information representing the optimal position of the ith individual at the t-th iteration,2 nd dimension information representing an i-th individual optimal position at the t-th iteration; subscript g represents the population, subscript i represents the ith individual, and superscript represents the number of iterations;
calculating the optimal group position when the iteration times t=0 are the initial timeThe i-th individual optimal position is +.>
Wherein f (·) is the function to be optimized; i is population scale;is->Corresponding to the minimum value
The normalized similarity between the target template image and the candidate template image obtained by clipping in the image to be detected is gamma, and the functional relation between the function f (·) to be optimized and the normalized similarity gamma is established as follows:
s (m, n) and T (m, n) are pixel point gray values corresponding to the position coordinates (m, n) in the image to be detected and the target template image respectively; f (·) e [0,1], when the candidate template image and the target template image are more similar, the smaller the value of the function f (·) to be optimized is, and conversely, the larger is;
s32, judging whether the adaptive variation longicorn group optimization algorithm meets a convergence condition, namely judging whether the adaptive variation longicorn group optimization algorithm finishes iteration;
if the optimal solution X best Corresponding function value f (X) best ) When the iteration times T is smaller than the set threshold or the set iteration times T and reaches the maximum iteration times T, namely, the convergence condition is met, iteration is ended, the optimal solution of the matching value is output, and the adaptive variation longicorn group optimization algorithm is ended;
if the optimal solution X best Corresponding function value f (X) best ) If the number of iterations T is not less than the set threshold and the maximum number of iterations T is not reached, that is, the convergence condition is not satisfied, step S33 is executed;
s33, updating the speed and the position of the individual:
randomly generating normalized direction vectors for the ith individualThe method comprises the following steps:
wherein, rand (1, 2) is a two-dimensional vector formed by random numbers of [0,1 ];
establishing a functional relation between the spacing between the group optimal position and the individual optimal position and the whisker length, and calculating the whisker length of the ith individual in the t-th iterationThe method comprises the following steps:
wherein β is a scaling factor; the length of the left and right beards of the ith individual at the t-th iteration is
Calculating the left whisker coordinate of the ith individualRight whisker coordinate->The method comprises the following steps of:
the update method of the speed and position of the ith individual is as follows:
wherein ω is inertial weight; c 1 、c 2 Are learning factors, and the symbols represent phasesThe corresponding elements of the two matrixes in the same shape are multiplied one by one;
the calculation mode of the parameters, namely the inertia weight omega and the scaling factor beta, in the speed updating method is as follows:
s34, updating the individual optimal position and the group optimal position, wherein the updating method of the individual optimal position and the group optimal position is as follows:
s35, function optimal solution X to be optimized best Matching value optimal solution X best The update method of (2) is as follows:
s36, calculating the population standard deviation sigma and the variation probability p, wherein the calculation mode of the population standard deviation sigma and the variation probability p is as follows:
wherein sigma 0 For normalization factor, σ 0 The value of (1) is the standard deviation of the non-normalized population during the initialization of the particle swarm; omega The standard deviation weight of the variation probability; omega pt The variation probability iteration number is weighted; b is a variation probability offset constant;as a mass center of the population,the calculation mode of (2) is as follows:
s37, judging whether to perform mutation operation, if rand is less than p, executing step S38, otherwise, returning to execute step S32;
s38, performing disturbance variation on the optimal position of the group, randomly selecting alpha% of dimensions of the optimal position of the group to perform random disturbance, wherein the random disturbance mode of the kth dimension is as follows:
wherein A is the disturbance amplitude; randn is a random variable subject to standard normal distribution;
and after the disturbance variation of the group optimal position, returning to the step S32.
CN202010553460.2A 2020-06-17 2020-06-17 Template matching method of longicorn group optimization algorithm based on self-adaptive variation Active CN111814839B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010553460.2A CN111814839B (en) 2020-06-17 2020-06-17 Template matching method of longicorn group optimization algorithm based on self-adaptive variation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010553460.2A CN111814839B (en) 2020-06-17 2020-06-17 Template matching method of longicorn group optimization algorithm based on self-adaptive variation

Publications (2)

Publication Number Publication Date
CN111814839A CN111814839A (en) 2020-10-23
CN111814839B true CN111814839B (en) 2023-09-01

Family

ID=72846580

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010553460.2A Active CN111814839B (en) 2020-06-17 2020-06-17 Template matching method of longicorn group optimization algorithm based on self-adaptive variation

Country Status (1)

Country Link
CN (1) CN111814839B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112598313B (en) * 2020-12-29 2023-02-21 南方电网数字电网研究院有限公司 Electricity utilization scheduling method and device based on longicorn stigma search algorithm and computer equipment
CN112927168B (en) * 2021-03-26 2023-04-18 江西理工大学 Image enhancement method based on longicorn stigma search and differential evolution hybrid algorithm
CN113434982B (en) * 2021-07-07 2022-09-27 合肥工业大学 Inverse kinematics solution method of electric intelligent bionic climbing robot
CN113570647A (en) * 2021-07-21 2021-10-29 中国能源建设集团安徽省电力设计院有限公司 Stereo target space registration method between oblique photography and remote sensing optical image
CN113326856B (en) * 2021-08-03 2021-12-03 电子科技大学 Self-adaptive two-stage feature point matching method based on matching difficulty
CN116152316B (en) * 2023-04-17 2023-07-07 山东省工业技术研究院 Image registration method based on self-adaptive parameter particle swarm algorithm

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104915969A (en) * 2015-05-21 2015-09-16 云南大学 Template matching tracking method based on particle swarm optimization
WO2018072351A1 (en) * 2016-10-20 2018-04-26 北京工业大学 Method for optimizing support vector machine on basis of particle swarm optimization algorithm
CN110288074A (en) * 2018-12-04 2019-09-27 东华大学 A kind of improvement longicorn palpus searching algorithm based on the mechanism of encirclement

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104915969A (en) * 2015-05-21 2015-09-16 云南大学 Template matching tracking method based on particle swarm optimization
WO2018072351A1 (en) * 2016-10-20 2018-04-26 北京工业大学 Method for optimizing support vector machine on basis of particle swarm optimization algorithm
CN110288074A (en) * 2018-12-04 2019-09-27 东华大学 A kind of improvement longicorn palpus searching algorithm based on the mechanism of encirclement

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于天牛须优化的BAS-CRI图像修复算法;唐艳;展华伟;唐组阁;杨丹;;太原师范学院学报(自然科学版)(第04期);全文 *

Also Published As

Publication number Publication date
CN111814839A (en) 2020-10-23

Similar Documents

Publication Publication Date Title
CN111814839B (en) Template matching method of longicorn group optimization algorithm based on self-adaptive variation
CN108776975B (en) Visual tracking method based on semi-supervised feature and filter joint learning
WO2021012590A1 (en) Facial expression shift method, apparatus, storage medium, and computer device
CN112085055B (en) Black box attack method based on transfer model Jacobian array feature vector disturbance
Zhang et al. Robust visual tracking using joint scale-spatial correlation filters
CN111709435A (en) Countermeasure sample generation method based on discrete wavelet transform
CN109448023B (en) Satellite video small target real-time tracking method
US10115208B2 (en) Image characteristic estimation method and device
CN111340932A (en) Image processing method and information processing apparatus
WO2018227820A1 (en) Method and device for controlling manipulator movement, storage medium, and terminal device
WO2021027539A1 (en) Three-dimensional trajectory smoothing processing method, device, apparatus, and storage medium
CN112257738A (en) Training method and device of machine learning model and classification method and device of image
CN110378932B (en) Correlation filtering visual tracking method based on spatial regularization correction
Zhang et al. Learning adaptive sparse spatially-regularized correlation filters for visual tracking
CN111260701A (en) Multi-mode retina fundus image registration method and device
CN107862680A (en) A kind of target following optimization method based on correlation filter
Kwon et al. Visual tracking via particle filtering on the affine group
CN111178261A (en) Face detection acceleration method based on video coding technology
Jiang et al. Active object detection in sonar images
Xu et al. Robust tracking via weighted spatio-temporal context learning
CN109785372A (en) Basis matrix robust estimation method based on soft decision optimization
CN110598595B (en) Multi-attribute face generation algorithm based on face key points and postures
CN111145221A (en) Target tracking algorithm based on multi-layer depth feature extraction
CN116543259A (en) Deep classification network noise label modeling and correcting method, system and storage medium
CN108596865B (en) Feature map enhancement system and method for convolutional neural network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant