WO2023078445A1 - Target tracking method and apparatus for unmanned aerial vehicle, electronic device, and storage medium - Google Patents

Target tracking method and apparatus for unmanned aerial vehicle, electronic device, and storage medium Download PDF

Info

Publication number
WO2023078445A1
WO2023078445A1 PCT/CN2022/130282 CN2022130282W WO2023078445A1 WO 2023078445 A1 WO2023078445 A1 WO 2023078445A1 CN 2022130282 W CN2022130282 W CN 2022130282W WO 2023078445 A1 WO2023078445 A1 WO 2023078445A1
Authority
WO
WIPO (PCT)
Prior art keywords
target object
image
area
tracking
response
Prior art date
Application number
PCT/CN2022/130282
Other languages
French (fr)
Chinese (zh)
Inventor
米俊桦
邱裕鹤
周剑
吴强
Original Assignee
中移(成都)信息通信科技有限公司
中国移动通信集团有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中移(成都)信息通信科技有限公司, 中国移动通信集团有限公司 filed Critical 中移(成都)信息通信科技有限公司
Publication of WO2023078445A1 publication Critical patent/WO2023078445A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/10Simultaneous control of position or course in three dimensions
    • G05D1/101Simultaneous control of position or course in three dimensions specially adapted for aircraft
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/10Simultaneous control of position or course in three dimensions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras

Definitions

  • the present disclosure relates to the technical field of target tracking, and in particular to a method, device, electronic equipment and storage medium for target tracking of an unmanned aerial vehicle.
  • Target tracking is an important research direction of computer vision. It is to accurately find information such as the position and trajectory of the target of interest in the video sequence. Applying target tracking technology to UAVs will help improve its intelligence level.
  • the target area of interest is often affected by some environmental factors, resulting in inaccurate calculation results of the algorithm, unable to track the target stably, and eventually leading to the loss of the target.
  • Embodiments of the present disclosure provide a UAV target tracking method, device, electronic equipment, and storage medium.
  • an embodiment of the present disclosure provides a method for tracking a UAV target, the method comprising:
  • the first image data collected by the drone includes a first image and a second image; the second image is a frame of image after the first image;
  • the sending control instructions to the UAV according to the degree of occlusion of the target object includes:
  • a first control instruction is sent to the UAV, and the first control instruction is used to instruct the UAV to adjust the flight direction so that the UAV man-machine tracking of the target object;
  • a second control instruction is sent to the UAV, and the second control instruction is used to instruct the UAV to maintain a hovering state to Make the UAV continuously collect image data in the hovering state.
  • the first control instruction further includes target object motion information; the method further includes:
  • connection line between the first center point coordinates and the second center point coordinates in the pixel coordinate system obtain the angle between the connection line and the horizontal axis, and the value of the angle
  • the range is greater than or equal to 0 degrees and less than 90 degrees
  • motion information of the target object is obtained.
  • the method also includes:
  • An object detection frame in the third image in the second image data is obtained, and the target object is tracked based on the object detection frame.
  • the determining the first area where the target object in the first image is located and the second area associated with the target object in the second image includes:
  • a second center position corresponding to the first center position in the second image is determined, and the second area is determined based on the second center position.
  • the determining the first coefficient of difference between the first response peak and the second response peak includes:
  • the value of the variation coefficient is related to the comparison result between the first response peak value and the second threshold and the comparison result between the third response peak value and the second threshold value, and the third response peak value is the same
  • the maximum value among the response values corresponding to each pixel point in the area associated with the target object; the fourth image is a subsequent frame image of the first image.
  • the determining the second difference coefficient between the first tracking frame information and the second tracking frame information includes:
  • the second difference coefficient is determined according to a ratio between an area of the first tracking frame and an area of the second tracking frame.
  • the embodiment of the present disclosure also provides a UAV target tracking device, the device comprising:
  • the first acquisition module is configured to acquire the first image data collected by the drone, the first image data includes a first image and a second image; the second image is a frame of image after the first image; determining a first area where the target object in the first image is located and a second area associated with the target object in the second image;
  • the tracking module is configured to perform target tracking processing on the pixels in the first area and the second area, and respectively obtain the first response peak value and the second response value among the corresponding response values of each pixel in the first area.
  • Each pixel point in the area corresponds to the second response peak value in the response value, and respectively obtain the first tracking frame information of the target object in the first area and the second tracking frame information of the target object in the second area.
  • Tracking box information
  • a first determining module configured to determine a first difference coefficient between the first response peak value and the second response peak value, and determine a first difference coefficient between the first tracking frame information and the second tracking frame information Two coefficients of difference;
  • a control module configured to determine the degree of occlusion of the target object based on the first difference coefficient and the second difference coefficient, and send a control command to the UAV according to the degree of occlusion of the target object, the The control instruction is used to adjust the flight state of the drone.
  • control module also includes:
  • the first control submodule is configured to send a first control instruction to the UAV when the degree of occlusion of the target object is less than a first threshold, and the first control instruction is used to instruct the UAV to adjust a direction of flight to enable the drone to track the target object;
  • the second control submodule is configured to send a second control instruction to the UAV when the degree of occlusion of the target object is greater than or equal to the first threshold, and the second control instruction is used to indicate that the The man-machine maintains a hovering state, so that the drone continuously collects image data in the hovering state.
  • the first control instruction further includes target object motion information
  • the first control submodule is further configured to obtain the first central point coordinates of the pixel corresponding to the first response peak in the pixel coordinate system; the pixel corresponding to the first response peak corresponds to the The center point of the first tracking frame; obtain the second center point coordinates of the pixel corresponding to the second response peak in the pixel coordinate system; the pixel corresponding to the second response peak corresponds to the second response peak Two track the center point of the frame; determine the connection line between the first center point coordinate and the second center point coordinate under the pixel coordinate system, and obtain the angle between the connection line and the horizontal axis, The value range of the included angle is greater than or equal to 0 degrees and less than 90 degrees; based on the coordinates of the first center point, the coordinates of the second center point, and the included angle, the motion information of the target object is obtained.
  • the device also includes:
  • the second acquiring module is configured to acquire the second image data collected by the drone in a hovering state, and re-detect the target object in the second image data;
  • the second determining module is configured to obtain an object detection frame in the third image in the second image data, and track the target object based on the object detection frame.
  • the first obtaining module is configured to obtain a first area where the target object is located in the first image, and a first center position of the first area; determine the a second center position corresponding to the first center position in the second image, and determine the second area based on the second center position.
  • the first determination module is configured to determine the first difference coefficient according to the difference between the first response peak value and the second response peak value and the coefficient of variation; wherein, The value of the variation coefficient is related to the comparison result between the first response peak and the second threshold and the comparison result between the third response peak and the second threshold, and the third response peak is the target in the fourth image.
  • the maximum value among the response values corresponding to each pixel in the area associated with the object; the fourth image is an image in a subsequent frame of the first image.
  • the first determining module is configured to determine the area of the first tracking frame according to the first tracking frame information, and determine the area of the second tracking frame according to the second tracking frame information;
  • the second difference coefficient is determined according to a ratio between an area of the first tracking frame and an area of the second tracking frame.
  • the embodiment of the present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the drone target tracking described in the first aspect of the embodiment of the present disclosure is realized. method steps.
  • an embodiment of the present disclosure further provides an electronic device, including: a processor and a memory for storing a computer program that can run on the processor, wherein, when the processor is used to run the computer program, The steps of the UAV target tracking method described in the foregoing first aspect of the embodiments of the present disclosure are executed.
  • the technical solution provided by the embodiment of the present disclosure acquires the first image data collected by the drone, and the first image data includes a first image and a second image; the second image is a frame after the first image image; determining a first area where the target object in the first image is located and a second area associated with the target object in the second image; pixels in the first area and the second area Points to perform target tracking processing, respectively obtain the first response peak value in the corresponding response value of each pixel point in the first area and the second response peak value in the corresponding response value of each pixel point in the second area, and obtain the corresponding First tracking frame information of the target object in the first area and second tracking frame information of the target object in the second area; determining a difference between the first response peak value and the second response peak value The first difference coefficient between, and determine the second difference coefficient between the first tracking frame information and the second tracking frame information; determine the target based on the first difference coefficient and the second difference coefficient According to the occlusion degree of the target object, a control instruction is sent to the UAV
  • the embodiments of the present disclosure combine multi-frame response peak values and tracking frame size change data to determine whether the target object is completely occluded, which can reduce the occlusion misjudgment rate and improve the robustness of the occlusion determination method; generate UAV control information based on the target object motion information , and then use the network to transmit the control command to the UAV, so as to realize the real-time target object tracking of the UAV.
  • FIG. 1 is a schematic diagram of a UAV target tracking system according to an embodiment of the present disclosure
  • FIG. 2 is a first schematic flow diagram of a UAV target tracking method according to an embodiment of the present disclosure
  • FIG. 3 is a second schematic flow diagram of the UAV target tracking method according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of an unmanned aerial vehicle target tracking device according to an embodiment of the present disclosure
  • FIG. 5 is a schematic diagram of a hardware composition structure of an electronic device according to an embodiment of the disclosure.
  • the UAV target tracking method of the embodiment of the present disclosure can be applied to the UAV target tracking system shown in Figure 1,
  • the UAV target tracking system includes a UAV system, a UAV cloud platform, and an information transmission system, wherein
  • the UAV system can transmit the image data collected by the camera to the UAV cloud platform through the airborne communication terminal through the public network (such as 4G or 5G mobile communication network) or private network for monitoring.
  • the public network such as 4G or 5G mobile communication network
  • the UAV cloud platform processes the collected image data to obtain the flight control instruction of the UAV
  • the UAV flight control command is sent to the UAV through the communication system to control the flight of the UAV.
  • system structure shown in FIG. 1 is only some optional system structures applied to the UAV target tracking method of the embodiment of the present disclosure, and the system applied in the embodiment of the present disclosure is not limited to that shown in FIG. 1 .
  • FIG. 2 is a first schematic flow diagram of a method for tracking a UAV target according to an embodiment of the present disclosure; as shown in FIG. 2 , the method includes:
  • Step 101 Obtain the first image data collected by the drone, the first image data includes a first image and a second image; the second image is a frame of image after the first image; determine the first image a first region in an image where the target object is located and a second region associated with the target object in the second image;
  • Step 102 Perform target tracking processing on the pixels in the first area and the second area, and respectively obtain the first response peak value among the corresponding response values of each pixel point in the first area and the first response peak value in the second area.
  • Each pixel corresponds to the second response peak value in the response value, and respectively obtains the first tracking frame information of the target object in the first area and the second tracking frame information of the target object in the second area information;
  • Step 103 Determine a first difference coefficient between the first response peak value and the second response peak value, and determine a second difference coefficient between the first tracking frame information and the second tracking frame information;
  • Step 104 Determine the degree of occlusion of the target object based on the first difference coefficient and the second difference coefficient, and send a control instruction to the drone according to the degree of occlusion of the target object, the control instruction Used to adjust the flight state of the drone.
  • the UAV target tracking method of this embodiment is applied in the UAV target tracking device, and the UAV target tracking device can be set in electronic devices with processing functions such as personal computers, mobile terminals, servers, etc., or executed by a processor implemented by computer programs.
  • the electronic device is the drone cloud platform shown in FIG. 1 .
  • the drone is controlled to fly to a position where its camera system (or camera) can capture a clear picture including the target object, and images are collected in real time through the camera system of the drone.
  • the UAV cloud platform obtains the image data collected by the UAV (denoted as the first image data), determines the target object to be tracked from the first image in the first image data, and determines the location of the target object in the first image. the first area of .
  • a second area associated with the target object in a frame of image after the first image is determined; wherein, the second area may be The area where the target object is located in the second image, or, because the target object may move fast, the second area may only include part of the target object, or even not include the target object.
  • the second image is separated from the first image by k frames, and the value of k may be set according to the moving speed of the target object. The faster the moving speed of the target object, the larger the value of k.
  • the pixel points of the first region and the second region are respectively used to obtain a correlation filter response map using a Discriminative Scale Space Tracking (DSST, Discriminative Scale Space Tracking) algorithm, and each response value in the filter response map Corresponding to each pixel point in the first area and the second area respectively; then respectively obtain the response peak value (denoted as the first response peak value) in the corresponding response value of each pixel point in the first area and the response peak value in the second area
  • DSST Discriminative Scale Space Tracking
  • Each pixel corresponds to the response peak value in the response value (denoted as the second response peak value), and the response peak value is the maximum value among the response values in the filtering response graph; the pixel point corresponding to the response peak value is the center position of the target object.
  • first tracking frame information and the second tracking frame information include at least the size of the tracking frame of the target object in the first image and the second image, such as the width and height of the tracking frame.
  • the first difference coefficient determined based on the first response peak value and the second response peak value represents the degree of difference or change degree of the center position of the target object in the first image and the second image.
  • the second difference coefficient determined based on the first tracking frame information and the second tracking frame information represents a degree of difference or a degree of change in the size of the tracking frame of the target object in the first image and the second image.
  • the degree of occlusion indicates the degree of occlusion of the target object, Or the degree of occlusion may also represent the presence, partial presence or absence of the target object in the second image; and then send control instructions to the drone according to the degree of occlusion of the target object, and the control instructions are used to adjust The flight status of the drone is used to facilitate the drone to find the target object more quickly.
  • combining multi-frame response peak values and tracking frame size change data to determine whether the target object is completely occluded can reduce the occlusion misjudgment rate and improve the robustness of the occlusion determination method; according to the target object
  • the degree of occlusion sends control instructions to the UAV, which realizes real-time target object tracking of the UAV.
  • the determining the first area where the target object in the first image is located and the second area associated with the target object in the second image includes: obtaining the The first area where the target object is located in the first image, and the first center position of the first area; determining a second center position corresponding to the first center position in the second image, based on the The second center position determines the second area.
  • the UAV cloud platform reads a frame of image in the first image data collected by the UAV, that is, the first image, and the operator can manually use a rectangular frame in the first image. Select the first area where the target object to be tracked is located.
  • the abscissa of the upper left corner of the rectangular frame is marked as X tk
  • the vertical coordinate of the upper left corner is marked as Y tk
  • the width of the rectangular frame is marked as W tk
  • the height is marked as H tk to obtain the first center position of the first area
  • the second center position can be As the center, the second area is determined with a preset width and a preset height; wherein, the size of the preset width and the preset height can be the same as the width (such as W tk ) and height (such as H tk ) of the above-mentioned first region , or greater than the width (such as W tk ) and height (such as H tk ) of the above-mentioned first region.
  • the above-mentioned first area and the second area can be used as the search area, and target tracking processing is performed in the search area, for example, the DSST algorithm is used to track the pixels in the first area and the second area, so as to obtain the first a first response peak in an area and a second response peak in a second area, and obtaining first tracking frame information of the target object in the first area and the target in the second area respectively The object's second tracking frame information.
  • the determining the first difference coefficient between the first response peak and the second response peak includes: according to the first response peak and the second response The difference between the peak values and the coefficient of variation determine the first coefficient of difference; wherein, the value of the coefficient of variation and the comparison result between the first response peak value and the second threshold value and the difference between the third response peak value and the second threshold value The comparison results are related, the third response peak value is the maximum value of the response values corresponding to the pixels in the region associated with the target object in the fourth image; the fourth image is the maximum value of the first image next frame image.
  • next frame image of the first image is recorded as the fourth image
  • the maximum value among the response values corresponding to the pixels in the area associated with the target object in the fourth image is recorded as the third response peak.
  • the first response peak value is recorded as rtk
  • the second response peak value is recorded as rt
  • the third response peak value is recorded as rt -k+1 .
  • the first difference coefficient is determined according to the difference between the first response peak value and the second response peak value and the variation coefficient, the first difference coefficient is denoted as R t , and the variation coefficient is denoted as ⁇ .
  • the value of the variation coefficient ⁇ is 1; otherwise, the value of the variation coefficient ⁇ is 0.
  • the determining the second difference coefficient between the first tracking frame information and the second tracking frame information includes: determining the first tracking frame information according to the first tracking frame information The area of the tracking frame, determining the area of the second tracking frame according to the information of the second tracking frame; determining the second difference coefficient according to the ratio between the area of the first tracking frame and the area of the second tracking frame .
  • the information of the first tracking frame includes the width w tk and the height h tk of the tracking frame
  • the information of the second tracking frame includes the width w t and the height h t of the tracking frame. Therefore, the information of the second tracking frame
  • the area is w t *h t
  • the area of the first tracking frame is w tk *h tk
  • the second difference coefficient is denoted as S t .
  • the value of the second difference coefficient S t is 1, otherwise the second The value of the difference coefficient S t is 0, and the value of the second threshold ⁇ can be set according to the actual scene.
  • the occlusion degree of the target object determined based on the first difference coefficient and the second difference coefficient can be represented by an occlusion determination function, and the value of the occlusion determination function represents the occlusion degree of the target object. degree of occlusion.
  • the occlusion judgment function is denoted as f t
  • the occlusion judgment function can be expressed by the following expression:
  • the UAV is controlled to track the target object.
  • step 104 in the foregoing embodiments is described in detail.
  • the sending of control instructions to the UAV according to the degree of occlusion of the target object includes two results, as shown in FIG. 3 , step 104 may include:
  • Step 104a when the degree of occlusion of the target object is less than a first threshold, send a first control instruction to the UAV, the first control instruction is used to instruct the UAV to adjust the flight direction so that the drone tracks the target object;
  • Step 104b when the degree of occlusion of the target object is greater than or equal to the first threshold, send a second control instruction to the UAV, the second control instruction is used to instruct the UAV to maintain hovering state, so that the UAV continuously collects image data in the hovering state.
  • control instructions are sent to the UAV according to the degree of occlusion of the target object, and the UAV is controlled to track the target object when the target object is not completely occluded.
  • the target re-detection is carried out, so as to realize the real-time tracking of the target.
  • the first control instruction further includes target object motion information; the method further includes: obtaining the first center point of the pixel point corresponding to the first response peak value in the pixel coordinate system Coordinates; the pixel point corresponding to the first response peak value corresponds to the center point of the first tracking frame; obtain the second center point coordinates of the pixel point corresponding to the second response peak value in the pixel coordinate system; The pixel point corresponding to the second response peak value corresponds to the center point of the second tracking frame; the connection line between the first center point coordinate and the second center point coordinate is determined in the pixel coordinate system, Obtain the angle between the connecting line and the horizontal axis, the value range of the angle is greater than or equal to 0 degrees and less than 90 degrees; based on the coordinates of the first center point, the coordinates of the second center point and the The included angle is used to obtain the motion information of the target object.
  • the coordinates of the first central point of the pixel corresponding to the first response peak in the pixel coordinate system are obtained
  • the pixel point corresponding to the first response peak value corresponds to the center point of the first tracking frame; obtain the second center point coordinates of the pixel point corresponding to the second response peak value in the pixel coordinate system
  • the pixel point corresponding to the second response peak value corresponds to the center point of the second tracking frame; determine the connection line between the first center point coordinates and the second center point coordinates in the pixel coordinate system , to obtain the angle ⁇ between the connection line and the horizontal axis, and the angle ⁇ satisfies the following expression; wherein the value range of the angle ⁇ is greater than or equal to 0 degrees and less than 90 degrees:
  • the target object moves to the right front of the drone; if Then the target object moves to the right rear of the UAV; if Then the tracking target moves to the left front of the UAV; if Then the target object moves to the left rear of the drone; the angle between the moving direction of the target object and the horizontal direction is ⁇ .
  • a control command is sent to the UAV, instructing the UAV to adjust the flight direction according to the motion direction of the target object, so that the UAV tracks the target object.
  • the UAV control command is calculated by using the motion information of the target object, and then the control command is transmitted to the airborne communication terminal on the UAV in real time using the network, and then it is controlled by the UAV flight control. In flight state, the UAV can automatically track the target.
  • the method further includes: obtaining second image data collected by the drone in a hovering state, and re-detecting the target object in the second image data; obtaining the An object detection frame in the third image in the second image data, and track the target object based on the object detection frame.
  • the UAV cloud platform issues a second control command, so that no one The drone is in a hovering state, allowing the drone to re-acquire image data.
  • the UAV cloud platform obtains three consecutive frames of images in the second image data collected by the UAV in the hovering state, and converts the three frames of images from RGB format to grayscale images, denoted as IT , I T+1 , I T+2 ; I T and I T+1 are subtracted and binarized, and the result obtained is recorded as I b1 ; I T+1 and I T+2 are subtracted and binarized process, the result obtained is recorded as I b2 ; I b1 and I b2 are ANDed, and the result is recorded as I and ; I and is opened, and the calculation steps of the open operation are first erosion operation, and then expansion operation (specific implementation The process can refer to any processing process of the conventional open operation), and the obtained result is recorded as I open ; the object outline is detected in I open , if the object outline area is within a given range, the object outline is retained, and the object is obtained The smallest circumscribing rectangle of the outline, (xi , y i , w
  • w tk-1 *h tk-1 is the area of the tracking frame before the target object is lost
  • w i *h i is the area of the rectangular frame of the i-th object.
  • the three-frame difference method can be used to detect the lost target object, and the target object position can be updated by combining the historical motion information of the target object and the detected target object detection frame. Continue Track the target object.
  • the method for tracking a drone target will be described in detail below with reference to a specific example.
  • the methods include:
  • Step 301 Acquire the first image data collected by the drone, the first image data includes a first image and a second image; the second image is a frame of image after the first image.
  • Step 302 Obtain the first area where the target object is located in the first image, and the first center position of the first area; determine the second center position corresponding to the first center position in the second image, based on the The second center position is used to obtain the second area.
  • Step 303 Perform target tracking processing on the pixels in the first area and the second area, and respectively obtain the first response peak value among the corresponding response values of each pixel point in the first area and the first response peak value in the second area.
  • Each pixel corresponds to the second response peak value in the response value, and respectively obtains the first tracking frame information of the target object in the first area and the second tracking frame information of the target object in the second area information.
  • Step 304 Determine the first coefficient of difference according to the difference between the first response peak value and the second response peak value and the variation coefficient; wherein, the value of the variation coefficient is the same as the first response peak value and the It is related to the comparison result of the second threshold and the comparison result of the third response peak and the second threshold, the third response peak is the response value corresponding to each pixel in the region associated with the target object in the fourth image The maximum value in ; the fourth image is the next frame image of the first image.
  • Step 305 Determine the area of the first tracking frame according to the first tracking frame information, and determine the area of the second tracking frame according to the second tracking frame information; according to the area of the first tracking frame and the second tracking frame The ratio between the areas of the boxes determines the second coefficient of difference.
  • Step 306 Determine the occlusion degree of the target object based on the first difference coefficient and the second difference coefficient.
  • Step 307a When the occlusion degree of the target object is less than a first threshold, determine that the target object is not completely occluded.
  • Step 308a Obtain the coordinates of the first center point of the pixel point corresponding to the first response peak value in the pixel coordinate system; the pixel point corresponding to the first response peak value corresponds to the center point of the first tracking frame;
  • connection line between the first center point coordinates and the second center point coordinates in the pixel coordinate system obtain the angle between the connection line and the horizontal axis, and the value of the angle
  • the range is greater than or equal to 0 degrees and less than 90 degrees
  • motion information of the target object is obtained.
  • Step 309a Sending a first control instruction to the UAV, where the first control instruction is used to instruct the UAV to adjust the flight direction so that the UAV tracks the target object.
  • Step 307b When the occlusion degree of the target object is greater than or equal to the first threshold, determine that the target object is completely occluded.
  • Step 308b Obtain the second image data collected by the drone in the hovering state, and re-detect the target object in the second image data.
  • Step 309b Obtain an object detection frame in the third image in the second image data, and track the target object based on the object detection frame.
  • combining multi-frame response peak values and tracking frame size change data to determine whether the target object is completely occluded can reduce the occlusion misjudgment rate and improve the robustness of the occlusion determination method; UAV control information, and then use the network to transmit control instructions to the UAV to realize real-time target tracking of the UAV; for the loss of the target object, use the three-frame difference method, combined with the historical motion information of the target object and detected target object, update the target object position and continue tracking.
  • FIG. 4 is a schematic structural diagram of a UAV target tracking device in an embodiment of the present disclosure. As shown in FIG. 4 , the device includes:
  • the first acquisition module 201 is configured to acquire the first image data collected by the drone, the first image data includes a first image and a second image; the second image is a frame of image after the first image ; determining a first area where the target object in the first image is located and a second area associated with the target object in the second image;
  • the tracking module 202 is configured to perform target tracking processing on the pixels in the first area and the second area, and respectively obtain the first response peak value and the second response value among the corresponding response values of each pixel in the first area.
  • Each pixel point in the second area corresponds to the second response peak value in the response value, and obtain the first tracking frame information of the target object in the first area and the first tracking frame information of the target object in the second area respectively.
  • the first determining module 203 is configured to determine a first difference coefficient between the first response peak value and the second response peak value, and determine a difference coefficient between the first tracking frame information and the second tracking frame information Second coefficient of difference;
  • the control module 204 is configured to determine the degree of occlusion of the target object based on the first difference coefficient and the second difference coefficient, and send a control instruction to the UAV according to the degree of occlusion of the target object, so The control instructions are used to adjust the flight state of the drone.
  • control module 204 further includes:
  • the first control submodule is configured to send a first control instruction to the UAV when the degree of occlusion of the target object is less than a first threshold, and the first control instruction is used to instruct the UAV to adjust a direction of flight to enable the drone to track the target object;
  • the second control submodule is configured to send a second control instruction to the UAV when the degree of occlusion of the target object is greater than or equal to the first threshold, and the second control instruction is used to indicate that the The man-machine maintains a hovering state, so that the drone continuously collects image data in the hovering state.
  • the first control instruction further includes target object motion information
  • the first control submodule is further configured to obtain the first central point coordinates of the pixel corresponding to the first response peak in the pixel coordinate system; the pixel corresponding to the first response peak corresponds to the The center point of the first tracking frame; obtain the second center point coordinates of the pixel corresponding to the second response peak in the pixel coordinate system; the pixel corresponding to the second response peak corresponds to the second response peak Two track the center point of the frame; determine the connection line between the first center point coordinate and the second center point coordinate under the pixel coordinate system, and obtain the angle between the connection line and the horizontal axis, The value range of the included angle is greater than or equal to 0 degrees and less than 90 degrees; based on the coordinates of the first center point, the coordinates of the second center point, and the included angle, the motion information of the target object is obtained.
  • the device further includes:
  • the second acquiring module is configured to acquire the second image data collected by the drone in a hovering state, and re-detect the target object in the second image data;
  • the second determination module is configured to obtain an object detection frame in the third image in the second image data, and track the target object based on the object detection frame.
  • the first obtaining module 201 is configured to obtain a first area where the target object is located in the first image, and a first center position of the first area ; determining a second center position corresponding to the first center position in the second image, and determining the second area based on the second center position.
  • the first determining module 203 is configured to determine the first difference coefficient according to the difference and variation coefficient between the first response peak value and the second response peak value ; Wherein, the value of the variation coefficient is related to the comparison result between the first response peak value and the second threshold value and the comparison result between the third response peak value and the second threshold value, and the third response peak value is related to the comparison result between the fourth image and the second threshold value
  • the maximum value among the response values corresponding to the pixel points in the area associated with the target object; the fourth image is a subsequent frame image of the first image.
  • the first determining module 203 is configured to determine the area of the first tracking frame according to the first tracking frame information, and determine the second tracking frame according to the second tracking frame information area; determine the second difference coefficient according to the ratio between the area of the first tracking frame and the area of the second tracking frame.
  • the device can be applied to electronic equipment.
  • the first acquisition module 201, the tracking module 202, the first determination module 203, and the control module 204 in the described device all can be composed of a central processing unit (CPU, Central Processing Unit), a digital signal processor (DSP, Digital Signal Processor), Microcontroller Unit (MCU, Microcontroller Unit) or Programmable Gate Array (FPGA, Field-Programmable Gate Array) implementation.
  • CPU Central Processing Unit
  • DSP Digital Signal Processor
  • MCU Microcontroller Unit
  • FPGA Field-Programmable Gate Array
  • FIG. 5 is a schematic diagram of a hardware composition structure of an electronic device according to an embodiment of the disclosure.
  • an electronic device 400 includes a processor 401 and a memory 402 for storing a computer program that can run on the processor 401, wherein, when the processor 401 is used to run the computer program, execute the present disclosure The steps of the method described in the examples.
  • the electronic device 400 may further include at least one network interface 403 .
  • Various components in the electronic device 400 are coupled together through the bus system 404 .
  • the bus system 404 is used to realize connection and communication between these components.
  • the bus system 404 also includes a power bus, a control bus and a status signal bus.
  • the various buses are labeled as bus system 404 in FIG. 5 .
  • the memory 402 may be a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories.
  • the non-volatile memory can be read-only memory (ROM, Read Only Memory), programmable read-only memory (PROM, Programmable Read-Only Memory), erasable programmable read-only memory (EPROM, Erasable Programmable Read-Only Memory) Only Memory), Electrically Erasable Programmable Read-Only Memory (EEPROM, Electrically Erasable Programmable Read-Only Memory), Magnetic Random Access Memory (FRAM, ferromagnetic random access memory), Flash Memory (Flash Memory), Magnetic Surface Memory , CD, or CD-ROM (Compact Disc Read-Only Memory); magnetic surface storage can be disk storage or tape storage.
  • the volatile memory may be random access memory (RAM, Random Access Memory), which is used as an external cache.
  • RAM random access memory
  • RAM Random Access Memory
  • many forms of RAM are available, such as Static Random Access Memory (SRAM, Static Random Access Memory), Synchronous Static Random Access Memory (SSRAM, Synchronous Static Random Access Memory), Dynamic Random Access Memory Memory (DRAM, Dynamic Random Access Memory), synchronous dynamic random access memory (SDRAM, Synchronous Dynamic Random Access Memory), double data rate synchronous dynamic random access memory (DDRSDRAM, Double Data Rate Synchronous Dynamic Random Access Memory), enhanced Synchronous Dynamic Random Access Memory (ESDRAM, Enhanced Synchronous Dynamic Random Access Memory), Synchronous Link Dynamic Random Access Memory (SLDRAM, SyncLink Dynamic Random Access Memory), Direct Memory Bus Random Access Memory (DRRAM, Direct Rambus Random Access Memory ).
  • the memory 402 described in embodiments of the present disclosure is intended to include, but is not limited to, these and any other suitable types of memory.
  • the memory 402 in the embodiment of the present disclosure is used to store various types of data to support the operation of the electronic device 400 .
  • the methods disclosed in the foregoing embodiments of the present disclosure may be applied to the processor 401 or implemented by the processor 401 .
  • the processor 401 may be an integrated circuit chip and has signal processing capability. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 401 or instructions in the form of software.
  • the aforementioned processor 401 may be a general-purpose processor, DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like.
  • the processor 401 may implement or execute various methods, steps, and logic block diagrams disclosed in the embodiments of the present disclosure.
  • a general purpose processor may be a microprocessor or any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present disclosure may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor.
  • the software module may be located in a storage medium, and the storage medium is located in the memory 402.
  • the processor 401 reads the information in the memory 402, and completes the steps of the foregoing method in combination with its hardware.
  • the electronic device 400 may be implemented by one or more Application Specific Integrated Circuit (ASIC, Application Specific Integrated Circuit), Programmable Logic Device (PLD, Programmable Logic Device), Complex Programmable Logic Device (CPLD, Complex Programmable Logic Device), FPGA, general-purpose processor, controller, MCU, microprocessor (Microprocessor), or other electronic components to implement the aforementioned method.
  • ASIC Application Specific Integrated Circuit
  • PLD Programmable Logic Device
  • CPLD Complex Programmable Logic Device
  • FPGA general-purpose processor
  • controller MCU
  • microprocessor Microprocessor
  • the embodiment of the present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for tracking a UAV target in the embodiment of the present disclosure are implemented.
  • the disclosed devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division.
  • the coupling, or direct coupling, or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical or other forms of.
  • the units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units; Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may be used as a single unit, or two or more units may be integrated into one unit; the above-mentioned integration
  • the unit can be realized in the form of hardware or in the form of hardware plus software functional unit.
  • the above-mentioned integrated units of the present disclosure are realized in the form of software function modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.
  • the computer software products are stored in a storage medium, including several instructions for Make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the methods described in various embodiments of the present disclosure.
  • the aforementioned storage medium includes: various media capable of storing program codes such as removable storage devices, ROM, RAM, magnetic disks or optical disks.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Automation & Control Theory (AREA)
  • Geometry (AREA)
  • Multimedia (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

Embodiments of the present disclosure relate to the technical field of target tracking, and disclose a target tracking method and apparatus for an unmanned aerial vehicle, an electronic device, and a storage medium. The method comprises: acquiring first image data collected by an unmanned aerial vehicle, and determining a first region where a target object in a first image is located and a second region associated with the target object in a second image; obtaining a first response peak value in response values corresponding to pixels in the first region and a second response peak value in response values corresponding to pixels in the second region, and obtaining first tracking box information of the target object in the first region and second tracking frame information of the target object in the second region; determining a first difference coefficient between the first response peak value and the second response peak value, and determining a second difference coefficient between the first tracking frame information and the second tracking frame information; and determining the degree of occlusion of the target object on the basis of the first difference coefficient and the second difference coefficient, and sending a control instruction to the unmanned aerial vehicle according to the degree of occlusion. Thus, real-time target object tracking of the unmanned aerial vehicle is achieved.

Description

一种无人机目标跟踪方法、装置、电子设备及存储介质A UAV target tracking method, device, electronic equipment and storage medium
相关申请的交叉引用Cross References to Related Applications
本公开基于申请号为202111306538.1、申请日为2021年11月05日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式并入本公开。This disclosure is based on a Chinese patent application with application number 202111306538.1 and a filing date of November 05, 2021, and claims the priority of this Chinese patent application. The entire content of this Chinese patent application is hereby incorporated into this disclosure by reference.
技术领域technical field
本公开涉及目标跟踪技术领域,具体涉及一种无人机目标跟踪方法、装置、电子设备及存储介质。The present disclosure relates to the technical field of target tracking, and in particular to a method, device, electronic equipment and storage medium for target tracking of an unmanned aerial vehicle.
背景技术Background technique
近年来,无人机在农业植保、电力巡检、交通巡查、安防、消防等领域已有广泛的应用。目标跟踪是计算机视觉的一个重要研究方向,是在视频序列中准确找到感兴趣目标的位置及运动轨迹等信息,将目标跟踪技术应用到无人机有助于提升其智能化水平。In recent years, drones have been widely used in agricultural plant protection, power inspection, traffic inspection, security, fire protection and other fields. Target tracking is an important research direction of computer vision. It is to accurately find information such as the position and trajectory of the target of interest in the video sequence. Applying target tracking technology to UAVs will help improve its intelligence level.
而在实际跟踪应用中,感兴趣的目标区域往往会受到一些环境因素的影响,导致算法计算结果不准确,无法稳定跟踪目标,最终导致目标丢失。直接使用响应峰值来判断目标是否丢失,存在较高的误判率,不具有较好的鲁棒性;利用连续帧间差分法重新检测目标,当目标移动速度较慢时可以检测出目标,但不适用于跟踪目标快速移动的场景。因此,现有技术难以准确判断目标是否丢失。However, in actual tracking applications, the target area of interest is often affected by some environmental factors, resulting in inaccurate calculation results of the algorithm, unable to track the target stably, and eventually leading to the loss of the target. Directly use the response peak value to judge whether the target is lost, there is a high misjudgment rate, and it does not have good robustness; the continuous frame difference method is used to re-detect the target, and the target can be detected when the moving speed of the target is slow, but It is not suitable for scenes where the tracking target moves quickly. Therefore, it is difficult for the prior art to accurately determine whether the target is lost.
发明内容Contents of the invention
本公开实施例提供一种无人机目标跟踪方法、装置、电子设备及存储介质。Embodiments of the present disclosure provide a UAV target tracking method, device, electronic equipment, and storage medium.
本公开实施例的技术方案是这样实现的:The technical scheme of the embodiment of the present disclosure is realized in this way:
第一方面,本公开实施例提供了一种无人机目标跟踪方法,所述方法包括:In a first aspect, an embodiment of the present disclosure provides a method for tracking a UAV target, the method comprising:
获取无人机采集的第一图像数据,所述第一图像数据包括第一图像和第二图像;所述第二图像为所述第一图像后的一帧图像;Obtain the first image data collected by the drone, the first image data includes a first image and a second image; the second image is a frame of image after the first image;
确定所述第一图像中的目标对象所在的第一区域以及所述第二图像中的所述目标对象相关联的第二区域;对所述第一区域和所述第二区域的像素点进行目标跟踪处理,分别获得所述第一区域中各像素点对应响应值中的第一响应峰值以及所述第二区域中各像素点对应响应值中的第二响应峰值,以及分别获得所述第一区域中的所述目标对象的第一跟踪框信息以及所述第二区域中的所述目标对象的第二跟踪框信息;Determining a first area where the target object in the first image is located and a second area associated with the target object in the second image; performing pixel points in the first area and the second area Target tracking processing, respectively obtaining the first response peak value in the response value corresponding to each pixel point in the first area and the second response peak value in the response value corresponding to each pixel point in the second area, and respectively obtaining the first response peak value in the response value corresponding to each pixel point in the second area; First tracking frame information of the target object in an area and second tracking frame information of the target object in the second area;
确定所述第一响应峰值和所述第二响应峰值之间的第一差异系数,以及确定所述第一跟踪框信息和所述第二跟踪框信息之间的第二差异系数;determining a first coefficient of difference between the first peak response and the second peak response, and determining a second coefficient of difference between the first tracking frame information and the second tracking frame information;
基于所述第一差异系数和所述第二差异系数确定所述目标对象的被遮挡程度,根据所述目标对象的被遮挡程度向所述无人机发送控制指令,所述控制指令用于调整所述无人机的飞行状态。Determine the degree of occlusion of the target object based on the first difference coefficient and the second difference coefficient, and send a control instruction to the UAV according to the degree of occlusion of the target object, and the control instruction is used to adjust The flight state of the drone.
在本公开的一些实施例中,所述根据所述目标对象的被遮挡程度向所述无人机发送控制指令,包括:In some embodiments of the present disclosure, the sending control instructions to the UAV according to the degree of occlusion of the target object includes:
当所述目标对象的被遮挡程度小于第一阈值时,向所述无人机发送第一控制指令,所述第一控制指令用于指示所述无人机调整飞行方向,以使所述无人机跟踪所述目标对象;When the degree of occlusion of the target object is less than the first threshold, a first control instruction is sent to the UAV, and the first control instruction is used to instruct the UAV to adjust the flight direction so that the UAV man-machine tracking of the target object;
当所述目标对象被遮挡程度大于或等于所述第一阈值时,向所述无人机发送第二控制指令,所述第二控制指令用于指示所述无人机维持悬停状态,以使所述无人机在所述悬停状态下连续采集图像数据。When the degree of occlusion of the target object is greater than or equal to the first threshold, a second control instruction is sent to the UAV, and the second control instruction is used to instruct the UAV to maintain a hovering state to Make the UAV continuously collect image data in the hovering state.
在本公开的一些实施例中,所述第一控制指令中还包括目标对象运动信息;所述方法还包括:In some embodiments of the present disclosure, the first control instruction further includes target object motion information; the method further includes:
获得所述第一响应峰值对应的像素点在像素坐标系下的第中心点一坐标;所述第一响应峰值对应的像素点对应于所述第一跟踪框的中心点;Obtaining the coordinates of the first central point of the pixel corresponding to the first response peak in the pixel coordinate system; the pixel corresponding to the first response peak corresponds to the central point of the first tracking frame;
获得所述第二响应峰值对应的像素点在所述像素坐标系下的第二中心点坐标;所述第二响应峰值对应的像素点对应于所述第二跟踪框的中心点;Obtaining the second center point coordinates of the pixel point corresponding to the second response peak value in the pixel coordinate system; the pixel point corresponding to the second response peak value corresponds to the center point of the second tracking frame;
在所述像素坐标系下确定所述第一中心点坐标和所述第二中心点坐标之间的连线,获得所述连线与水平轴之间的夹角,所述夹角的取值范围为大于等于0度小于90度;Determine the connection line between the first center point coordinates and the second center point coordinates in the pixel coordinate system, obtain the angle between the connection line and the horizontal axis, and the value of the angle The range is greater than or equal to 0 degrees and less than 90 degrees;
基于所述第一中心点坐标、所述第二中心点坐标及所述夹角,获得所述目标对象运动信息。Based on the coordinates of the first center point, the coordinates of the second center point, and the included angle, motion information of the target object is obtained.
在本公开的一些实施例中,所述方法还包括:In some embodiments of the present disclosure, the method also includes:
获得所述无人机在悬停状态下采集的第二图像数据,重新检测所述第二图像数据中的所述目标对象;Obtaining second image data collected by the drone in a hovering state, and re-detecting the target object in the second image data;
获得所述第二图像数据中的第三图像中的物体检测框,基于所述物体检测框对所述目标对象进行跟踪。An object detection frame in the third image in the second image data is obtained, and the target object is tracked based on the object detection frame.
在本公开的一些实施例中,所述确定所述第一图像中的目标对象所在的第一区域以及所述第二图像中的目标对象相关联的第二区域,包括:In some embodiments of the present disclosure, the determining the first area where the target object in the first image is located and the second area associated with the target object in the second image includes:
获得所述第一图像中的所述目标对象所在的第一区域,以及所述第一区域的第一中心位置;Obtain a first area where the target object is located in the first image, and a first center position of the first area;
确定所述第二图像中与所述第一中心位置对应的第二中心位置,基于所述第二中心位置确定所述第二区域。A second center position corresponding to the first center position in the second image is determined, and the second area is determined based on the second center position.
在本公开的一些实施例中,所述确定所述第一响应峰值和所述第二响应峰值之间的第一差异系数,包括:In some embodiments of the present disclosure, the determining the first coefficient of difference between the first response peak and the second response peak includes:
根据所述第一响应峰值和所述第二响应峰值之间的差值和变化系数确定所述第一差异系数;determining the first coefficient of difference based on a difference between the first peak response and the second peak response and a coefficient of variation;
其中,所述变化系数的取值与所述第一响应峰值与第二阈值的比较结果以及第三响应峰值与第二阈值的比较结果相关,所述第三响应峰值为第四图像中与所述目标对象相关联的区域中的各像素点对应的响应值中的最大值;所述第四图像为所述第一图像的后一帧图像。Wherein, the value of the variation coefficient is related to the comparison result between the first response peak value and the second threshold and the comparison result between the third response peak value and the second threshold value, and the third response peak value is the same The maximum value among the response values corresponding to each pixel point in the area associated with the target object; the fourth image is a subsequent frame image of the first image.
在本公开的一些实施例中,所述确定所述第一跟踪框信息和所述第二跟踪框信息之间的第二差异系数,包括:In some embodiments of the present disclosure, the determining the second difference coefficient between the first tracking frame information and the second tracking frame information includes:
根据所述第一跟踪框信息确定第一跟踪框的面积,根据所述第二跟踪框信息确定第二跟踪框的面积;determining the area of the first tracking frame according to the first tracking frame information, and determining the area of the second tracking frame according to the second tracking frame information;
根据所述第一跟踪框的面积和所述第二跟踪框的面积之间的比值确定所述第二差异系数。The second difference coefficient is determined according to a ratio between an area of the first tracking frame and an area of the second tracking frame.
第二方面,本公开实施例还提供了一种无人机目标跟踪装置,所述装置包括:In the second aspect, the embodiment of the present disclosure also provides a UAV target tracking device, the device comprising:
第一获取模块,配置为获取无人机采集的第一图像数据,所述第一图像数据包括第一图像和第二图像;所述第二图像为所述第一图像后的一帧图像;确定所述第一图像中的目标对象所在的第一区域以及所述第二图像中的所述目标对象相关联的第二区域;The first acquisition module is configured to acquire the first image data collected by the drone, the first image data includes a first image and a second image; the second image is a frame of image after the first image; determining a first area where the target object in the first image is located and a second area associated with the target object in the second image;
跟踪模块,配置为对所述第一区域和所述第二区域的像素点进行目标 跟踪处理,分别获得所述第一区域中各像素点对应响应值中的第一响应峰值以及所述第二区域中各像素点对应响应值中的第二响应峰值,以及分别获得所述第一区域中的所述目标对象的第一跟踪框信息以及所述第二区域中的所述目标对象的第二跟踪框信息;The tracking module is configured to perform target tracking processing on the pixels in the first area and the second area, and respectively obtain the first response peak value and the second response value among the corresponding response values of each pixel in the first area. Each pixel point in the area corresponds to the second response peak value in the response value, and respectively obtain the first tracking frame information of the target object in the first area and the second tracking frame information of the target object in the second area. Tracking box information;
第一确定模块,配置为确定所述第一响应峰值和所述第二响应峰值之间的第一差异系数,以及确定所述第一跟踪框信息和所述第二跟踪框信息之间的第二差异系数;A first determining module configured to determine a first difference coefficient between the first response peak value and the second response peak value, and determine a first difference coefficient between the first tracking frame information and the second tracking frame information Two coefficients of difference;
控制模块,配置为基于所述第一差异系数和所述第二差异系数确定所述目标对象的被遮挡程度,根据所述目标对象的被遮挡程度向所述无人机发送控制指令,所述控制指令用于调整所述无人机的飞行状态。A control module configured to determine the degree of occlusion of the target object based on the first difference coefficient and the second difference coefficient, and send a control command to the UAV according to the degree of occlusion of the target object, the The control instruction is used to adjust the flight state of the drone.
在本公开的一些实施例中,所述控制模块还包括:In some embodiments of the present disclosure, the control module also includes:
第一控制子模块,配置为当所述目标对象的被遮挡程度小于第一阈值时,向所述无人机发送第一控制指令,所述第一控制指令用于指示所述无人机调整飞行方向,以使所述无人机跟踪所述目标对象;The first control submodule is configured to send a first control instruction to the UAV when the degree of occlusion of the target object is less than a first threshold, and the first control instruction is used to instruct the UAV to adjust a direction of flight to enable the drone to track the target object;
第二控制子模块,配置为当所述目标对象被遮挡程度大于或等于所述第一阈值时,向所述无人机发送第二控制指令,所述第二控制指令用于指示所述无人机维持悬停状态,以使所述无人机在所述悬停状态下连续采集图像数据。The second control submodule is configured to send a second control instruction to the UAV when the degree of occlusion of the target object is greater than or equal to the first threshold, and the second control instruction is used to indicate that the The man-machine maintains a hovering state, so that the drone continuously collects image data in the hovering state.
在本公开的一些实施例中,所述第一控制指令中还包括目标对象运动信息;In some embodiments of the present disclosure, the first control instruction further includes target object motion information;
所述第一控制子模块,还配置为获得所述第一响应峰值对应的所述像素点在像素坐标系下的第一中心点坐标;所述第一响应峰值对应的像素点对应于所述第一跟踪框的中心点;获得所述第二响应峰值对应的所述像素点在所述像素坐标系下的第二中心点坐标;所述第二响应峰值对应的像素点对应于所述第二跟踪框的中心点;在所述像素坐标系下确定所述第一中心点坐标和所述第二中心点坐标之间的连线,获得所述连线与水平轴之间的夹角,所述夹角的取值范围为大于等于0度小于90度;基于所述第一中心点坐标、所述第二中心点坐标及所述夹角,获得所述目标对象运动信息。The first control submodule is further configured to obtain the first central point coordinates of the pixel corresponding to the first response peak in the pixel coordinate system; the pixel corresponding to the first response peak corresponds to the The center point of the first tracking frame; obtain the second center point coordinates of the pixel corresponding to the second response peak in the pixel coordinate system; the pixel corresponding to the second response peak corresponds to the second response peak Two track the center point of the frame; determine the connection line between the first center point coordinate and the second center point coordinate under the pixel coordinate system, and obtain the angle between the connection line and the horizontal axis, The value range of the included angle is greater than or equal to 0 degrees and less than 90 degrees; based on the coordinates of the first center point, the coordinates of the second center point, and the included angle, the motion information of the target object is obtained.
在本公开的一些实施例中,所述装置还包括:In some embodiments of the present disclosure, the device also includes:
第二获取模块,配置为获得所述无人机在悬停状态下采集的第二图像数据,重新检测所述第二图像数据中的所述目标对象;The second acquiring module is configured to acquire the second image data collected by the drone in a hovering state, and re-detect the target object in the second image data;
第二确定模块,配置为获得所述第二图像数据中的第三图像中的物体 检测框,基于所述物体检测框对所述目标对象进行跟踪。The second determining module is configured to obtain an object detection frame in the third image in the second image data, and track the target object based on the object detection frame.
在本公开的一些实施例中,所述第一获取模块,配置为获得所述第一图像中的所述目标对象所在的第一区域,以及所述第一区域的第一中心位置;确定所述第二图像中与所述第一中心位置对应的第二中心位置,基于所述第二中心位置确定所述第二区域。In some embodiments of the present disclosure, the first obtaining module is configured to obtain a first area where the target object is located in the first image, and a first center position of the first area; determine the a second center position corresponding to the first center position in the second image, and determine the second area based on the second center position.
在本公开的一些实施例中,所述第一确定模块,配置为根据所述第一响应峰值和所述第二响应峰值之间的差值和变化系数确定所述第一差异系数;其中,所述变化系数的取值与所述第一响应峰值与第二阈值的比较结果以及第三响应峰值与第二阈值的比较结果相关,所述第三响应峰值为第四图像中与所述目标对象相关联的区域中的各像素点对应的响应值中的最大值;所述第四图像为所述第一图像的后一帧图像。In some embodiments of the present disclosure, the first determination module is configured to determine the first difference coefficient according to the difference between the first response peak value and the second response peak value and the coefficient of variation; wherein, The value of the variation coefficient is related to the comparison result between the first response peak and the second threshold and the comparison result between the third response peak and the second threshold, and the third response peak is the target in the fourth image. The maximum value among the response values corresponding to each pixel in the area associated with the object; the fourth image is an image in a subsequent frame of the first image.
在本公开的一些实施例中,所述第一确定模块,配置为根据所述第一跟踪框信息确定第一跟踪框的面积,根据所述第二跟踪框信息确定第二跟踪框的面积;根据所述第一跟踪框的面积和所述第二跟踪框的面积之间的比值确定所述第二差异系数。In some embodiments of the present disclosure, the first determining module is configured to determine the area of the first tracking frame according to the first tracking frame information, and determine the area of the second tracking frame according to the second tracking frame information; The second difference coefficient is determined according to a ratio between an area of the first tracking frame and an area of the second tracking frame.
第三方面,本公开实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现本公开实施例前述第一方面所述无人机目标跟踪方法的步骤。In the third aspect, the embodiment of the present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the drone target tracking described in the first aspect of the embodiment of the present disclosure is realized. method steps.
第四方面,本公开实施例还提供了一种电子设备,包括:处理器和用于存储能够在处理器上运行的计算机程序的存储器,其中,所述处理器用于运行所述计算机程序时,执行本公开实施例前述第一方面所述无人机目标跟踪方法的步骤。In a fourth aspect, an embodiment of the present disclosure further provides an electronic device, including: a processor and a memory for storing a computer program that can run on the processor, wherein, when the processor is used to run the computer program, The steps of the UAV target tracking method described in the foregoing first aspect of the embodiments of the present disclosure are executed.
本公开实施例提供的技术方案,获取无人机采集的第一图像数据,所述第一图像数据包括第一图像和第二图像;所述第二图像为所述第一图像后的一帧图像;确定所述第一图像中的目标对象所在的第一区域以及所述第二图像中的所述目标对象相关联的第二区域;对所述第一区域和所述第二区域的像素点进行目标跟踪处理,分别获得所述第一区域中各像素点对应响应值中的第一响应峰值以及所述第二区域中各像素点对应响应值中的第二响应峰值,以及分别获得所述第一区域中的所述目标对象的第一跟踪框信息以及所述第二区域中的所述目标对象的第二跟踪框信息;确定所述第一响应峰值和所述第二响应峰值之间的第一差异系数,以及确定所述第一跟踪框信息和所述第二跟踪框信息之间的第二差异系数;基于所述第一 差异系数和所述第二差异系数确定所述目标对象的被遮挡程度,根据所述目标对象的被遮挡程度向所述无人机发送控制指令,所述控制指令用于调整所述无人机的飞行状态。本公开实施例结合多帧响应峰值和跟踪框尺寸变化数据来判断目标对象是否完全遮挡,可以降低遮挡误判率,提升遮挡判定方法的鲁棒性;依据目标对象运动信息生成无人机控制信息,再利用网络将控制指令传输给无人机,实现无人机实时目标对象跟踪。The technical solution provided by the embodiment of the present disclosure acquires the first image data collected by the drone, and the first image data includes a first image and a second image; the second image is a frame after the first image image; determining a first area where the target object in the first image is located and a second area associated with the target object in the second image; pixels in the first area and the second area Points to perform target tracking processing, respectively obtain the first response peak value in the corresponding response value of each pixel point in the first area and the second response peak value in the corresponding response value of each pixel point in the second area, and obtain the corresponding First tracking frame information of the target object in the first area and second tracking frame information of the target object in the second area; determining a difference between the first response peak value and the second response peak value The first difference coefficient between, and determine the second difference coefficient between the first tracking frame information and the second tracking frame information; determine the target based on the first difference coefficient and the second difference coefficient According to the occlusion degree of the target object, a control instruction is sent to the UAV according to the occlusion degree of the target object, and the control instruction is used to adjust the flight state of the UAV. The embodiments of the present disclosure combine multi-frame response peak values and tracking frame size change data to determine whether the target object is completely occluded, which can reduce the occlusion misjudgment rate and improve the robustness of the occlusion determination method; generate UAV control information based on the target object motion information , and then use the network to transmit the control command to the UAV, so as to realize the real-time target object tracking of the UAV.
附图说明Description of drawings
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本公开的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only It is an embodiment of the present disclosure, and those skilled in the art can also obtain other drawings according to the provided drawings without creative efforts.
图1为本公开实施例的无人机目标跟踪系统示意图;FIG. 1 is a schematic diagram of a UAV target tracking system according to an embodiment of the present disclosure;
图2为本公开实施例的无人机目标跟踪方法的流程示意图一;FIG. 2 is a first schematic flow diagram of a UAV target tracking method according to an embodiment of the present disclosure;
图3为本公开实施例的无人机目标跟踪方法的流程示意图二;FIG. 3 is a second schematic flow diagram of the UAV target tracking method according to an embodiment of the present disclosure;
图4为本公开实施例的无人机目标跟踪装置结构示意图;4 is a schematic structural diagram of an unmanned aerial vehicle target tracking device according to an embodiment of the present disclosure;
图5为本公开实施例的电子设备的硬件组成结构示意图。FIG. 5 is a schematic diagram of a hardware composition structure of an electronic device according to an embodiment of the disclosure.
具体实施方式Detailed ways
下面结合附图及具体实施例对本公开作进一步详细的说明。The present disclosure will be described in further detail below in conjunction with the accompanying drawings and specific embodiments.
本公开实施例的无人机目标跟踪方法可应用于图1所示的无人机目标跟踪系统,该无人机目标跟踪系统包括无人机系统、无人机云平台、信息传输系统,其中无人机系统可将相机采集到的图像数据,通过机载通信终端,将图像数据通过公网(例如4G或5G等移动通信网络)或者私有网络传输至无人机云平台,以供监控者进行无人机飞行管理。其中,所述相机对目标对象进行图像采集,机载通信终端对采集到的图像数据进行传输;无人机云平台对所述采集到的图像数据进行处理,得到无人机飞行控制指令,将所述无人机飞行控制指令通过通信系统下发给无人机,对无人机进行飞行控制。The UAV target tracking method of the embodiment of the present disclosure can be applied to the UAV target tracking system shown in Figure 1, the UAV target tracking system includes a UAV system, a UAV cloud platform, and an information transmission system, wherein The UAV system can transmit the image data collected by the camera to the UAV cloud platform through the airborne communication terminal through the public network (such as 4G or 5G mobile communication network) or private network for monitoring. Conduct drone flight management. Wherein, the camera collects the image of the target object, and the airborne communication terminal transmits the collected image data; the UAV cloud platform processes the collected image data to obtain the flight control instruction of the UAV, and the The UAV flight control command is sent to the UAV through the communication system to control the flight of the UAV.
需要说明的是,图1所示的系统结构仅为本公开实施例的无人机目标跟踪方法应用的一些可选的系统结构,本公开实施例应用的系统不限于图1 所示。It should be noted that the system structure shown in FIG. 1 is only some optional system structures applied to the UAV target tracking method of the embodiment of the present disclosure, and the system applied in the embodiment of the present disclosure is not limited to that shown in FIG. 1 .
图2为本公开实施例的无人机目标跟踪方法的流程示意图一;如图2所示,所述方法包括:FIG. 2 is a first schematic flow diagram of a method for tracking a UAV target according to an embodiment of the present disclosure; as shown in FIG. 2 , the method includes:
步骤101:获取无人机采集的第一图像数据,所述第一图像数据包括第一图像和第二图像;所述第二图像为所述第一图像后的一帧图像;确定所述第一图像中的目标对象所在的第一区域以及所述第二图像中的所述目标对象相关联的第二区域;Step 101: Obtain the first image data collected by the drone, the first image data includes a first image and a second image; the second image is a frame of image after the first image; determine the first image a first region in an image where the target object is located and a second region associated with the target object in the second image;
步骤102:对所述第一区域和所述第二区域的像素点进行目标跟踪处理,分别获得所述第一区域中各像素点对应响应值中的第一响应峰值以及所述第二区域中各像素点对应响应值中的第二响应峰值,以及分别获得所述第一区域中的所述目标对象的第一跟踪框信息以及所述第二区域中的所述目标对象的第二跟踪框信息;Step 102: Perform target tracking processing on the pixels in the first area and the second area, and respectively obtain the first response peak value among the corresponding response values of each pixel point in the first area and the first response peak value in the second area. Each pixel corresponds to the second response peak value in the response value, and respectively obtains the first tracking frame information of the target object in the first area and the second tracking frame information of the target object in the second area information;
步骤103:确定所述第一响应峰值和所述第二响应峰值之间的第一差异系数,以及确定所述第一跟踪框信息和所述第二跟踪框信息之间的第二差异系数;Step 103: Determine a first difference coefficient between the first response peak value and the second response peak value, and determine a second difference coefficient between the first tracking frame information and the second tracking frame information;
步骤104:基于所述第一差异系数和所述第二差异系数确定所述目标对象的被遮挡程度,根据所述目标对象的被遮挡程度向所述无人机发送控制指令,所述控制指令用于调整所述无人机的飞行状态。Step 104: Determine the degree of occlusion of the target object based on the first difference coefficient and the second difference coefficient, and send a control instruction to the drone according to the degree of occlusion of the target object, the control instruction Used to adjust the flight state of the drone.
本实施例的无人机目标跟踪方法应用于无人机目标跟踪装置中,无人机目标跟踪装置可设置于个人计算机、移动终端、服务器等具有处理功能的电子设备内,或者由处理器执行计算机程序实现。示例性的,电子设备即图1中所示的无人机云平台。The UAV target tracking method of this embodiment is applied in the UAV target tracking device, and the UAV target tracking device can be set in electronic devices with processing functions such as personal computers, mobile terminals, servers, etc., or executed by a processor implemented by computer programs. Exemplarily, the electronic device is the drone cloud platform shown in FIG. 1 .
本实施例中,控制无人机飞行到使其摄像系统(或相机)能够拍摄到包含目标对象在内的清晰图片的位置,通过无人机的摄像系统实时采集图像。无人机云平台获取无人机采集的图像数据(记为第一图像数据),从第一图像数据中的第一图像中确定出需要跟踪的目标对象,确定目标对象在第一图像中所在的第一区域。进而,基于所述第一图像中的所述第一区域确定出第一图像后的一帧图像(即第二图像)中目标对象相关联的第二区域;其中,所述第二区域可以是目标对象在第二图像中所在的区域,或者,由于目标对象可能是快速移动的,则第二区域中可能仅包括部分目标对象,甚至不包括目标对象。示例性的,所述第二图像与所述第一图像相隔k帧,k的取值可以根据目标对象的运动速度来设定,目标对象的运动速度越快, k的取值越大。In this embodiment, the drone is controlled to fly to a position where its camera system (or camera) can capture a clear picture including the target object, and images are collected in real time through the camera system of the drone. The UAV cloud platform obtains the image data collected by the UAV (denoted as the first image data), determines the target object to be tracked from the first image in the first image data, and determines the location of the target object in the first image. the first area of . Furthermore, based on the first area in the first image, a second area associated with the target object in a frame of image after the first image (that is, the second image) is determined; wherein, the second area may be The area where the target object is located in the second image, or, because the target object may move fast, the second area may only include part of the target object, or even not include the target object. Exemplarily, the second image is separated from the first image by k frames, and the value of k may be set according to the moving speed of the target object. The faster the moving speed of the target object, the larger the value of k.
本实施例中,分别对所述第一区域和所述第二区域的像素点利用分辨尺度空间跟踪(DSST,Discriminative Scale Space Tracking)算法得到相关滤波响应图,滤波响应图中的每个响应值分别与第一区域和第二区域中的各像素点对应;则分别获得所述第一区域中各像素点对应响应值中的响应峰值(记为第一响应峰值)以及所述第二区域中各像素点对应响应值中的响应峰值(记为第二响应峰值),响应峰值即为滤波响应图中的各响应值中的最大值;响应峰值对应的像素点即为目标对象的中心位置。In this embodiment, the pixel points of the first region and the second region are respectively used to obtain a correlation filter response map using a Discriminative Scale Space Tracking (DSST, Discriminative Scale Space Tracking) algorithm, and each response value in the filter response map Corresponding to each pixel point in the first area and the second area respectively; then respectively obtain the response peak value (denoted as the first response peak value) in the corresponding response value of each pixel point in the first area and the response peak value in the second area Each pixel corresponds to the response peak value in the response value (denoted as the second response peak value), and the response peak value is the maximum value among the response values in the filtering response graph; the pixel point corresponding to the response peak value is the center position of the target object.
以所述第一响应峰值对应的像素点所在位置为目标对象在所述第一区域的中心位置,以所述第二响应峰值对应的像素点所在位置为目标对象在所述第二区域的中心位置,分别获得所述第一区域中的所述目标对象的第一跟踪框信息以及所述第二区域中的所述目标对象的第二跟踪框信息。其中,所述第一跟踪框信息和所述第二跟踪框信息至少包括目标对象在第一图像和第二图像中的跟踪框的尺寸,例如跟踪框的宽度和高度。Taking the position of the pixel corresponding to the first response peak as the center position of the target object in the first area, and taking the position of the pixel corresponding to the second response peak as the center of the target object in the second area position, respectively obtaining first tracking frame information of the target object in the first area and second tracking frame information of the target object in the second area. Wherein, the first tracking frame information and the second tracking frame information include at least the size of the tracking frame of the target object in the first image and the second image, such as the width and height of the tracking frame.
本实施例中,基于所述第一响应峰值和所述第二响应峰值确定的第一差异系数,表征目标对象的中心位置在第一图像和第二图像中的差异程度或变化程度。基于所述第一跟踪框信息和所述第二跟踪框信息确定的第二差异系数,表征目标对象的跟踪框的尺寸在第一图像和第二图像中的差异程度或变化程度。根据目标对象的中心位置的变化(第一差异系数)以及目标对象的跟踪框尺寸的变化(第二差异系数)确定目标对象的被遮挡程度,所述被遮挡程度表明目标对象被遮挡的程度,或者所述被遮挡程度也可以表征第二图像中目标对象存在、部分存在或不存在;进而根据所述目标对象的被遮挡程度向所述无人机发送控制指令,所述控制指令用于调整所述无人机的飞行状态,以便于无人机能够更快速的发现目标对象。In this embodiment, the first difference coefficient determined based on the first response peak value and the second response peak value represents the degree of difference or change degree of the center position of the target object in the first image and the second image. The second difference coefficient determined based on the first tracking frame information and the second tracking frame information represents a degree of difference or a degree of change in the size of the tracking frame of the target object in the first image and the second image. Determine the degree of occlusion of the target object according to the change of the center position of the target object (the first difference coefficient) and the change of the tracking frame size of the target object (the second difference coefficient), the degree of occlusion indicates the degree of occlusion of the target object, Or the degree of occlusion may also represent the presence, partial presence or absence of the target object in the second image; and then send control instructions to the drone according to the degree of occlusion of the target object, and the control instructions are used to adjust The flight status of the drone is used to facilitate the drone to find the target object more quickly.
采用本公开实施例的技术方案,结合多帧响应峰值和跟踪框尺寸变化数据来判断目标对象是否完全遮挡,可以降低遮挡误判率,提升遮挡判定方法的鲁棒性;依据所述目标对象的被遮挡程度向所述无人机发送控制指令,实现了无人机实时目标对象跟踪。Using the technical solutions of the embodiments of the present disclosure, combining multi-frame response peak values and tracking frame size change data to determine whether the target object is completely occluded can reduce the occlusion misjudgment rate and improve the robustness of the occlusion determination method; according to the target object The degree of occlusion sends control instructions to the UAV, which realizes real-time target object tracking of the UAV.
在本公开的一些可选实施例中,所述确定所述第一图像中的目标对象所在的第一区域以及所述第二图像中的目标对象相关联的第二区域,包括:获得所述第一图像中的所述目标对象所在的第一区域,以及所述第一区域的第一中心位置;确定所述第二图像中与所述第一中心位置对应的第二中 心位置,基于所述第二中心位置确定所述第二区域。In some optional embodiments of the present disclosure, the determining the first area where the target object in the first image is located and the second area associated with the target object in the second image includes: obtaining the The first area where the target object is located in the first image, and the first center position of the first area; determining a second center position corresponding to the first center position in the second image, based on the The second center position determines the second area.
本实施例中,示例性的,无人机云平台读取无人机采集的第一图像数据中的一帧图像,即第一图像,操作人员可采用手动的方式在第一图像中采用矩形框选中待跟踪的目标对象所在的第一区域。示例性的,包括矩形框左上角横坐标记为X t-k、左上角纵坐标记为Y t-k、矩形框宽度记为W t-k、高度记为H t-k,得到第一区域的第一中心位置
Figure PCTCN2022130282-appb-000001
In this embodiment, for example, the UAV cloud platform reads a frame of image in the first image data collected by the UAV, that is, the first image, and the operator can manually use a rectangular frame in the first image. Select the first area where the target object to be tracked is located. Exemplarily, the abscissa of the upper left corner of the rectangular frame is marked as X tk , the vertical coordinate of the upper left corner is marked as Y tk , the width of the rectangular frame is marked as W tk , and the height is marked as H tk to obtain the first center position of the first area
Figure PCTCN2022130282-appb-000001
读取所述第一图像后的第二图像,确定所述第二图像中与所述第一中心位置
Figure PCTCN2022130282-appb-000002
对应的第二中心位置
Figure PCTCN2022130282-appb-000003
然后基于所述第二中心位置
Figure PCTCN2022130282-appb-000004
获得目标对象相关联的第二区域。示例性的,可以以第二中心位置
Figure PCTCN2022130282-appb-000005
为中心,以预设宽度和预设高度确定第二区域;其中,所述预设宽度和预设高度的尺寸可以与上述第一区域的宽度(如W t-k)和高度(如H t-k)相同,或者大于上述第一区域的宽度(如W t-k)和高度(如H t-k)。
reading the second image after the first image, and determining the position of the first center in the second image
Figure PCTCN2022130282-appb-000002
Corresponding second center position
Figure PCTCN2022130282-appb-000003
Then based on the second center position
Figure PCTCN2022130282-appb-000004
Get the second area associated with the target object. Exemplarily, the second center position can be
Figure PCTCN2022130282-appb-000005
As the center, the second area is determined with a preset width and a preset height; wherein, the size of the preset width and the preset height can be the same as the width (such as W tk ) and height (such as H tk ) of the above-mentioned first region , or greater than the width (such as W tk ) and height (such as H tk ) of the above-mentioned first region.
本实施例中,上述第一区域和第二区域可以作为搜索区域,在搜索区域中进行目标跟踪处理,例如采用DSST算法对第一区域和第二区域中的像素点进行跟踪处理,从而获得第一区域中的第一响应峰值和第二区域中的第二响应峰值,以及分别获得所述第一区域中的所述目标对象的第一跟踪框信息以及所述第二区域中的所述目标对象的第二跟踪框信息。In this embodiment, the above-mentioned first area and the second area can be used as the search area, and target tracking processing is performed in the search area, for example, the DSST algorithm is used to track the pixels in the first area and the second area, so as to obtain the first a first response peak in an area and a second response peak in a second area, and obtaining first tracking frame information of the target object in the first area and the target in the second area respectively The object's second tracking frame information.
在本公开的一些可选实施例中,所述确定所述第一响应峰值和所述第二响应峰值之间的第一差异系数,包括:根据所述第一响应峰值和所述第二响应峰值之间的差值和变化系数确定所述第一差异系数;其中,所述变化系数的取值与所述第一响应峰值与第二阈值的比较结果以及第三响应峰值与第二阈值的比较结果相关,所述第三响应峰值为第四图像中与所述目标对象相关联的区域中的各像素点对应的响应值中的最大值;所述第四图像为所述第一图像的后一帧图像。In some optional embodiments of the present disclosure, the determining the first difference coefficient between the first response peak and the second response peak includes: according to the first response peak and the second response The difference between the peak values and the coefficient of variation determine the first coefficient of difference; wherein, the value of the coefficient of variation and the comparison result between the first response peak value and the second threshold value and the difference between the third response peak value and the second threshold value The comparison results are related, the third response peak value is the maximum value of the response values corresponding to the pixels in the region associated with the target object in the fourth image; the fourth image is the maximum value of the first image next frame image.
本实施例中,第一图像的后一帧图像记为第四图像,第四图像中与所述目标对象相关联的区域中的各像素点对应的响应值中的最大值记为第三响应峰值。In this embodiment, the next frame image of the first image is recorded as the fourth image, and the maximum value among the response values corresponding to the pixels in the area associated with the target object in the fourth image is recorded as the third response peak.
示例性的,第一响应峰值记为r t-k,第二响应峰值记为r t,第三响应峰值记为r t-k+1。根据所述第一响应峰值和所述第二响应峰值之间的差值和变化系数确定所述第一差异系数,第一差异系数记为R t,变化系数记为α。 Exemplarily, the first response peak value is recorded as rtk , the second response peak value is recorded as rt , and the third response peak value is recorded as rt -k+1 . The first difference coefficient is determined according to the difference between the first response peak value and the second response peak value and the variation coefficient, the first difference coefficient is denoted as R t , and the variation coefficient is denoted as α.
Figure PCTCN2022130282-appb-000006
Figure PCTCN2022130282-appb-000006
当第一响应峰值和第三响应峰值的值都小于等于第二阈值λ时,所述变化系数α的取值为1,否则所述变化系数α的取值为0。When the values of the first response peak value and the third response peak value are both less than or equal to the second threshold λ, the value of the variation coefficient α is 1; otherwise, the value of the variation coefficient α is 0.
在本公开的一些可选实施例中,所述确定所述第一跟踪框信息和所述第二跟踪框信息之间的第二差异系数,包括:根据所述第一跟踪框信息确定第一跟踪框的面积,根据所述第二跟踪框信息确定第二跟踪框的面积;根据所述第一跟踪框的面积和所述第二跟踪框的面积之间的比值确定所述第二差异系数。In some optional embodiments of the present disclosure, the determining the second difference coefficient between the first tracking frame information and the second tracking frame information includes: determining the first tracking frame information according to the first tracking frame information The area of the tracking frame, determining the area of the second tracking frame according to the information of the second tracking frame; determining the second difference coefficient according to the ratio between the area of the first tracking frame and the area of the second tracking frame .
本实施例中,示例性的,第一跟踪框的信息包含跟踪框宽度w t-k和高度h t-k,第二跟踪框的信息包含跟踪框宽度w t和高度h t,因此,第二跟踪框的面积为w t*h t,第一跟踪框的面积为w t-k*h t-k,第二差异系数记为S tIn this embodiment, for example, the information of the first tracking frame includes the width w tk and the height h tk of the tracking frame, and the information of the second tracking frame includes the width w t and the height h t of the tracking frame. Therefore, the information of the second tracking frame The area is w t *h t , the area of the first tracking frame is w tk *h tk , and the second difference coefficient is denoted as S t .
Figure PCTCN2022130282-appb-000007
Figure PCTCN2022130282-appb-000007
当第二跟踪框的面积w t*h t与第一跟踪框的面积w t-k*h t-k之间的比值小于第二阈值μ时,第二差异系数S t的取值为1,否则第二差异系数S t的取值为0,第二阈值μ的取值可以根据实际场景进行设置。 When the ratio between the area w t *h t of the second tracking frame and the area w tk *h tk of the first tracking frame is smaller than the second threshold μ, the value of the second difference coefficient S t is 1, otherwise the second The value of the difference coefficient S t is 0, and the value of the second threshold μ can be set according to the actual scene.
本实施例中,示例性的,基于所述第一差异系数和所述第二差异系数确定的目标对象的被遮挡程度可通过遮挡判定函数表示,遮挡判定函数的值表征所述目标对象的被遮挡程度。假设遮挡判定函数记为f t,遮挡判定函数可通过以下表达式表示: In this embodiment, for example, the occlusion degree of the target object determined based on the first difference coefficient and the second difference coefficient can be represented by an occlusion determination function, and the value of the occlusion determination function represents the occlusion degree of the target object. degree of occlusion. Assuming that the occlusion judgment function is denoted as f t , the occlusion judgment function can be expressed by the following expression:
f t=S t·R t=S t·α·(r t-k-r t) f t =S t ·R t =S t ·α·(r tk -r t )
若计算得到遮挡判定函数f t的值大于等于第一阈值ν,则判定目标对象被完全遮挡,需要进行目标重检测;若计算得到遮挡判定函数的值小于第一阈值ν,则判定目标对象没有被完全遮挡,则控制无人机进行目标对象跟踪。 If the calculated value of the occlusion determination function f t is greater than or equal to the first threshold ν, it is determined that the target object is completely occluded, and re-detection of the target is required; if the calculated value of the occlusion determination function is less than the first threshold ν, it is determined that the target object is not If it is completely blocked, the UAV is controlled to track the target object.
本公开实施例还提供了一种无人机目标跟踪方法。本实施例在前述实施例的基础上,对前述实施例中的步骤104进行具体说明。本实施例中,所述根据所述目标对象的被遮挡程度向所述无人机发送控制指令包括两种结果,如图3所示,步骤104可包括:The embodiment of the present disclosure also provides a UAV target tracking method. In this embodiment, on the basis of the foregoing embodiments, step 104 in the foregoing embodiments is described in detail. In this embodiment, the sending of control instructions to the UAV according to the degree of occlusion of the target object includes two results, as shown in FIG. 3 , step 104 may include:
步骤104a,当所述目标对象的被遮挡程度小于第一阈值时,向所述无 人机发送第一控制指令,所述第一控制指令用于指示所述无人机调整飞行方向,以使所述无人机跟踪所述目标对象; Step 104a, when the degree of occlusion of the target object is less than a first threshold, send a first control instruction to the UAV, the first control instruction is used to instruct the UAV to adjust the flight direction so that the drone tracks the target object;
步骤104b,当所述目标对象被遮挡程度大于或等于所述第一阈值时,向所述无人机发送第二控制指令,所述第二控制指令用于指示所述无人机维持悬停状态,以使所述无人机在所述悬停状态下连续采集图像数据。 Step 104b, when the degree of occlusion of the target object is greater than or equal to the first threshold, send a second control instruction to the UAV, the second control instruction is used to instruct the UAV to maintain hovering state, so that the UAV continuously collects image data in the hovering state.
采用本公开实施例的技术方案,依据所述目标对象的被遮挡程度向所述无人机发送控制指令,当目标对象没有被完全遮挡时控制无人机进行目标对象跟踪。当目标对象被完全遮挡时进行目标重检测,从而实现目标的实时跟踪。Using the technical solutions of the embodiments of the present disclosure, control instructions are sent to the UAV according to the degree of occlusion of the target object, and the UAV is controlled to track the target object when the target object is not completely occluded. When the target object is completely occluded, the target re-detection is carried out, so as to realize the real-time tracking of the target.
在一些可选的实施例中,所述第一控制指令中还包括目标对象运动信息;所述方法还包括:获得所述第一响应峰值对应的像素点在像素坐标系下的第一中心点坐标;所述第一响应峰值对应的像素点对应于所述第一跟踪框的中心点;获得所述第二响应峰值对应的像素点在所述像素坐标系下的第二中心点坐标;所述第二响应峰值对应的像素点对应于所述第二跟踪框的中心点;在所述像素坐标系下确定所述第一中心点坐标和所述第二中心点坐标之间的连线,获得所述连线与水平轴之间的夹角,所述夹角的取值范围为大于等于0度小于90度;基于所述第一中心点坐标、所述第二中心点坐标及所述夹角,获得所述目标对象运动信息。In some optional embodiments, the first control instruction further includes target object motion information; the method further includes: obtaining the first center point of the pixel point corresponding to the first response peak value in the pixel coordinate system Coordinates; the pixel point corresponding to the first response peak value corresponds to the center point of the first tracking frame; obtain the second center point coordinates of the pixel point corresponding to the second response peak value in the pixel coordinate system; The pixel point corresponding to the second response peak value corresponds to the center point of the second tracking frame; the connection line between the first center point coordinate and the second center point coordinate is determined in the pixel coordinate system, Obtain the angle between the connecting line and the horizontal axis, the value range of the angle is greater than or equal to 0 degrees and less than 90 degrees; based on the coordinates of the first center point, the coordinates of the second center point and the The included angle is used to obtain the motion information of the target object.
本实施例中,示例性的,获得所述第一响应峰值对应的像素点在像素坐标系下的第一中心点坐标
Figure PCTCN2022130282-appb-000008
所述第一响应峰值对应的像素点对应于所述第一跟踪框的中心点;获得所述第二响应峰值对应的像素点在所述像素坐标系下的第二中心点坐标
Figure PCTCN2022130282-appb-000009
所述第二响应峰值对应的像素点对应于所述第二跟踪框的中心点;在所述像素坐标系下确定所述第一中心点坐标和所述第二中心点坐标之间的连线,获得所述连线与水平轴之间的夹角θ,夹角θ满足如下表达式;其中所述夹角θ的取值范围为大于等于0度小于90度:
In this embodiment, for example, the coordinates of the first central point of the pixel corresponding to the first response peak in the pixel coordinate system are obtained
Figure PCTCN2022130282-appb-000008
The pixel point corresponding to the first response peak value corresponds to the center point of the first tracking frame; obtain the second center point coordinates of the pixel point corresponding to the second response peak value in the pixel coordinate system
Figure PCTCN2022130282-appb-000009
The pixel point corresponding to the second response peak value corresponds to the center point of the second tracking frame; determine the connection line between the first center point coordinates and the second center point coordinates in the pixel coordinate system , to obtain the angle θ between the connection line and the horizontal axis, and the angle θ satisfies the following expression; wherein the value range of the angle θ is greater than or equal to 0 degrees and less than 90 degrees:
Figure PCTCN2022130282-appb-000010
Figure PCTCN2022130282-appb-000010
确定目标对象运动方向,若
Figure PCTCN2022130282-appb-000011
则目标对象向无人机的右前方运动;若
Figure PCTCN2022130282-appb-000012
则目标对象向无人机的右后方运动;若
Figure PCTCN2022130282-appb-000013
则跟踪目标向无人机的左前方运动;若
Figure PCTCN2022130282-appb-000014
则 目标对象向无人机的左后方运动;目标对象运动方向与水平方向的夹角为θ。
Determine the direction of movement of the target object, if
Figure PCTCN2022130282-appb-000011
Then the target object moves to the right front of the drone; if
Figure PCTCN2022130282-appb-000012
Then the target object moves to the right rear of the UAV; if
Figure PCTCN2022130282-appb-000013
Then the tracking target moves to the left front of the UAV; if
Figure PCTCN2022130282-appb-000014
Then the target object moves to the left rear of the drone; the angle between the moving direction of the target object and the horizontal direction is θ.
基于所述目标对象的运动信息,向所述无人机发送控制指令,指示所述无人机根据所述目标对象的运动方向调整飞行方向,以使所述无人机跟踪所述目标对象。Based on the motion information of the target object, a control command is sent to the UAV, instructing the UAV to adjust the flight direction according to the motion direction of the target object, so that the UAV tracks the target object.
采用本公开实施例的技术方案,利用目标对象运动信息计算得到无人机控制指令,再利用网络将控制指令实时传输到无人机上的机载通信终端,然后通过无人机飞控来控制其飞行状态,实现无人机自动跟踪目标。Using the technical solutions of the embodiments of the present disclosure, the UAV control command is calculated by using the motion information of the target object, and then the control command is transmitted to the airborne communication terminal on the UAV in real time using the network, and then it is controlled by the UAV flight control. In flight state, the UAV can automatically track the target.
在一些可选的实施例中,所述方法还包括:获得所述无人机在悬停状态下采集的第二图像数据,重新检测所述第二图像数据中的所述目标对象;获得所述第二图像数据中的第三图像中的物体检测框,基于所述物体检测框对所述目标对象进行跟踪。In some optional embodiments, the method further includes: obtaining second image data collected by the drone in a hovering state, and re-detecting the target object in the second image data; obtaining the An object detection frame in the third image in the second image data, and track the target object based on the object detection frame.
本实施例中,在所述目标对象被遮挡程度大于或等于所述第一阈值的情况下,表明目标对象被完全遮挡,这种情况下无人机云平台发出第二控制指令,使得无人机处于悬停状态,使得无人机重新采集图像数据。In this embodiment, when the degree of occlusion of the target object is greater than or equal to the first threshold, it indicates that the target object is completely occluded. In this case, the UAV cloud platform issues a second control command, so that no one The drone is in a hovering state, allowing the drone to re-acquire image data.
示例性的,无人机云平台获得所述无人机在悬停状态下采集的第二图像数据中连续的三帧图像,将三帧图像由RGB格式转为灰度图,记为I T、I T+1、I T+2;I T与I T+1相减并做二值化处理,得到的结果记为I b1;I T+1与I T+2相减并做二值化处理,得到的结果记为I b2;对I b1和I b2做与运算,结果记为I and;对I and做开运算,开运算的计算步骤为先腐蚀运算,再膨胀运算(具体实现过程可参考常规的开运算的任意处理过程),得到的结果记为I open;在I open中检测物体轮廓,若物体轮廓面积在给定的范围内,则保留该物体轮廓,并得到该物体轮廓的最小外接矩形框,(x i,y i,w i,h i)表示第i个物体矩形框,其中,x i为矩形框左上角横坐标、y i为矩形框左上角纵坐标、w i为矩形框的宽度、h i为矩形框的高度。 Exemplarily, the UAV cloud platform obtains three consecutive frames of images in the second image data collected by the UAV in the hovering state, and converts the three frames of images from RGB format to grayscale images, denoted as IT , I T+1 , I T+2 ; I T and I T+1 are subtracted and binarized, and the result obtained is recorded as I b1 ; I T+1 and I T+2 are subtracted and binarized process, the result obtained is recorded as I b2 ; I b1 and I b2 are ANDed, and the result is recorded as I and ; I and is opened, and the calculation steps of the open operation are first erosion operation, and then expansion operation (specific implementation The process can refer to any processing process of the conventional open operation), and the obtained result is recorded as I open ; the object outline is detected in I open , if the object outline area is within a given range, the object outline is retained, and the object is obtained The smallest circumscribing rectangle of the outline, (xi , y i , w i , h i ) represents the i-th object rectangle, where x i is the abscissa of the upper left corner of the rectangle, y i is the ordinate of the upper left corner of the rectangle, w i is the width of the rectangle, h i is the height of the rectangle.
计算得到物体矩形框的中心位置,记为
Figure PCTCN2022130282-appb-000015
连接
Figure PCTCN2022130282-appb-000016
与目标对象丢失前的中心位置
Figure PCTCN2022130282-appb-000017
计算连线与水平方向的夹角θ i。若|θ-θ i|的值小于等于设定的阈值ρ,则进入下一步;若|θ-θ i|的值大于设定的阈值ρ,则读取下一帧图像,重复上述步骤。
Calculate the center position of the rectangular frame of the object, denoted as
Figure PCTCN2022130282-appb-000015
connect
Figure PCTCN2022130282-appb-000016
The center position before the loss of the target object
Figure PCTCN2022130282-appb-000017
Calculate the angle θ i between the connecting line and the horizontal direction. If the value of |θ- θi | is less than or equal to the set threshold ρ, enter the next step; if the value of |θ- θi | is greater than the set threshold ρ, read the next frame of image and repeat the above steps.
采用如下方式微调筛选出的物体矩形框尺度:Use the following method to fine-tune the size of the rectangular frame of the filtered object:
Figure PCTCN2022130282-appb-000018
Figure PCTCN2022130282-appb-000018
其中,w t-k-1*h t-k-1为目标对象丢失前的跟踪框的面积,w i*h i为第i个物体矩形框的面积。 Among them, w tk-1 *h tk-1 is the area of the tracking frame before the target object is lost, and w i *h i is the area of the rectangular frame of the i-th object.
若ε的值等于1,则不调整矩形框尺度;若ε的值大于1,则令w i=w t-k-1,h i=h t-k-1If the value of ε is equal to 1, the scale of the rectangular frame is not adjusted; if the value of ε is greater than 1, set w i =w tk-1 , h i =h tk-1 .
微调筛选出的物体矩形框位置,将物体矩形框中心位置向上下左右四个方向分别移动k个像素值,得到四个中心位置坐标:
Figure PCTCN2022130282-appb-000019
Figure PCTCN2022130282-appb-000020
Fine-tune the position of the rectangular frame of the object selected, and move the center position of the rectangular frame of the object by k pixel values in the four directions of up, down, left, and right respectively to obtain four center position coordinates:
Figure PCTCN2022130282-appb-000019
Figure PCTCN2022130282-appb-000020
在四个中心位置,以(w i,h i)为尺度得到四个物体检测框,提取各个物体检测框区域的颜色直方图,记为hist q,q=1,2,3,4,在物体矩形框的初始中心位置,对目标对象丢失前的跟踪框(w t-k-1,h t-k-1)区域,提取目标未被遮挡时的颜色直方图,记为hist t-k-1At the four central positions, four object detection frames are obtained on the scale of (w i , h i ), and the color histogram of each object detection frame area is extracted, which is recorded as hist q , q=1, 2, 3, 4, in The initial center position of the rectangular frame of the object, for the tracking frame (w tk-1 , h tk-1 ) area before the target object is lost, extract the color histogram when the target is not occluded, denoted as hist tk-1 ;
利用巴氏系数计算得到hist q与hist t-k-1之间的相似度,相似度最大的物体检测框记为(x re,y re,w re,h re):w re=w i,h re=h i,
Figure PCTCN2022130282-appb-000021
Calculate the similarity between hist q and hist tk-1 by using the Bhattachary coefficient. The object detection frame with the largest similarity is recorded as (x re , y re , w re , h re ): w re = w i , h re = h i ,
Figure PCTCN2022130282-appb-000021
将物体检测框(x re,y re,w re,h re)包含的区域作为目标对象,继续跟踪。 Take the area contained in the object detection frame (x re , y re , w re , h re ) as the target object and continue tracking.
采用本公开实施例的技术方案,针对目标对象丢失的情况,利用三帧差分法可以检测已丢失的目标对象,结合目标对象的历史运动信息和检测出的目标对象检测框,更新目标对象位置继续跟踪目标对象。Using the technical solutions of the embodiments of the present disclosure, in view of the loss of the target object, the three-frame difference method can be used to detect the lost target object, and the target object position can be updated by combining the historical motion information of the target object and the detected target object detection frame. Continue Track the target object.
下面结合一个具体的示例对本公开实施例的无人机目标跟踪方法进行详细说明。所述方法包括:The method for tracking a drone target according to an embodiment of the present disclosure will be described in detail below with reference to a specific example. The methods include:
步骤301:获取无人机采集的第一图像数据,所述第一图像数据包括第一图像和第二图像;所述第二图像为所述第一图像后的一帧图像。Step 301: Acquire the first image data collected by the drone, the first image data includes a first image and a second image; the second image is a frame of image after the first image.
步骤302:获得第一图像中的目标对象所在的第一区域,以及所述第一区域的第一中心位置;确定第二图像中与所述第一中心位置对应的第二中心位置,基于所述第二中心位置获得第二区域。Step 302: Obtain the first area where the target object is located in the first image, and the first center position of the first area; determine the second center position corresponding to the first center position in the second image, based on the The second center position is used to obtain the second area.
步骤303:对所述第一区域和所述第二区域的像素点进行目标跟踪处理,分别获得所述第一区域中各像素点对应响应值中的第一响应峰值以及所述第二区域中各像素点对应响应值中的第二响应峰值,以及分别获得所述第一区域中的所述目标对象的第一跟踪框信息以及所述第二区域中的所 述目标对象的第二跟踪框信息。Step 303: Perform target tracking processing on the pixels in the first area and the second area, and respectively obtain the first response peak value among the corresponding response values of each pixel point in the first area and the first response peak value in the second area. Each pixel corresponds to the second response peak value in the response value, and respectively obtains the first tracking frame information of the target object in the first area and the second tracking frame information of the target object in the second area information.
步骤304:根据所述第一响应峰值和所述第二响应峰值之间的差值和变化系数确定所述第一差异系数;其中,所述变化系数的取值与所述第一响应峰值和与第二阈值的比较结果以及第三响应峰值与第二阈值的比较结果相关,所述第三响应峰值为第四图像中与所述目标对象相关联的区域中的各像素点对应的响应值中的最大值;所述第四图像为所述第一图像的后一帧图像。Step 304: Determine the first coefficient of difference according to the difference between the first response peak value and the second response peak value and the variation coefficient; wherein, the value of the variation coefficient is the same as the first response peak value and the It is related to the comparison result of the second threshold and the comparison result of the third response peak and the second threshold, the third response peak is the response value corresponding to each pixel in the region associated with the target object in the fourth image The maximum value in ; the fourth image is the next frame image of the first image.
步骤305:根据所述第一跟踪框信息确定第一跟踪框的面积,根据所述第二跟踪框信息确定第二跟踪框的面积;根据所述第一跟踪框的面积和所述第二跟踪框的面积之间的比值确定所述第二差异系数。Step 305: Determine the area of the first tracking frame according to the first tracking frame information, and determine the area of the second tracking frame according to the second tracking frame information; according to the area of the first tracking frame and the second tracking frame The ratio between the areas of the boxes determines the second coefficient of difference.
步骤306:基于所述第一差异系数和所述第二差异系数确定所述目标对象的被遮挡程度。Step 306: Determine the occlusion degree of the target object based on the first difference coefficient and the second difference coefficient.
步骤307a:当所述目标对象的被遮挡程度小于第一阈值时,确定所述目标对象没有被完全遮挡。Step 307a: When the occlusion degree of the target object is less than a first threshold, determine that the target object is not completely occluded.
步骤308a:获得所述第一响应峰值对应的像素点在像素坐标系下的第一中心点坐标;所述第一响应峰值对应的像素点对应于所述第一跟踪框的中心点;Step 308a: Obtain the coordinates of the first center point of the pixel point corresponding to the first response peak value in the pixel coordinate system; the pixel point corresponding to the first response peak value corresponds to the center point of the first tracking frame;
获得所述第二响应峰值对应的像素点在所述像素坐标系下的第二中心点坐标;所述第二响应峰值对应的像素点对应于所述第二跟踪框的中心点;Obtaining the second center point coordinates of the pixel point corresponding to the second response peak value in the pixel coordinate system; the pixel point corresponding to the second response peak value corresponds to the center point of the second tracking frame;
在所述像素坐标系下确定所述第一中心点坐标和所述第二中心点坐标之间的连线,获得所述连线与水平轴之间的夹角,所述夹角的取值范围为大于等于0度小于90度;Determine the connection line between the first center point coordinates and the second center point coordinates in the pixel coordinate system, obtain the angle between the connection line and the horizontal axis, and the value of the angle The range is greater than or equal to 0 degrees and less than 90 degrees;
基于所述第一中心点坐标、所述第二中心点坐标及所述夹角,获得所述目标对象运动信息。Based on the coordinates of the first center point, the coordinates of the second center point, and the included angle, motion information of the target object is obtained.
步骤309a:向所述无人机发送第一控制指令,所述第一控制指令用于指示所述无人机调整飞行方向,以使所述无人机跟踪所述目标对象。Step 309a: Sending a first control instruction to the UAV, where the first control instruction is used to instruct the UAV to adjust the flight direction so that the UAV tracks the target object.
步骤307b:当所述目标对象被遮挡程度大于或等于所述第一阈值时,确定所述目标对象被完全遮挡。Step 307b: When the occlusion degree of the target object is greater than or equal to the first threshold, determine that the target object is completely occluded.
步骤308b:获得所述无人机在悬停状态下采集的第二图像数据,重新检测所述第二图像数据中的所述目标对象。Step 308b: Obtain the second image data collected by the drone in the hovering state, and re-detect the target object in the second image data.
步骤309b:获得所述第二图像数据中的第三图像中的物体检测框,基于所述物体检测框对所述目标对象进行跟踪。Step 309b: Obtain an object detection frame in the third image in the second image data, and track the target object based on the object detection frame.
这里,步骤301至步骤309可参照前述实施例中的详细阐述,这里不再赘述。采用本公开实施例的技术方案,结合多帧响应峰值和跟踪框尺寸变化数据来判断目标对象是否完全遮挡,可以降低遮挡误判率,提升遮挡判定方法的鲁棒性;依据目标对象运动信息生成无人机控制信息,再利用网络将控制指令传输给无人机,实现无人机实时目标对象跟踪;针对目标对象丢失的情况,利用三帧差分法,结合目标对象的历史运动信息和检测出的目标对象,更新目标对象位置继续跟踪。Here, for steps 301 to 309, reference may be made to the detailed descriptions in the foregoing embodiments, and details are not repeated here. Using the technical solutions of the embodiments of the present disclosure, combining multi-frame response peak values and tracking frame size change data to determine whether the target object is completely occluded can reduce the occlusion misjudgment rate and improve the robustness of the occlusion determination method; UAV control information, and then use the network to transmit control instructions to the UAV to realize real-time target tracking of the UAV; for the loss of the target object, use the three-frame difference method, combined with the historical motion information of the target object and detected target object, update the target object position and continue tracking.
基于前述实施例,本公开实施例还提供了一种无人机目标跟踪装置,图4是本公开实施例的无人机目标跟踪装置结构示意图,如图4所示,所述装置包括:Based on the foregoing embodiments, an embodiment of the present disclosure also provides a UAV target tracking device. FIG. 4 is a schematic structural diagram of a UAV target tracking device in an embodiment of the present disclosure. As shown in FIG. 4 , the device includes:
第一获取模块201,配置为获取无人机采集的第一图像数据,所述第一图像数据包括第一图像和第二图像;所述第二图像为所述第一图像后的一帧图像;确定所述第一图像中的目标对象所在的第一区域以及所述第二图像中的所述目标对象相关联的第二区域;The first acquisition module 201 is configured to acquire the first image data collected by the drone, the first image data includes a first image and a second image; the second image is a frame of image after the first image ; determining a first area where the target object in the first image is located and a second area associated with the target object in the second image;
跟踪模块202,配置为对所述第一区域和所述第二区域的像素点进行目标跟踪处理,分别获得所述第一区域中各像素点对应响应值中的第一响应峰值以及所述第二区域中各像素点对应响应值中的第二响应峰值,以及分别获得所述第一区域中的所述目标对象的第一跟踪框信息以及所述第二区域中的所述目标对象的第二跟踪框信息;The tracking module 202 is configured to perform target tracking processing on the pixels in the first area and the second area, and respectively obtain the first response peak value and the second response value among the corresponding response values of each pixel in the first area. Each pixel point in the second area corresponds to the second response peak value in the response value, and obtain the first tracking frame information of the target object in the first area and the first tracking frame information of the target object in the second area respectively. 2. Tracking box information;
第一确定模块203,配置为确定所述第一响应峰值和所述第二响应峰值之间的第一差异系数,以及确定所述第一跟踪框信息和所述第二跟踪框信息之间的第二差异系数;The first determining module 203 is configured to determine a first difference coefficient between the first response peak value and the second response peak value, and determine a difference coefficient between the first tracking frame information and the second tracking frame information Second coefficient of difference;
控制模块204,配置为基于所述第一差异系数和所述第二差异系数确定所述目标对象的被遮挡程度,根据所述目标对象的被遮挡程度向所述无人机发送控制指令,所述控制指令用于调整所述无人机的飞行状态。The control module 204 is configured to determine the degree of occlusion of the target object based on the first difference coefficient and the second difference coefficient, and send a control instruction to the UAV according to the degree of occlusion of the target object, so The control instructions are used to adjust the flight state of the drone.
在本公开的一些可选实施例中,所述控制模块204还包括:In some optional embodiments of the present disclosure, the control module 204 further includes:
第一控制子模块,配置为当所述目标对象的被遮挡程度小于第一阈值时,向所述无人机发送第一控制指令,所述第一控制指令用于指示所述无人机调整飞行方向,以使所述无人机跟踪所述目标对象;The first control submodule is configured to send a first control instruction to the UAV when the degree of occlusion of the target object is less than a first threshold, and the first control instruction is used to instruct the UAV to adjust a direction of flight to enable the drone to track the target object;
第二控制子模块,配置为当所述目标对象被遮挡程度大于或等于所述第一阈值时,向所述无人机发送第二控制指令,所述第二控制指令用于指示所述无人机维持悬停状态,以使所述无人机在所述悬停状态下连续采集 图像数据。The second control submodule is configured to send a second control instruction to the UAV when the degree of occlusion of the target object is greater than or equal to the first threshold, and the second control instruction is used to indicate that the The man-machine maintains a hovering state, so that the drone continuously collects image data in the hovering state.
在本公开的一些可选实施例中,所述第一控制指令中还包括目标对象运动信息;In some optional embodiments of the present disclosure, the first control instruction further includes target object motion information;
所述第一控制子模块,还配置为获得所述第一响应峰值对应的所述像素点在像素坐标系下的第一中心点坐标;所述第一响应峰值对应的像素点对应于所述第一跟踪框的中心点;获得所述第二响应峰值对应的所述像素点在所述像素坐标系下的第二中心点坐标;所述第二响应峰值对应的像素点对应于所述第二跟踪框的中心点;在所述像素坐标系下确定所述第一中心点坐标和所述第二中心点坐标之间的连线,获得所述连线与水平轴之间的夹角,所述夹角的取值范围为大于等于0度小于90度;基于所述第一中心点坐标、所述第二中心点坐标及所述夹角,获得所述目标对象运动信息。The first control submodule is further configured to obtain the first central point coordinates of the pixel corresponding to the first response peak in the pixel coordinate system; the pixel corresponding to the first response peak corresponds to the The center point of the first tracking frame; obtain the second center point coordinates of the pixel corresponding to the second response peak in the pixel coordinate system; the pixel corresponding to the second response peak corresponds to the second response peak Two track the center point of the frame; determine the connection line between the first center point coordinate and the second center point coordinate under the pixel coordinate system, and obtain the angle between the connection line and the horizontal axis, The value range of the included angle is greater than or equal to 0 degrees and less than 90 degrees; based on the coordinates of the first center point, the coordinates of the second center point, and the included angle, the motion information of the target object is obtained.
在本公开的一些可选实施例中,所述装置还包括:In some optional embodiments of the present disclosure, the device further includes:
第二获取模块,配置为获得所述无人机在悬停状态下采集的第二图像数据,重新检测所述第二图像数据中的所述目标对象;The second acquiring module is configured to acquire the second image data collected by the drone in a hovering state, and re-detect the target object in the second image data;
第二确定模块,配置为获得所述第二图像数据中的第三图像中的物体检测框,基于所述物体检测框对所述目标对象进行跟踪。The second determination module is configured to obtain an object detection frame in the third image in the second image data, and track the target object based on the object detection frame.
在本公开的一些可选实施例中,所述第一获取模块201,配置为获得所述第一图像中的所述目标对象所在的第一区域,以及所述第一区域的第一中心位置;确定所述第二图像中与所述第一中心位置对应的第二中心位置,基于所述第二中心位置确定所述第二区域。In some optional embodiments of the present disclosure, the first obtaining module 201 is configured to obtain a first area where the target object is located in the first image, and a first center position of the first area ; determining a second center position corresponding to the first center position in the second image, and determining the second area based on the second center position.
在本公开的一些可选实施例中,所述第一确定模块203,配置为根据所述第一响应峰值和所述第二响应峰值之间的差值和变化系数确定所述第一差异系数;其中,所述变化系数的取值与所述第一响应峰值与第二阈值的比较结果以及第三响应峰值与第二阈值的比较结果相关,所述第三响应峰值为第四图像中与所述目标对象相关联的区域中的各像素点对应的响应值中的最大值;所述第四图像为所述第一图像的后一帧图像。In some optional embodiments of the present disclosure, the first determining module 203 is configured to determine the first difference coefficient according to the difference and variation coefficient between the first response peak value and the second response peak value ; Wherein, the value of the variation coefficient is related to the comparison result between the first response peak value and the second threshold value and the comparison result between the third response peak value and the second threshold value, and the third response peak value is related to the comparison result between the fourth image and the second threshold value The maximum value among the response values corresponding to the pixel points in the area associated with the target object; the fourth image is a subsequent frame image of the first image.
在本公开的一些可选实施例中,所述第一确定模块203,配置为根据所述第一跟踪框信息确定第一跟踪框的面积,根据所述第二跟踪框信息确定第二跟踪框的面积;根据所述第一跟踪框的面积和所述第二跟踪框的面积之间的比值确定所述第二差异系数。In some optional embodiments of the present disclosure, the first determining module 203 is configured to determine the area of the first tracking frame according to the first tracking frame information, and determine the second tracking frame according to the second tracking frame information area; determine the second difference coefficient according to the ratio between the area of the first tracking frame and the area of the second tracking frame.
本公开实施例中,所述装置可应用于电子设备中。所述装置中的第一获取模块201、跟踪模块202、第一确定模块203、控制模块204,在实际 应用中均可由中央处理器(CPU,Central Processing Unit)、数字信号处理器(DSP,Digital Signal Processor)、微控制单元(MCU,Microcontroller Unit)或可编程门阵列(FPGA,Field-Programmable Gate Array)实现。In the embodiments of the present disclosure, the device can be applied to electronic equipment. The first acquisition module 201, the tracking module 202, the first determination module 203, and the control module 204 in the described device all can be composed of a central processing unit (CPU, Central Processing Unit), a digital signal processor (DSP, Digital Signal Processor), Microcontroller Unit (MCU, Microcontroller Unit) or Programmable Gate Array (FPGA, Field-Programmable Gate Array) implementation.
本公开实施例还提供了一种电子设备。图5是本公开实施例的电子设备的硬件组成结构示意图。如图5所示,电子设备400包括处理器401和用于存储能够在处理器401上运行的计算机程序的存储器402,其中,所述处理器401用于运行所述计算机程序时,执行本公开实施例所述方法的步骤。The embodiment of the present disclosure also provides an electronic device. FIG. 5 is a schematic diagram of a hardware composition structure of an electronic device according to an embodiment of the disclosure. As shown in FIG. 5 , an electronic device 400 includes a processor 401 and a memory 402 for storing a computer program that can run on the processor 401, wherein, when the processor 401 is used to run the computer program, execute the present disclosure The steps of the method described in the examples.
可选地,电子设备400还可包括至少一个网络接口403。电子设备400中的各个组件通过总线系统404耦合在一起。可理解,总线系统404用于实现这些组件之间的连接通信。总线系统404除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图5中将各种总线都标为总线系统404。Optionally, the electronic device 400 may further include at least one network interface 403 . Various components in the electronic device 400 are coupled together through the bus system 404 . It can be understood that the bus system 404 is used to realize connection and communication between these components. In addition to the data bus, the bus system 404 also includes a power bus, a control bus and a status signal bus. However, for clarity of illustration, the various buses are labeled as bus system 404 in FIG. 5 .
可以理解,存储器402可以是易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、磁性随机存取存储器(FRAM,ferromagnetic random access memory)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc Read-Only Memory);磁表面存储器可以是磁盘存储器或磁带存储器。易失性存储器可以是随机存取存储器(RAM,Random Access Memory),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(SRAM,Static Random Access Memory)、同步静态随机存取存储器(SSRAM,Synchronous Static Random Access Memory)、动态随机存取存储器(DRAM,Dynamic Random Access Memory)、同步动态随机存取存储器(SDRAM,Synchronous Dynamic Random Access Memory)、双倍数据速率同步动态随机存取存储器(DDRSDRAM,Double Data Rate Synchronous Dynamic Random Access Memory)、增强型同步动态随机存取存储器(ESDRAM,Enhanced Synchronous Dynamic Random Access Memory)、同步连接动态随机存取存储器(SLDRAM,SyncLink Dynamic  Random Access Memory)、直接内存总线随机存取存储器(DRRAM,Direct Rambus Random Access Memory)。本公开实施例描述的存储器402旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory 402 may be a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. Among them, the non-volatile memory can be read-only memory (ROM, Read Only Memory), programmable read-only memory (PROM, Programmable Read-Only Memory), erasable programmable read-only memory (EPROM, Erasable Programmable Read-Only Memory) Only Memory), Electrically Erasable Programmable Read-Only Memory (EEPROM, Electrically Erasable Programmable Read-Only Memory), Magnetic Random Access Memory (FRAM, ferromagnetic random access memory), Flash Memory (Flash Memory), Magnetic Surface Memory , CD, or CD-ROM (Compact Disc Read-Only Memory); magnetic surface storage can be disk storage or tape storage. The volatile memory may be random access memory (RAM, Random Access Memory), which is used as an external cache. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM, Static Random Access Memory), Synchronous Static Random Access Memory (SSRAM, Synchronous Static Random Access Memory), Dynamic Random Access Memory Memory (DRAM, Dynamic Random Access Memory), synchronous dynamic random access memory (SDRAM, Synchronous Dynamic Random Access Memory), double data rate synchronous dynamic random access memory (DDRSDRAM, Double Data Rate Synchronous Dynamic Random Access Memory), enhanced Synchronous Dynamic Random Access Memory (ESDRAM, Enhanced Synchronous Dynamic Random Access Memory), Synchronous Link Dynamic Random Access Memory (SLDRAM, SyncLink Dynamic Random Access Memory), Direct Memory Bus Random Access Memory (DRRAM, Direct Rambus Random Access Memory ). The memory 402 described in embodiments of the present disclosure is intended to include, but is not limited to, these and any other suitable types of memory.
本公开实施例中的存储器402用于存储各种类型的数据以支持电子设备400的操作。The memory 402 in the embodiment of the present disclosure is used to store various types of data to support the operation of the electronic device 400 .
上述本公开实施例揭示的方法可以应用于处理器401中,或者由处理器401实现。处理器401可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器401中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器401可以是通用处理器、DSP,或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。处理器401可以实现或者执行本公开实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本公开实施例所公开的方法的步骤,可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于存储介质中,该存储介质位于存储器402,处理器401读取存储器402中的信息,结合其硬件完成前述方法的步骤。The methods disclosed in the foregoing embodiments of the present disclosure may be applied to the processor 401 or implemented by the processor 401 . The processor 401 may be an integrated circuit chip and has signal processing capability. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 401 or instructions in the form of software. The aforementioned processor 401 may be a general-purpose processor, DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. The processor 401 may implement or execute various methods, steps, and logic block diagrams disclosed in the embodiments of the present disclosure. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present disclosure may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, and the storage medium is located in the memory 402. The processor 401 reads the information in the memory 402, and completes the steps of the foregoing method in combination with its hardware.
在示例性实施例中,电子设备400可以被一个或多个应用专用集成电路(ASIC,Application Specific Integrated Circuit)、可编程逻辑器件(PLD,Programmable Logic Device)、复杂可编程逻辑器件(CPLD,Complex Programmable Logic Device)、FPGA、通用处理器、控制器、MCU、微处理器(Microprocessor)、或其他电子元件实现,用于执行前述方法。In an exemplary embodiment, the electronic device 400 may be implemented by one or more Application Specific Integrated Circuit (ASIC, Application Specific Integrated Circuit), Programmable Logic Device (PLD, Programmable Logic Device), Complex Programmable Logic Device (CPLD, Complex Programmable Logic Device), FPGA, general-purpose processor, controller, MCU, microprocessor (Microprocessor), or other electronic components to implement the aforementioned method.
本公开实施例还提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现本公开实施例无人机目标跟踪方法的步骤。The embodiment of the present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for tracking a UAV target in the embodiment of the present disclosure are implemented.
本公开所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。The methods disclosed in the several method embodiments provided in the present disclosure can be combined arbitrarily to obtain new method embodiments if there is no conflict.
本公开所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。The features disclosed in several product embodiments provided in the present disclosure can be combined arbitrarily without conflict to obtain new product embodiments.
本公开所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。The features disclosed in several method or device embodiments provided in the present disclosure may be combined arbitrarily without conflict to obtain new method embodiments or device embodiments.
在本公开所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例 如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided in the present disclosure, it should be understood that the disclosed devices and methods may be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or May be integrated into another system, or some features may be ignored, or not implemented. In addition, the coupling, or direct coupling, or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical or other forms of.
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units; Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本公开各实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may be used as a single unit, or two or more units may be integrated into one unit; the above-mentioned integration The unit can be realized in the form of hardware or in the form of hardware plus software functional unit.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps for realizing the above-mentioned method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the It includes the steps of the above method embodiments; and the aforementioned storage medium includes: various media that can store program codes such as removable storage devices, ROM, RAM, magnetic disks or optical disks.
或者,本公开上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本公开各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Alternatively, if the above-mentioned integrated units of the present disclosure are realized in the form of software function modules and sold or used as independent products, they may also be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solutions of the embodiments of the present disclosure or the part that contributes to the prior art can be embodied in the form of software products, the computer software products are stored in a storage medium, including several instructions for Make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the methods described in various embodiments of the present disclosure. The aforementioned storage medium includes: various media capable of storing program codes such as removable storage devices, ROM, RAM, magnetic disks or optical disks.
以上所述,仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope of the present disclosure. should fall within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be determined by the protection scope of the claims.

Claims (10)

  1. 一种无人机目标跟踪方法,所述方法包括:A method for tracking an unmanned aerial vehicle, the method comprising:
    获取无人机采集的第一图像数据,所述第一图像数据包括第一图像和第二图像;所述第二图像为所述第一图像后的一帧图像;Obtain the first image data collected by the drone, the first image data includes a first image and a second image; the second image is a frame of image after the first image;
    确定所述第一图像中的目标对象所在的第一区域以及所述第二图像中的所述目标对象相关联的第二区域;对所述第一区域和所述第二区域的像素点进行目标跟踪处理,分别获得所述第一区域中各像素点对应响应值中的第一响应峰值以及所述第二区域中各像素点对应响应值中的第二响应峰值,以及分别获得所述第一区域中的所述目标对象的第一跟踪框信息以及所述第二区域中的所述目标对象的第二跟踪框信息;Determining a first area where the target object in the first image is located and a second area associated with the target object in the second image; performing pixel points in the first area and the second area Target tracking processing, respectively obtaining the first response peak value in the response value corresponding to each pixel point in the first area and the second response peak value in the response value corresponding to each pixel point in the second area, and respectively obtaining the first response peak value in the response value corresponding to each pixel point in the second area; First tracking frame information of the target object in an area and second tracking frame information of the target object in the second area;
    确定所述第一响应峰值和所述第二响应峰值之间的第一差异系数,以及确定所述第一跟踪框信息和所述第二跟踪框信息之间的第二差异系数;determining a first coefficient of difference between the first peak response and the second peak response, and determining a second coefficient of difference between the first tracking frame information and the second tracking frame information;
    基于所述第一差异系数和所述第二差异系数确定所述目标对象的被遮挡程度,根据所述目标对象的被遮挡程度向所述无人机发送控制指令,所述控制指令用于调整所述无人机的飞行状态。Determine the degree of occlusion of the target object based on the first difference coefficient and the second difference coefficient, and send a control instruction to the UAV according to the degree of occlusion of the target object, and the control instruction is used to adjust The flight state of the drone.
  2. 根据权利要求1所述的方法,其中,所述根据所述目标对象的被遮挡程度向所述无人机发送控制指令,包括:The method according to claim 1, wherein said sending control instructions to said UAV according to the degree of occlusion of said target object comprises:
    当所述目标对象的被遮挡程度小于第一阈值时,向所述无人机发送第一控制指令,所述第一控制指令用于指示所述无人机调整飞行方向,以使所述无人机跟踪所述目标对象;When the degree of occlusion of the target object is less than the first threshold, a first control instruction is sent to the UAV, and the first control instruction is used to instruct the UAV to adjust the flight direction so that the UAV man-machine tracking of the target object;
    当所述目标对象被遮挡程度大于或等于所述第一阈值时,向所述无人机发送第二控制指令,所述第二控制指令用于指示所述无人机维持悬停状态,以使所述无人机在所述悬停状态下连续采集图像数据。When the degree of occlusion of the target object is greater than or equal to the first threshold, a second control instruction is sent to the UAV, and the second control instruction is used to instruct the UAV to maintain a hovering state to Make the UAV continuously collect image data in the hovering state.
  3. 根据权利要求2所述的方法,其中,所述第一控制指令中还包括目标对象运动信息;所述方法还包括:The method according to claim 2, wherein the first control instruction further includes target object motion information; the method further comprises:
    获得所述第一响应峰值对应的像素点在像素坐标系下的第一中心点坐标;所述第一响应峰值对应的像素点对应于所述第一跟踪框的中心点;Obtaining the coordinates of the first center point of the pixel point corresponding to the first response peak value in the pixel coordinate system; the pixel point corresponding to the first response peak value corresponds to the center point of the first tracking frame;
    获得所述第二响应峰值对应的像素点在所述像素坐标系下的第二中心点坐标;所述第二响应峰值对应的像素点对应于所述第二跟踪框的中心点;Obtaining the second center point coordinates of the pixel point corresponding to the second response peak value in the pixel coordinate system; the pixel point corresponding to the second response peak value corresponds to the center point of the second tracking frame;
    在所述像素坐标系下确定所述第一中心点坐标和所述第二中心点坐标 之间的连线,获得所述连线与水平轴之间的夹角,所述夹角的取值范围为大于等于0度小于90度;Determine the connection line between the first center point coordinates and the second center point coordinates in the pixel coordinate system, obtain the angle between the connection line and the horizontal axis, and the value of the angle The range is greater than or equal to 0 degrees and less than 90 degrees;
    基于所述第一中心点坐标、所述第二中心点坐标及所述夹角,获得所述目标对象运动信息。Based on the coordinates of the first center point, the coordinates of the second center point, and the included angle, motion information of the target object is obtained.
  4. 根据权利要求2所述的方法,其中,所述方法还包括:The method according to claim 2, wherein the method further comprises:
    获得所述无人机在悬停状态下采集的第二图像数据,重新检测所述第二图像数据中的所述目标对象;Obtaining second image data collected by the drone in a hovering state, and re-detecting the target object in the second image data;
    获得所述第二图像数据中的第三图像中的物体检测框,基于所述物体检测框对所述目标对象进行跟踪。An object detection frame in the third image in the second image data is obtained, and the target object is tracked based on the object detection frame.
  5. 根据权利要求1所述的方法,其中,所述确定所述第一图像中的目标对象所在的第一区域以及所述第二图像中的目标对象相关联的第二区域,包括:The method according to claim 1, wherein said determining the first area where the target object in the first image is located and the second area associated with the target object in the second image comprises:
    获得所述第一图像中的所述目标对象所在的第一区域,以及所述第一区域的第一中心位置;Obtain a first area where the target object is located in the first image, and a first center position of the first area;
    确定所述第二图像中与所述第一中心位置对应的第二中心位置,基于所述第二中心位置确定所述第二区域。A second center position corresponding to the first center position in the second image is determined, and the second area is determined based on the second center position.
  6. 根据权利要求1所述的方法,其中,所述确定所述第一响应峰值和所述第二响应峰值之间的第一差异系数,包括:The method of claim 1, wherein said determining a first coefficient of difference between said first response peak and said second response peak comprises:
    根据所述第一响应峰值和所述第二响应峰值之间的差值和变化系数确定所述第一差异系数;determining the first coefficient of difference based on a difference between the first peak response and the second peak response and a coefficient of variation;
    其中,所述变化系数的取值与所述第一响应峰值与第二阈值的比较结果以及第三响应峰值与第二阈值的比较结果相关,所述第三响应峰值为第四图像中与所述目标对象相关联的区域中的各像素点对应的响应值中的最大值;所述第四图像为所述第一图像的后一帧图像。Wherein, the value of the variation coefficient is related to the comparison result between the first response peak value and the second threshold and the comparison result between the third response peak value and the second threshold value, and the third response peak value is the same The maximum value among the response values corresponding to each pixel point in the area associated with the target object; the fourth image is a subsequent frame image of the first image.
  7. 根据权利要求1所述的方法,其中,所述确定所述第一跟踪框信息和所述第二跟踪框信息之间的第二差异系数,包括:The method according to claim 1, wherein said determining the second difference coefficient between the first tracking frame information and the second tracking frame information comprises:
    根据所述第一跟踪框信息确定第一跟踪框的面积,根据所述第二跟踪框信息确定第二跟踪框的面积;determining the area of the first tracking frame according to the first tracking frame information, and determining the area of the second tracking frame according to the second tracking frame information;
    根据所述第一跟踪框的面积和所述第二跟踪框的面积之间的比值确定所述第二差异系数。The second difference coefficient is determined according to a ratio between an area of the first tracking frame and an area of the second tracking frame.
  8. 一种无人机目标跟踪装置,所述装置包括:An unmanned aerial vehicle target tracking device, said device comprising:
    第一获取模块,配置为获取无人机采集的第一图像数据,所述第一图 像数据包括第一图像和第二图像;所述第二图像为所述第一图像后的一帧图像;确定所述第一图像中的目标对象所在的第一区域以及所述第二图像中的所述目标对象相关联的第二区域;The first acquisition module is configured to acquire the first image data collected by the drone, the first image data includes a first image and a second image; the second image is a frame of image after the first image; determining a first area where the target object in the first image is located and a second area associated with the target object in the second image;
    跟踪模块,配置为对所述第一区域和所述第二区域的像素点进行目标跟踪处理,分别获得所述第一区域中各像素点对应响应值中的第一响应峰值以及所述第二区域中各像素点对应响应值中的第二响应峰值,以及分别获得所述第一区域中的所述目标对象的第一跟踪框信息以及所述第二区域中的所述目标对象的第二跟踪框信息;The tracking module is configured to perform target tracking processing on the pixels in the first area and the second area, and respectively obtain the first response peak value and the second response value among the corresponding response values of each pixel in the first area. Each pixel point in the area corresponds to the second response peak value in the response value, and respectively obtain the first tracking frame information of the target object in the first area and the second tracking frame information of the target object in the second area. Tracking box information;
    第一确定模块,配置为确定所述第一响应峰值和所述第二响应峰值之间的第一差异系数,以及确定所述第一跟踪框信息和所述第二跟踪框信息之间的第二差异系数;A first determining module configured to determine a first difference coefficient between the first response peak value and the second response peak value, and determine a first difference coefficient between the first tracking frame information and the second tracking frame information Two coefficients of difference;
    控制模块,配置为基于所述第一差异系数和所述第二差异系数确定所述目标对象的被遮挡程度,根据所述目标对象的被遮挡程度向所述无人机发送控制指令,所述控制指令用于调整所述无人机的飞行状态。A control module configured to determine the degree of occlusion of the target object based on the first difference coefficient and the second difference coefficient, and send a control command to the UAV according to the degree of occlusion of the target object, the The control instruction is used to adjust the flight state of the drone.
  9. 一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现权利要求1至7任一项所述方法的步骤。A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
  10. 一种电子设备,包括:处理器和用于存储能够在处理器上运行的计算机程序的存储器,An electronic device comprising: a processor and a memory for storing a computer program capable of running on the processor,
    其中,所述处理器用于运行所述计算机程序时,执行权利要求1至7任一项所述方法的步骤。Wherein, when the processor is used to run the computer program, it executes the steps of the method according to any one of claims 1 to 7.
PCT/CN2022/130282 2021-11-05 2022-11-07 Target tracking method and apparatus for unmanned aerial vehicle, electronic device, and storage medium WO2023078445A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111306538.1 2021-11-05
CN202111306538.1A CN116088558A (en) 2021-11-05 2021-11-05 Unmanned aerial vehicle target tracking method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2023078445A1 true WO2023078445A1 (en) 2023-05-11

Family

ID=86199735

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/130282 WO2023078445A1 (en) 2021-11-05 2022-11-07 Target tracking method and apparatus for unmanned aerial vehicle, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN116088558A (en)
WO (1) WO2023078445A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107464256A (en) * 2017-07-05 2017-12-12 河海大学 A kind of target detection differentiates the correlating method of amendment with possibility
CN108010067A (en) * 2017-12-25 2018-05-08 北京航空航天大学 A kind of visual target tracking method based on combination determination strategy
CN108803655A (en) * 2018-06-08 2018-11-13 哈尔滨工程大学 A kind of UAV Flight Control platform and method for tracking target
JP2020149641A (en) * 2019-03-15 2020-09-17 オムロン株式会社 Object tracking device and object tracking method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107464256A (en) * 2017-07-05 2017-12-12 河海大学 A kind of target detection differentiates the correlating method of amendment with possibility
CN108010067A (en) * 2017-12-25 2018-05-08 北京航空航天大学 A kind of visual target tracking method based on combination determination strategy
CN108803655A (en) * 2018-06-08 2018-11-13 哈尔滨工程大学 A kind of UAV Flight Control platform and method for tracking target
JP2020149641A (en) * 2019-03-15 2020-09-17 オムロン株式会社 Object tracking device and object tracking method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
NING, CHENJING ET AL.: "Correlation Filter Tracking Algorithm Based on Feature Matching under Occlusion Discrimination", MODERN COMPUTER, 5 January 2021 (2021-01-05), XP009546017, ISSN: 1007-1423 *

Also Published As

Publication number Publication date
CN116088558A (en) 2023-05-09

Similar Documents

Publication Publication Date Title
CN109144095B (en) Embedded stereoscopic vision-based obstacle avoidance system for unmanned aerial vehicle
US11915502B2 (en) Systems and methods for depth map sampling
US11263445B2 (en) Method, apparatus and system for human body tracking processing
US11887318B2 (en) Object tracking
WO2020014909A1 (en) Photographing method and device and unmanned aerial vehicle
WO2020113423A1 (en) Target scene three-dimensional reconstruction method and system, and unmanned aerial vehicle
KR101530255B1 (en) Cctv system having auto tracking function of moving target
WO2020233397A1 (en) Method and apparatus for detecting target in video, and computing device and storage medium
Litomisky et al. Removing moving objects from point cloud scenes
CN109213202B (en) Goods placement method, device, equipment and storage medium based on optical servo
Palaniappan et al. Moving object detection for vehicle tracking in wide area motion imagery using 4d filtering
EP4090000A1 (en) Method and device for image processing, electronic device, and storage medium
CN112651994A (en) Ground multi-target tracking method
WO2023078445A1 (en) Target tracking method and apparatus for unmanned aerial vehicle, electronic device, and storage medium
WO2021217403A1 (en) Method and apparatus for controlling movable platform, and device and storage medium
JP7363504B2 (en) Object detection method, detection device and electronic equipment
CN111103891B (en) Unmanned aerial vehicle rapid posture control system and method based on skeleton point detection
Bardas et al. 3D tracking and classification system using a monocular camera
WO2021223166A1 (en) State information determination method, apparatus and system, and movable platform and storage medium
WO2023283929A1 (en) Method and apparatus for calibrating external parameters of binocular camera
Li et al. ALOT: Augmented Localization with Obstacle Tracking
CN113515978A (en) Data processing method, device and storage medium
Lian et al. A real-time traffic environmental perception algorithm fusing stereo vision and deep network
US11995869B2 (en) System and method to improve object detection accuracy by focus bracketing
Kachhava et al. Security system and surveillance using real time object tracking and multiple cameras

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22889466

Country of ref document: EP

Kind code of ref document: A1