CN-122023455-A - Quick retrieval method for lost zoom lens target of KCF tracker
Abstract
The invention provides a quick recovery method for lost zoom lens targets of a KCF tracker, which has stronger robustness and can quickly and automatically recover the targets after the targets are lost. The method comprises the following steps of tracking object initialization, local tracking and state monitoring, size calculation after target loss and global gridding search recovery, starting a global searching process of the whole image frame once target loss is judged, and step four, similarity matching and recovery judgment based on an original model.
Inventors
- MAO HAIBIN
- WANG SHAOBIN
Assignees
- 杭州晨安科技股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251226
Claims (10)
- 1. A method for quickly finding lost zoom lens target of a KCF tracker is characterized by comprising the following steps: Step one, tracking an object for initialization; step two, local tracking and state monitoring; Step three, size calculation after target loss and global gridding search recovery, once target loss is judged, starting a global searching flow of the whole image frame; and step four, similarity matching and recovery judgment are based on the original model.
- 2. The method for quickly retrieving a lost zoom lens object of a KCF tracker according to claim 1, wherein the first step comprises the steps of: 1) In the first frame image, a user selects a tracking target in a frame mode; 2) The global variable records the position of a tracking target, and coordinates are (L_init, T_init, W_init and H_init) as initial coordinates of the target; 3) Initializing a KCF tracker; 4) Extracting multi-channel features including HOG features and HSV color histogram features in a frame-selected tracking target area; 5) The multi-channel characteristics are input into a KCF filter for training to obtain an initial target model M_target, and the initial target model M_target is further backed up as an original target model M_original.
- 3. The method for quickly finding lost objects of a zoom lens of a KCF tracker according to claim 2, wherein in the step one 4), HOG features and HSV color histogram features are fused in such a way that the HOG features and the HSV color features are spliced at a feature level to form a joint feature.
- 4. The method for quickly finding lost objects in a zoom lens of a KCF tracker according to claim 2, wherein the extraction of HSV color histogram features requires quantization of H and S channels in HSV color space and calculation of histograms, while giving higher weight to pixels in a central region of the object by a spatial weight mask.
- 5. The method for quickly retrieving the lost zoom lens object of the KCF tracker according to claim 2, wherein the second step comprises the steps of: 1) The method comprises the steps of (1) acquiring a current frame target model M_current, calculating the similarity between the current frame target model M_current and an initial target model M_target, and obtaining a maximum matching value F_max; 2) A loss judgment threshold T_lost is set, and whether the maximum matching value F_max obtained in the last step is not smaller than the loss judgment threshold T_lost is judged.
- 6. The method for quickly retrieving a lost zoom lens object of a KCF tracker according to claim 5, wherein in the step two 2): (21) If f_max > =t_lost, indicating that the matching is normal, successfully tracking the target, and performing the next step (22); (22) Updating the current tracking target coordinates (L_current, T_current, W_current, H_current); Meanwhile, resetting a continuous frame number counter value count=0, and calculating the moving speed of the current target center point according to the historical coordinates so as to predict the local position of the next frame of target; (23) Setting a continuous frame number counter, if F_max < T_lost, then the continuous frame number counter value count+1, and judging whether F_max of continuous n frames is lower than T_lost: If not, jumping back to the step (22) to process the next frame; if yes, the system judges that the target is lost, and the step three is entered.
- 7. The method for quickly retrieving a lost zoom lens object of a KCF tracker according to claim 5, wherein the specific calculation in (22) is as follows: fVX t =fVX t-1 *0.75+res.fX t *0.25, fVY t =fVY t-1 *0.75+res.fY t *0.25, cx t+1 =cx t +fVX t , cy t+1 =cy t +fVY t , Wherein (cx t ,cy t ) is the target center point of the t frame, (cx t ,cy t ) is to be used as the input of the next frame t+1, fVX t-1 、fVY t-1 is the speed change information of the previous frame t-1 in the direction X, Y, res.fX t 、res.fY t is the speed change information of the current frame in the direction X, Y compared with the speed change information before detection, fVX t 、fVY t is the speed change information of the current frame t.
- 8. The method for quickly retrieving the lost zoom lens object of the KCF tracker according to claim 5, wherein the third step comprises the following steps: 1) Acquiring a full-image when a target of a current frame is lost and a current Zoom lens multiplying power value Zoom_lost, and calculating the width W_lost and the height H_lost of the target frame when the current frame is lost based on the Zoom_lost and a target initial coordinate; 2) The method comprises the steps of traversing by taking the calculated size of a lost target frame (W_lost and H_lost) as a step length, dividing the whole image frame into a plurality of grids, traversing by taking the size as the step length, and taking a central point (X_center and Y_center) of each grid as the region center of each candidate region.
- 9. The method for quickly finding lost objects in a zoom lens of a KCF tracker according to claim 8, wherein the method for calculating the width w_lost and the height h_lost of the currently lost object frame is as follows: W_lost=W_init*(Zoom_lost/Zoom_inint), H_lost=H_init*(Zoom_lost/Zoom_inint)。
- 10. the method for quickly retrieving the lost zoom lens object of the KCF tracker according to claim 8, wherein the fourth step comprises the steps of: 1) Extracting the multi-channel characteristics of each candidate region generated in the third step, calculating the similarity with the multi-channel characteristics of the region corresponding to the original target model M_original stored in the first step to obtain a matching value C_match of each candidate region, if the C_match of a certain candidate region is larger than the matching values of all other candidate regions, calculating the C_match as a maximum matching value F_match, and when the F_match is larger than a preset retrieval threshold T_found, judging that the candidate region is an optimal screening region, successfully retrieving a target in the optimal screening region, and entering the next step 2; 2) When the target is successfully retrieved in the previous step, updating the model characteristics of the optimal screening area into an initial target model M_target, and simultaneously taking the optimal screening area as a new tracking starting point, and jumping to the second step to continue tracking; 3) When F_match is not greater than a preset recovery threshold T_found, the frame recovery fails, and the step III is skipped to search the next frame or the tracking is declared to fail thoroughly after a certain number of frames.
Description
Quick retrieval method for lost zoom lens target of KCF tracker Technical Field The invention relates to the technical fields of computer vision, image processing and target tracking, in particular to a quick recovery method for lost zoom lens targets of a KCF tracker. Background Target tracking is a core task in computer vision and is widely applied to the fields of video monitoring, man-machine interaction, unmanned driving, augmented reality and the like. KCF (KernelizedCorrelationFilters) tracker is favored because it uses cyclic matrix and kernel techniques to implement high-speed operations in the fourier domain, becoming a model of a related filtering class tracker. However, there are two main limitations with conventional KCF trackers and most variants thereof: 1. The feature expression capability is limited, namely, only HOG features are generally used, the target is not fully characterized, and model drift and even loss are easily caused when the target is deformed, rotated or similar to the background color. 2. The lack of an effective loss recovery mechanism is that once tracking fails due to serious occlusion or rapid movement of the target out of view, the standard KCF tracker cannot recover by itself and can only wait for the target to enter the predicted search area again, which often results in complete failure of tracking in actual use. Some existing improvements attempt to solve the problem of loss by introducing complex re-detection modules, but these modules are often computationally intensive, difficult to meet real-time requirements, or inefficient in retrieving logic and unable to respond quickly when the target reappears. Therefore, there is an urgent need for a novel tracking method that can enhance the feature discrimination capability of KCF while maintaining the high-speed characteristics thereof and integrate a lightweight, fast loss recovery mechanism. Disclosure of Invention The invention aims to overcome the defects of the prior KCF tracker and provide a quick retrieval method for lost targets of a zoom lens of the KCF tracker, which has stronger robustness and can quickly and automatically retrieve the targets after the targets are lost. The invention solves the problems by adopting the technical scheme that the method for quickly finding out the lost zoom lens target of the KCF tracker is characterized by comprising the following steps: Step one, tracking an object for initialization; step two, local tracking and state monitoring; Step three, size calculation after target loss and global gridding search recovery, once target loss is judged, starting a global searching flow of the whole image frame; and step four, similarity matching and recovery judgment are based on the original model. The first step of the invention comprises the following steps: 1) In the first frame image, a user selects a tracking target in a frame mode; 2) The global variable records the position of a tracking target, and coordinates are (L_init, T_init, W_init and H_init) as initial coordinates of the target; 3) Initializing a KCF tracker; 4) Extracting multi-channel features including HOG features and HSV color histogram features in a frame-selected tracking target area; 5) The multi-channel characteristics are input into a KCF filter for training to obtain an initial target model M_target, and the initial target model M_target is further backed up as an original target model M_original. In the step one 4), the HOG features and the HSV color histogram features are fused in a way that the HOG features and the HSV color features are spliced at a feature level to form a combined feature. The invention extracts HSV color histogram features, quantizes H and S channels in HSV color space and calculates histogram, and gives higher weight to the pixels in the central region of the target through a space weight mask. The second step of the invention comprises the following steps: 1) The method comprises the steps of (1) acquiring a current frame target model M_current, calculating the similarity between the current frame target model M_current and an initial target model M_target, and obtaining a maximum matching value F_max; 2) A loss judgment threshold T_lost is set, and whether the maximum matching value F_max obtained in the last step is not smaller than the loss judgment threshold T_lost is judged. In the step two 2) of the invention: (21) If f_max > =t_lost, indicating that the matching is normal, successfully tracking the target, and performing the next step (22); (22) Updating the current tracking target coordinates (L_current, T_current, W_current, H_current); Meanwhile, resetting a continuous frame number counter value count=0, and calculating the moving speed of the current target center point according to the historical coordinates so as to predict the local position of the next frame of target; (23) Setting a continuous frame number counter, if F_max < T_lost, then the continuous frame number c