A method and system for detecting and tracking unmanned aerial vehicle targets
By extracting and fusing fHOG, LBP and grayscale features in UAVs, combined with the trajectory prediction module, the problem of accuracy and efficiency of target detection and tracking in complex environments is solved, and efficient tracking under the influence of lighting, noise and other factors is achieved. .
Patent Information
- Application Number
- CN202410045684.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-11
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-01-11
AI Technical Summary
Existing UAV target detection and tracking technology is difficult to accurately identify and track targets in complex environments. It is affected by factors such as illumination, noise, shooting distance and angle, resulting in a decline in detection results and tracking efficiency.
By extracting the fHOG features, LBP features and grayscale features of the current frame image, fuse them into a global feature matrix, and perform convolution to determine the target position. At the same time, with the help of the trajectory prediction module, the target position is predicted to ensure that the target position is correct in a complex environment. maintain tracking effect.
It improves the accuracy and efficiency of UAV target detection and tracking, can effectively identify and track targets in complex environments, and resume tracking in a short time under extreme circumstances, improving user experience.
Smart Images

Figure CN118071792B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of unmanned aerial vehicles, and in particular to the field of a method and system for detecting and tracking unmanned aerial vehicles. Background Art
[0002] Target detection and tracking technology has many uses in visual navigation, transportation, government rescue, public safety and other fields, such as real-time positioning of stolen ships, tracking of criminals' vehicles when arresting them, etc., and also using drones to follow people to take photos and videos. Target detection refers to obtaining the image coordinates of certain types of targets in the video, such as people and cars. Tracking refers to selecting a target and obtaining the position information of each subsequent frame in real time based on its initial position. However, scenes in real life are complex and changeable. For example, lighting, noise, shooting distance and angle will affect the imaging quality of the drone, and thus affect the detection effect, which in turn affects the tracking effect. Summary of the invention
[0003] Based on this, the purpose of the present invention is to provide a method and system for detecting and tracking unmanned aerial vehicles. Through the initialization of the tracker, the tracker can accurately identify the target image even in the image frame disturbed by lighting, noise, shooting distance and angle, and extract multiple features from the image, fuse the extracted multiple features, construct a feature matrix, and after convolving the feature matrix, determine the approximate position of the target in the image frame, so that the tracker can identify the target image more quickly according to the obtained position information, thereby improving the detection and tracking efficiency.
[0004] The present invention is implemented by the following technical solutions. First, the present invention provides a method for detecting and tracking a drone target, which specifically includes:
[0005] Get the current frame image of the camera;
[0006] Extracting the fHOG feature of the current frame image;
[0007] Split the current frame image into multiple equal areas;
[0008] LBP features are extracted for the pixels in each region respectively, and the LBP features of all the pixels in each region are connected in series to obtain the local LBP feature vector of each region;
[0009] The grayscale features of the pixels in each area are extracted respectively, and the grayscale features of all the pixels in each area are connected in series to obtain the local grayscale feature vector of each area;
[0010] The local LBP feature vector, the local grayscale feature vector and the fHOG feature of each region are connected in series to obtain the global feature vector of each region, and the global feature vectors of each region are combined into a global feature matrix;
[0011] The global feature matrix is convolved, and the position of the maximum value of the convolved matrix is obtained to frame the target image.
[0012] Furthermore, in order to avoid extreme situations such as target occlusion, strong interference, and heavy fog during target tracking, which may make target tracking impossible, when acquiring the current frame image of the camera, if the tracker cannot recognize the target image, the trajectory prediction is performed by the following method:
[0013] A set of image frame data captured before the current frame is obtained as a trajectory prediction image group; starting from the first frame of the trajectory prediction image group, the actual displacement of the target between each frame is calculated in sequence, where the actual displacement is the displacement of the target when the camera is stationary;
[0014] A motion trajectory is obtained by fitting according to the actual displacement of each frame, and a motion prediction model is established according to the motion trajectory;
[0015] The position of the target in the current frame image is predicted according to the motion prediction model, and the position is used as the target position, or a target search is performed near the position. If the peak sidelobe ratio is greater than a preset threshold, it is the target position.
[0016] Furthermore, before performing image tracking, the steps required to initialize the tracker include:
[0017] Obtain a cache image group in the camera, and find the target frame closest to the coordinate information and the frame image in the cache image group according to the coordinate information and the target image sent by the terminal device, and input them into the tracker, which is used to extract features from the image to obtain a standard feature;
[0018] Taking the image frame where the target frame is located as the starting point, repeatedly assigning serial numbers to the remaining images in the cache image group, obtaining the image to be feature extracted through sequential frame skipping processing, and inputting the image into the tracker to obtain a target feature;
[0019] Convolving the standard feature and the target feature to obtain a response matrix, and calculating the peak sidelobe ratio;
[0020] The peak sidelobe ratio is compared with a preset threshold value, if the peak sidelobe ratio is less than the preset threshold value, the standard feature is not updated, if the peak sidelobe ratio of the response matrix is greater than the threshold value, the standard feature is updated according to the learning rate update feature function;
[0021] If the sequential frame skipping is completed, the initialization is completed, otherwise the frame skipping continues to read the image in the cache image group and update the standard features. Further, the specific calculation formula of the response matrix is:
[0022] S=F -1 [F(m)*F(x)]
[0023] Where S is the response matrix, F is the Fourier transform, m is the target feature of the previous frame, and x is the feature of the search area.
[0024] Furthermore, the learning rate update characteristic function is:
[0025]
[0026] Where x and a are the appearance model (features) and response coefficient of the current frame, respectively, and η is the learning rate.
[0027] Furthermore, the steps of establishing the motion model are specifically as follows:
[0028] An XY coordinate system is established for each image frame. Uniformly accelerated linear motion is used in the X and Y directions to perform data fitting on the motion trajectory, and the total error is calculated:
[0029]
[0030] The specific calculation formula of the motion model can be obtained by taking the derivative of the above error sum:
[0031]
[0032] Where v and a represent velocity and acceleration, S represents displacement, and t represents time.
[0033] On the other hand, the present invention also provides a drone target detection and tracking system, which includes a tracker, wherein the tracker includes:
[0034] Image acquisition module: used to obtain the current frame image of the camera;
[0035] fHOG feature extraction module: used to extract the fHOG feature of the current frame image;
[0036] Image preprocessing module: used to split the current frame image into multiple equal areas;
[0037] LBP feature extraction module: used to extract LBP features from the pixels of each area respectively, and concatenate the LBP features of all the pixels of each area to obtain the local LBP feature vector of each area;
[0038] Grayscale feature extraction module: used to extract grayscale features from the pixels of each area respectively, and connect the grayscale features of all the pixels of each area in series to obtain the local grayscale feature vector of each area;
[0039] Local feature vector fusion module: used for feature matrix extraction module: used for connecting the local LBP feature vector, the local gray feature vector and the fHOG feature of each region in series to obtain the global feature vector of each region, and the global feature vector of each region is combined into a global feature matrix;
[0040] Target object framing module: convolve the global feature matrix, obtain the position of the maximum value of the convolved matrix, and frame the target object.
[0041] Furthermore, it also includes a trajectory prediction module, which is used to predict the trajectory of the target if the tracker cannot recognize the target image when acquiring the current frame image of the camera. The trajectory prediction module includes:
[0042] The actual displacement calculation unit is used to obtain a group of image frame data taken before the current frame as a trajectory prediction image group; starting from the first frame of the trajectory prediction image group, the actual displacement of the target between each frame is calculated in sequence, and the actual displacement is the displacement of the target when the camera is stationary;
[0043] A motion model building unit: used to fit a motion trajectory according to the actual displacement of each frame, and to build a motion prediction model according to the motion trajectory;
[0044] Position prediction unit: used to predict the position of the target in the current frame image according to the motion prediction model, and use this position as the target location, or search for the target near this position. If the peak sidelobe ratio is greater than a preset threshold, it is the target location.
[0045] Furthermore, an initialization module is also included, and the initialization module specifically includes:
[0046] The starting position search unit is used to obtain a cache image group in the camera, and find the target frame closest to the coordinate information and the frame image in the cache image group according to the coordinate information and the target image sent by the terminal device, and input them to the tracker; the tracker is used to extract features from the image to obtain a standard feature;
[0047] A frame skipping tracking unit is used to repeatedly assign serial numbers to the remaining images of the cached image group starting from the image frame where the target frame is located, obtain the image to be feature extracted through sequential frame skipping processing, input the image into the tracker, and obtain a target feature;
[0048] A peak sidelobe ratio calculation unit is used to convolve the standard feature and the target feature to obtain a response matrix and calculate the peak sidelobe ratio;
[0049] A standard feature update determination unit is used to compare the peak sidelobe ratio with a preset threshold value, if the peak sidelobe ratio is less than the preset threshold value, the standard feature is not updated, if the peak sidelobe ratio of the response matrix is greater than the threshold value, the standard feature is updated according to the learning rate update feature function;
[0050] The initialization completion determination unit is used to complete the initialization if the sequential frame skipping is completed, otherwise continue to skip frames to read the images in the cache image group and update the standard features.
[0051] On the other hand, the present invention also provides a computer-readable storage medium, which stores a computer program, characterized in that when the computer program is executed by a processor, the steps of a drone target detection and tracking method described in any one of the above are implemented.
[0052] The present invention first initializes the tracker of the unmanned aerial vehicle target detection and tracking system, so that the target can be gradually caught up by frame skipping processing without increasing the search range, and both speed and accuracy can be guaranteed. Secondly, the fHOG feature, LBP feature and grayscale feature of the current frame are extracted, the current frame is split into a number of equal areas, the local LBP feature and the local grayscale feature of each area are feature fused with the fHOG feature, and the feature vectors after all the features are fused form a feature matrix. The position where the maximum value of the feature matrix is located after convolution is the position where the target image is located, and the tracker tracks the target based on multi-feature fusion, so that the tracking can adapt to more environments, and the target can be well tracked even in a complex environment; in addition, a trajectory prediction module is added, so that the system can replace the tracker for a short time when the tracker cannot work, and will not stop immediately, and can also find the target and track it again, thereby improving the user experience.
[0053] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 A flowchart of a method for detecting and tracking unmanned aerial vehicle targets provided by the present invention;
[0055] Figure 2 For execution Figure 1 A structural block diagram of a tracker of a drone target detection and tracking system of the drone target detection and tracking method;
[0056] Figure 3 A schematic diagram of the fHOG feature extraction process provided by the present invention;
[0057] Figure 4 A flow chart of pre-initialization of a tracker provided by the present invention;
[0058] Figure 5 A schematic diagram of frame skipping sorting in a camera cache image group during the tracker initialization process provided by the present invention;
[0059] Figure 6 The present invention provides a flow chart of a trajectory prediction method. DETAILED DESCRIPTION
[0060] See also Figure 1 , Figure 2 , Figure 1 A flowchart of a method for detecting and tracking unmanned aerial vehicle targets provided by the present invention is provided. Figure 2 For execution Figure 1 The structural block diagram of a drone target detection and tracking system of the drone target detection and tracking method described above, wherein the present invention provides a drone target detection and tracking method that solves the problem that the tracker of the existing method cannot accurately track the target object in a complex environment, and specifically includes the following steps:
[0061] S10: Acquire the current frame image of the camera; step S10 is executed by the image acquisition module 10.
[0062] S21: extracting the fHOG feature of the current frame image; step S21 is performed by the fHOG feature extraction module 21.
[0063] Drones can capture the expected images through high-altitude photography, but due to the complexity and diversity of the shooting environment, the captured image data and targets may be blurred, deformed, and affected by various noises, or the background and target are not distinguished. In this case, the tracker cannot track the target image. The inventor analyzes the image information and finds that there are some features that are not affected by the above. Therefore, the corresponding features of the current frame image of the camera are first extracted, and the extracted features are used to track the target. The extraction is performed through the following steps:
[0064] First, for the current frame image, the image range is expanded with the target as the center. The specific calculation formula is as follows:
[0065] w'=w*template / max(wh)
[0066] h'=h*template / max(wh)
[0067] w_new=((int)w' / (2*cell))*2*cell+2*cell
[0068] h_new=((int)h' / (2*cell))*2*cell+2*cell
[0069] Among them, w and h represent the original size of the target, w_new and h_new represent the expanded target size, here template = 96, cell = 4, and the current frame image is also expanded at the same time, and the final target area and the search area are of the same size, and then fHOG feature extraction is performed. First, the image is grayed, the image is normalized using Gamma correction, and the gradient of each pixel of the image is calculated; secondly, the image is divided into several cells, which is (h_new / cell)*(w_new / cell) in this embodiment, and the gradient feature of each cell is calculated; finally, the cells are grouped into blocks, the gradient features of the cells in the block are connected in series to obtain the gradient features of the block, the gradient features of all blocks are connected in series to obtain the HOG features of the image, and then combined Figure 3 To further process the HOG features of the image, after the concatenation is completed, the pixel-level features of the tracking target area that are direction-sensitive (0-360°) and direction-insensitive (0-180°) are mapped; secondly, it is normalized and truncated to obtain a 27+4=31-dimensional feature vector, which is the fHOG feature of the image. The 31-dimensional feature vector contains 18-dimensional features that are sensitive to direction, 9-dimensional features that are insensitive to direction, and 4-dimensional cumulative features.
[0070] S22: Split the current frame into a plurality of equal regions; Step S22 is performed by the image preprocessing module 22 .
[0071] S23a: Extract LBP features from the pixels of each region respectively, and concatenate the LBP features of all the pixels of each region to obtain a local LBP feature vector of each region. Step S23a is performed by the LBP feature extraction module 23a.
[0072] Then, LBP feature extraction is performed, and LBP encoding is performed on the pixels in a circular area with a radius of r, which is calculated by the following formula:
[0073] xp=xc+R cos 2πp / P
[0074] yp=yc+R sin 2πp / P
[0075] Where (xc, yc) gives the coordinates of the center point, (xp, yp) calculates the coordinates of the pth sampling point, R is the radius, and P is the number of sampling points.
[0076] Since the sampling points are not necessarily integers, interpolation is required. This embodiment uses bilinear interpolation to compare the size of the area pixel and the center pixel. Pixels larger than the center pixel are assigned a value of 1, otherwise they are 0. These 1s and 0s are connected to obtain the local binary pattern of the center pixel. Next, the binary pattern is circularly shifted to find the binary pattern with the smallest decimal number represented by the binary pattern, which is the LBP feature with rotation invariance. For example, 010 can be circularly shifted to 001 and 100, and the decimal representations are 2, 1, and 4 respectively. Obviously, 001 is the smallest, so the feature is 001.
[0077] S23b: Extract grayscale features from the pixels of each region, and connect the grayscale features of all the pixels of each region in series to obtain a local grayscale feature vector of each region; step S23b is executed by the grayscale feature extraction module 23b.
[0078] The next step is to extract the grayscale features, that is, convert the target area image into a grayscale image, then divide each pixel value by 255, and then subtract 0.5 to obtain the grayscale features.
[0079] S30: The local LBP feature vector, the local grayscale feature vector and the fHOG feature of each region are connected in series to obtain the global feature vector of each region, and the global feature vectors of each region are combined into a global feature matrix. Step S30 is performed by the feature matrix extraction module 30.
[0080] After knowing how to extract the above features, you need to fuse the features between the above features. First, divide the image into block images, each block is 8*8 in size. Next, extract the circular LBP features and grayscale features for each block, and concatenate the features of each block into a 64-dimensional vector by pixel, and then concatenate them with the previous fHOG features, that is, add 64-dimensional LBP features and 64-dimensional grayscale features after the 31-dimensional features to obtain a fused feature vector. Next, convolve the feature matrix, and then find the maximum value of the fused feature matrix, which is the position of the target in the current frame.
[0081] In another embodiment, the size of the target in the image changes during the motion process due to factors such as viewing angle and distance. Therefore, in order to obtain the optimal target size, the original target area size is expanded or reduced by a coefficient of 1.05 in this embodiment. For example, the length and width of the smallest area is 1 / 1.05 times the original length and width, and the largest area is 1.05 times the original length and width. Features are extracted from these two areas respectively, and then the fused response matrix and their respective position sizes are calculated. The three maximum response values are used for comparison, and the largest of the three maximum response values is taken as the true target position and size.
[0082] S40: performing convolution on the global feature matrix, obtaining the location of the maximum value of the matrix after the convolution, and framing the target object. Step S40 is performed by the target object framing module 40.
[0083] After the position information of an image frame is acquired, the target can be tracked by selecting a frame each time according to the calculated position information, and then the position tracking and calculation of the target are continued for the next frame of image acquired by the camera until the camera stops working.
[0084] In another embodiment, considering that it is difficult to select a target in a network delay environment during actual operation, the traditional approach is to simply increase the search range, which will lead to a decrease in speed and an increase in the probability of misidentification; therefore, before starting to track the target, the inventor initializes the tracker through a series of steps, so that the tracker can track without being affected by delay or network environment without expanding the search range. Figure 4 The initialization process specifically includes the following steps:
[0085] S10a: Obtain a cached image group in the camera, and find the target frame and the frame image in which the target frame is located that are closest to the coordinate information in the cached image group according to the coordinate information and the target image sent by the terminal device, and input them into the tracker, which is used to extract features from the image to obtain a standard feature; step S10a is executed by the starting position search unit 10a.
[0086] In this embodiment, due to network delay or instability, the terminal device needs to send instructions to the camera multiple times. Only when the camera and the terminal device recognize each other's instructions, the camera starts tracking. During this period, the camera will cache an image queue of about 15 frames, and then find the target frame closest to it from these images according to the clicked coordinates.
[0087] The terminal device can be an electronic device such as a remote control, smart terminal, mobile phone, computer, etc. that is connected to the drone.
[0088] S10b: starting from the image frame where the target box is located, repeatedly assigning serial numbers to the remaining images in the cached image group, obtaining the image to be feature extracted through sequential frame skipping processing, inputting the image into the tracker, and obtaining a target feature; step S10b is executed by the frame skipping tracking unit 10b.
[0089] See also Figure 5, then take this frame as the starting point (frame 0) and re-number each frame after this frame. At this time, the camera will continue to acquire new images and insert them into the cache queue, and then they will be assigned new numbers. Next, track the 4th frame (the queue after re-numbering), that is, extract features near the same position of the 4th frame, and then convolve with the target features of the 0th frame. The calculation formula is:
[0090] S=F -1 [F(m)*F(x)]
[0091] Where S is the response matrix, F is the Fourier transform, m is the target feature of the previous frame, and x is the feature of the search area.
[0092] S10c: convolve the standard feature and the target feature to obtain a response matrix, and calculate the peak sidelobe ratio; step S10c is executed by the peak sidelobe ratio calculation unit 10c.
[0093] S10d: used to compare the peak sidelobe ratio with a preset threshold, if the peak sidelobe ratio is less than the preset threshold, the standard feature is not updated, if the peak sidelobe ratio of the response matrix is greater than the threshold, the standard feature is updated according to the learning rate update feature function. Step S10d is performed by the template correction unit 10d.
[0094] The position where the maximum value of the response matrix after convolution is obtained is the position of the target in the fourth frame. The peak sidelobe ratio PSR is calculated according to the response matrix of the fourth frame. The peak sidelobe ratio PSR is the ratio of the maximum sidelobe intensity value to the main lobe intensity value. This parameter can be used to measure the ability of SAR images to detect weak targets around strong targets. If PSR is greater than the threshold, a learning rate is used to update the feature function to update the template. The specific calculation formula is:
[0095]
[0096] Wherein x and a are the appearance model (feature) and response coefficient of the current frame respectively, and η is the learning rate, which is set to 0.0001 in this embodiment.
[0097] S10e: If the sequential frame skipping is completed, the initialization is completed, otherwise the frame skipping continues to read the images in the cache image group and the standard features are updated. Step S10e is executed by the initialization completion determination unit 10e.
[0098] Otherwise, the feature template is not updated. The same calculation steps are performed on the 8th frame, followed by the 12th frame, the 16th frame, and so on. Each frame skip calculation must consider the number of frames remaining in the queue. If the number of remaining frames is less than 4, the next calculation directly uses the camera's real-time frame and clears the queue. The camera will no longer insert images into the queue (note that from the start of the click event to the time when the frames in the queue are skipped, PID will not control the movement of the gimbal and remain stationary). After that, the tracker will directly use the real-time frame sent back by the camera. In the real-time frame, the tracker will also extract features at the location of the target last time, and then convolve with the last feature template to calculate the response matrix to obtain the coordinate position of the target in the real-time frame. Based on this position information, the camera's angular velocity is calculated through PID, and the gimbal is controlled to move so that the target always remains in the center of the picture. During the frame skipping process, if there are 20 consecutive frames with PSR less than the threshold, the tracking stops.
[0099] In addition, in the actual drone tracking process, in addition to the lighting, noise, shooting distance and angle that will cause the shooting quality to deteriorate and thus affect the target detection and tracking, there are also some more extreme situations. For example, in a certain period of continuous image frames shot by the camera, when the target is blocked or severely deformed, blurred, etc., the tracker cannot track the position of the target during this period. The inventor further studied in another embodiment and found a method for tracking a target by using trajectory prediction, please refer to Figure 6 The specific steps are as follows: after acquiring the current frame image of the camera, if the tracker cannot track the target image, after step S40, it also includes:
[0100] S50a: Acquire a group of image frame data taken before the current frame as a trajectory prediction image group; start from the first frame of the trajectory prediction image group and calculate the actual displacement of the target between each frame in sequence, wherein the actual displacement is the displacement of the target when the camera is stationary; step S50a is executed by the actual displacement calculation unit 50a.
[0101] In this embodiment, the 20 frames of images taken before the current frame are used as the trajectory prediction image group. Considering that the drone is constantly moving during the shooting process, causing each frame of the image taken by the camera to be offset, the KPB method is used to calculate the affine transformation parameters of the two frames before and after in the trajectory prediction image group to obtain the displacement of the target caused by the camera movement. The specific calculation formula is as follows:
[0102]
[0103] Where u is the previous frame image, R is the current frame image, r and s are the displacements in the X and Y directions, and θ is the rotation angle.
[0104] Then, the difference between the target position of the current frame and the target position of the previous frame is obtained as the target displacement. The displacement at this time has a direction. For example, +1 means moving one pixel to the right or down in the image coordinate system, and vice versa). The actual displacement of the target when the camera is stationary can be obtained by summing the camera displacement and the target displacement (this physical quantity is between the previous and next frames).
[0105] S50b: a motion trajectory is obtained by fitting according to the actual displacement of each frame, and a motion prediction model is established according to the motion trajectory; step S50b is executed by the motion model building unit 50b.
[0106] Taking the starting frame of the trajectory prediction image group as the starting point, the actual displacement of the next 20 frames is added frame by frame to obtain the target's motion trajectory (absolute displacement) in each of the 20 frames. Use uniformly accelerated linear motion in the X and Y directions to fit the motion trajectory data and calculate the total error:
[0107]
[0108] The specific calculation formula of the motion model can be obtained by taking the derivative of the above error sum:
[0109]
[0110] Among them, v and a represent velocity and acceleration, S represents displacement, and t represents time. Here, the time of one frame is 1, and the time of two frames is 2.
[0111] S50c: predict the position of the target in the current frame image according to the motion prediction model, and use the position as the target position, or search for targets near the position, and if the peak sidelobe ratio is greater than a preset threshold, it is the target position. Step S50c is performed by the position prediction unit 50c.
[0112] According to the above equations, the parameters v and a of the motion model can be solved. The displacement prediction can be completed by using the calculation formula of uniform acceleration motion during prediction. At the same time, the image affine transformation from the previous frame to the current frame and the displacement caused by it to the target are calculated. The predicted position of the actual target can be obtained by summing the model prediction and the camera displacement. Then, the tracker is used to search for the target near the predicted position. When the target is found, the peak sidelobe ratio PSR will be greater than the preset threshold, and then re-tracking will be started, otherwise the prediction will continue. And if the target cannot be found within 20 frames, it is judged as tracking failure and tracking is stopped.
[0113] When the tracker runs out of images in the cache and each time tracking stops, it starts using the camera's real-time data and uses PID to calculate the gimbal's rotational angular velocity, then sends a command to rotate the gimbal. The specific calculation formula is as follows:
[0114]
[0115] e(k)=r(k)-y(k)
[0116] The parameters are as follows: u(k) represents the angular velocity of the gimbal; Kp, Ki, and Kd represent the proportional coefficient, integral parameter, and differential parameter, respectively; r(k) represents the coordinates of the current target in the image; y(k) represents the center coordinates of the image; e(k) represents the deviation of the target position from the center position; and k represents the frame number.
[0117] In summary, the present invention first initializes the tracker of the drone target detection and tracking system, so that the target can be gradually caught up by frame skipping processing without increasing the search range, and both speed and accuracy can be guaranteed. Secondly, the fHOG feature, LBP feature and grayscale feature of the current frame are extracted, the current frame is split into several equal areas, the local LBP feature and local grayscale feature of each area are fused with the fHOG feature, and the feature vectors after all the features are fused are formed into a feature matrix. The position of the maximum value of the feature matrix after convolution is the position of the target image, and the tracker is realized to track the target based on multi-feature fusion, so that the tracking can adapt to more environments, and the target can be well tracked even in complex environments; in addition, a trajectory prediction module is added, so that the system can replace the tracker for a short time when the tracker cannot work, and will not stop immediately, and can also retrieve the target and track it again, thereby improving the user experience.
[0118] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for detecting and tracking a drone target described in any one of the above embodiments is implemented.
[0119] The present invention may take the form of a computer program product implemented on one or more storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-readable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, 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, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
[0120] The above-mentioned embodiments only express several implementation methods of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, and the present invention is also intended to include these modifications and modifications.
Claims
1. A method for detecting and tracking unmanned aerial vehicle targets, characterized in that: include: Get the current frame image of the camera; Extracting the fHOG feature of the current frame image; Split the current frame image into multiple equal areas; LBP features are extracted for the pixels in each region respectively, and the LBP features of all the pixels in each region are connected in series to obtain the local LBP feature vector of each region; The grayscale features of the pixels in each area are extracted respectively, and the grayscale features of all the pixels in each area are connected in series to obtain the local grayscale feature vector of each area; The local LBP feature vector, the local grayscale feature vector and the fHOG feature of each region are connected in series to obtain the global feature vector of each region, and the global feature vectors of each region are combined into a global feature matrix; Convolve the global feature matrix, obtain the position of the maximum value of the convolved matrix, and frame the target object; If the tracker cannot recognize the target image, a group of image frame data taken before the current frame is obtained as a trajectory prediction image group, and the actual displacement of the target between each frame is calculated starting from the first frame of the trajectory prediction image group; The actual displacement is the displacement of the target when the camera is stationary; A motion trajectory is obtained by fitting the actual displacement of each frame, and a motion prediction model is established based on the motion trajectory; the position of the target in the current frame image is predicted based on the motion prediction model, and this position is used as the target location, or a target search is performed near this position. If the peak-to-sidelobe ratio is greater than a preset threshold, it is the target location.
2. The method for detecting and tracking an unmanned aerial vehicle target according to claim 1, characterized in that: Before performing image tracking, the steps to initialize the tracker include: Obtain a cache image group in the camera, and find the target frame closest to the coordinate information and the frame image in the cache image group according to the coordinate information and the target image sent by the terminal device, and input them into the tracker, which is used to extract features from the image to obtain a standard feature; Taking the image frame where the target frame is located as the starting point, repeatedly assigning serial numbers to the remaining images in the cache image group, obtaining the image to be feature extracted through sequential frame skipping processing, and inputting the image into the tracker to obtain a target feature; Convolving the standard feature and the target feature to obtain a response matrix, and calculating the peak sidelobe ratio; The peak sidelobe ratio is compared with a preset threshold value, if the peak sidelobe ratio is less than the preset threshold value, the standard feature is not updated, if the peak sidelobe ratio of the response matrix is greater than the threshold value, the standard feature is updated according to the learning rate update feature function; If the sequential frame skipping is completed, the initialization is completed; otherwise, the frame skipping continues to read the images in the cache image group and update the standard features.
3. The method for detecting and tracking an unmanned aerial vehicle target according to claim 2, characterized in that: The specific calculation formula of the response matrix is: S=F -1 [F(m)*F(x)] Where S is the response matrix, F is the Fourier transform, m is the target feature of the previous frame, and x is the feature of the search area.
4. The method for detecting and tracking an unmanned aerial vehicle target according to claim 3, characterized in that: The learning rate update characteristic function is: Where x and a are the appearance model (features) and response coefficient of the current frame, respectively, and η is the learning rate.
5. The method for detecting and tracking an unmanned aerial vehicle target according to claim 2, characterized in that: The steps of establishing the motion model are specifically as follows: An XY coordinate system is established for each image frame. Uniformly accelerated linear motion is used in the X and Y directions to perform data fitting on the motion trajectory, and the total error is calculated: The specific calculation formula of the motion model can be obtained by taking the derivative of the above error sum: Where v and a represent velocity and acceleration, S represents displacement, and t represents time.
6. A drone target detection and tracking system, characterized in that: A tracker is included, the tracker comprising: Image acquisition module: used to obtain the current frame image of the camera; fHOG feature extraction module: used to extract the fHOG feature of the current frame image; Image preprocessing module: used to split the current frame image into multiple equal areas; LBP feature extraction module: used to extract LBP features from the pixels of each area respectively, and concatenate the LBP features of all the pixels of each area to obtain the local LBP feature vector of each area; Grayscale feature extraction module: used to extract grayscale features from the pixels of each area respectively, and connect the grayscale features of all the pixels of each area in series to obtain the local grayscale feature vector of each area; Feature matrix extraction module: used to connect the local LBP feature vector, the local gray feature vector and the fHOG feature of each region in series to obtain the global feature vector of each region, and the global feature vector of each region is combined into a global feature matrix; Trajectory prediction module: used to predict the trajectory of the target when the tracker cannot recognize the target image when acquiring the current frame image of the camera. The trajectory prediction module includes: The actual displacement calculation unit is used to obtain a group of image frame data taken before the current frame as a trajectory prediction image group; starting from the first frame of the trajectory prediction image group, the actual displacement of the target between each frame is calculated in sequence, and the actual displacement is the displacement of the target when the camera is stationary; A motion model building unit: used to fit a motion trajectory according to the actual displacement of each frame, and to build a motion prediction model according to the motion trajectory; Position prediction unit: used to predict the position of the target in the current frame image according to the motion prediction model, and use this position as the target location, or search for the target near this position. If the peak sidelobe ratio is greater than a preset threshold, it is the target location.
7. The unmanned aerial vehicle target detection and tracking system according to claim 6, characterized in that: It also includes an initialization module, which specifically includes: A starting position search unit is used to obtain a cache image group in the camera, and find the target frame closest to the coordinate information and the frame image in the cache image group according to the coordinate information and the target image sent by the terminal device, and input them to the tracker, and the tracker is used to extract features from the image to obtain a standard feature; A frame skipping tracking unit is used to repeatedly assign serial numbers to the remaining images of the cached image group starting from the image frame where the target frame is located, obtain the image to be feature extracted through sequential frame skipping processing, input the image into the tracker, and obtain a target feature; A peak sidelobe ratio calculation unit is used to convolve the standard feature and the target feature to obtain a response matrix and calculate the peak sidelobe ratio; A standard feature update determination unit is used to compare the peak sidelobe ratio with a preset threshold value, if the peak sidelobe ratio is less than the preset threshold value, the standard feature is not updated, if the peak sidelobe ratio of the response matrix is greater than the threshold value, the standard feature is updated according to the learning rate update feature function; The initialization completion determination unit is used to complete the initialization if the sequential frame skipping is completed, otherwise continue to skip frames to read the images in the cache image group and update the standard features.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of a drone target detection and tracking method as described in any one of claims 1 to 5 are implemented.
