An online target matching tracking method based on local cropping
By predicting the target location using Kalman filtering and combining it with local cropping techniques, the problems of wasted computational resources and target occlusion loss in large-format, high-resolution images are solved, achieving efficient and accurate target tracking.
Patent Information
- Application Number
- CN202410142063.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-01
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2044-02-01
AI Technical Summary
Existing technologies waste computational resources when processing large-format, high-resolution images, and are prone to losing tracking when the target is occluded.
By combining Kalman filtering for local cropping, the search range is narrowed by predicting the target location, and by combining feature matching algorithms, tracking efficiency is improved and interference from irrelevant information is reduced.
It achieves real-time and efficient target tracking, reduces computational resource consumption, improves tracking accuracy and stability, and avoids interference from non-target feature points.
Smart Images

Figure CN118071793B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to computer vision target tracking technology, in particular, disclose a kind of online target matching tracking method based on local clipping, belong to the technical field of calculation, estimation or counting. BACKGROUND
[0002] Target tracking is an important part of computer vision image processing field, its main goal is to automatically detect and track the position and movement of objects in video or image sequence. Target tracking is widely used in video surveillance, autonomous driving, robot navigation and virtual reality fields.
[0003] Feature-based image matching algorithm is one of important computer vision tracking technologies, and SIFT feature, i.e. scale invariant feature, is widely used in image feature extraction and matching due to its good geometric invariance and photometric invariance. At present, the research focus in the field of target tracking mainly concentrates on improving the accuracy, robustness and real-time performance of tracking, and with the continuous progress of modern sensor technology, the quality of visual imaging has been significantly improved, mainly manifested as the generation of high-resolution images. However, the global matching method for processing large-format, high-resolution images usually needs to traverse the full image, which will cause waste of computing resources and time redundancy for small proportion of medium and long distance targets. In this context, it is necessary to improve the traditional feature matching method by combining local clipping technology.
[0004] Kalman filter can utilize the context observation information of video or image sequence to model the appearance and motion information of the target, so as to predict the motion state of the target and calibrate the next frame position of the target, but when the moving target is occluded for a long time, the tracking target will be lost.
[0005] In summary, the present application aims to combine Kalman filter for local clipping target positioning, and cooperate with feature matching tracking algorithm, so as to effectively improve the tracking effect and save computing resources. SUMMARY
[0006] The present application aims to solve the technical problems of low matching efficiency in large-format high-resolution images, improve the tracking efficiency, reduce the interference of irrelevant information, and realize the purpose of real-time sensing tracking of visual targets.
[0007] The present application adopts the following technical solutions to achieve the above purposes:
[0008] An online target matching tracking method based on local clipping, comprising the following steps:
[0009] Step 1, pre-processing the input current frame image to obtain a template;
[0010] Step 2, estimating the candidate position of the tracking target in the current frame image by Kalman filtering, determining the matching area of the tracking target in the current frame image according to the motion information of the tracking target in the video, and performing local clipping on the current frame image according to the matching area of the current frame image;
[0011] Step 3, performing feature extraction and matching tracking processing on the template and the matching area of the current frame image to obtain the position coordinates of the tracking target in the matching area of the current frame image;
[0012] Step 4, converting the position coordinates of the tracking target in the matching area of the current frame image into global coordinates to obtain the position information of the tracking target in the current frame image;
[0013] Step 5, repeating steps 1 to 4 to process the next frame image to obtain the position information of the tracking target in each frame image.
[0014] As a further optimization scheme of the online target matching tracking method based on local clipping, step 1 performs pre-processing on the input current frame image, including but not limited to linear transformation, stretching gray level, and improving contrast.
[0015] As a further optimization scheme of the online target matching tracking method based on local clipping, the specific method for obtaining the template in step 1 is: for the first frame image after pre-processing, the tracking target is framed by a rectangular window and the rectangular window coordinate position is obtained.
[0016] As a further optimization scheme of the online target matching tracking method based on local clipping, the specific method for determining the matching area of the tracking target in the current frame image according to the motion information of the tracking target in the video in step 2 is: determining the search area center according to the prior estimate value of the state vector at k time, taking the sum of the radius of the tracking target and the predicted motion distance of the tracking target within the sampling time period as the search radius, searching for the tracking target within the search range covered by the current search radius, when the tracking target is searched, taking the search range covered by the current search radius as the matching area of the current frame image, when the tracking target is not searched, expanding the search radius to continue searching until the candidate position of the tracking target in the current frame image is obtained.
[0017] As a further optimization scheme of the online target matching tracking method based on local clipping, the search area center is represented as The search radius is represented as R is the search radius, r is the radius of the tracking target, and T is the sampling time period. the first component, the second component, the third component, the fourth component of the priori estimation value of the state vector at the k moment, x k , y k the estimation value of the x-axis, y-axis component of the tracking target position information at the k moment, v xk , v yk the estimation value of the x-axis, y-axis component of the tracking target speed information at the k moment.
[0018] As a further optimization scheme of the online target matching tracking method based on local clipping, step 3 specifically comprises the following steps:
[0019] Step 3-1, detecting key feature points of the matching region of the template and the current frame image;
[0020] Step 3-2, describing the key feature points of the matching region of the template and the current frame image, and obtaining the feature descriptor vector of the key feature points of the matching region of the template and the current frame image;
[0021] Step 3-3, matching the key feature points according to the feature descriptor vector of the key feature points of the matching region of the template and the current frame image, and obtaining the matching feature point pair;
[0022] Step 3-4, correcting the matching feature point pair;
[0023] Step 3-5, performing affine transformation on the corrected matching feature point pair, and obtaining the position coordinates of the tracking target in the matching region of the current frame image.
[0024] As a further optimization scheme of the online target matching tracking method based on local clipping, the specific method of step 3-1 for detecting key feature points of the matching region of the template and the current frame image is as follows:
[0025] Step A, traversing all pixel points in each layer size space as intermediate detection points in the Gaussian difference scale space, when the intermediate detection points in the current layer size space obtain the maximum value or the minimum value in the neighborhood of the current layer size space and the adjacent two layer size spaces, the intermediate detection points in the current layer size space are the extreme points of the scale space;
[0026] Step B, Taylor expanding the Gaussian difference scale function of the extreme point obtained in step A in the Gaussian difference scale space, and calculating the offset of the spatial position of the extreme point in the scale space according to the expression of Taylor expansion When If any one dimension is greater than 0.5, the spatial position of the extreme value point is repositioned, the spatial position offset after repositioning is judged, and the extreme value point with the convergent spatial position offset within the set iteration number is selected as the key feature point.
[0027] As a further optimization scheme of the online target matching tracking method based on local clipping, the specific method of step 3-2 is: calculating gradient vectors in 8 directions in a 4x4 neighborhood window in the scale space to which the key feature point belongs, and each gradient vector constitutes a feature descriptor vector, wherein,
[0028] The method for calculating the amplitude of the gradient vector in the 4x4 neighborhood window in the scale space to which the key feature point belongs is: calculating the gradient amplitude m(x, y) in the 3σ neighborhood window of the key feature point (x, y) adjacent to the Gaussian pyramid image, weighting m(x, y) according to the Gaussian distribution of σ=1.5σ oct , the neighborhood window is 3σ=3x1.5σ oct , L(x+1, y) is the gray value of the neighborhood pixel (x+1, y) of the key feature point (x, y), L(x-1, y) is the gray value of the neighborhood pixel (x-1, y) of the key feature point (x, y), L(x, y+1) is the gray value of the neighborhood pixel (x, y+1) of the key feature point (x, y), L(x, y-1) is the gray value of the neighborhood pixel (x, y-1) of the key feature point (x, y), σ is the scale coordinate, and σ oct is the scale parameter of the key feature point in the scale space of the layer to which it belongs;
[0029] The method for calculating the direction of the gradient vector in the 4x4 neighborhood window in the scale space to which the key feature point belongs is: calculating the gradient direction θ(x, y) of the key feature point (x, y) in the layer size space, θ(x, y)=tan -1 [L(x, y+1)-L(x, y-1)] / [L(x+1, y)-L(x-1, y)].
[0030] An electronic device includes a memory and a processor, the memory has a computer program stored thereon and running on the processor, and the processor executes the steps of the online target matching tracking method when running the computer program.
[0031] A computer readable storage medium has a computer program stored thereon, and the computer program executes the steps of the online target matching tracking method when running.
[0032] The present invention adopts the above-mentioned technical solution and has the following beneficial effects: compared with the existing template matching tracking method, the present invention uses Kalman filtering prediction update to optimally estimate the system state based on the observation data of the system historical frames and the current frame input and output, thereby automatically adjusting the target search range to achieve the technical effect of improving the real-time and accuracy of tracking; accurately control the search range of the target tracking process, avoid interference from non-target feature points in the matching image, improve the efficiency of target tracking, and ensure the accuracy and stability of the tracking process; reduce the search area, improve the search efficiency, and effectively save the time and computing resources of the matching process. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 This is a flowchart of the online target matching and tracking method based on local clipping proposed in the present invention.
[0034] Figure 2 This is a flowchart of the local feature matching and tracking step in the target matching and tracking method proposed in the present invention.
[0035] Figure 3 This is a schematic diagram of detecting extreme points in a multi-scale space in the target matching and tracking method proposed in the present invention.
[0036] Figure 4 This is a flow chart of the Kalman filter prediction process in the target matching tracking method proposed in the present invention. DETAILED DESCRIPTION
[0037] The technical solution of the invention is described in detail below with reference to the accompanying drawings.
[0038] like Figure 1 As shown, this embodiment provides a Kalman filter combined with template matching method for online target tracking. The overall process of the method specifically includes steps 1 to 5.
[0039] Step 1: Input the nth frame image and perform preprocessing: First, perform linear transformation preprocessing on the nth frame image obtained from the input video to stretch the grayscale and increase the contrast to obtain a template, where n ≥ 1. In this embodiment, after preprocessing the first frame image, a frame is selected to select the tracking target and the coordinate position of the selection frame is obtained for initializing the Kalman filter. Since the target image used for feature matching is typically small, this selected tracking target image is called a template and is denoted by T.
[0040] Step 2: Kalman filter to determine the candidate area and locally crop it: The candidate position of the tracking target in the n-th frame image is estimated and predicted by Kalman filter. The effective motion information in the video or image sequence is used to narrow the matching range to the area around the candidate position of the tracking target, and the n-th frame image is locally cropped to obtain the matching area of the n-th frame image.
[0041] Step 3, local feature matching tracking: the matching region of the n-th frame image and the template are subjected to feature extraction and matching tracking processing, and the specific implementation steps include: detecting potential scale and rotation invariant key feature points by using a Gaussian differential function, calculating the key feature points of the matching region of the template and the n-th frame image; obtaining the feature descriptor vectors of the key feature points of the matching region of the template and the n-th frame image respectively; screening the two-dimensional key feature points of the matching region of the n-th frame image and the template by using the descriptor to obtain matching key feature points; correcting the matching key feature points; projecting the template to the matching region of the n-th frame image by using affine projection to obtain the position coordinates of the tracking target in the matching region of the n-th frame image.
[0042] Step 4, local conversion to global coordinates to obtain tracking results: converting the coordinate points crop_x and crop_y of the target in the matching region of the n-th frame image into the coordinate points original_x, original_y in the n-th frame image to obtain the position information of the tracking target in the n-th frame image.
[0043] Step 5, searching and matching in the n-th frame image, repeating steps 1 to 4, outputting the position information of the tracking target in each frame image, and repeatedly repeating the above tracking cycle to realize target tracking in the entire video sequence.
[0044] The initial tracking target, i.e., the template image T, is a rectangular region, and the obtaining method can be described as follows: without any prior knowledge, a certain object is selected as a matching template in the first frame image through a rectangular window; searching and matching in the n-th frame full image by setting a threshold to realize continuous tracking of the object in the subsequent video sequence.
[0045] The specific process of step 3, local feature matching tracking, is shown in Figure 2 The specific process of step 3, local feature matching tracking, is shown in
[0046] (1) Key feature point detection
[0047] The detection of the feature points first needs to construct a multi-scale space to detect space extreme points. The scale space L(x, y, sigma) of the image can be defined as the convolution of the input image I(x, y) and the variable scale Gaussian function G(x, y, sigma):
[0048] L(x, y, sigma) = G(x, y, sigma) * I(x, y)
[0049]
[0050] Where (x, y) is the spatial coordinate of the image, and σ in the Gaussian function G(x, y, σ) is the scale coordinate, or scale variation factor. The magnitude of σ determines the smoothness of the image; larger σ values result in more severe image blur. Large scales correspond to the image's general features, while small scales correspond to its detailed features. The size of the Gaussian kernel matrix is set to (6σ + 1) × (6σ + 1).
[0051] In order to detect stable key points in the scale space more efficiently, the Gaussian difference operator is used to construct the Gaussian difference scale space D(x, y, σ). D(x, y, σ) can be generated by convolving the Gaussian difference kernels of adjacent different scales separated by the varying scale factor k with the image:
[0052] D(x,y,σ)=(G(x,y,kσ)-G(x,y,σ))*I(x,y)
[0053] =L(x,y,kσ)-L(x,y,σ)
[0054] After constructing the Difference-of-Gaussian Scale-Space, we obtain a spatial representation sequence at multiple scales and search for extreme points in the Difference-of-Gaussian Scale-Space (DoG). Figure 3 As shown, the middle detection point in each scale space layer is compared with its eight neighboring pixels in the same scale space layer, the middle detection points in the two adjacent scale spaces, and the eight neighborhood pixels. That is, all pixels in each scale space layer are traversed in the DoG scale space as middle detection points. The middle detection point in the current scale space layer is then determined to see whether it reaches the maximum or minimum value within the local scale space layer and the neighborhood of the two adjacent scale spaces. This ensures that extreme points can be detected in both image space and scale space. When the middle detection point in the current scale space layer reaches the maximum or minimum value, it can be considered an extreme point in the image at that scale.
[0055] Since the extreme points detected in the DoG scale space are discrete and not necessarily true extreme points, the Taylor expansion of the DoG function D(X)=D(x,y,σ) of the local extreme points in the Gaussian difference scale space is:
[0056]
[0057] Let the derivative of D(X) be 0 to get the offset of the extreme point:
[0058]
[0059] X represents the spatial position of the extreme point in the scale space, denotes the offset of the spatial position of the extreme point in the scale space, if If any one dimension is greater than 0.5, it means that the exact position of the extreme point is closer to another point, and the position of the current detected local extreme point should be changed. After positioning to the new point, the operation of extreme point exact position detection is performed. If it does not converge after 5 iterations, it is considered that the extreme point is not a key feature point. If it converges within 5 iterations, it is considered that the extreme point is a key feature point. The DoG function value at the key feature point is:
[0060]
[0061] (2) Key feature point description
[0062] In order to make the feature descriptor vector have rotation invariance, the gradient direction distribution characteristics of the key feature point neighborhood pixels are used to specify the direction parameter for each key point. For the key feature points detected in the DoG pyramid, the gradient amplitude in the 3σ neighborhood window of the adjacent Gaussian pyramid image is calculated, and the direction in the DoG pyramid is calculated. The formula is as follows:
[0063]
[0064] θ(x,y)=tan -1 [L(x,y+1)-L(x,y-1)] / [L(x+1,y)-L(x-1,y)]
[0065] In the formula, m(x,y) is the gradient amplitude calculated in the 3σ neighborhood window of the adjacent Gaussian pyramid image of the key feature point (x,y), θ(x,y) is the gradient direction calculated in the 3σ neighborhood window of the adjacent Gaussian pyramid image of the key feature point (x,y), L(x+1,y) is the gray value of the neighborhood pixel (x+1,y) of the key feature point (x,y), L(x-1,y) is the gray value of the neighborhood pixel (x-1,y) of the key feature point (x,y), L(x,y+1) is the gray value of the neighborhood pixel (x,y+1) of the key feature point (x,y), and L(x,y-1) is the gray value of the neighborhood pixel (x,y-1) of the key feature point (x,y).
[0066] The modulus m(x,y) is weighted according to the Gaussian distribution σ=1.5σ oct , and the neighborhood window is 3σ=3×1.5σ oct , wherein σ oct is the scale parameter of the key feature point in the scale space of its belonging layer. The modulus weighted by the Gaussian distribution and the direction calculated by the above formula describe the gradient vector in the neighborhood window in the scale space of the key feature point.
[0067] By the above steps, each key feature point is assigned with position, scale and orientation information. In order to make the feature descriptor vector of the key feature point invariant under different light, the feature descriptor vector of the key feature point is normalized to a 128-dimensional unit vector. In the 4x4 neighborhood window in the scale space to which the key feature point belongs, 8 direction gradient vectors are calculated, the amplitude and direction of each dimension of the gradient vector are calculated according to the above method, and finally a 4x4x8=128-dimensional vector is obtained.
[0068] (3) Key feature point matching
[0069] By comparing the feature descriptor vector of the template with the feature descriptor vector of the key feature point in the matching area of the nth frame image based on the FLANN-based matcher, the matching of the key feature point of the template with the key feature point in the matching area of the nth frame image is realized, and a matching key feature point pair is obtained. Flann represents a fast library of approximate nearest neighbors, which is used to select the best algorithm and the best parameters according to the data set using approximate kd-tree and random kd-tree, and these data structures are used to organize data so that the nearest neighbors can be searched faster compared with other traditional methods.
[0070] (4) Rectification of matching key feature point pair
[0071] The rectification of the matching feature point pair is completed by feature screening, and the robust algorithm based on RANSAC is realized: in order to increase the reliability, the matching key feature point pair with the nearest distance and the second nearest distance greater than 0.8 is removed, and the false pairing caused by the background is eliminated.
[0072] (5) Affine transformation
[0073] The best affine transformation parameters between the matching area of the nth frame image and the template are obtained by using the least square method to obtain the position of the tracking target in the matching area of the nth frame image, establish the affine transformation relationship, and finally obtain the position and size of the tracking target in the frame image, complete a tracking cycle. The simulation transformation parameters are used to compare the rectified key feature points, and the parameters are adjusted until the key feature points are correctly affine and no error occurs.
[0074] As shown in Figure 4 , the step of estimating the candidate position of the tracking target in the nth frame image by Kalman filtering in step 2 is:
[0075] (1) Obtain the state information of the tracking target according to the input template and perform Kalman filtering initialization;
[0076] (2) Using Kalman filter to predict the candidate position of the target in the nth frame of image: using maximum IOU to find the observation value, taking the maximum IOU box as the observation value to make prior estimation, calculating state estimation covariance matrix P and Kalman gain K to make posterior estimation, and updating state estimation covariance matrix P.
[0077] Let the model of a random linear discrete system be:
[0078] x k+1 =A k x k +B k u k +ξ k
[0079] z k =H k x k +η k
[0080] wherein: x k represents a linear state space including position and velocity, i.e. A k , B k , H k represent state transition matrix, control input matrix, and observation model matrix respectively. Among them, take u k represents control model, z k represents observation, ξ k and η k represent system and observation noise, which are assumed to be zero-mean Gaussian white noise sequences, then the Kalman filter of the system can be expressed as:
[0081]
[0082]
[0083]
[0084]
[0085]
[0086] P k,k =(I-K k H k )P k,k-1
[0087] wherein: is the minimum variance estimation of state vector x k at time k; e k is estimation error; Kk denotes the Kalman gain; R k denotes the observation noise covariance matrix; P k,k is the estimation error covariance matrix of x k ; Q k-1 is the covariance of the system process at k-1. Given the initial value and P 0,0 , the state estimation vector at k can be recursively calculated according to the measurement z k at k.
[0088] The target search range determination method is as follows: taking the estimated value of the state vector at k as the center of a circle, taking the sum of the radius of the tracked target and the predicted motion distance of the tracked target in the sampling time period as the radius of the circle, and determining the center of the search area of the tracked target in the nth image as The search radius is:
[0089]
[0090] wherein, is the priori estimation value of the state vector at k, i.e., the candidate position of the tracked target in the nth image, i.e., x k and y k are the estimated values of the x-axis and y-axis components of the position information of the tracked target at k, and v xk and v yk are the estimated values of the x-axis and y-axis components of the velocity information of the tracked target at k.
[0091] When the tracked target is found in the search range covered by the search radius, the position of the tracked target is returned, the search range covered by the search radius is taken as the matching area of the nth image, and the Kalman filter is corrected; if the tracked target is not found in the search range covered by the search radius, the search radius is expanded, and the search is continued in the surrounding area until the tracking candidate position is acquired and the filter is updated.
[0092] In an embodiment of the present application, an electronic device is also provided, which comprises a memory and a processor, and the memory stores a computer program running on the processor. When the processor runs the computer program, the steps of the online target matching tracking method described above are executed.
[0093] In an embodiment of the present application, a computer readable storage medium is also provided, which stores a computer program. When the computer program runs, the steps of the online target matching tracking method described above are executed.
[0094] The above specific embodiments and examples are specific supports for the technical idea of the present application, and cannot limit the protection scope of the present application. Any equivalent changes or equivalent modifications made according to the technical idea of the present application and based on the technical solutions of the present application still belong to the protection scope of the technical solutions of the present application.
Claims
1. A local cropping based online target matching tracking method, characterized in that, The method comprises the following steps: Step 1, pre-processing the input current frame image to obtain a template; Step 2, estimating the candidate position of the tracking target in the current frame image by Kalman filtering, determining the matching area of the tracking target in the current frame image according to the motion information of the tracking target in the video, performing local clipping on the current frame image according to the matching area of the current frame image, and the specific method for determining the matching area of the tracking target in the current frame image according to the motion information of the tracking target in the video is: determining the search area center according to the prior estimation value of the state vector at k moment, taking the sum of the radius of the tracking target and the predicted motion distance of the tracking target in the sampling time period as the search radius, searching for the tracking target in the current search radius covering the search range, taking the search range covered by the current search radius as the matching area of the current frame image when the tracking target is searched, and expanding the search radius to continue searching when the tracking target is not searched, until the candidate position of the tracking target in the current frame image is obtained, and the search area center is represented as The search radius is represented as R is the search radius, r is the radius of the tracking target, and T is the sampling time period, are the first component, the second component, the third component, and the fourth component of the prior estimation value of the state vector at k moment, x k , y k are the estimation values of the x-axis and y-axis components of the position information of the tracking target at k moment, v xk , v yk are the estimation values of the x-axis and y-axis components of the speed information of the tracking target at k moment. Step 3, performing feature extraction and matching tracking processing on the template and the matching region of the current frame image to obtain the position coordinates of the tracking target in the matching region of the current frame image; Step 4, converting the position coordinates of the tracking target in the matching region of the current frame image into global coordinates to obtain the position information of the tracking target in the current frame image; Step 5, repeating steps 1 to 4 to process the next frame image to obtain the position information of the tracking target in each frame image.
2. The online object matching and tracking method based on local cropping according to claim 1, wherein, The step 1 pre-processes the input current frame image, including but not limited to linear transformation, stretching gray level, and improving contrast.
3. The online object matching and tracking method based on local cropping according to claim 1, wherein, The specific method of the step 1 for obtaining the template is: for the first frame image after pre-processing, the tracking target is framed by a rectangular window and the rectangular window coordinate position is obtained.
4. The online object matching and tracking method based on local cropping according to claim 1, wherein, The step 3 specifically comprises the following steps: Step 3-1, detecting key feature points of the template and the matching region of the current frame image; Step 3-2, describing the key feature points of the template and the matching region of the current frame image to obtain the feature descriptor vector of the key feature points of the template and the matching region of the current frame image; Step 3-3, matching the key feature points according to the feature descriptor vector of the key feature points of the template and the matching region of the current frame image to obtain a matching feature point pair; Step 3-4, correcting the matching feature point pair; Step 3-5, performing affine transformation on the corrected matching feature point pair to obtain the position coordinates of the tracking target in the matching region of the current frame image.
5. The online object matching and tracking method based on local cropping according to claim 4, wherein, The specific method of the step 3-1 for detecting key feature points of the template and the matching region of the current frame image is: Step A, traversing all pixel points in each layer size space as intermediate detection points in the Gaussian difference scale space, when the intermediate detection points in the layer scale space obtain the maximum value or the minimum value in the neighborhood of the layer scale space and the adjacent two layer scale spaces, the intermediate detection points in the layer scale space are extreme points of the scale space; Step B, Taylor expansion of the Gaussian difference scale function of the extreme point obtained in step A in the Gaussian difference scale space, and calculating the spatial position offset of the extreme point in the scale space according to the expression of Taylor expansion When When any one dimension is greater than 0.5, judging the spatial position offset of the repositioned extreme point, and selecting the extreme point with the convergent spatial position offset within the set iteration number as the key feature point.
6. The online object matching and tracking method based on local cropping according to claim 5, wherein, The specific method of the step 3-2 is: calculating gradient vectors in 8 directions in a 4x4 neighborhood window in the scale space to which the key feature points belong, and each gradient vector constitutes a feature descriptor vector, wherein, The method for calculating the amplitude of the gradient vector in the 4x4 neighborhood window in the scale space to which the key feature point belongs is as follows: the gradient amplitude m(x, y) is calculated in the 3σ neighborhood window of the key feature point (x, y) adjacent to the Gaussian pyramid image, The m(x, y) is weighted according to the Gaussian distribution of σ = 1.5σ oct , the neighborhood window is 3σ = 3x1.5σ oct , L(x+1, y) is the gray value of the neighborhood pixel (x+1, y) of the key feature point (x, y), L(x-1, y) is the gray value of the neighborhood pixel (x-1, y) of the key feature point (x, y), L(x, y+1) is the gray value of the neighborhood pixel (x, y+1) of the key feature point (x, y), L(x, y-1) is the gray value of the neighborhood pixel (x, y-1) of the key feature point (x, y), σ is the scale coordinate, and σ oct is the scale parameter of the key feature point in the scale space of the layer to which it belongs. The method for calculating the direction of the gradient vector in the 4x4 neighborhood window in the scale space to which the key feature point belongs is as follows: calculating the gradient direction θ(x, y) of the key feature point (x, y) in the scale space, θ(x, y) = tan -1 [L(x, y+1)-L(x, y-1)] / [L(x+1, y)-L(x-1, y)].
7. An electronic device comprising a memory and a processor, the memory storing a computer program running on the processor, and the processor executing the steps of the online target matching tracking method of claim 1 when running the computer program.
8. A computer readable storage medium storing a computer program, the computer program executing the steps of the online target matching tracking method of claim 1 when running.
Citation Information
Patent Citations
Fast target tracking method with improved SIFT algorithm
CN104036524A
A target scale adaptive tracking method based on OpenCV
CN109949340A