Speed measurement method based on dynamic zoom of unmanned aerial vehicle and inspection system

By combining a lightweight YOLOv8s detection model and the ByteTrack algorithm, and dynamically adjusting the focal length parameters, the problems of computational redundancy and projection error in UAV speed measurement technology are solved, achieving high frame rate and stable traffic monitoring and speed measurement results.

CN120722002BActive Publication Date: 2025-11-07NANKAI UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511232103.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-01
Publication Date
2025-11-07
Estimated Expiration
2045-09-01

AI Technical Summary

Technical Problem

Existing drone speed measurement technology suffers from severe computational redundancy, making it difficult to meet real-time requirements. It does not fully consider projection errors caused by drone dynamic parameters and fails to effectively distinguish the physical effects of optical zoom and digital zoom, resulting in decreased coordinate mapping stability.

Method used

A lightweight YOLOv8s detection model and ByteTrack tracking algorithm are used, combined with real-time UAV parameters for cross-frame correlation and coordinate system projection mapping, dynamically adjusting focal length parameters to calibrate zoom operation, suppressing jitter noise and distinguishing between optical and digital zoom processing.

Benefits of technology

It achieves high frame rate processing in scenarios with minimal occlusion and continuous target displacement, reduces ID jumps, enhances trajectory coherence, reduces computational complexity, and improves the stability and accuracy of speed measurement. It is suitable for wide-area flight conditions and supports traffic management in multiple scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120722002B_ABST
    Figure CN120722002B_ABST
Patent Text Reader

Abstract

The application provides a speed measurement method and an inspection system based on dynamic zoom of a UAV, comprising: acquiring a video stream collected by a camera of the UAV in real time by dynamically adjusting a focal length parameter; inputting the video stream into a detection model frame by frame; outputting a target detection frame set corresponding to a current frame; performing cross-frame association on detection frames of adjacent frames by a ByteTrack algorithm to assign a unique instance identifier to the same target; acquiring real-time parameters of the UAV, establishing a real road surface coordinate system and a pixel imaging coordinate system, and performing coordinate system projection mapping; and calculating a real speed of the target. The application has the beneficial effects that dynamic parameter fusion and UAV displacement compensation greatly reduce coordinate mapping errors, especially in a pitch angle or zoom scene, and the improvement is obvious; by introducing a center point position transformation, the application dynamically calibrates image center deviation caused by digital zoom, effectively eliminating pixel-physical coordinate mapping distortion caused by simple image cropping or interpolation enlargement.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of traffic management, and in particular relates to a speed measurement method based on dynamic zooming of a UAV and a patrol system. BACKGROUND

[0002] In the existing technology, the vehicle speed measurement technology based on a UAV maps the position on the real road surface by analyzing the image coordinates of the target in the video stream in combination with the flight parameters of the UAV, and then calculates the target motion speed. However, the existing technology has obvious deficiencies: the traditional detection model (such as a two-stage detector) is difficult to meet the real-time requirement due to serious calculation redundancy; the speed estimation model does not fully consider the projection error caused by the dynamic parameters (such as the change of the pitch angle and the zoom operation) of the UAV; the existing geometric coordinate mapping method relies on the assumption that the flight plane of the UAV is strictly parallel to the road, and is easily disturbed by the angle deviation and the displacement of the UAV itself in actual application. In addition, the existing technology cannot effectively distinguish the physical effects of optical zooming and digital zooming, and the stability of coordinate mapping is significantly reduced in the zooming scene. Therefore, there is an urgent need for a real-time speed measurement method and system that can fuse the dynamic parameters of the UAV, adapt to the zooming mechanism and compensate for the motion disturbance of the UAV itself to solve the above problems. SUMMARY

[0003] To solve the above technical problems, the present application provides a speed measurement method based on dynamic zooming of a UAV and a patrol system, which is particularly suitable for measuring the speed and monitoring the target on the road surface by a UAV.

[0004] The technical solution adopted by the present application is as follows: in the first aspect, a speed measurement method based on dynamic zooming of a UAV is provided, comprising:

[0005] acquiring a video stream collected by a camera of the UAV through dynamic adjustment of the focal length parameter in real time;

[0006] inputting the video stream frame by frame into a detection model;

[0007] outputting a target detection box set corresponding to the current frame;

[0008] cross-frame associating the detection boxes of adjacent frames by a ByteTrack algorithm to assign a unique instance identifier to the same target;

[0009] acquiring real-time parameters of the UAV, establishing a real road surface coordinate system and a pixel imaging coordinate system and performing coordinate system projection mapping;

[0010] calculating the real speed of the target.

[0011] Further, the detection includes a YOLOv8s model.

[0012] Furthermore, the real-time parameters of the drone include drone altitude, drone pitch angle, camera angle of view, image pixel width, video frame rate, and sensor maximum image aspect ratio.

[0013] Furthermore, establishing the real road surface coordinate system and the pixel imaging coordinate system and performing coordinate system projection mapping includes the following steps:

[0014] Taking the real-time projection point of the UAV on the ground as the origin, and the UAV's forward direction as the y-axis, passing through... The ground normal vector of a point is the z-axis, and the plane... With the normal vector as the x-axis, establish a coordinate system for the actual road surface;

[0015] The normal vector of the plane containing the sensor at the center of the drone lens is... The origin is the point where the axis intersects the plane containing the sensor. The direction in which the sensor width is located is The axis, the direction of the sensor height is Establish a pixel imaging coordinate system using axes;

[0016] Through equations , Perform coordinate system projection mapping, where ( () represents the coordinates of the target in the pixel imaging coordinate system. Let be the coordinates of the target in the real road surface coordinate system. The aspect ratio of the sensor's maximum image. For the drone's pitch angle, The width of the image in pixels. From the camera's perspective, This refers to the flight altitude of the drone.

[0017] Through equations Obtain the velocity of the target at time t. ,in Let t be the position of the UAV in the real road surface coordinate system at time t. Let be the position of the UAV at time t-1 in the real road surface coordinate system, and let be the scalar velocity of the UAV at time t. The video frame rate is f.

[0018] Furthermore, through equations Suppressing random noise caused by drone jitter during flight, the target's suppressed velocity at time t is obtained. ,in Let be the relative coordinate vector of the target to the UAV at time t, obtained by the coordinate transformation algorithm. Let be the relative coordinate vector of the target to the UAV at time tk, obtained by the coordinate transformation algorithm, and let be the flight velocity vector of the UAV at time ti. k is the time interval, k takes 10.

[0019] Further, the unmanned aerial vehicle adjusts the focal length parameter by dynamic adjustment, including optical zoom and digital zoom, when the digital zoom, the detection frame coordinates are scaled according to the zoom ratio; when the optical zoom, the equivalent focal length parameter of the lens is updated.

[0020] Further, when the digital zoom, the equation The center point position transformation is added to calibrate the calculation of the target speed, wherein is the zoom magnification, is the minimum magnification of different lenses.

[0021] In a second aspect, a speed measurement and inspection system based on dynamic zoom of an unmanned aerial vehicle is provided, comprising:

[0022] A monitoring module is configured to monitor a target on a road surface by an unmanned aerial vehicle and obtain a video stream;

[0023] A target classification and identification module is configured to process the video stream to identify the type of the target, the type including a car, a bus, a truck and a pedestrian;

[0024] A road congestion detection module is configured to receive the video stream and the type of the target to calculate the number of cars, buses and trucks, determine whether the road surface is congested, and output;

[0025] A vehicle speed calculation module is configured to receive the video stream, the road congestion condition and the type of the target to calculate the speed of the vehicle, and when the road surface is not congested, mark and remind the vehicle below the speed limit;

[0026] A pedestrian detection module is configured to receive the video stream and the type of the target to detect the pedestrian, and when the pedestrian is detected on the road surface, mark and warn.

[0027] In a third aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the speed measurement method based on dynamic zoom of an unmanned aerial vehicle provided by the present disclosure.

[0028] In a fourth aspect, a computer program product is provided, comprising computer programs / instructions, and the computer programs / instructions execute the speed measurement method based on dynamic zoom of an unmanned aerial vehicle provided by the present disclosure when executed by a processor.

[0029] The application has the advantages and positive effects that: due to the above technical scheme, the lightweight YOLOv8s detection model and the ByteTrack tracking algorithm are selected, the calculation complexity and the memory occupation are reduced, the high frame rate processing capability is realized, the ID jump is effectively reduced in the road scene with less occlusion and continuous target displacement, and the trajectory continuity is enhanced; the dynamic parameter fusion and the unmanned aerial vehicle displacement compensation greatly reduce the coordinate mapping error, especially in the pitch angle or zoom scene; the stable speed measurement under the condition of wide area flight of the unmanned aerial vehicle is supported, and the system applicability is significantly improved; by introducing the center point position transformation, the image center offset caused by digital zoom is dynamically calibrated, the pixel-physical coordinate mapping distortion caused by pure image cropping or interpolation enlargement is effectively eliminated, and the risk of false positioning is avoided; through the cascading design of the system internal modules, the flexible switching of wide-angle monitoring and detailed target is realized, the global traffic situation awareness is ensured, and the local high-precision speed measurement demand is met. BRIEF DESCRIPTION OF DRAWINGS

[0030] Figure 1 is a flow diagram of a speed measurement method based on dynamic zoom of an unmanned aerial vehicle according to an embodiment of the application;

[0031] Figure 2 is a real road surface coordinate system diagram according to an embodiment of the application;

[0032] Figure 3 is a pixel imaging coordinate system diagram according to an embodiment of the application;

[0033] Figure 4 is a wide plane geometric structure diagram according to an embodiment of the application;

[0034] Figure 5 is a high plane geometric structure diagram according to an embodiment of the application. DETAILED DESCRIPTION

[0035] The present disclosure will be described more fully hereinafter with reference to the accompanying drawings, in which example embodiments of the present disclosure are described. The technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the accompanying drawings of the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present disclosure.

[0036] As shown in Figure 1 , the present application provides a speed measurement method based on dynamic zoom of an unmanned aerial vehicle, comprising:

[0037] S100, acquiring a video stream collected by a camera of an unmanned aerial vehicle in real time by dynamically adjusting a focal length parameter;

[0038] S200. Input the video stream frame by frame into the detection model;

[0039] S300, Output the set of target detection boxes for the current frame;

[0040] S400: The ByteTrack algorithm is used to associate detection boxes in adjacent frames across frames and assign a unique instance identifier to the same target.

[0041] S500: Acquire real-time parameters of the UAV, establish a real road surface coordinate system and a pixel imaging coordinate system, and perform coordinate system projection mapping;

[0042] S600: Calculate the target's true velocity.

[0043] Using the above method, a lightweight YOLOv8s detection model and ByteTrack tracking algorithm are selected to reduce computational complexity and memory usage, achieve high frame rate processing capability, effectively reduce ID jumps and enhance trajectory continuity in road scenes with few occlusions and continuous target displacement.

[0044] In one embodiment, the detection model includes the YOLOv8s model.

[0045] To address the issue of not being able to directly calculate target speed from video streams captured by drones, this embodiment provides an implementation method.

[0046] like Figures 2-3 As shown, in one embodiment, establishing the real road surface coordinate system and the pixel imaging coordinate system and performing coordinate system projection mapping includes the following steps:

[0047] Taking the real-time projection point of the UAV on the ground as the origin, and the UAV's forward direction as the y-axis, passing through... The ground normal vector of a point is the z-axis, and the plane... With the normal vector as the x-axis, establish a coordinate system for the actual road surface;

[0048] The normal vector of the plane containing the sensor at the center of the drone lens is... The origin is the point where the axis intersects the plane containing the sensor. The direction in which the sensor width is located is The axis, the direction of the sensor height is Establish a pixel imaging coordinate system using axes;

[0049] Through equations , Perform coordinate system projection mapping, where ( () represents the coordinates of the target in the pixel imaging coordinate system. Let be the coordinates of the target in the real road surface coordinate system. The aspect ratio of the sensor's maximum image. is a pitch angle of the UAV, is a pixel width of the image, is a camera view angle, is a flight height of the UAV;

[0050] The velocity of the target at time t is obtained by equation wherein is a position of the UAV in the real road coordinate system at time t, and the scalar of the flight velocity of the UAV at time t is , and the video frame rate is f.

[0051] By using the above method, the dynamic parameter fusion and the UAV displacement compensation greatly reduce the coordinate mapping error, especially in the pitch angle or zoom scene, the improvement is obvious; the stable speed measurement under the wide-area flight condition (height change, pitch angle fluctuation) of the UAV is supported, and the applicability of the system is significantly improved.

[0052] In an embodiment, in order to suppress the random noise generated by the shaking of the UAV during flight, that is, a more accurate estimation of the target velocity after considering the influence of the shaking of the UAV, the velocity of the target at time t is obtained by equation that is, the estimated velocity after suppressing the shaking of the UAV, wherein is the relative coordinate vector of the target to the UAV at time t obtained by the coordinate conversion algorithm, is the relative coordinate vector of the target to the UAV at time t-k obtained by the coordinate conversion algorithm, and the flight velocity vector of the UAV at time t-i is , and the vector of the flight velocity of the UAV at time t is (the horizontal component is 0), and k is the time interval, and k is 10.

[0053] In order to solve the problem that the UAV selects different zoom modes according to different situations when shooting, thereby causing the velocity to jump, an implementation manner is provided in the embodiment.

[0054] In an embodiment, the UAV adjusts the focal length parameter in a dynamic manner, including optical zoom and digital zoom, when it is digital zoom, the detection frame coordinates are scaled according to the zoom ratio; when it is optical zoom, the equivalent focal length parameter of the lens is updated.

[0055] By using the above method, the processing mechanism of distinguishing optical zoom and digital zoom is adopted, and the velocity jump caused by the zoom operation is avoided.

[0056] In order to solve the problem of image center offset caused by digital zoom when the UAV shoots, an implementation manner is provided in the embodiment. In order to solve the problem of image center offset caused by digital zoom when the UAV shoots, an implementation manner is provided in the embodiment.​

[0057] In one embodiment, when it is digital zoom, it is achieved through an equation. The calculation of the target velocity is calibrated by adding a change in the position of the center point. This refers to the zoom magnification. This represents the minimum magnification for different lenses.

[0058] By adopting the above method, the image center shift caused by digital zoom is dynamically calibrated by introducing a center point position transformation, effectively eliminating pixel-physical coordinate mapping distortion caused by simple image cropping or interpolation magnification, and avoiding the risk of mispositioning.

[0059] The following description, in conjunction with a preferred embodiment, illustrates the content involved in the above embodiments.

[0060] like Figures 2-5 As shown, a DJI M300RTK drone equipped with an H20T camera was used to capture a 4K@30fps video stream in wide-angle mode by default. Data was transmitted back in real-time via dual-frequency image transmission. The video stream was input frame by frame into a CMM-based YOLOv8s model, outputting a set of target detection boxes for the current frame. The ByteTrack algorithm was used to associate detection boxes between adjacent frames, assigning a unique instance identifier to the same target. Real-time parameters of the drone included image pixel width w, image pixel height h, and drone altitude. UAV pitch angle Camera field of view (FOV) and the camera's maximum image aspect ratio The video frame rate f is used to shift the coordinate origin of the image frame using equations. The origin at the top left corner of the detection box is converted to the origin at the center of the image. The real-time projection point of the drone on the ground is taken as the origin, and the drone's forward direction is the y-axis. The ground normal vector of a point is the z-axis, and the plane... The normal vector is taken as the x-axis, and a real road surface coordinate system is established; the normal vector of the plane where the sensor is located at the center point of the UAV lens is taken as... The origin is the point where the axis intersects the plane containing the sensor. The direction in which the sensor width is located is The axis, the direction of the sensor height is Establish a pixel imaging coordinate system using axes; the target's position on the ground is point c, and its position on the image is point [missing information]. In the coordinate system xOy, the projection of point c onto the y-axis is... In the image plane coordinate system midpoint exist The projection on the axis is ,exist The projection on the axis is According to the convex lens optical imaging principle, it is obvious that the plane is coplanar with the plane , and the plane is coplanar with the plane . The position of the target relative to the unmanned aerial vehicle is . In the plane, that is, the high plane, such as , the y coordinate of the target in the actual space coordinate system can be obtained through the equation Figure 5 . , . In the plane, that is, the wide plane, such as , the triangle is similar to the triangle Figure 4 , and can be obtained. . Through the coordinate system projection mapping equation , , , the coordinates of the target in the real road surface coordinate system are obtained, and the speed of the target is obtained through the equation if the unmanned aerial vehicle remains stationary. If the unmanned aerial vehicle flies and produces jitter, the speed of the target at time t is obtained through the equation , wherein is the relative coordinate vector of the target to the unmanned aerial vehicle obtained by the coordinate conversion algorithm, the flight speed vector of the unmanned aerial vehicle is , k is the time interval, and k is 10. The unmanned aerial vehicle adjusts the focal length parameter in a dynamic manner, including optical zoom and digital zoom. When it is digital zoom, the detection frame coordinates are scaled according to the zoom magnification; when it is optical zoom, the equivalent focal length parameter of the lens is updated. When it is digital zoom, the center point position transformation is increased through the equation to calibrate the calculation of the target speed, wherein is the zoom magnification, is the minimum magnification of different lenses. In order to facilitate the use of the unmanned aerial vehicle dynamic zoom-based speed measurement method provided by the present disclosure, the present disclosure further provides an unmanned aerial vehicle dynamic zoom-based speed measurement inspection system, comprising:

[0061] A monitoring module for monitoring targets on the road surface by an unmanned aerial vehicle and obtaining a video stream;

[0062] A target classification and identification module for processing the video stream to identify the type of target, including cars, buses, trucks and pedestrians;

[0063] A target classification and identification module for processing the video stream to identify the type of target, including cars, buses, trucks and pedestrians;

[0064] ​a road congestion detection module configured to receive the video stream and the target category to calculate the number of cars, buses and trucks, determine whether the road is congested and output the result;

[0065] a vehicle speed calculation module configured to receive the video stream, the road congestion condition and the target category to calculate the speed of the vehicle, mark and remind the vehicle when the speed is lower than the speed limit in the case of no road congestion;

[0066] a pedestrian detection module configured to receive the video stream and the target category to detect pedestrians, mark and warn when pedestrians are detected on the road.

[0067] With the above arrangement, the target classification and recognition module can accurately distinguish cars, buses, trucks and pedestrians, which can adapt to the needs of multiple scenes such as urban roads and expressways, avoid missed or false detection caused by the dependence of traditional methods on single vehicle detection, and improve the degree of traffic management refinement. The road congestion detection module dynamically counts the number of target vehicles, judges the congestion state in real time, provides data support for vehicle shunting and scheduling, and reduces the decline in traffic efficiency caused by congestion. The vehicle speed calculation module combines the congestion state classification processing: in the case of no congestion, it focuses on monitoring the ultra-low speed vehicle and marking it in real time to avoid the risk of rear-end collision caused by slow-moving vehicles; in the case of congestion, it reduces the speed measurement frequency to save computing power and improve system resource utilization efficiency; the pedestrian detection module marks and warns pedestrians on the road in real time, combines the advantage of high-altitude view of the unmanned aerial vehicle, avoids the blind area problem of ground equipment, and improves the safety of complex road conditions; through the cascading design of the modules in the system, the flexible switching of wide-angle monitoring and detailed targets is realized, which ensures the global traffic situation awareness while meeting the local high-precision speed measurement demand.

[0068] The above-mentioned embodiments will be described below in combination with a preferred embodiment.

[0069] The monitoring module adopts DJI M3TD unmanned aerial vehicle, and the magnification is 1-8 (the DJI M3TD unmanned aerial vehicle lens 1-7 times magnification is a wide-angle lens, and 7-56 times is a long-focus lens) to shoot 4K@30fps video stream, and real-time data is returned through double-frequency image transmission. The target classification and recognition module is based on a YOLOv8s model, the classification head is expanded to include categories such as but not limited to cars, buses, trucks, and pedestrians, the data set is trained using BDD100K and self-defined unmanned aerial vehicle perspective data augmentation, video frames from the monitoring module are received, detection boxes and categories are output through YOLOv8s and a deep learning model, a deep learning real-time semantic segmentation network is used to segment the road, and the detected targets in the non-road (such as trees and signboards) are deleted to reduce the operation load. The road congestion detection module receives video frames and target types, and the number of target vehicles in the video stream covering the road section is counted every 15 seconds, and when the ratio of the number of vehicles to the number of road strips (or the length of the road surface) is greater than a set threshold, the congestion is determined. The vehicle speed calculation module receives video frames, target types and congestion conditions, calculates the speed of all vehicles in the video frames, and if there is a vehicle with a speed lower than 70% of the minimum speed limit, the vehicle is marked as an abnormal low-speed vehicle, the unmanned aerial vehicle broadcasts an alarm voice and pushes an alarm to the ground terminal for broadcasting, and the low-speed vehicle detection is stopped in the road congestion to save computing power. The pedestrian detection module receives video frames and target types, and detects pedestrians in the vehicle passing area (such as a motor vehicle lane and a non-isolated intersection) in real time, and if the pedestrian coordinates are located within the road boundary, the video stream is superimposed with a red frame to mark the pedestrian; the unmanned aerial vehicle broadcasts an alarm voice and pushes an alarm to the ground terminal for broadcasting.

[0070] Based on the embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0071] An electronic device includes at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the speed measurement method based on dynamic zoom of an unmanned aerial vehicle provided by the present disclosure.

[0072] The electronic device is intended to represent a variety of forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent a variety of forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present disclosure described and / or claimed in this document.

[0073] A non-transitory computer readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the speed measurement method based on dynamic zoom of a UAV provided in the present disclosure.

[0074] The various embodiments in the present disclosure can be implemented in digital electronic circuitry, integrated circuitry, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), system on a chip systems (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0075] A computer program product including computer programs / instructions that, when executed by a processor, perform the speed measurement method based on dynamic zoom of a UAV provided in the present disclosure.

[0076] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, causes the machine to perform the functions / operations specified in the flow diagrams and / or block diagrams. The program code can execute entirely on a machine, partly on a machine, as a stand-alone software package, partly on a machine and partly on a remote machine or entirely on a remote machine or server.

[0077] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0078] The above detailed description of the embodiments of the present application is only a preferred embodiment of the present application, and should not be considered as limiting the scope of the present application. Any equivalent changes and improvements made according to the scope of the present application should still belong to the patent scope of the present application.

Claims

1. A speed measurement method based on dynamic zooming of a UAV, characterized in that, The method comprises the following steps: acquiring a video stream collected by a camera of a UAV through dynamic adjustment of a focal length parameter; inputting the video stream frame by frame into a detection model; outputting a target detection frame set corresponding to a current frame; performing cross-frame association on detection frames of adjacent frames through a ByteTrack algorithm to assign a unique instance identifier to a same target; acquiring real-time parameters of the UAV, establishing a real road surface coordinate system and a pixel imaging coordinate system, and performing coordinate system projection mapping; calculating a real speed of the target; the real-time parameters of the UAV include a UAV height, a UAV pitch angle, a camera view angle, an image pixel width, a video frame rate, and a maximum image aspect ratio of a sensor; establishing the real road surface coordinate system and the pixel imaging coordinate system and performing the coordinate system projection mapping comprises the following steps: Taking the real-time projection point of the unmanned aerial vehicle on the ground as the origin, the advancing direction of the unmanned aerial vehicle as the y axis, the ground normal vector passing through the point as the z axis, and the normal vector of the plane as the x axis, a real road surface coordinate system is established. a real road surface coordinate system is established.​ A normal vector of a plane where a sensor of a lens center point of the unmanned aerial vehicle is located is taken as an axis, an intersection of the axis and the plane where the sensor is located is taken as an origin, a direction where a width of the sensor is located is taken as an axis, a direction where a height of the sensor is located is taken as an axis, and a pixel imaging coordinate system is established. ​​​​ Through equations , Perform coordinate system projection mapping, where ( () represents the coordinates of the target in the pixel imaging coordinate system. Let be the coordinates of the target in the real road surface coordinate system. The aspect ratio of the sensor's maximum image. For the drone's pitch angle, The width of the image in pixels. From the camera's perspective, This refers to the flight altitude of the drone. By equation get the target speed at time t where is the position of the UAV in the real road coordinate system at time t, is the position of the UAV in the real road coordinate system at time t-1, and the flight speed scalar of the UAV at time t is , and the video frame rate is f; By equation Inhibit random noise generated by the shaking of the unmanned aerial vehicle when flying, get the target after inhibition at t time speed , wherein The relative coordinate vector of the target to the unmanned aerial vehicle at t time obtained by the coordinate conversion algorithm, The relative coordinate vector of the target to the unmanned aerial vehicle at t-k time obtained by the coordinate conversion algorithm, the flight speed vector of the unmanned aerial vehicle at t-i time is , k is the time interval, k is 10. 2.The UAV dynamic zoom-based speed measurement method of claim 1, wherein: the detection model comprises a YOLOv8s model. 3.The UAV dynamic zoom-based speed measurement method of claim 1, wherein: The UAV adjusts the focal length parameter in a manner including optical zooming and digital zooming; when the digital zooming is used, the detection frame coordinates are scaled according to a zoom ratio; and when the optical zooming is used, an equivalent focal length parameter of a lens is updated.

4. The UAV dynamic zoom-based speed measurement method of claim 3, wherein: When digital zoom, the target speed is calculated by the equation The center point position transformation is increased to calibrate the target speed calculation, where is the zoom magnification, is the minimum magnification for different lenses.

5. A patrol system based on UAV dynamic zoom speed measurement, using the UAV dynamic zoom speed measurement method according to claim 4, characterized in that, The method comprises the following steps: a monitoring module for monitoring a target on a road surface through a UAV and obtaining a video stream; a target classification and identification module for processing the video stream to identify a type of the target, the type including a car, a bus, a truck, and a pedestrian; a road congestion detection module for receiving the video stream and the target type to calculate a number of the cars, the buses, and the trucks, determining whether the road surface is congested, and outputting a result; a vehicle speed calculation module for receiving the video stream, a congestion condition of the road surface, and the target type to calculate a speed of a vehicle, and marking and reminding a vehicle that is lower than a speed limit when the road surface is not congested; a pedestrian detection module for receiving the video stream and the target type to detect a pedestrian, and marking and warning when the pedestrian is detected on the road surface. 6.An electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4. 7.A computer program product comprising computer programs / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Moving target tracking method and device and unmanned aerial vehicle (UAV)

    CN110147122A

  • Vehicle speed detection method and device and storage medium

    CN117689941A

  • Unmanned aerial vehicle real-time road condition monitoring method and system and medium

    CN120148242A