A method for eliminating false moving targets based on multi-target tracking

By employing a multi-target tracking method, this approach utilizes a Kalman filter and the Intersection over Union (IOU) ratio for target matching and tracking. Combined with differential calculation and noise processing, it addresses the issue of false targets caused by illumination variations and strong image edges, thereby improving the accuracy of moving target detection.

CN117132626BActive Publication Date: 2026-01-06UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311089509.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-28
Publication Date
2026-01-06
Estimated Expiration
2043-08-28

AI Technical Summary

Technical Problem

Existing moving target detection methods are prone to generating false targets under changes in lighting and strong image edges, leading to inaccurate detection.

Method used

A false moving target elimination method based on multi-target tracking is adopted. Target matching and tracking are performed by Kalman filter and intersection-to-union ratio (IOU). False targets are eliminated by combining differential calculation and noise processing.

Benefits of technology

It effectively eliminates false targets caused by changes in lighting and strong edges at fixed positions, thus improving the accuracy of moving target detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117132626B_ABST
    Figure CN117132626B_ABST
Patent Text Reader

Abstract

A false moving target elimination method based on multi-target tracking, comprising the following steps: step S1. selecting a frame as an initial frame from a video stream, selecting a subsequent frame of the initial frame as a reference frame, and obtaining an initial target by using a difference calculation method on the subsequent frame and the initial frame; step S2. initializing a Kalman filter matrix for the initial target; step S3. matching the detection result of a subsequent frame of the video stream with the initial target; step S4. classifying and processing each target of the current frame, and updating the target; and step S5. eliminating false targets according to target coordinate deviation. The application can effectively eliminate false moving targets by using a multi-target tracking correlation algorithm to continuously track the detected suspected moving targets, and using the characteristics that false moving target detection is unstable and the position of a false target does not move.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of software and relates to image recognition technology, specifically to a method for eliminating false moving targets based on multi-target tracking. Background Technology

[0002] Moving target detection is a branch of image processing that uses image processing methods to divide the content of a sequence of images or videos into two parts: background and foreground. The background refers to the static or slightly changing parts of the image, where the relative positions of objects are fixed. The foreground refers to the parts that have significant relative displacement with respect to the background. Moving target detection methods segment and extract moving targets as the foreground from the image.

[0003] In the security field, with the advancement of smart city construction and the reduction in hardware costs such as image detectors and image processing chips, a large number of cameras are being installed in more and more public places. These are typically monitored manually, which presents problems such as staff fatigue and the inability of humans to effectively monitor multiple areas simultaneously. In the fields of intelligent robots and autonomous driving, machines need to be able to acquire the position of moving targets and perform appropriate avoidance maneuvers. Image-based moving target detection methods are widely used in these areas.

[0004] Common moving target detection methods include inter-frame differencing, background subtraction, and optical flow. Inter-frame differencing performs a difference operation on two or three consecutive frames of images, subtracting pixels from each other and determining the absolute value of the grayscale difference. When the absolute value exceeds a certain threshold, the target is identified as a moving object. Background subtraction subtracts each current frame from a pre-stored or real-time acquired background image, calculating the region that deviates from the background by a certain threshold as the moving region. Typical background modeling methods include Gaussian mixture models (Gaussian mixture models) and the VIBE algorithm. The Gaussian mixture model describes the distribution of pixel values ​​in the background image; during target detection, it determines whether the current pixel value conforms to this distribution. If it does, it is considered a foreground point; otherwise, it is considered a background point. Simultaneously, the background image parameters are adaptively updated based on newly acquired images. The VIBE algorithm uses neighboring pixels to create a background model and detects the foreground by comparing the background model with the current input pixel value. Optical flow infers the speed and direction of object movement by detecting changes in the intensity of image pixels over time. However, these moving target detection algorithms are affected by changes in lighting and strong image edges, resulting in a large number of false targets in the detection output, causing moving target detection to fail. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method for eliminating false moving targets based on multi-target tracking, so as to solve the problem of inaccurate moving target detection.

[0006] This invention discloses a method for eliminating false moving targets based on multi-target tracking, comprising the following steps:

[0007] Step S1. Select a frame from the video stream as the initial frame, select a subsequent frame of the initial frame as the reference frame, and use the difference calculation method between the subsequent frame and the initial frame to obtain the initial target;

[0008] For the initial target, define a consecutive loss count value and set the initial value to zero;

[0009] Step S2. Initialize the Kalman filter matrix for the initial target; specifically:

[0010] Step S2.1: Define initial target information;

[0011] For each initial target obtained in step S1, an initial target vector is defined as a seven-dimensional vector. The state of the target is described, where u and v are the x and y coordinates of the geometric center of the detected target on the image, respectively, s is the area of ​​the initial target, and r is the aspect ratio of the initial target. The horizontal axis represents velocity. The vertical axis represents velocity. The area velocity refers to the rate of change between adjacent frames;

[0012] Step S2.2: Define a 7th-order square matrix F as the state transformation model matrix;

[0013]

[0014] Define the observation function H as a 4x7 matrix:

[0015]

[0016] Step S2.3: Initialize the measurement noise matrix R, covariance matrix P, and process noise matrix Q;

[0017] R is a 4th-order square matrix, and P and Q are 7th-order square matrices; where the measurement noise matrix R, the covariance matrix P, and the process noise matrix Q are square matrices with non-zero elements only on the diagonal.

[0018] In this step, the measurement noise matrix R, covariance matrix P, process noise matrix Q, observation function H, and state transformation model matrix F constitute the initialized Kalman filter.

[0019] Step S3: For subsequent frames after the reference frame of the video stream, use the differential calculation method described in step S1 to detect moving targets as potential moving targets, and match them with potential moving targets in the previous frame; specifically:

[0020] Step S3.1: Calculate the estimated target information value predicted in the current frame. With Estimated Covariance Among them, the target information estimate The vector is of the same form as the initial target vector X.

[0021] in:

[0022] Target information estimate in frame K

[0023] The estimated covariance of the Kth frame

[0024] --Formula Group 1

[0025] The subscript K indicates the frame number;

[0026] For the first frame, i.e., when K=1, the estimated value of the target information. Let X be the initial target vector obtained in step S1. The estimated covariance of the first frame is the covariance matrix P;

[0027] Step S3.2: Detect potential moving targets in the current frame using the differential calculation method described in step S1;

[0028] Estimate of target information Calculate the intersection-union ratio (IOU) between each pair of potential moving targets and their target information.

[0029] Step S3.3: Use the Intersection over Union (IOU) as weight to perform sequence matching on the detected targets, set the IOU threshold, and mark potential moving targets with an IOU less than the IOU threshold as failed matches;

[0030] After matching, there are three types of matching results:

[0031] The current frame has detected and successfully matched a potential moving target.

[0032] The current frame detected a potential moving target but did not match.

[0033] Potential moving targets that existed in the previous frame but did not match successfully in the current frame;

[0034] Step S4: Classify and process each target in the current frame to obtain the potential moving targets output in the current frame, specifically:

[0035] Step S4.1: For potential moving targets detected and successfully matched in the current frame, the consecutive loss count value of the target is set to 0, and its Kalman filter gain parameter K is updated. k Correcting the estimated value And posterior estimate of covariance P k The updated formula is as follows:

[0036]

[0037]

[0038]

[0039] ---Formula Group 2

[0040] The superscript T denotes the transpose of the matrix, the subscript K denotes the frame number, H is the observation function, I is the identity matrix, and Z... K Z represents the target result output by the differential detection in the current frame. K =[u K ,v K ,s K ,r K ], k is the number of the current frame image, u is the horizontal coordinate of the center of the detected target in the current frame in the image, v is the vertical coordinate of the center of the detected target in the current frame in the image, s is the pixel area of ​​the detected target in the current frame, and r is the aspect ratio of the detected target in the current frame;

[0041] Step S4.2: For potential moving targets detected but not matched in the current frame, obtain the Kalman filter for the potential moving targets in the same way as the initial target processing in step S2, and define its continuous loss count value, with an initial value of 0.

[0042] Step S4.3: If a potential moving target that existed in the previous frame is not matched successfully in the current frame, increment the consecutive loss count of the target by 1. If the consecutive loss count exceeds the consecutive loss threshold, delete the potential moving target; if it does not exceed the consecutive loss threshold, retain the potential moving target.

[0043] After step 4, all potential moving targets from the previous and current frames are retained as all potential moving targets output in the current frame and enter step 3 of the next frame. They are used as the target information estimate and estimated covariance of the previous frame in formula group 1 to predict potential targets in the next frame.

[0044] Step S5: Eliminate false targets based on target coordinate deviation;

[0045] Steps S3 to S5 are performed by traversing all frames, and the remaining potential moving targets are the correct moving target information.

[0046] Preferably, the difference calculation method in step S1 is as follows:

[0047] Step S1.1: Calculate the difference between corresponding pixels in subsequent frames and the initial frame to obtain the difference result image;

[0048] Step S1.2: For the difference result image, calculate the mean m and standard deviation s of the difference values ​​of all pixels, calculate the image segmentation threshold v = m + s, set the difference value of each pixel in the difference result image to 1 if it is greater than the threshold, and set the difference value of each pixel in the difference result image to 0 if it is less than the threshold, and segment the image to obtain the segmentation result image; after denoising the segmentation result image, obtain the initial target.

[0049] Preferably, the noise reduction process specifically includes:

[0050] Step S1.3: Use a 3×3 cross-shaped structuring element to perform erosion operation on the segmented image to obtain the eroded result image;

[0051] Step S1.4: Remove noise from the erosion result image to obtain the noise-reduced result image;

[0052] Step S1.5: Use square structuring elements to perform dilation calculations on the denoised image to merge multiple regions of the same target, resulting in multiple initial targets.

[0053] Preferably, step S5 specifically involves:

[0054] For a successfully matched potential moving target, calculate the absolute value of the difference between the x-coordinate u and y-coordinate v of the center pixel of the potential moving target in this frame and the adjacent frame, and add them together as the coordinate deviation value of the potential moving target.

[0055] Set a pixel deviation threshold. If the average coordinate deviation value of all pixels of a potential moving target is less than the pixel deviation threshold, then the potential moving target is removed.

[0056] Preferably, in step S3.3, the Hungarian algorithm is used to perform sequence matching on potential moving targets.

[0057] The beneficial effects of this invention are:

[0058] 1. This invention employs a multi-target tracking and association algorithm to continuously track detected suspected moving targets. Based on the random nature of false targets generated by changes in external lighting or the swaying of fixed solids caused by strong winds, this invention can effectively eliminate such false targets.

[0059] 2. This invention employs a multi-target tracking and association algorithm to continuously track detected suspected moving targets. For false moving targets generated by strong edges at fixed positions in the image, the fixed position characteristic can be utilized to effectively suppress such false targets. Attached Figure Description

[0060] Figure 1 This is a schematic diagram of a specific embodiment of the present invention;

[0061] Figure 2 This is a schematic diagram illustrating the use of image difference extraction to detect targets in a specific embodiment of the present invention;

[0062] Figure 3 This is a schematic diagram of the distribution of the association results in frame 55 in a specific embodiment of the present invention;

[0063] Figure 4 This is a schematic diagram of the distribution of the association results in frame 60 in a specific embodiment of the present invention;

[0064] Figure 5 This is a schematic diagram of the final detection result output in a specific embodiment of the present invention;

[0065] The numbers 1 to 11 in the diagram represent target number 1, target number 2, ..., target number 11, respectively. Detailed Implementation

[0066] The specific embodiments of the present invention will be described in further detail below.

[0067] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0068] like Figure 1 As shown, the present invention provides a method for eliminating false moving targets based on multi-target tracking, comprising the following steps:

[0069] Step S1: Select a frame from the video stream as the initial frame, select a subsequent frame of the initial frame as the reference frame, and use the difference calculation method to obtain the initial target by comparing the subsequent frame with the initial frame.

[0070] Step S1.1: As Figure 2 As shown, Figure 2 .B-1 is the first frame of the original image. Figure 2 .B-2 is the original image of frame 50. Figure 2 .B-3 is the difference result image obtained by calculating the difference between corresponding pixels in the first frame and the fiftieth frame.

[0071] Step S1.2: For the difference result image, calculate the mean m and standard deviation s of the difference values ​​of all pixels, calculate the image segmentation threshold v = m + s, and assign a value of 1 to each pixel in the difference result image that is greater than the threshold and a value of 0 to each pixel that is less than the threshold. Segment the image to obtain the segmentation result image. For example... Figure 2 .B-4 is the segmentation result image of the difference image between the first frame and the fiftieth frame.

[0072] Step S1.3: Using a 3×3 cross-shaped structuring element, as shown in the matrix below, perform an erosion operation on the segmented image to remove fine edge noise, such as... Figure 2 B-5 is the erosion result image after the segmented image has been eroded. The erosion operation uses a 3×3 cross-shaped structuring element to perform convolution with the image, and the minimum value of the pixel covered by the non-zero elements of the 3×3 matrix is ​​used to replace the pixel value of that point in the image.

[0073]

[0074] Step S1.4: Eight-connected region labeling is performed on the erosion result image. Different connected regions of the segmented image are labeled with different numbers. Regions labeled with the same number but with an area less than a threshold of 15 pixels are removed as noise. This step is used to calculate the area of ​​the segmented result and remove areas less than the threshold as noise. Figure 2 .B-6 is the denoising result image after removing noise.

[0075] Step S1.5: Using a 7×7 square structuring element, perform dilation calculations on the denoised image, such as... Figure 2 B-7 is the dilated image, which merges multiple regions of the same target. Since the same target may be segmented into multiple adjacent regions, this step merges these adjacent regions to obtain a complete target. Finally, multiple initial targets are obtained as the output detection results, such as... Figure 2 .B-8 provides multiple initial target result images;

[0076] Step S2: For Figure 2 The nine initial targets detected in the first B-8 are used to initialize the Kalman filter matrix, specifically as follows:

[0077] Step S2.1: Define initial target information based on the detection target obtained in step S1;

[0078] For each initial target obtained in step S1, an initial target vector is defined as a seven-dimensional vector. The state of the target is described, where u and v are the x and y coordinates of the geometric center of the detected target on the image, respectively, s is the area of ​​the initial target, and r is the aspect ratio of the initial target. The horizontal axis represents velocity. The vertical axis represents velocity. The area velocity refers to the rate of change between adjacent frames.

[0079] Step S2.2: According to the definition in S2.1, the initial target state involves 7 parameters, namely u, v, s, r, Define a 7th-order square matrix F as the state transition model matrix; the model parameters u, v, s are linear functions of time, and the aspect ratio r is a constant. Then the state transition model matrix F is:

[0080]

[0081] Since only the four parameters u, v, r, and s of the output target are observed, the observation function H is defined as a four-row, seven-column matrix:

[0082]

[0083] Step S2.3: Initialize the measurement noise matrix R, covariance matrix P, and process noise matrix Q;

[0084] R is a 4th-order square matrix, and P and Q are 7th-order square matrices; where the measurement noise matrix R, the covariance matrix P, and the process noise matrix Q are square matrices with non-zero elements only on the diagonal.

[0085] In one specific implementation,

[0086]

[0087]

[0088]

[0089] The covariance matrix P is the initial value, and it converges iteratively during the calculation process. The measurement noise matrix R and the process noise matrix Q are hyperparameters, which can be set according to engineering experience. For example, if the set values ​​of each non-zero element in R are large, the weight of the image motion detection value in the output optimal estimate will be small. If the set values ​​of each non-zero element in Q are small, the weight of the motion model prediction value in the output optimal estimate will be large.

[0090] A Kalman filter consisting of measurement noise matrix R, covariance matrix P, process noise matrix Q, observation function H, and state transformation model matrix F;

[0091] Step S3: For subsequent frames after the reference frame of the video stream, use the differential calculation method described in step S1 to detect moving targets as potential moving targets, and match them with potential moving targets in the previous frame; specifically:

[0092] Step S3.1: Calculate the estimated target information value predicted in the current frame. With Estimated Covariance Among them, the target information estimate The vector is of the same form as the initial target vector X.

[0093] in:

[0094] Target information estimate in frame K

[0095] The estimated covariance of the Kth frame

[0096] --Formula Group 1

[0097] The subscript K indicates the frame number;

[0098] For the first frame, i.e., when K=1, the estimated value of the target information. Let X be the initial target vector obtained in step S1. The estimated covariance of the first frame is the covariance matrix P;

[0099] Step S3.2: Detect potential moving targets in the current frame using the differential calculation method described in step S1;

[0100] Estimate of target information Calculate the intersection-union ratio (IOU) between each pair of potential moving targets and their target information.

[0101] Step S3.3: Using the Intersection over Union (IOU) as weights, the Hungarian algorithm is used to perform sequence matching on the detected targets. An IOU threshold is set, and potential moving targets with an IOU less than the IOU threshold are set as failed to match.

[0102] After matching, there are three types of matching results:

[0103] The current frame has detected and successfully matched a potential moving target.

[0104] The current frame detected a potential moving target but did not match.

[0105] Potential moving targets that existed in the previous frame but did not match successfully in the current frame;

[0106] For example, starting from the fiftieth frame, with a step size of five frames, the difference between the new input image and the initial frame is calculated using a difference calculation method.

[0107] Figure 2 , Figure 3 , Figure 4 The detection results of the 50th, 55th, and 60th frames of the video stream compared with the initial frame using the difference calculation method are shown below.

[0108] by Figure 2 Using the base frame, nine initial targets are obtained; Figure 3 and Figure 4 For subsequent frames;

[0109] Figure 3 Frame 55 contains ten potential moving targets, numbered 1-10. Figure 3 The location of the potential moving target extracted from it, and Figure 2 The nine initial targets were matched, among which Figure 2 and Figure 3 Targets 1, 2, 3, 4, 5, 7, 8, and 9 were successfully matched; target 6 was... Figure 3 The target was not detected in the data. Target number 10 is... Figure 3 Potential moving targets detected by China News Service;

[0110] Figure 4 In frame 60, targets 1, 3, 4, 5, 7, 8, 9, and 10 were successfully matched; target 2 was not detected; and target 11 was not detected. Figure 4 China News Service testing target.

[0111] Step S4: Classify and process each target in the current frame to obtain the potential moving targets output in the current frame, specifically:

[0112] Step S4.1: For potential moving targets detected and successfully matched in the current frame, the consecutive loss count value of the target is set to 0, and its Kalman filter gain parameter K is updated. k Correcting the estimated value And posterior estimate of covariance P k The updated formula is as follows:

[0113]

[0114]

[0115]

[0116] ---Formula Group 2

[0117] In formula group 2, the superscript T denotes the transpose of the matrix, and Z... K Z represents the target result output by the differential detection in the current frame. K =[u K ,v K ,s K ,r K ], k is the number of the current frame image, u is the horizontal coordinate of the center of the detected target in the current frame in the image, v is the vertical coordinate of the center of the detected target in the current frame in the image, s is the pixel area of ​​the detected target in the current frame, and r is the aspect ratio of the detected target in the current frame;

[0118] The corrected value, obtained by combining the predicted value of the current frame with the target detection result of the current frame, is used as the input value for predicting the target information of the next frame. k This is the correction value for the estimated covariance of the current frame, which is used as the input value for predicting the estimated covariance matrix of the next frame.

[0119] Step S4.2: For potential moving targets detected but not matched in the current frame, obtain the Kalman filter for the potential moving targets in the same way as the initial target processing in step S2, and define its continuous loss count value, with an initial value of 0.

[0120] Step S4.3: If a potential moving target that existed in the previous frame is not matched successfully in the current frame, increment the consecutive loss count of the target by 1. If the consecutive loss count exceeds the consecutive loss threshold, delete the potential moving target; if it does not exceed the consecutive loss threshold, retain the potential moving target.

[0121] In steps 3 and 4, for the first detection, the previous frame is the reference frame, and the initial target is used as the potential moving target of the previous frame.

[0122] For example, increment the consecutive loss count of the initial target by 1, set the consecutive loss threshold to 3. If the consecutive loss count exceeds 3, it indicates that the initial target is unstable and is noise, so delete the initial target.

[0123] After step 4, all potential moving targets from the previous and current frames are retained as all potential moving targets output in the current frame and enter step 3 of the next frame. They are used as the target information estimate and estimated covariance of the previous frame in formula group 1 to predict potential targets in the next frame.

[0124] For example, for Figure 3 For targets 1, 2, 3, 4, 5, 7, 8, and 9 that are successfully matched, update the corresponding Kalman filter parameters; for potential associated target 10 that appears in the current frame, initialize the Kalman filter corresponding to the new target and add it as a new potential associated target; for the previous initial target 6, if it is not detected in the current frame, increment the consecutive loss count value of initial target 6 by 1.

[0125] And for Figure 4 For targets 1, 3, 4, 5, 7, 8, 9, and 10 that are successfully matched, update the corresponding Kalman filter parameters; for the new target 11 that appears in the current frame, initialize the Kalman filter corresponding to the new target and add it as a new potential associated target; for the previous initial target 2, which was not detected in the current frame, increment the consecutive loss count value of target 2 by 1.

[0126] Figure 2 Target No. 6 in Figure 3 and Figure 4 Not related to China Figure 2 and Figure 3 Target No. 2 in Figure 4 If a target is not associated with another target for three consecutive times, it is considered to have unstable association and will be removed.

[0127] Step S5: Eliminate false targets based on the target coordinate deviation threshold. For a successfully matched potential moving target, calculate the absolute value of the difference between the potential moving target and the horizontal coordinate u and vertical coordinate v of the two adjacent frames, and add them together as the coordinate deviation value of the potential moving target.

[0128] If the average coordinate deviation value of a potential moving target is less than the set pixel deviation threshold (10), it indicates that the target does not show significant motion change, and the potential moving target is then removed. For example, Figure 2 , Figure 3 and Figure 4 Among them, targets 1, 3, 4, 5, 8, and 9 have an average coordinate deviation of less than 10, indicating that these targets do not have significant motion changes and are therefore eliminated. Target 7 is a stable detection, and the average value of its coordinates is greater than the threshold.

[0129] After step S5 ends in each frame, return to step S3 to perform potential moving target matching for the next frame. Repeat steps S3 to S5 for all frames, and finally the remaining potential associated targets are the correct moving target information.

[0130] Steps S3-S5 continuously track the detected suspected moving targets, utilizing the unstable nature of false moving target detection and the fact that the position of false targets does not actually move, to eliminate false moving targets.

[0131] The foregoing descriptions are preferred embodiments of the present invention. Unless there is a clear contradiction between the preferred embodiments or a prerequisite for a particular preferred embodiment, the preferred embodiments can be arbitrarily combined and used. The embodiments and specific parameters described are only for clearly illustrating the inventor's invention verification process and are not intended to limit the scope of patent protection of the present invention. The scope of patent protection of the present invention shall still be determined by its claims. Similarly, any equivalent structural changes made based on the description and drawings of the present invention shall also be included within the scope of protection of the present invention.

Claims

1. A false moving target elimination method based on multi-target tracking, characterized in that comprising the following steps: Step S1. Select a frame as an initial frame from the video stream, select a subsequent frame of the initial frame as a reference frame, and obtain an initial target by using a difference calculation method on the subsequent frame and the initial frame; Define a consecutive loss count value for the initial target and set the initial value to zero; Step S2. Initialize the Kalman filter matrix for the initial target; specifically: Step S2.1: define the initial target information; For each initial target obtained in step S1, define an initial target vector as a seven-dimensional vector Describe the target state, where u, v are the horizontal and vertical coordinates of the geometric center of the initial target on the image, s is the area of the initial target, and r is the aspect ratio of the initial target, is the horizontal coordinate velocity, is the vertical coordinate velocity, is the area velocity, where velocity refers to the change rate between adjacent frames; Step S2.2: define a 7-order square matrix F as a state transformation model matrix; Define the observation function H as a four-row seven-column matrix: Step S2.3: initialize the measurement noise matrix R, the covariance matrix P, and the process noise matrix Q; R is a 4-order square matrix, and P and Q are 7-order square matrices; wherein the measurement noise matrix R, the covariance matrix P, and the process noise matrix Q are square matrices with only non-zero elements on the diagonal; In this step, the measurement noise matrix R, the covariance matrix P, the process noise matrix Q, the observation function H, and the state transformation model matrix F constitute the initialized Kalman filter; Step S3: for the subsequent frame after the reference frame of the video stream, detect the moving target as a potential moving target using the difference calculation method described in step S1, and match it with the potential moving target of the previous frame; specifically: Step S3.1: Compute the target information estimate for the current frame prediction with the estimated covariance where the target information estimate is a vector of the same form as the initial target vector X; Wherein: Target information estimate value of the Kth frame estimated covariance of the Kth frame Formula group 1 The subscript K represents the frame number; For the first frame, i.e. K = 1, the target information estimate is The initial target vector X obtained in step S2.1 is set as The estimated covariance for the first frame is the covariance matrix P; Step S3.2: detect the potential moving target of the current frame using the difference calculation method described in step S1; Target information estimate value The intersection over union value IOU is calculated between each pair of target information of potential moving targets, respectively. Step S3.3: use the intersection over union value IOU as the weight to match the detected target by the sequence number, set the intersection over union threshold, and set the potential moving target with the intersection over union value IOU less than the intersection over union threshold as a failed matching; After the matching is completed, there are three types of matching results: the potential moving target detected in the current frame and successfully matched, the potential moving target detected in the current frame but not successfully matched, the potential moving target existing in the previous frame but not successfully matched with the current frame; Step S4: classify and process each target of the current frame to obtain the potential moving target output by the current frame, specifically: Step S4.1: For the potential moving object detected and successfully matched in the current frame, set the consecutive loss count value of the object to 0, and update the Kalman filter gain parameter K k , the correction estimated value , and the posteriori estimated covariance P k , the update formula is as follows: Formula group 2 The superscript T represents the transpose of the matrix, the subscript K represents the frame number, H is an observation function, I is a unit matrix, Z K represents the target result of the current frame difference detection output, Z K = [u K , v K , s K , r K ], k is the number of the current frame image, u is the horizontal coordinate of the center of the detection target in the image of the current frame, v is the vertical coordinate of the center of the detection target in the image of the current frame, s is the pixel area of the detection target of the current frame, and r is the aspect ratio of the detection target of the current frame. Step S4.2: for the potential moving target detected in the current frame but not successfully matched, obtain the Kalman filter of the potential moving target in the same way as the processing of the initial target in step S2, and define the consecutive loss count value of the potential moving target with the initial value of 0; Step S4.3: for the potential moving target existing in the previous frame but not successfully matched in the current frame, add 1 to the consecutive loss count value of the target, and if the consecutive loss count value exceeds the consecutive loss threshold, delete the potential moving target; if the consecutive loss count value does not exceed the consecutive loss threshold, retain the potential moving target; After step 4, all potential moving targets of the previous frame and the current frame that are retained are all potential moving targets output by the current frame; Step S5: remove false targets according to target coordinate deviation; Iterate through all frames to perform steps S3 to S5, and the remaining potential moving targets are the correct moving target information.

2. The multi-target tracking based false moving target elimination method of claim 1, wherein, The difference calculation method in step S1 is specifically: Step S1.1: calculate the difference between the corresponding pixels of the subsequent frame and the initial frame to obtain a difference result image; Step S1.2: calculate the mean value m and the standard deviation s of all pixel difference values of the difference result image, calculate the image segmentation threshold value v=m+s, let the pixel difference value greater than the threshold value be 1 and less than the threshold value be 0 in the difference result image, segment the image to obtain a segmentation result image; after noise reduction processing of the segmentation result image, an initial target is obtained.

3. The multi-target tracking based false motion target elimination method of claim 2, wherein, The noise reduction processing is specifically: Step S1.3: use a 3*3 cross-shaped structure element to perform erosion operation on the segmented image to obtain an erosion result image; Step S1.4: perform noise removal on the erosion result image to obtain a noise reduction result image; Step S1.5: use a square structure element to perform inflation calculation on the noise reduction result image to complete the merging of multiple regions of the same target, and multiple initial targets are obtained after merging.

4. The multi-target tracking based false motion target elimination method of claim 1, wherein, The S5 step is specifically, For the matched potential moving target, the absolute value of the difference between the horizontal coordinate u and the vertical coordinate v of the center pixel point of the potential moving target in the frame and the adjacent frame is calculated and added, as the coordinate deviation value of the potential moving target; Set a pixel deviation threshold value, if the average value of the coordinate deviation value of all pixel points of the potential moving target is less than the pixel deviation threshold value, the potential moving target is removed.

5. The multi-target tracking based false motion target elimination method of claim 1, wherein, In the step S3.3, the Hungarian algorithm is used to match the serial numbers of the potential moving targets.

Citation Information

Patent Citations

  • Passenger behavior monitoring method based on machine vision

    CN109359536A

  • Fish body target tracking method and device based on contour matching

    CN116128920A