Target tracking method for optimizing particle filter based on improved PID search algorithm

By combining improved PID search algorithm and particle filtering in target tracking, the problem that heuristic optimization algorithm is prone to fall into local optimality is solved, and tracking accuracy and filtering accuracy are improved.

CN119741336AActive Publication Date: 2025-04-01GUANGDONG POWER GRID CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411803012.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-04-01
Estimated Expiration
2044-12-09

AI Technical Summary

Technical Problem

Existing heuristic optimization algorithms are prone to falling into local optimization in target tracking, resulting in reduced accuracy.

Method used

The improved PID search algorithm is combined with particle filtering, and the particle distribution is optimized by adding zero output condition factors to the output adjustment value of PID adjustment to optimize the particle distribution and preventing the algorithm from falling into local optimality.

Benefits of technology

Improves the accuracy of target tracking and filtering accuracy, and reduces estimation errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741336A_ABST
    Figure CN119741336A_ABST
Patent Text Reader

Abstract

The invention provides a target tracking method for optimizing particle filtering based on an improved PID (Proportion Integration Differentiation) search algorithm. The target tracking method comprises the following steps: reading a current video frame and selecting a tracking target from the current video frame; initializing algorithm parameters of the initialization particle filter algorithm and the improved PID search algorithm, and performing initialization operation on a population by adopting a chaotic mapping strategy to generate a chaotic initial population; calculating an importance weight and a fitness value of particles in the chaotic initial population by adopting a particle filtering algorithm, and calculating an output adjustment value of PID adjustment by adopting an improved PID search algorithm; updating the positions of all particles in the chaotic initial population according to the output adjustment value and the zero output condition factor; calculating a state estimation value and a variance estimation value based on the importance weight; and tracking the tracking target in real time according to the state estimation value and the variance estimation value. The problem that the accuracy of target tracking is reduced due to the fact that an existing heuristic optimization algorithm is responsible for a structure and multiple updated parameters are likely to sink into local optimum is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of video target tracking, and in particular to a target tracking method based on an improved PID search algorithm to optimize particle filtering, a target tracking device based on an improved PID search algorithm to optimize particle filtering, a computer-readable storage medium and a computer program product. Background Art

[0002] Video target tracking is a hot research topic in the field of computer vision. It refers to the technology of detecting the target motion state and calibrating the position based on the context information of the video or image sequence. Video target tracking algorithms are mainly divided into video target tracking algorithms based on correlation filtering and video target tracking algorithms based on deep learning. The filtering algorithm is a commonly used tracking algorithm. Among them, the particle filter algorithm does not require the motion model of the tracked target to be linear and the noise to obey the Gaussian distribution. It has better performance in both linear and nonlinear system state estimation and is the most widely used. With the continuous iteration of the algorithm, the particle degradation problem becomes more and more serious, which will lead to an increase in computing costs and a significant reduction in estimation accuracy. In recent years, the development of swarm intelligence optimization algorithms has provided new ideas for improving particle diversity. By treating particles as individuals in a population, the particle distribution is optimized by simulating the movement laws of individuals.

[0003] In recent years, with the development of intelligent optimization algorithms, the idea of ​​swarm intelligent optimization has become a new direction for the development of particle filtering. The distribution of particles is iteratively optimized through the swarm intelligent optimization algorithm, and the particles in the particle filter are regarded as individuals in the group. The particle distribution is made more reasonable by simulating the motion law of a certain group. The prior art methods are as follows. The patent number CN 110264501A discloses a CNN-based adaptive particle filter video target tracking method and system, constructs a convolutional neural network to learn the features of the image, and uses a particle swarm optimization particle filter for feature tracking. The patent number CN 118115537A discloses a target tracking method, system and medium based on an improved quantum particle swarm optimization particle filter, iteratively optimizes a low-weight particle set in a quantum particle swarm, and introduces the predicted position of effective particles in the position update formula of the quantum particle swarm and the particle objective function. The patent number CN 116227533 A discloses a particle swarm-based improved particle filter target tracking method, which performs adaptive inertia weight and learning factor on the particle filter algorithm, thereby improving the accuracy of the algorithm. Classic swarm intelligence optimization algorithms include particle swarm optimization, genetic algorithm, and ant colony algorithm. During the algorithm iteration process, their fitness functions only depend on the measured values. When a bimodal or multimodal function appears, the algorithm cannot guarantee that the particles move to the optimal position, resulting in a decrease in filtering accuracy. Existing filtering algorithms, such as the Kalman filter algorithm, have weaker ability to solve non-Gaussian nonlinear filtering problems. With continuous improvements, the resampling strategy of the particle filter algorithm has become more and more complex, the number of parameters that need to be set has gradually increased, and it depends on human experience. Existing heuristic optimization algorithms have complex structures, many updated parameters, and are prone to local optimal situations. Summary of the invention

[0004] The main purpose of the present application is to provide a target tracking method based on an improved PID search algorithm to optimize particle filtering, a target tracking device based on an improved PID search algorithm to optimize particle filtering, a computer-readable storage medium and a computer program product, so as to at least solve the problem that the existing heuristic optimization algorithms in the prior art have complex structures, multiple updated parameters, and are prone to falling into local optimal situations, resulting in reduced target tracking accuracy.

[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a target tracking method based on an improved PID search algorithm to optimize particle filtering is provided, comprising: a reading step, reading a current video frame and selecting a tracking target from the current video frame; an initialization step, initializing the algorithm parameters of the particle filter algorithm and the improved PID search algorithm, and using a chaotic mapping strategy to initialize the population to generate a chaotic initial population, the algorithm parameters at least include a sampling period, a measurement noise variance, a process noise, a maximum number of iterations and a population size, the improved PID search algorithm is a PID search algorithm improved by adding a zero output condition factor to the output regulation value of the PID regulation, and the particles in the chaotic initial population represent all states of the tracking target; a first calculation step, using the particle filter algorithm to calculate the importance weights and fitness values ​​of the particles in the chaotic initial population, and at the same time using the improved PID search algorithm The method calculates the output regulation value of PID regulation; an updating step, when the regulation condition is met, updating the positions of all particles in the chaotic initial population according to the output regulation value and the zero output condition factor, the regulation condition being the condition that the zero output condition factor is greater than zero; a second calculation step, judging whether it is necessary to enter the resampling stage according to the resampling condition, and when it is not necessary to enter the resampling stage, calculating the state estimation value and the variance estimation value based on the importance weight, the resampling condition being that the number of effective particles is greater than or equal to the lower limit of the number of effective particles, the resampling stage being the stage of resampling the particles, the effective particles being particles whose fitness values ​​are greater than the set fitness values; a tracking step, estimating the target state of the tracking target according to the state estimation value and the variance estimation value to track the tracking target in real time, the target state at least including the position information and speed information of the tracking target.

[0006] Optionally, a chaotic mapping strategy is used to initialize the population to generate a chaotic initial population, including: determining the chaotic mapping strategy, where the chaotic mapping strategy is at least one of the following: Logistic chaotic mapping strategy, Circle chaotic mapping strategy, Sing chaotic mapping strategy, and Singer chaotic mapping strategy; performing the initialization operation on the population according to the chaotic mapping strategy to generate particle positions of the chaotic initial population, where the expression of the particle position is x ij =L i (u j -l j )+l j , x ij The current position of particle i in the chaotic initialization population on dimension j, u j is the upper bound of the decision variable in the dimension j, l j is the lower bound of the decision variable in the dimension j, Li is the population after the chaotic mapping strategy mapping, i = 1, 2, ..., n, n represents the total number of particles, j = 1, 2, ..., d, d represents the total number of decision variables, the decision variables are the parameters to be optimized in the particle filter algorithm and the improved PID search algorithm, and the expression of the population is x ij =(u j -l j )·r1+l j , r1 is a random number from 0 to 1; determine the target state transition model of the tracking target, the expression of the target state transition model is S xk represents the x-axis position information of the tracking target k at time, S yk represents the information of the tracking target k at the y-axis, represents the x-axis velocity information of the tracking target at time k, represents the y-axis speed information of the tracking target at time k, and T is the sampling period; generates the particle state set of the population according to the state transition model; samples the particle state set based on the importance density function to form the chaotic initial population at the initial moment, and the importance density function is z k Represents the measurement values ​​of all the particles at time k.

[0007] Optionally, the particle filter algorithm is used to calculate the importance weight and fitness value of particles in the chaotic initial population, including: calculating the importance weight of each particle according to a weight calculation formula, and the weight calculation formula is: represents the importance weight of the i-th particle at time k, represents the importance weight of the i-th particle at time k-1, R k represents the measurement noise variance, z k represents the measurement value of the sampling particle at time k, is the posterior probability density, represents the predicted measurement value; the fitness value of each particle is calculated according to the fitness formula, and the fitness formula is: represents the fitness value of the i-th particle at time k, φ is the adaptive parameter, Represents the predicted position of the valid particle.

[0008] Optionally, using the improved PID search algorithm to calculate the output adjustment value of the PID regulation includes: calculating the current system deviation according to a first formula, wherein the first formula is e k (t) = x b(t-1)-x(t-1), e k (t) represents the current system deviation, x b represents the individual with the best value in the history of the population, and x represents the position of the individual in the current iteration process; the output adjustment value of the PID adjustment is calculated according to the second formula, and the second formula is Δu(t)=K p ·r2[e k (t)-e k-1 (t)]+K i ·r3·e k (t)+K d ·r4·[e k (t)-2e k-1 (t)+e k-2 (t)], where r2, r3, and r4 are all random numbers in the matrix rand(n, 1), and K p K is the coefficient of the proportional factor in the PID regulation process. i is the coefficient of the integral factor in the PID regulation process, K d is the coefficient of the differential factor in the PID regulation process, Δu(t) represents the output regulation value when the number of iterations is t, and e k-1 (t) represents the system deviation at time k-1 when the number of iterations is t, and e k-1 (t) = e k (t-1)+x b (t)-x b (t-1), e k-2 (t) represents the system deviation at time k-2 when the number of iterations is t.

[0009] Optionally, when the adjustment condition is met, the positions of all particles in the chaotic initial population are updated according to the output adjustment value and the zero output condition factor, including: updating the positions of all particles in the chaotic initial population according to the population individual update formula, the population individual update formula is x(t+1)=x(t)+η·Δu(t)+(1-η)·o(t), x(t) is the position of the particle at the tth iteration, x(t+1) is the position of the particle at the t+1th iteration, Δu(t) is the output adjustment value, o(t) is the zero output condition factor, wherein o(t)=(cos(1-t / T max )+λr5·L)·e k (t), r5 is the random number of the matrix rand(n, d), T max is the maximum number of iterations, λ=[ln(T max -t+2) / ln(T max )] 2 , e k(t) is the system deviation, L is the Levy flight function, η = r6cos(t / T max ), r6 is the random number of the matrix rand(0,1).

[0010] Optionally, when the adjustment conditions are met, after updating the positions of all particles in the chaotic initial population according to the output adjustment value, the method further includes: normalizing the importance weight of each particle to obtain a normalized weight; and updating the importance weight of the particle according to the normalized weight.

[0011] Optionally, after calculating the state estimate and the variance estimate based on the importance weight, the method further includes: when the number of iterations has not reached the maximum number of iterations, repeating the first calculation step, the update step and the second calculation step in sequence at least once until the number of iterations reaches the maximum number of iterations; when the number of iterations reaches the maximum number of iterations, updating the next video frame of the current video frame to the current video frame, and repeating the reading step, the initialization step, the first calculation step, the update step, the second calculation step and the tracking step in sequence at least once until all the video frames complete the target tracking analysis.

[0012] According to another aspect of the present application, a target tracking device based on an improved PID search algorithm to optimize particle filtering is provided, the device comprising: a reading unit, used to execute a reading step, read a current video frame and select a tracking target from the current video frame; an initialization unit, used to execute an initialization step, initialize the algorithm parameters of the particle filter algorithm and the improved PID search algorithm, and use a chaotic mapping strategy to initialize the population to generate a chaotic initial population, the algorithm parameters at least include a sampling period, a measurement noise variance, a process noise, a maximum number of iterations and a population size, the improved PID search algorithm is a PID search algorithm improved by adding a zero output condition factor to the output regulation value of the PID regulation, and the particles in the chaotic initial population represent all states of the tracking target; a first calculation unit, used to execute a first calculation step, use the particle filter algorithm to calculate the importance weights and fitness values ​​of the particles in the chaotic initial population, and use the improved PID search algorithm to calculate The output regulation value of PID regulation; a first updating unit, used to execute the updating step, when the regulation condition is met, updating the positions of all particles in the chaotic initial population according to the output regulation value and the zero output condition factor, the regulation condition being the condition that the zero output condition factor is greater than zero; a second calculating unit, used to execute the second calculating step, judging whether it is necessary to enter the resampling stage according to the resampling condition, and calculating the state estimation value and the variance estimation value based on the importance weight when it is not necessary to enter the resampling stage, the resampling condition being that the number of valid particles is greater than or equal to the lower limit of the number of valid particles, the resampling stage being the stage of resampling the particles, the valid particles being the particles whose fitness value is greater than the set fitness value; a tracking unit, used to execute the tracking step, estimating the target state of the tracking target according to the state estimation value and the variance estimation value to track the tracking target in real time, the target state at least including the position information and velocity information of the tracking target.

[0013] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the methods described.

[0014] According to another aspect of the present application, a computer program product is provided, comprising computer instructions, wherein when the computer instructions are executed by a processor, any one of the methods described above is implemented.

[0015] By applying the technical solution of the present application, in a target tracking method based on an improved PID search algorithm to optimize a particle filter, an improved PID search algorithm is introduced, and the improved PID search algorithm is combined with a particle filter. To prevent the algorithm from falling into a local optimum, a zero output condition factor is added on the basis of the output value of the original PID search algorithm, and invalid particles are optimized and iterated, and a set of valid particles is retained, thereby achieving the purpose of reducing the estimation error and improving the filtering accuracy. The present application solves the problem that the existing heuristic optimization algorithm has a complex structure, many updated parameters, and is prone to falling into a local optimum, resulting in reduced accuracy of target tracking. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A hardware structure block diagram of a mobile terminal for executing a target tracking method based on an improved PID search algorithm and optimized particle filtering according to an embodiment of the present application is shown;

[0017] Figure 2 A schematic flow chart of a target tracking method based on an improved PID search algorithm to optimize particle filtering according to an embodiment of the present application is shown;

[0018] Figure 3 A flow chart of a target tracking method based on an improved PID search algorithm to optimize particle filtering is shown according to an embodiment of the present application;

[0019] Figure 4 A structural block diagram of a target tracking device based on an improved PID search algorithm and optimized particle filtering according to an embodiment of the present application is shown.

[0020] The above drawings include the following reference numerals:

[0021] 102, processor; 104, memory; 106, transmission device; 108, input and output devices. DETAILED DESCRIPTION

[0022] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0023] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] As introduced in the background technology, existing filtering algorithms in the prior art, such as the Kalman filter algorithm, have a weaker ability to solve non-Gaussian nonlinear filtering problems. With continuous improvement, the resampling strategy of the particle filter algorithm is becoming more and more complex, the parameters that need to be set are gradually increasing, and it depends on human experience. The existing heuristic optimization algorithms have complex structures, many update parameters, and are prone to local optimal situations. In order to solve the problem that the existing heuristic optimization algorithms have complex structures, many update parameters, and are prone to local optimal situations, resulting in reduced target tracking accuracy, the embodiments of the present application provide a target tracking method based on an improved PID search algorithm to optimize particle filtering, a target tracking device based on an improved PID search algorithm to optimize particle filtering, a computer-readable storage medium, and a computer program product.

[0026] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0027] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 1 is a hardware structure block diagram of a mobile terminal of a target tracking method based on an improved PID search algorithm to optimize particle filtering according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1Different configurations are shown.

[0028] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the target tracking method based on the improved PID search algorithm to optimize the particle filter in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The above network specific examples may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0029] In this embodiment, a target tracking method based on an improved PID search algorithm to optimize particle filtering is provided, which runs on a mobile terminal, a computer terminal or a similar computing device. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0030] Figure 2 1 is a flow chart of a target tracking method based on an improved PID search algorithm to optimize particle filtering according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0031] Step S201, a reading step, reads a current video frame and selects a tracking target from the current video frame.

[0032] Specifically, the current video frame is read from the video stream. In the current video frame, the system uses specific algorithms (such as feature matching, color tracking, etc.) to identify and select the tracking target. Ensure that the system can obtain video data in real time and extract information about the tracking target from it to provide input for subsequent tracking algorithms.

[0033] Step S202, an initialization step, initializes the algorithm parameters of the particle filter algorithm and the improved PID search algorithm, and uses a chaotic mapping strategy to initialize the population to generate a chaotic initial population. The above algorithm parameters at least include a sampling period, a measurement noise variance, a process noise, a maximum number of iterations and a population size. The above improved PID search algorithm is a PID search algorithm obtained by adding a zero output condition factor to the output adjustment value of the PID adjustment. The particles in the above chaotic initial population represent all states of the above tracking target.

[0034] Specifically, the parameters of the particle filter algorithm and the improved PID search algorithm are initialized, such as the sampling period, measurement noise variance, process noise, maximum number of iterations and population size, and the state equation and measurement equation of the system are generated as follows: State equation x k =f k (x k-1 , k)+w k-1 , measurement equation In the formula, w k and v k The mean is 0 and the variance is Q k and R k Gaussian noise. The chaotic mapping strategy is used to initialize the population and generate a chaotic initial population. Chaotic mapping can increase the diversity of the population and improve the search efficiency. The improved PID search algorithm adds a zero output condition factor to the traditional PID adjustment output value to prevent the algorithm from falling into the local optimum to adapt to different tracking scenarios.

[0035] It should be noted that particle filtering is an approximate Bayesian filtering algorithm. The main idea is to use some discrete random sampling points to approximate the probability density function of the system's random variables, and to use the expectation of the particles in the sample space instead of the integral to calculate the state quantity of the system, thereby obtaining the minimum variance estimate. Particle filtering is mainly divided into two parts: sequential importance sampling and resampling. In order to slow down particle degradation and reduce filter divergence, the predicted value and the error of the predicted value are used to compensate the particles in the sequential importance sampling process, and the covariance matrix of the particles is calculated at the same time to assist in the generation of new particle swarms. The particle generation steps of this algorithm are as follows: (1) Particle prediction: in, represents the state of particle i at time k, and W is the corresponding weight. (2) Weight calculation: In the formula, represents the weight of particle i at time k; Z k Represents the measured value of the particle. (3) Gain calculation: Calculate the particle gain matrix based on the predicted value and the measured value In the formula, is the predicted value of the particle at time k. (4) Particle update: Update the particle using the calculated gain and measurement value. (5) Covariance calculation: Calculate the covariance matrix of the particle Among them, K, R, and Z are particle filter gain, measurement noise, and measurement data, respectively.

[0036] Step S203, the first calculation step, uses the above-mentioned particle filter algorithm to calculate the importance weights and fitness values ​​of the particles in the above-mentioned chaotic initial population, and simultaneously uses the above-mentioned improved PID search algorithm to calculate the output adjustment value of the PID adjustment.

[0037] Specifically, the particle filter algorithm is used to calculate the importance weight and fitness value of each particle in the chaotic initial population. The improved PID search algorithm is used to calculate the output adjustment value of PID regulation. The particle filter algorithm evaluates the reliability of each particle by calculating the weight and fitness value, providing a basis for subsequent updates and resampling. The improved PID search algorithm provides a dynamic adjustment mechanism, making tracking more flexible and accurate.

[0038] It should be noted that the purpose of PID control is to effectively adjust the deviation of the controlled object so that the system reaches a stable state. The PID-based search algorithm (PSA) simulates the adjustment process of PID, abstracts the historical best individual of the group as the target value, abstracts each individual as the real value, and continuously corrects the deviation of each individual relative to the best individual to achieve a better overall state.

[0039] Step S204, an updating step, updates the positions of all particles in the above chaotic initial population according to the above output adjustment value and the above zero output condition factor when the adjustment condition is met, and the above adjustment condition is that the above zero output condition factor is greater than zero.

[0040] Specifically, when the adjustment condition is met (the zero output condition factor is greater than zero), the positions of all particles in the chaotic initial population are updated according to the output adjustment value and the zero output condition factor, so that the particles continue to approach the real state. The positions of the particles are updated so that the population can better approach the real state of the tracking target. The introduction of the zero output condition factor can reduce unnecessary adjustment actions and improve the stability and efficiency of tracking.

[0041] Step S205, the second calculation step, determines whether it is necessary to enter the resampling stage according to the resampling conditions. When it is not necessary to enter the resampling stage, the state estimation value and the variance estimation value are calculated based on the importance weights. The resampling condition is that the number of valid particles is greater than or equal to the lower limit of the number of valid particles. The resampling stage is the stage of resampling the particles. The valid particles are particles whose fitness values ​​are greater than the set fitness values.

[0042] Specifically, the threshold value of the number of effective particles is set to N b , effective particle number N eff The calculation formula is: If N eff <N b , it means that the number of effective particles is insufficient, the algorithm is degraded, and resampling is required; otherwise, it means that there are sufficient effective particles and resampling is not required. The resampling stage can remove particles with low fitness and retain particles with high fitness, thereby improving the tracking accuracy. If resampling is not required, the state estimate and variance estimate are calculated based on the importance weights. State estimate and variance estimates Provides the current status information of the tracking target and provides a basis for real-time tracking. and are the particles and their corresponding weights at that moment. The state estimate of the particle filter is calculated by the weighted average of a group of random samples (particles). In particle filtering, the variance estimate is used to measure the uncertainty of the state estimate. The smaller the variance, the more stable the estimate and the smaller the uncertainty. The performance of the particle filter for video target tracking is measured by the size of these two values.

[0043] Step S206, a tracking step, estimates the target state of the tracking target according to the state estimation value and the variance estimation value to track the tracking target in real time, wherein the target state at least includes the position information and the speed information of the tracking target.

[0044] Specifically, the target state of the tracking target, including position information and velocity information, is estimated based on the state estimation value and variance estimation value. This information is used to track the tracking target in real time. The state of the tracking target is updated in real time to ensure the continuity and accuracy of tracking. In general, this system achieves real-time tracking of video targets by combining particle filtering and improved PID search algorithm. Through chaotic initialization and resampling mechanism, the system can adapt to different tracking environments and improve the robustness and accuracy of tracking.

[0045] In this embodiment, first, a reading step is performed to read the current video frame and select a tracking target from the current video frame; then, an initialization step is performed to initialize the algorithm parameters of the particle filter algorithm and the improved PID search algorithm, and a chaotic mapping strategy is used to initialize the population to generate a chaotic initial population, wherein the algorithm parameters at least include a sampling period, a measurement noise variance, a process noise, a maximum number of iterations and a population size; the improved PID search algorithm is a PID search algorithm obtained by adding a zero output condition factor to the output adjustment value of the PID regulation; the particles in the chaotic initial population represent all states of the tracking target; then, a first calculation step is performed to calculate the importance weights and fitness values ​​of the particles in the chaotic initial population using the particle filter algorithm, and at the same time, the improved PID search algorithm is used to calculate the output adjustment value of the PID regulation; then, an updating step is performed to update the value of the PID regulation in the first calculation step. When the adjustment condition is met, the positions of all particles in the above-mentioned chaotic initial population are updated according to the above-mentioned output adjustment value and the above-mentioned zero output condition factor, and the above-mentioned adjustment condition is that the above-mentioned zero output condition factor is greater than zero; then, in the second calculation step, whether it is necessary to enter the resampling stage is determined according to the resampling condition. When it is not necessary to enter the above-mentioned resampling stage, the state estimation value and the variance estimation value are calculated based on the above-mentioned importance weights. The above-mentioned resampling condition is that the number of valid particles is greater than or equal to the lower limit value of the number of valid particles. The above-mentioned resampling stage is a stage for resampling the above-mentioned particles. The above-mentioned valid particles are particles whose fitness values ​​are greater than the set fitness values; finally, in the tracking step, the target state of the above-mentioned tracking target is estimated according to the above-mentioned state estimation value and the above-mentioned variance estimation value to track the above-mentioned tracking target in real time, and the above-mentioned target state at least includes the position information and speed information of the above-mentioned tracking target. The present invention introduces an improved PID search algorithm, combines the improved PID search algorithm with a particle filter, and adds a zero output condition factor based on the output value of the original PID search algorithm to prevent the algorithm from falling into a local optimum, optimizes and iterates invalid particles, and retains a set of valid particles, thereby achieving the purpose of reducing estimation errors and improving filtering accuracy. The present application solves the problem that the existing heuristic optimization algorithm has a complex structure, many updated parameters, and is prone to falling into a local optimum, resulting in reduced accuracy of target tracking.

[0046] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the target tracking method based on the improved PID search algorithm to optimize the particle filter of the present application will be described in detail below in combination with specific embodiments.

[0047] In order to improve the convergence speed and solution accuracy of the algorithm, in an optional implementation manner, the above step S202 includes:

[0048] Step S2021, determining the above-mentioned chaotic mapping strategy, where the above-mentioned chaotic mapping strategy is at least one of the following: Logistic chaotic mapping strategy, Circle chaotic mapping strategy, Sing chaotic mapping strategy and Singer chaotic mapping strategy;

[0049] Step S2022, performing the initialization operation on the population according to the chaotic mapping strategy to generate the particle positions of the initial chaotic population. The expression of the particle positions is x ij =L i (u j -l j )+l j , x ij The current position of particle i in the above chaotic initialization population on dimension j, u j is the upper bound of the decision variable in the above dimension j, l j is the lower bound of the above decision variables in the above dimension j, L i is the population after the chaotic mapping strategy, i = 1, 2, ..., n, n represents the total number of the above particles, j = 1, 2, ..., d, d represents the total number of the above decision variables, the above decision variables are the parameters to be optimized in the particle filter algorithm and the improved PID search algorithm, and the expression of the above population is x ij =(u j -l j )·r1+l j , r1 is a random number from 0 to 1;

[0050] Step S2023, determining the target state transition model of the tracking target, the expression of the target state transition model is: S xk represents the x-axis position information of the above-mentioned tracking target k at the moment, S yk represents the information of the above tracking target k at the y-axis, represents the x-axis velocity information of the above-mentioned tracking target at time k, represents the velocity information of the tracking target at time k on the y-axis, and T is the sampling period; the particle state set of the population is generated according to the state transition model;

[0051] Step S2024, sampling the particle state set based on the importance density function to form the chaotic initial population at the initial moment, the importance density function is z k Represents the measurement values ​​of all the above particles at time k.

[0052] In the above embodiment, it is assumed that the number of decision variables in the optimization problem is d, and the upper and lower bounds of the variables are u and l respectively. The control parameters of the PSA algorithm include the maximum number of iterations T and the population size n. Then the initialization population can be expressed as: ij =(u j -l j )·r1+l j , i = 1, 2, ..., n; j = 1, 2, ..., d, where x ij is the current position of individual i on dimension j, and r1 is a random number from 0 to 1. The quality of the initial population affects the convergence speed and solution accuracy of the algorithm. The PSA algorithm generates the initial population randomly, which makes it difficult to ensure the diversity and uniformity of the population distribution. Therefore, the present invention uses the Logistic chaotic mapping strategy to initialize the population. The Logistic mathematical expression is: k+1 =μx k (1-x k ), where k represents the number of iterations, x k ∈[0,1], μ∈(0,4], μ=4. First, from the formula x k+1 =μx k (1-x k ) Generate a set of initial populations: L i =4*L i-1 (1-L i-1 ), L i represents the population after Logistic mapping, and the individual positions of the chaotic initialized population can be expressed as: ij =L i (u j -l j )+l j The state transition model can reflect the target position and target motion characteristics, and can represent the actual motion process of the target. When tracking a video target, the target area is usually marked manually or using a detection algorithm, and the mathematical model for obtaining the tracking target position information is obtained through the state transition model. The second-order autoregressive uniform velocity model is usually used, and the formula is expressed as: X k =AX k-1 +BV k-1 +CW k-1 , where X k-1 、V k-1 and W k-1 are the position information, motion speed information and system noise information at time k-1 respectively, and A, B and C are parameter matrices. For a two-dimensional image plane, the target state transition model can be expressed as: Indicates the predicted position of the tracking target in the current video frame. According to the target state transfer model, various predicted positions can be obtained to generate a particle state set. At the moment k = 0, the sampled particles are used It means that the initial state set is sampled based on the initial state importance density function to form the sampling particle swarm set at the initial moment (that is, the above-mentioned chaotic initial population). The importance density function is: In the formula, z k Represents the measurement value of the particle at time k.

[0053] In order to improve the estimation accuracy of the filtering algorithm, in an optional implementation manner, the above step S203 includes:

[0054] Step S2031, calculate the importance weight of each particle according to the weight calculation formula, the weight calculation formula is: represents the above importance weight of the i-th particle at time k, represents the above importance weight of the i-th particle at time k-1, R k represents the above measurement noise variance, z k represents the measurement value of the sampling particle at time k, is the posterior probability density, represents the predicted measurement value;

[0055] Step S2032, calculating the fitness value of each particle according to the fitness formula, the fitness formula is: represents the fitness value of the i-th particle at time k, φ is the adaptive parameter, Represents the predicted position of the valid particle.

[0056] In the above embodiment, according to the particle filter algorithm, each particle is predicted and sampled using the prediction model and the sampling model to obtain the sampled measurement value. Then, the posterior probability density of each particle is calculated according to the measurement value and the measurement noise variance, that is, the weight corresponding to the particle with a high posterior probability density will also be higher. According to the predicted measurement value and the measurement noise variance, the fitness value of each particle is calculated. First, according to the adaptive parameters and the predicted position of the effective particle, the gap between the predicted position of each particle and the actual observation value is calculated. Then, according to the size of the gap, the fitness value of each particle is calculated, that is, the larger the fitness value, the higher the matching degree between the predicted position corresponding to the particle and the actual observation value. In the particle filter algorithm, the particles are resampled according to the importance weight to increase the number of effective particles, thereby improving the estimation accuracy of the filter algorithm; and the fitness value can help screen out particles that better match the actual observation value, thereby improving the estimation accuracy of the filter algorithm.

[0057] In order to converge the entire population to an optimal state by continuously adjusting the system deviation to improve the convergence speed and accuracy, in an optional implementation, the above step S203 further includes:

[0058] Step S2033, calculating the current system deviation according to the first formula, the first formula is e k (t) = x b (t-1)-x(t-1), e k (t) represents the above current system deviation, x b represents the individual with the best historical value in the population, and x represents the position of the individual in the current iteration process;

[0059] Step S2034, calculating the output adjustment value of the PID adjustment according to the second formula, the second formula is Δu(t)=K p ·r2[e k (t)-e k-1 (t)]+K i ·r3·e k (t)+K d ·r4·[e k (t)-2e k-1 (t)+e k-2 (t)], where r2, r3, and r4 are all random numbers in the matrix rand(n, 1), and K p K is the coefficient of the proportional factor in the PID regulation process. i K is the coefficient of the integral factor in the above PID regulation process. d is the coefficient of the differential factor in the PID regulation process, Δu(t) represents the above output regulation value when the number of iterations is t, e k-1 (t) represents the system deviation at time k-1 when the number of iterations is t, and e k-1 (t) = e k (t-1)+x b (t)-x b (t-1), e k-2 (t) represents the system deviation at time k-2 when the number of iterations is t.

[0060] In the above embodiment, for several iterations t, the overall deviation e at the current moment is k (t) is e k (t) = x b (t-1)-x(t-1), where x b represents the historical optimal individual in the initial chaotic population, and x represents the position of the individual in the current iteration. In order to facilitate calculation and iterative update, when the number of iterations is t, the deviation of the population at the previous moment is expressed as e k-1 (t) represents the deviation between the first two moments.k-2 (t) represents. In the PSA algorithm, the optimal value after each iteration is not always the same. At the same time, in order to reduce the space complexity of the algorithm as much as possible, e k-1 (t) can be expressed as: k-1 (t) = e k (t-1)+x b (t)-x b (t-1). In the PID adjustment process, the proportional, integral and differential factors will be adjusted according to different situations. When the number of iterations is t, the expression of the output adjustment value Δu(t) of the PID adjustment is, Δu(t) = K p ·r2[e k (t)-e k-1 (t)]+K i ·r3·e k (t)+K d ·r4·[ e k(t)-2e k-1 (t)+e k-2 (t)].

[0061] In order to prevent the algorithm from falling into a local optimum and further improve filtering accuracy, in an optional implementation manner, the above step S204 includes:

[0062] Step S2041, the positions of all particles in the above chaotic initial population are updated according to the population individual update formula, the above population individual update formula is x(t+1)=x(t)+η·Δu(t)+(1-η)·o(t), x(t) is the position of the above particle at the tth iteration, x(t+1) is the position of the above particle at the t+1th iteration, Δu(t) is the above output adjustment value, o(t) is the above zero output condition factor, wherein o(t)=(cos(1-t / T max )+λr5·L)·e k (t), r5 is the random number of the matrix rand(n, d), T max is the maximum number of iterations mentioned above, λ=[ln(T max -t+2) / ln(T max )] 2 , e k (t) is the system deviation, L is the Levy flight function, η = r6cos(t / T max ), r6 is the random number of the matrix rand(n,1).

[0063] In the above embodiment, in order to prevent the algorithm from falling into a local optimum, a condition factor called zero output is added to the original output adjustment value Δu(t), which is defined as follows: o(t) = (cos(1-t / T) + λr5·L)·ek (t), where r5∈rand(n, d); λ is the adjustment parameter according to the following formula: λ=[ln(T-t+2) / ln(T)] 2 , L is a Levy flight function, defined as: In the formula, u and v are matrices of random numbers with n rows and d columns that follow a standard normal distribution; β is a constant set to 1.5. In summary, the update of individuals in the population is related to both Δu(t) and o(t). The update formula for individuals in the population is: x(t+1)=x(t)+η·Δu(t)+(1-η)·o(t), where η is a matrix with n rows and 1 column, expressed as: η=r6cos(t / T), where r6 is a random number in the matrix rand(n,1).

[0064] In order to improve the search efficiency and convergence of the particle swarm algorithm, in an optional implementation manner, after the above step S204, the above method further includes:

[0065] Step S301, normalizing the importance weight of each particle to obtain a normalized weight;

[0066] Step S302: updating the importance weight of the particle according to the normalized weight.

[0067] In the above embodiment, the particle weight value is normalized according to the normalization formula, and the above normalization formula is: Updating the importance weights of particles according to the normalized weights can make the weights of each particle more consistent with its actual importance in the particle swarm. The updated importance weights can be used in the subsequent particle swarm algorithm to affect the movement and search direction of the particles. Updating the importance weights of particles according to the normalized weights, that is, replacing the original weights with normalized weights. Normalization and importance weight update can make the particle swarm algorithm more accurate and stable. Normalization can eliminate the dimensional differences between the weights of different particles, making the weights of each particle more comparable; and the importance weight update can be adjusted according to the actual contribution of the particle in the particle swarm, making the algorithm more flexible and adaptable to the solution of different problems, improving the search efficiency and convergence of the particle swarm algorithm, and making it more effective in solving optimization problems.

[0068] In order to ensure the accuracy and efficiency of target tracking, in an optional implementation manner, after the above step S205, the above method further includes:

[0069] Step S401, when the number of iterations has not reached the maximum number of iterations, repeatedly executing the first calculation step, the updating step and the second calculation step at least once in sequence until the number of iterations reaches the maximum number of iterations;

[0070] Step S402, when the above-mentioned number of iterations reaches the above-mentioned maximum number of iterations, the next video frame of the above-mentioned current video frame is updated to the above-mentioned current video frame, and the above-mentioned reading step, the above-mentioned initialization step, the above-mentioned first calculation step, the above-mentioned updating step, the above-mentioned second calculation step and the above-mentioned tracking step are repeated in sequence at least once until all the above-mentioned video frames complete the target tracking analysis.

[0071] In the above embodiment, it is checked whether the current number of iterations has reached the preset maximum number of iterations. If the number of iterations has not reached the maximum number of iterations, the first calculation step, the updating step, and the second calculation step are repeated at least once until the number of iterations reaches the maximum number of iterations to complete the target tracking analysis of the current video frame. When the number of iterations reaches the maximum number of iterations, the next video frame of the current video frame is set as the current video frame. In order to reset or prepare for the next iteration cycle, the reading step, the initialization step, the first calculation step, the updating step, the second calculation step, and the tracking step are repeated in sequence at least once until all video frames complete the target tracking analysis. Figure 3 As shown in FIG. 1 , this process is repeated until all video frames have completed the target tracking analysis. By iteratively processing and analyzing the video frames, the target in the video is tracked to ensure the accuracy and efficiency of target tracking.

[0072] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0073] The embodiment of the present application also provides a target tracking device based on an improved PID search algorithm to optimize particle filtering. It should be noted that the target tracking device based on an improved PID search algorithm to optimize particle filtering in the embodiment of the present application can be used to execute the target tracking method for optimizing particle filtering based on an improved PID search algorithm provided in the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and those that have been described will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0074] The following is an introduction to the target tracking device based on the improved PID search algorithm and particle filter optimization provided in the embodiment of the present application.

[0075] Figure 41 is a block diagram of a target tracking device based on an improved PID search algorithm to optimize particle filtering according to an embodiment of the present application. Figure 4 As shown, the device comprises:

[0076] The reading unit 10 is used to execute the reading step, read the current video frame and select a tracking target from the current video frame.

[0077] Specifically, the current video frame is read from the video stream. In the current video frame, the system uses specific algorithms (such as feature matching, color tracking, etc.) to identify and select the tracking target. Ensure that the system can obtain video data in real time and extract information about the tracking target from it to provide input for subsequent tracking algorithms.

[0078] The initialization unit 20 is used to perform the initialization step, initialize the algorithm parameters of the particle filter algorithm and the improved PID search algorithm, and use the chaotic mapping strategy to initialize the population to generate a chaotic initial population. The above algorithm parameters at least include a sampling period, a measurement noise variance, a process noise, a maximum number of iterations and a population size. The above improved PID search algorithm is a PID search algorithm obtained by adding a zero output condition factor to the output adjustment value of the PID adjustment. The particles in the above chaotic initial population represent all states of the above tracking target.

[0079] Specifically, the parameters of the particle filter algorithm and the improved PID search algorithm are initialized, such as the sampling period, measurement noise variance, process noise, maximum number of iterations and population size, and the state equation and measurement equation of the system are generated as follows: State equation x k =f k (x k-1 , k)+w k-1 , measurement equation In the formula, w k and v k The mean is 0 and the variance is Q k and R k Gaussian noise. The chaotic mapping strategy is used to initialize the population and generate a chaotic initial population. Chaotic mapping can increase the diversity of the population and improve the search efficiency. The improved PID search algorithm adds a zero output condition factor to the traditional PID adjustment output value to prevent the algorithm from falling into the local optimum to adapt to different tracking scenarios.

[0080] The first calculation unit 30 is used to perform the first calculation step, using the above-mentioned particle filter algorithm to calculate the importance weights and fitness values ​​of the particles in the above-mentioned chaotic initial population, and at the same time using the above-mentioned improved PID search algorithm to calculate the output adjustment value of the PID adjustment.

[0081] Specifically, the particle filter algorithm is used to calculate the importance weight and fitness value of each particle in the chaotic initial population. The improved PID search algorithm is used to calculate the output adjustment value of PID regulation. The particle filter algorithm evaluates the reliability of each particle by calculating the weight and fitness value, providing a basis for subsequent updates and resampling. The improved PID search algorithm provides a dynamic adjustment mechanism, making tracking more flexible and accurate.

[0082] The first updating unit 40 is used to execute the updating step, and when the adjustment condition is met, the positions of all particles in the above-mentioned chaotic initial population are updated according to the above-mentioned output adjustment value and the above-mentioned zero output condition factor, and the above-mentioned adjustment condition is the condition that the above-mentioned zero output condition factor is greater than zero.

[0083] Specifically, when the adjustment condition is met (the zero output condition factor is greater than zero), the positions of all particles in the chaotic initial population are updated according to the output adjustment value and the zero output condition factor, so that the particles continue to approach the real state. The positions of the particles are updated so that the population can better approach the real state of the tracking target. The introduction of the zero output condition factor can reduce unnecessary adjustment actions and improve the stability and efficiency of tracking.

[0084] The second calculation unit 50 is used to execute the second calculation step, determine whether it is necessary to enter the resampling stage according to the resampling condition, and calculate the state estimation value and the variance estimation value based on the importance weight when it is not necessary to enter the resampling stage. The resampling condition is that the number of valid particles is greater than or equal to the lower limit of the number of valid particles. The resampling stage is a stage for resampling the particles. The valid particles are particles whose fitness values ​​are greater than the set fitness values.

[0085] Specifically, the threshold value of the number of effective particles is set to N b , effective particle number N eff The calculation formula is: If N eff <N b , it means that the number of effective particles is insufficient, the algorithm is degraded, and resampling is required; otherwise, it means that there are sufficient effective particles and resampling is not required. The resampling stage can remove particles with low fitness and retain particles with high fitness, thereby improving the tracking accuracy. If resampling is not required, the state estimate and variance estimate are calculated based on the importance weights. State estimate and variance estimates Provides the current status information of the tracking target and provides a basis for real-time tracking. and are the particles and their corresponding weights at that moment. The state estimate of the particle filter is calculated by the weighted average of a group of random samples (particles). In particle filtering, the variance estimate is used to measure the uncertainty of the state estimate. The smaller the variance, the more stable the estimate and the smaller the uncertainty. The performance of the particle filter for video target tracking is measured by the size of these two values.

[0086] The tracking unit 60 is used to execute the tracking step, estimate the target state of the tracking target according to the state estimation value and the variance estimation value to track the tracking target in real time, and the target state at least includes the position information and speed information of the tracking target.

[0087] Specifically, the target state of the tracking target, including position information and velocity information, is estimated based on the state estimation value and variance estimation value. This information is used to track the tracking target in real time. The state of the tracking target is updated in real time to ensure the continuity and accuracy of tracking. In general, this system achieves real-time tracking of video targets by combining particle filtering and improved PID search algorithm. Through chaotic initialization and resampling mechanism, the system can adapt to different tracking environments and improve the robustness and accuracy of tracking.

[0088] In this embodiment, a target tracking device based on an improved PID search algorithm to optimize particle filtering includes a reading unit for executing a reading step, reading a current video frame and selecting a tracking target from the current video frame; an initialization unit for executing an initialization step, initializing the algorithm parameters of the particle filter algorithm and the improved PID search algorithm, and initializing the population using a chaotic mapping strategy to generate a chaotic initial population, wherein the algorithm parameters at least include a sampling period, a measurement noise variance, a process noise, a maximum number of iterations, and a population size, wherein the improved PID search algorithm is a PID search algorithm obtained by adding a zero output condition factor to the output adjustment value of the PID regulation, and the particles in the chaotic initial population represent all states of the tracking target; and a first calculation unit for executing a first calculation step, using the particle filter algorithm to calculate the importance weights and fitness values ​​of the particles in the chaotic initial population, and at the same time using the improved PID search algorithm to calculate the output adjustment value of the PID regulation. a first updating unit for executing an updating step, and updating the positions of all particles in the above-mentioned chaotic initial population according to the above-mentioned output adjustment value and the above-mentioned zero output condition factor when an adjustment condition is met, and the above-mentioned adjustment condition is that the above-mentioned zero output condition factor is greater than zero; a second calculating unit for executing a second calculating step, and judging whether it is necessary to enter the resampling stage according to the resampling condition, and calculating the state estimation value and the variance estimation value based on the above-mentioned importance weight when it is not necessary to enter the above-mentioned resampling stage, and the above-mentioned resampling condition is that the number of valid particles is greater than or equal to the lower limit of the number of valid particles, and the above-mentioned resampling stage is a stage for resampling the above-mentioned particles, and the above-mentioned valid particles are particles whose fitness values ​​are greater than the set fitness values; a tracking unit for executing a tracking step, and estimating the target state of the above-mentioned tracking target according to the above-mentioned state estimation value and the above-mentioned variance estimation value to track the above-mentioned tracking target in real time, and the above-mentioned target state at least includes the position information and the speed information of the above-mentioned tracking target. The present invention introduces an improved PID search algorithm, combines the improved PID search algorithm with a particle filter, and adds a zero output condition factor based on the output value of the original PID search algorithm to prevent the algorithm from falling into a local optimum, optimizes and iterates invalid particles, and retains a set of valid particles, thereby achieving the purpose of reducing estimation errors and improving filtering accuracy. The present application solves the problem that the existing heuristic optimization algorithm has a complex structure, many updated parameters, and is prone to falling into a local optimum, resulting in reduced accuracy of target tracking.

[0089] In order to improve the convergence speed and solution accuracy of the algorithm, in an optional implementation manner, the initialization unit includes:

[0090] A first determination module is used to determine the above-mentioned chaotic mapping strategy, and the above-mentioned chaotic mapping strategy is at least one of the following: Logistic chaotic mapping strategy, Circle chaotic mapping strategy, Sing chaotic mapping strategy and Singer chaotic mapping strategy;

[0091] A generation module is used to perform the initialization operation on the above population according to the above chaotic mapping strategy to generate the particle positions of the above chaotic initial population. The expression of the above particle position is x ij =L i (u j -l j )+l j , x ij The current position of particle i in the above chaotic initialization population on dimension j, u j is the upper bound of the decision variable in the above dimension j, l j is the lower bound of the above decision variables in the above dimension j, L i is the population after the chaotic mapping strategy, i = 1, 2, ..., n, 0 represents the total number of the above particles, j = 1, 2, ..., d, d represents the total number of the above decision variables, the above decision variables are the parameters to be optimized in the particle filter algorithm and the improved PID search algorithm, and the expression of the above population is x ij =(u j -l j )·r1+l j , r1 is a random number from 0 to 1;

[0092] The second determination module is used to determine the target state transition model of the tracking target. The expression of the target state transition model is: S xk represents the x-axis position information of the above-mentioned tracking target k at the moment, S yk represents the information of the above tracking target k at the y-axis, represents the x-axis velocity information of the above-mentioned tracking target at time k, represents the velocity information of the tracking target at time k on the y-axis, and T is the sampling period; the particle state set of the population is generated according to the state transition model;

[0093] The sampling module is used to sample the particle state set based on the importance density function to form the chaotic initial population at the initial moment. The importance density function is: z k Represents the measurement values ​​of all the above particles at time k.

[0094] In the above embodiment, it is assumed that the number of decision variables in the optimization problem is d, and the upper and lower bounds of the variables are u and l respectively. The control parameters of the PSA algorithm include the maximum number of iterations T and the population size n. Then the initialization population can be expressed as: ij =(u j -l j )·r1+l j , i = 1, 2, ..., n; j = 1, 2, ..., d, where x ij is the current position of individual i on dimension j, and r1 is a random number from 0 to 1. The quality of the initial population affects the convergence speed and solution accuracy of the algorithm. The PSA algorithm generates the initial population randomly, which makes it difficult to ensure the diversity and uniformity of the population distribution. Therefore, the present invention uses the Logistic chaotic mapping strategy to initialize the population. The Logistic mathematical expression is: k+1 =μx k (1-x k ), where k represents the number of iterations, x k ∈[0,1], μ∈(0,4], μ=4. First, from the formula x k+1 =μx k (1-x k ) Generate a set of initial populations: L i =4*L i-1 (1-L i-1 ), L i represents the population after Logistic mapping, and the individual positions of the chaotic initialized population can be expressed as: ij =L i (u j -l j )+l j The state transition model can reflect the target position and target motion characteristics, and can represent the actual motion process of the target. When tracking a video target, the target area is usually marked manually or using a detection algorithm, and the mathematical model for obtaining the tracking target position information is obtained through the state transition model. The second-order autoregressive uniform velocity model is usually used, and the formula is expressed as: X k =AX k-1 +BV k-1 +CW k-1 , where X k-1 、V k-1 and W k-1 are the position information, motion speed information and system noise information at time k-1 respectively, and A, B and C are parameter matrices. For a two-dimensional image plane, the target state transition model can be expressed as: Indicates the predicted position of the tracking target in the current video frame. According to the target state transfer model, various predicted positions can be obtained to generate a particle state set. At the moment k = 0, the sampled particles are used It means that the initial state set is sampled based on the initial state importance density function to form the sampling particle swarm set at the initial moment (that is, the above-mentioned chaotic initial population). The importance density function is: In the formula, z k Represents the measurement value of the particle at time k.

[0095] In order to improve the estimation accuracy of the filtering algorithm, in an optional implementation manner, the first calculation unit includes:

[0096] The first calculation module is used to calculate the importance weight of each particle according to the weight calculation formula. The weight calculation formula is: represents the above importance weight of the i-th particle at time k, represents the above importance weight of the i-th particle at time k-1, R k represents the above measurement noise variance, z k represents the measurement value of the sampling particle at time k, is the posterior probability density, represents the predicted measurement value;

[0097] The second calculation module is used to calculate the fitness value of each particle according to the fitness formula. The fitness formula is: represents the fitness value of the i-th particle at time k, φ is the adaptive parameter, Represents the predicted position of the valid particle.

[0098] In the above embodiment, according to the particle filter algorithm, each particle is predicted and sampled using the prediction model and the sampling model to obtain the sampled measurement value. Then, the posterior probability density of each particle is calculated according to the measurement value and the measurement noise variance, that is, the weight corresponding to the particle with a high posterior probability density will also be higher. According to the predicted measurement value and the measurement noise variance, the fitness value of each particle is calculated. First, according to the adaptive parameters and the predicted position of the effective particle, the gap between the predicted position of each particle and the actual observation value is calculated. Then, according to the size of the gap, the fitness value of each particle is calculated, that is, the larger the fitness value, the higher the matching degree between the predicted position corresponding to the particle and the actual observation value. In the particle filter algorithm, the particles are resampled according to the importance weight to increase the number of effective particles, thereby improving the estimation accuracy of the filter algorithm; and the fitness value can help screen out particles that better match the actual observation value, thereby improving the estimation accuracy of the filter algorithm.

[0099] In order to converge the entire population to an optimal state by continuously adjusting the system deviation to improve the convergence speed and accuracy, in an optional implementation manner, the first calculation unit further includes:

[0100] The third calculation module is used to calculate the current system deviation according to the first formula, where the first formula is e k (t) = x b (t-1)-x(t-1), e k (t) represents the above current system deviation, x b represents the individual with the best historical value in the population, and x represents the position of the individual in the current iteration process;

[0101] The fourth calculation module is used to calculate the output adjustment value of the PID adjustment according to the second formula, and the above second formula is Δu(t)=K p ·r2[e k (t)-e k-1 (t)]+K i ·r3·e k (t)+K d ·r4·[e k (t)-2e k-1 (t)+e k-2 (t)], where r2, r3, and r4 are all random numbers in the matrix rand(n, 1), and K p K is the coefficient of the proportional factor in the PID regulation process. i K is the coefficient of the integral factor in the above PID regulation process. d is the coefficient of the differential factor in the PID regulation process, Δu(t) represents the above output regulation value when the number of iterations is t, e k-1 (t) represents the system deviation at time k-1 when the number of iterations is t, and e k-1 (t) = e k (t-1)+x b (t)-x b (t-1), e k-2 (t) represents the system deviation at time k-2 when the number of iterations is t.

[0102] In the above embodiment, for several iterations t, the overall deviation e at the current moment is k (t) is e k (t) = x b (t-1)-x(t-1), where x b represents the historical optimal individual in the initial chaotic population, and x represents the position of the individual in the current iteration. In order to facilitate calculation and iterative update, when the number of iterations is t, the deviation of the population at the previous moment is expressed as e k-1 (t) represents the deviation between the first two moments.k-2 (t) represents. In the PSA algorithm, the optimal value after each iteration is not always the same. At the same time, in order to reduce the space complexity of the algorithm as much as possible, e k-1 (t) can be expressed as: k-1 (t) = e k (t-1)+x b (t)-x b (t-1). In the PID adjustment process, the proportional, integral and differential factors will be adjusted according to different situations. When the number of iterations is t, the expression of the output adjustment value Δu(t) of the PID adjustment is, Δu(t) = K p ·r2[e k (t)-e k-1 (t)]+K i ·r3·e k (t)+K d ·r4·[e k (t)-2e k-1 (t)+e k-2 (t)].

[0103] In order to prevent the algorithm from falling into a local optimum and further improve filtering accuracy, in an optional implementation manner, the first updating unit includes:

[0104] The updating module is used to update the positions of all particles in the above chaotic initial population according to the population individual updating formula. The above population individual updating formula is x(t+1)=x(t)+η·Δu(t)+(1-η)·o(t), x(t) is the position of the above particle at the tth iteration, x(t+1) is the position of the above particle at the t+1th iteration, Δu(t) is the output adjustment value, and o(t) is the zero output condition factor, wherein o(t)=(cos(1-t / T max )+λr5·L)·e k (t), r5 is the random number of the matrix rand(n, d), T max is the maximum number of iterations mentioned above, λ=[ln(T max -t+2) / ln(T max )] 2 , e k (t) is the system deviation, L is the Levy flight function, η = r6cos(t / T max ), r6 is the random number of the matrix rand(n,1).

[0105] In the above embodiment, in order to prevent the algorithm from falling into a local optimum, a condition factor called zero output is added to the original output adjustment value Δu(t), which is defined as follows: o(t) = (cos(1-t / T) + λr5·L)·ek (t), where r5∈rand(n, d); λ is an adjustment parameter according to the following formula: λ=[ln(T-t+2) / ln(T)] 2 , L is a Levy flight function, defined as: In the formula, u and v are matrices of random numbers with 0 rows and d columns that follow the standard normal distribution; β is a constant set to 1.5. In summary, the update of individuals in the population is related to both Δu(t) and o(t). The update formula of individuals in the population is: x(t+1)=x(t)+η·Δu(t)+(1-η)·o(t), where η is a matrix with n rows and 1 column, expressed as: η=r6cos(t / T), where r6 is a random number in the matrix rand(n,1).

[0106] In order to improve the search efficiency and convergence of the particle swarm algorithm, in an optional implementation manner, the above-mentioned device further includes:

[0107] A normalization unit is used for normalizing the importance weight of each particle to obtain a normalized weight after updating the positions of all particles in the chaotic initial population according to the output adjustment value when the adjustment condition is met;

[0108] The second updating unit is used to update the importance weight of the particle according to the normalized weight.

[0109] In the above embodiment, the particle weight value is normalized according to the normalization formula, and the above normalization formula is: Updating the importance weights of particles according to the normalized weights can make the weights of each particle more consistent with its actual importance in the particle swarm. The updated importance weights can be used in the subsequent particle swarm algorithm to affect the movement and search direction of the particles. Updating the importance weights of particles according to the normalized weights, that is, replacing the original weights with normalized weights. Normalization and importance weight update can make the particle swarm algorithm more accurate and stable. Normalization can eliminate the dimensional differences between the weights of different particles, making the weights of each particle more comparable; and the importance weight update can be adjusted according to the actual contribution of the particle in the particle swarm, making the algorithm more flexible and adaptable to the solution of different problems, improving the search efficiency and convergence of the particle swarm algorithm, and making it more effective in solving optimization problems.

[0110] In order to ensure the accuracy and efficiency of target tracking, in an optional implementation manner, the above-mentioned device further includes:

[0111] A first repeating unit is used for, after calculating the state estimation value and the variance estimation value based on the importance weight, if the number of iterations has not reached the maximum number of iterations, sequentially repeating the first calculation step, the updating step and the second calculation step at least once, until the number of iterations reaches the maximum number of iterations;

[0112] The second repetition unit is used to update the next video frame of the above-mentioned current video frame to the above-mentioned current video frame when the above-mentioned number of iterations reaches the above-mentioned maximum number of iterations, and to repeat the above-mentioned reading step, the above-mentioned initialization step, the above-mentioned first calculation step, the above-mentioned updating step, the above-mentioned second calculation step and the above-mentioned tracking step at least once in sequence until all the above-mentioned video frames complete the target tracking analysis.

[0113] In the above embodiment, it is checked whether the current number of iterations has reached the preset maximum number of iterations. If the number of iterations has not reached the maximum number of iterations, the first calculation step, the update step and the second calculation step will be repeated at least once until the number of iterations reaches the maximum number of iterations to complete the target tracking analysis of the current video frame. When the number of iterations reaches the maximum number of iterations, the next video frame of the current video frame is set as the current video frame. In order to reset or prepare for the next iteration cycle, the above reading step, the above initialization step, the above first calculation step, the above update step, the above second calculation step and the above tracking step are repeated at least once until all video frames complete the target tracking analysis. This process will be repeated until all video frames have completed the target tracking analysis. By iteratively processing and analyzing the video frames, the tracking of the target in the video is achieved, ensuring the accuracy and efficiency of target tracking.

[0114] The above-mentioned target tracking device based on the particle filter optimized by the improved PID search algorithm includes a processor and a memory, and the above-mentioned reading unit, initialization unit and first calculation unit are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize the corresponding functions. The above-mentioned modules are all located in the same processor; or, the above-mentioned modules are respectively located in different processors in the form of any combination.

[0115] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the kernel parameters can be adjusted to solve the problem that the existing heuristic optimization algorithm has a complex structure, many updated parameters, and is prone to local optimality, resulting in reduced accuracy of target tracking.

[0116] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0117] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the target tracking method based on the improved PID search algorithm to optimize the particle filter.

[0118] Specifically, the target tracking method based on the improved PID search algorithm to optimize the particle filter includes:

[0119] Step S201, a reading step, reading a current video frame and selecting a tracking target from the current video frame;

[0120] Step S202, initialization step, initializing the algorithm parameters of the particle filter algorithm and the improved PID search algorithm, and using the chaotic mapping strategy to initialize the population to generate a chaotic initial population, the above algorithm parameters at least include sampling period, measurement noise variance, process noise, maximum number of iterations and population size, the above improved PID search algorithm is a PID search algorithm improved by adding a zero output condition factor to the output adjustment value of the PID adjustment, and the particles in the above chaotic initial population represent all states of the above tracking target;

[0121] Step S203, a first calculation step, using the particle filter algorithm to calculate the importance weights and fitness values ​​of the particles in the chaotic initial population, and using the improved PID search algorithm to calculate the output adjustment value of the PID adjustment;

[0122] Step S204, an updating step, in which, when an adjustment condition is met, the positions of all particles in the initial chaotic population are updated according to the output adjustment value and the zero output condition factor, wherein the adjustment condition is that the zero output condition factor is greater than zero;

[0123] Step S205, a second calculation step, determining whether it is necessary to enter the resampling stage according to the resampling condition, and calculating the state estimation value and the variance estimation value based on the importance weight if it is not necessary to enter the resampling stage, the resampling condition is that the number of valid particles is greater than or equal to the lower limit of the number of valid particles, the resampling stage is a stage for resampling the particles, and the valid particles are particles whose fitness values ​​are greater than the set fitness values;

[0124] Step S206, a tracking step, estimates the target state of the tracking target according to the state estimation value and the variance estimation value to track the tracking target in real time, wherein the target state at least includes the position information and the speed information of the tracking target.

[0125] An embodiment of the present invention provides a processor, which is used to run a program, wherein the target tracking method based on the improved PID search algorithm to optimize the particle filter is executed when the program is running.

[0126] Specifically, the target tracking method based on the improved PID search algorithm to optimize the particle filter includes:

[0127] Step S201, a reading step, reading a current video frame and selecting a tracking target from the current video frame;

[0128] Step S202, initialization step, initializing the algorithm parameters of the particle filter algorithm and the improved PID search algorithm, and using the chaotic mapping strategy to initialize the population to generate a chaotic initial population, the above algorithm parameters at least include sampling period, measurement noise variance, process noise, maximum number of iterations and population size, the above improved PID search algorithm is a PID search algorithm improved by adding a zero output condition factor to the output adjustment value of the PID adjustment, and the particles in the above chaotic initial population represent all states of the above tracking target;

[0129] Step S203, a first calculation step, using the particle filter algorithm to calculate the importance weights and fitness values ​​of the particles in the chaotic initial population, and using the improved PID search algorithm to calculate the output adjustment value of the PID adjustment;

[0130] Step S204, an updating step, in which, when an adjustment condition is met, the positions of all particles in the initial chaotic population are updated according to the output adjustment value and the zero output condition factor, wherein the adjustment condition is that the zero output condition factor is greater than zero;

[0131] Step S205, a second calculation step, determining whether it is necessary to enter the resampling stage according to the resampling condition, and calculating the state estimation value and the variance estimation value based on the importance weight if it is not necessary to enter the resampling stage, the resampling condition is that the number of valid particles is greater than or equal to the lower limit of the number of valid particles, the resampling stage is a stage for resampling the particles, and the valid particles are particles whose fitness values ​​are greater than the set fitness values;

[0132] Step S206, a tracking step, estimates the target state of the tracking target according to the state estimation value and the variance estimation value to track the tracking target in real time, wherein the target state at least includes the position information and the speed information of the tracking target.

[0133] An embodiment of the present invention provides a video target tracking system, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, at least the following steps are implemented:

[0134] Step S201, a reading step, reading a current video frame and selecting a tracking target from the current video frame;

[0135] Step S202, initialization step, initializing the algorithm parameters of the particle filter algorithm and the improved PID search algorithm, and using the chaotic mapping strategy to initialize the population to generate a chaotic initial population, the above algorithm parameters at least include sampling period, measurement noise variance, process noise, maximum number of iterations and population size, the above improved PID search algorithm is a PID search algorithm improved by adding a zero output condition factor to the output adjustment value of the PID adjustment, and the particles in the above chaotic initial population represent all states of the above tracking target;

[0136] Step S203, a first calculation step, using the particle filter algorithm to calculate the importance weights and fitness values ​​of the particles in the chaotic initial population, and using the improved PID search algorithm to calculate the output adjustment value of the PID adjustment;

[0137] Step S204, an updating step, in which, when an adjustment condition is met, the positions of all particles in the initial chaotic population are updated according to the output adjustment value and the zero output condition factor, wherein the adjustment condition is that the zero output condition factor is greater than zero;

[0138] Step S205, a second calculation step, determining whether it is necessary to enter the resampling stage according to the resampling condition, and calculating the state estimation value and the variance estimation value based on the importance weight if it is not necessary to enter the resampling stage, the resampling condition is that the number of valid particles is greater than or equal to the lower limit of the number of valid particles, the resampling stage is a stage for resampling the particles, and the valid particles are particles whose fitness values ​​are greater than the set fitness values;

[0139] Step S206, a tracking step, estimates the target state of the tracking target according to the state estimation value and the variance estimation value to track the tracking target in real time, wherein the target state at least includes the position information and the speed information of the tracking target.

[0140] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing at least the following method steps:

[0141] Step S201, a reading step, reading a current video frame and selecting a tracking target from the current video frame;

[0142] Step S202, initialization step, initializing the algorithm parameters of the particle filter algorithm and the improved PID search algorithm, and using the chaotic mapping strategy to initialize the population to generate a chaotic initial population, the above algorithm parameters at least include sampling period, measurement noise variance, process noise, maximum number of iterations and population size, the above improved PID search algorithm is a PID search algorithm improved by adding a zero output condition factor to the output adjustment value of the PID adjustment, and the particles in the above chaotic initial population represent all states of the above tracking target;

[0143] Step S203, a first calculation step, using the particle filter algorithm to calculate the importance weights and fitness values ​​of the particles in the chaotic initial population, and using the improved PID search algorithm to calculate the output adjustment value of the PID adjustment;

[0144] Step S204, an updating step, in which, when an adjustment condition is met, the positions of all particles in the initial chaotic population are updated according to the output adjustment value and the zero output condition factor, wherein the adjustment condition is that the zero output condition factor is greater than zero;

[0145] Step S205, a second calculation step, determining whether it is necessary to enter the resampling stage according to the resampling condition, and calculating the state estimation value and the variance estimation value based on the importance weight if it is not necessary to enter the resampling stage, the resampling condition is that the number of valid particles is greater than or equal to the lower limit of the number of valid particles, the resampling stage is a stage for resampling the particles, and the valid particles are particles whose fitness values ​​are greater than the set fitness values;

[0146] Step S206, a tracking step, estimates the target state of the tracking target according to the state estimation value and the variance estimation value to track the tracking target in real time, wherein the target state at least includes the position information and the speed information of the tracking target.

[0147] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0148] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0149] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0150] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0151] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0152] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0153] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0154] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0155] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0156] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:

[0157] 1) The target tracking method based on the improved PID search algorithm and particle filter optimization of the present application, first, a reading step, reading the current video frame and selecting the tracking target from the above current video frame; then, an initialization step, initializing the algorithm parameters of the particle filter algorithm and the improved PID search algorithm, and using the chaotic mapping strategy to initialize the population to generate a chaotic initial population, the above algorithm parameters at least include sampling period, measurement noise variance, process noise, maximum number of iterations and population size, the above improved PID search algorithm is a PID search algorithm improved by adding a zero output condition factor to the output adjustment value of the PID regulation, and the particles in the above chaotic initial population represent all states of the above tracking target; then, a first calculation step, using the above particle filter algorithm to calculate the importance weights and fitness values ​​of the particles in the above chaotic initial population, and at the same time using the above improved PID search algorithm to calculate the output of the PID regulation Adjustment value; then, an updating step, in the case of satisfying the adjustment condition, updating the positions of all particles in the above-mentioned chaotic initial population according to the above-mentioned output adjustment value and the above-mentioned zero output condition factor, the above-mentioned adjustment condition is the condition that the above-mentioned zero output condition factor is greater than zero; then, a second calculation step, judging whether it is necessary to enter the resampling stage according to the resampling condition, when it is not necessary to enter the above-mentioned resampling stage, calculating the state estimation value and the variance estimation value based on the above-mentioned importance weight, the above-mentioned resampling condition is that the number of valid particles is greater than or equal to the lower limit value of the number of valid particles, the above-mentioned resampling stage is the stage of resampling the above-mentioned particles, and the above-mentioned valid particles are particles whose fitness values ​​are greater than the set fitness values; finally, a tracking step, estimating the target state of the above-mentioned tracking target according to the above-mentioned state estimation value and the above-mentioned variance estimation value to track the above-mentioned tracking target in real time, the above-mentioned target state at least includes the position information and speed information of the above-mentioned tracking target. The present invention introduces an improved PID search algorithm, combines the improved PID search algorithm with a particle filter, and adds a zero output condition factor based on the output value of the original PID search algorithm to prevent the algorithm from falling into a local optimum, optimizes and iterates invalid particles, and retains a set of valid particles, thereby achieving the purpose of reducing estimation errors and improving filtering accuracy. The present application solves the problem that the existing heuristic optimization algorithm has a complex structure, many updated parameters, and is prone to falling into a local optimum, resulting in reduced accuracy of target tracking.

[0158] 2) The target tracking device based on the improved PID search algorithm and particle filter optimization of the present application comprises a reading unit, which is used to execute the reading step, read the current video frame and select the tracking target from the above current video frame; an initialization unit, which is used to execute the initialization step, initialize the algorithm parameters of the particle filter algorithm and the improved PID search algorithm, and use the chaotic mapping strategy to initialize the population to generate a chaotic initial population. The above algorithm parameters at least include the sampling period, the measurement noise variance, the process noise, the maximum number of iterations and the population size. The above improved PID search algorithm is a PID search algorithm obtained by adding a zero output condition factor to the output adjustment value of the PID regulation. The particles in the above chaotic initial population represent all states of the above tracking target; a first calculation unit, which is used to execute the first calculation step, use the above particle filter algorithm to calculate the importance weights and fitness values ​​of the particles in the above chaotic initial population, and use the above improved PID search algorithm to calculate the output adjustment value of the PID regulation adjustment value; a first updating unit, used to execute the updating step, when the adjustment condition is met, updating the positions of all particles in the above-mentioned chaotic initial population according to the above-mentioned output adjustment value and the above-mentioned zero output condition factor, the above-mentioned adjustment condition is the condition that the above-mentioned zero output condition factor is greater than zero; a second calculating unit, used to execute the second calculating step, judging whether it is necessary to enter the resampling stage according to the resampling condition, when it is not necessary to enter the above-mentioned resampling stage, calculating the state estimation value and the variance estimation value based on the above-mentioned importance weight, the above-mentioned resampling condition is that the number of valid particles is greater than or equal to the lower limit of the number of valid particles, the above-mentioned resampling stage is the stage of resampling the above-mentioned particles, and the above-mentioned valid particles are particles whose fitness values ​​are greater than the set fitness values; a tracking unit, used to execute the tracking step, estimating the target state of the above-mentioned tracking target according to the above-mentioned state estimation value and the above-mentioned variance estimation value to track the above-mentioned tracking target in real time, the above-mentioned target state at least includes the position information and speed information of the above-mentioned tracking target. The present invention introduces an improved PID search algorithm, combines the improved PID search algorithm with a particle filter, and adds a zero output condition factor based on the output value of the original PID search algorithm to prevent the algorithm from falling into a local optimum, optimizes and iterates invalid particles, and retains a set of valid particles, thereby achieving the purpose of reducing estimation errors and improving filtering accuracy. The present application solves the problem that the existing heuristic optimization algorithm has a complex structure, many updated parameters, and is prone to falling into a local optimum, resulting in reduced accuracy of target tracking.

[0159] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A target tracking method based on an improved PID search algorithm to optimize particle filtering, characterized in that: include: A reading step, reading a current video frame and selecting a tracking target from the current video frame; Initialization step, initializing the algorithm parameters of the particle filter algorithm and the improved PID search algorithm, and using the chaotic mapping strategy to initialize the population to generate a chaotic initial population, the algorithm parameters at least include sampling period, measurement noise variance, process noise, maximum number of iterations and population size, the improved PID search algorithm is a PID search algorithm improved by adding a zero output condition factor to the output adjustment value of the PID adjustment, and the particles in the chaotic initial population represent all states of the tracking target; In the first calculation step, the particle filter algorithm is used to calculate the importance weights and fitness values ​​of the particles in the chaotic initial population, and the improved PID search algorithm is used to calculate the output adjustment value of the PID adjustment; An updating step, in which, when an adjustment condition is met, the positions of all particles in the chaotic initial population are updated according to the output adjustment value and the zero output condition factor, wherein the adjustment condition is that the zero output condition factor is greater than zero; The second calculation step is to determine whether it is necessary to enter the resampling stage according to the resampling condition. If it is not necessary to enter the resampling stage, the state estimation value and the variance estimation value are calculated based on the importance weight. The resampling condition is that the number of valid particles is greater than or equal to the lower limit of the number of valid particles. The resampling stage is a stage for resampling the particles. The valid particles are particles whose fitness values ​​are greater than the set fitness values. A tracking step is to estimate the target state of the tracking target according to the state estimation value and the variance estimation value so as to track the tracking target in real time, wherein the target state at least includes the position information and the speed information of the tracking target.

2. The method according to claim 1, characterized in that The chaotic mapping strategy is used to initialize the population and generate a chaotic initial population, including: Determine the chaotic mapping strategy, where the chaotic mapping strategy is at least one of the following: Logistic chaotic mapping strategy, Circle chaotic mapping strategy, Sing chaotic mapping strategy and Singer chaotic mapping strategy; The population is initialized according to the chaotic mapping strategy to generate the particle positions of the initial chaotic population. The expression of the particle position is x ij =L i (u j -l j )+l j , x ij The current position of particle i in the chaotic initialization population on dimension j, u j is the upper bound of the decision variable in the dimension j, l j is the lower bound of the decision variable in the dimension j, L i is the population after the chaotic mapping strategy mapping, i = 1, 2, ..., n, n represents the total number of particles, j = 1, 2, ..., d, d represents the total number of decision variables, the decision variables are the parameters to be optimized in the particle filter algorithm and the improved PID search algorithm, and the expression of the population is x ij =(u j -l j )·r1+l j , r1 is a random number from 0 to 1; Determine the target state transition model of the tracking target, the expression of the target state transition model is: S xk represents the x-axis position information of the tracking target k at time, S yk represents the information of the tracking target k at the y-axis, represents the x-axis velocity information of the tracking target at time k, represents the velocity information of the tracking target at time k on the y-axis, and T is the sampling period; generating a particle state set of the population according to the state transition model; The particle state set is sampled based on the importance density function to form the chaotic initial population at the initial moment. The importance density function is: z k Represents the measurement values ​​of all the particles at time k.

3. The method according to claim 1, characterized in that The particle filter algorithm is used to calculate the importance weights and fitness values ​​of particles in the chaotic initial population, including: The importance weight of each particle is calculated according to the weight calculation formula, and the weight calculation formula is: represents the importance weight of the i-th particle at time k, represents the importance weight of the i-th particle at time k-1, R k represents the measurement noise variance, z k represents the measurement value of the sampling particle at time k, is the posterior probability density, represents the predicted measurement value; The fitness value of each particle is calculated according to the fitness formula, and the fitness formula is: represents the fitness value of the i-th particle at time k, φ is the adaptive parameter, Represents the predicted position of the valid particle.

4. The method according to claim 1, characterized in that: The improved PID search algorithm is used to calculate the output adjustment value of the PID adjustment, including: The current system deviation is calculated according to the first formula, wherein the first formula is e k (t) = x b (t-1)-x(t-1), e k (t) represents the current system deviation, x b represents the individual with the best historical value in the population, and x represents the position of the individual in the current iteration process; The output adjustment value of the PID adjustment is calculated according to the second formula, where Δu(t)=K p ·r2[e k (t)-e k-1 (t)]+K i ·r3·e k (t)+K d ·r4·[e k (t)-2e k-1 (t)+e k-2 (t)], where r2, r3, and r4 are all random numbers in the matrix rand(n, 1), and K p K is the coefficient of the proportional factor in the PID regulation process. i is the coefficient of the integral factor in the PID regulation process, K d is the coefficient of the differential factor in the PID regulation process, Δu(t) represents the output regulation value when the number of iterations is t, and e k-1 (t) represents the system deviation at time k-1 when the number of iterations is t, and e k-1 (t) = e k (t-1)+x b (t)-x b (t-1), e k-2 (t) represents the system deviation at time k-2 when the number of iterations is t.

5. The method according to claim 1, characterized in that When the adjustment condition is met, the positions of all particles in the chaotic initial population are updated according to the output adjustment value and the zero output condition factor, including: The positions of all particles in the chaotic initial population are updated according to the population individual update formula, and the population individual update formula is x(t+1)=x(t)+η·Δu(t)+(1-η)·o(t), x(t) is the position of the particle at the tth iteration, x(t+1) is the position of the particle at the t+1th iteration, Δu(t) is the output adjustment value, and o(t) is the zero output condition factor, wherein o(t)=(cos(1-t / T max )+λr5·L)·e k (t), r5 is the random number of the matrix rand(n, d), T max is the maximum number of iterations, λ=[ln(T max -t+2) / ln(T max )] 2 , e k (t) is the system deviation, L is the Levy flight function, η = r6cos(t / T max ), r6 is the random number of the matrix rand(0,1).

6. The method according to claim 1, characterized in that When the adjustment condition is met, after updating the positions of all particles in the chaotic initial population according to the output adjustment value, the method further includes: Normalizing the importance weight of each particle to obtain a normalized weight; The importance weight of the particle is updated according to the normalized weight.

7. The method according to claim 1, characterized in that After calculating the state estimate and the variance estimate based on the importance weight, the method further includes: If the number of iterations does not reach the maximum number of iterations, repeatedly executing the first calculation step, the updating step, and the second calculation step at least once in sequence until the number of iterations reaches the maximum number of iterations; When the number of iterations reaches the maximum number of iterations, the next video frame of the current video frame is updated to the current video frame, and the reading step, the initialization step, the first calculation step, the updating step, the second calculation step and the tracking step are repeated in sequence at least once until all the video frames complete the target tracking analysis.

8. A target tracking device based on an improved PID search algorithm to optimize particle filtering, characterized in that: The device comprises: A reading unit, configured to execute a reading step, read a current video frame and select a tracking target from the current video frame; An initialization unit is used to perform an initialization step, initialize the algorithm parameters of the particle filter algorithm and the improved PID search algorithm, and use a chaotic mapping strategy to initialize the population to generate a chaotic initial population, wherein the algorithm parameters at least include a sampling period, a measurement noise variance, a process noise, a maximum number of iterations, and a population size, wherein the improved PID search algorithm is a PID search algorithm obtained by adding a zero output condition factor to an output adjustment value of the PID adjustment, and the particles in the chaotic initial population represent all states of the tracking target; A first calculation unit is used to perform a first calculation step, using the particle filter algorithm to calculate the importance weights and fitness values ​​of particles in the chaotic initial population, and using the improved PID search algorithm to calculate the output adjustment value of PID regulation; A first updating unit is used to execute an updating step, and when an adjustment condition is met, the positions of all particles in the chaotic initial population are updated according to the output adjustment value and the zero output condition factor, wherein the adjustment condition is that the zero output condition factor is greater than zero; a second calculation unit, configured to execute a second calculation step, determine whether it is necessary to enter a resampling phase according to a resampling condition, and calculate a state estimation value and a variance estimation value based on the importance weight when it is not necessary to enter the resampling phase, wherein the resampling condition is that the number of valid particles is greater than or equal to a lower limit of the number of valid particles, the resampling phase is a phase for resampling the particles, and the valid particles are particles whose fitness values ​​are greater than a set fitness value; The tracking unit is used to execute the tracking step, estimate the target state of the tracking target according to the state estimation value and the variance estimation value to track the tracking target in real time, and the target state at least includes the position information and speed information of the tracking target.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.

10. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • CNN-based adaptive particle filter video target tracking method and system

    CN110264501A

  • Target tracking method and system based on improved quantum particle swarm optimization particle filter, and medium

    CN118115537A

  • Air cylinder piston sealing groove intelligent optimization method based on novel improved particle swarm optimization

    CN115268268A

  • Hydraulic mechanical arm high-precision control method and system based on data driving

    CN115741692A

  • Improved particle filter target tracking method based on particle swarm

    CN116227533A