Vehicle speed estimation method and device based on aerial photography using unmanned aerial vehicle, and medium
By using drone aerial video data processing technology, image offset is automatically corrected and vehicle speed is estimated, solving the problems of high cost and large error in existing methods. This achieves high-precision speed measurement in complex environments and is suitable for rapid deployment and resource-constrained scenarios.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- SHANDONG JIAOTONG UNIV
- Filing Date
- 2025-04-08
- Publication Date
- 2026-06-04
AI Technical Summary
Existing methods for estimating the speed of unmanned vehicles rely on high-performance unmanned aerial vehicles and cumbersome positioning calibration, which are costly and prone to large errors, making it difficult to achieve accurate speed measurement in complex environments.
By extracting regions of interest from drone aerial video data, adaptive histogram equalization, processing with the deep learning model U-Net and perspective transformation matrix, image offset is automatically corrected. Combined with YOLO and DeepSORT algorithms, vehicle trajectory recognition and speed estimation using the dynamic and static frame difference method are performed.
It achieves stable and accurate speed measurement at various altitudes and angles, reduces dependence on UAV hardware performance, is suitable for complex scenarios and resource-constrained environments, and meets the application requirements of high real-time performance, low cost and high reliability.
Smart Images

Figure CN2025087872_04062026_PF_FP_ABST
Abstract
Description
A method, device, and medium for estimating vehicle speed based on UAV aerial photography.
[0001] This application claims priority to Chinese Patent Application No. 202411722841.3, filed on November 28, 2024, entitled "A method, device and medium for estimating vehicle speed based on drone aerial photography", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of vehicle speed estimation, and in particular to a method, device and medium for vehicle speed estimation based on drone aerial photography. Background Technology
[0003] Methods for estimating vehicle speed using drones mainly include image processing-based and GPS / IMU data-based methods. Image processing-based methods typically use drone aerial photography to acquire raw traffic images, then perform preprocessing, use successive image subtraction to detect moving vehicles, and extract lane lines to determine lane boundaries. The vehicle speed is then estimated using the lane width as a scale.
[0004] GPS-based methods calculate location changes at different times using GPS-provided location information, then divide by the time interval to obtain the velocity. This method offers high accuracy in open areas, but is significantly affected by GPS signal strength; environments such as urban canyons or forests may impact accuracy and efficiency.
[0005] The inertial measurement unit (IMU) based method uses accelerometer and gyroscope data to calculate velocity through integration. This method does not rely on external signals, can be used in any environment, and is suitable for rapidly changing scenarios, but it has a large cumulative error and requires error correction.
[0006] Existing drones for detecting vehicle speed have high requirements for the drones, such as flight altitude and shooting angle. They are also prone to flight shaking, which leads to large errors in the captured images and video image shifts. At the same time, due to the complexity of drone hardware and software, they are difficult to apply to more complex scenarios, thus making it impossible to accurately calculate the actual speed of moving vehicles. Summary of the Invention
[0007] This application provides a vehicle speed estimation method, device, and medium based on UAV aerial photography to solve the following technical problems: Existing UAV methods for estimating vehicle speed rely heavily on high-performance UAVs and require cumbersome positioning and calibration to calculate vehicle speed correctly, resulting in high costs and large calculation errors.
[0008] The embodiments of this application adopt the following technical solutions:
[0009] On one hand, this application provides a vehicle speed estimation method based on UAV aerial photography, including: performing region of interest extraction and image noise reduction preprocessing on video data collected by UAV aerial photography to obtain preprocessed video data; enhancing the image pixel values in the preprocessed video data according to adaptive histogram equalization technology to obtain enhanced video data; performing straight line fitting processing on the lane boundary line region in the enhanced video data to obtain lane boundary line position features; performing geometric correction and spatial alignment processing on each frame of the image based on the lane boundary line position features and a perspective transformation matrix to generate final video data; performing recognition processing between the vehicle and the dashed white segment of the lane divider line on the final video data to determine vehicle trajectory data; and estimating the vehicle speed in the vehicle trajectory data using the dynamic and static frame difference method to obtain the actual vehicle speed.
[0010] This application's embodiments allow UAVs to achieve accurate speed measurement under various combinations of altitude and angle. Stable speed measurement results can be obtained simply by ensuring consistent parameters in a single video segment. This feature greatly expands its application scope, making it particularly suitable for traffic monitoring and emergency tasks in rapidly deployable, complex scenarios, or resource-constrained environments. It not only significantly improves the system's anti-interference capability but also ensures stable speed measurement even in complex environments, fully meeting the application requirements of high real-time performance, low cost, and high reliability, thus opening up new pathways for data acquisition and processing in UAV aerial photography scenarios. Furthermore, vehicle speed estimation is entirely based on video images, without relying on UAV flight speed, geographic coordinates, or other external sensor data, fundamentally simplifying the integration complexity of hardware and software and significantly reducing implementation costs.
[0011] In one feasible implementation, the video data collected by drone aerial photography undergoes region of interest extraction and image noise reduction preprocessing to obtain preprocessed video data, including: using the drone to perform mobile aerial photography of a speed measurement section, collecting and obtaining first video data; extracting the region of interest from the first video data based on the coordinates of four points of a preset region of interest to obtain second video data; and further processing the first video data according to the region of interest. The image value I′(x) after denoising the second video data is obtained; where I(x) and I(y) are the pixel values at pixel x and pixel y, respectively; Ω is the set of all pixels in the image and represents the region for calculating similarity in the entire image; h is a smoothing parameter used to control the sensitivity of similarity; ||I(x)-I(y)|| 2 is the Euclidean distance between pixels x and y, used to measure their similarity; e is a mathematical symbol; based on the image values after denoising the second video data, the preprocessed video data is obtained again.
[0012] In one feasible implementation, the image pixel values in the preprocessed video data are enhanced using adaptive histogram equalization technology to obtain enhanced video data. This includes: converting the color image in the preprocessed video data to grayscale and representing the brightness information of each pixel in grayscale; using a preset binary mask, marking the grayscale value of each pixel in the preprocessed video data with a brightness threshold to obtain mask parameters; and according to… The image grayscale value G is obtained after enhancement based on the adaptive histogram equalization technique. enhanced (x,y); where G(x,y) is the grayscale value of the original image in the preprocessed video data; H s (k′) is the histogram frequency of the gray level K of the s-th small block; L clip For shearing limitation, used to prevent excessive contrast enhancement in areas; according to I final (x,y)=M(x,y)·G enhanced (x,y)+(1-M(x,y))·I(x,y) yields the final pixel value I of the synthesized image. final (x,y); where M(x,y) is the mask parameter; I(x,y) is the image pixel value in the preprocessed video data; the enhanced video data is determined based on the final image pixel value.
[0013] In one feasible implementation, the lane boundary line region in the enhanced video data is subjected to straight-line fitting processing of the lane boundary lines to obtain lane boundary line position features, including: using a preset deep learning model U-Net and based on an activation function, performing image region segmentation processing on the lane region in the enhanced video data to obtain a lane region map; calculating the coordinates of the intermediate point set in the lane region map to obtain the lane region intermediate point coordinate set; according to... The lane boundary line position feature L is obtained. fit ; where (x i ,y i ) represents the coordinates in the coordinate set M of the midpoint of the lane area, and the position feature L of the lane boundary line. fit Let m be the slope of the fitted linear function and b be a constant of the fitted linear function.
[0014] In one feasible implementation, before generating the final video data by performing geometric correction and spatial alignment on each frame of the image based on the lane boundary line position features and a perspective transformation matrix, the method further includes: based on... The source coordinates H of each frame of the enhanced video data before perspective transformation are obtained; where m1 is the slope of the first lane boundary line in the lane boundary line position feature, b1 is a constant of the first lane boundary line, and (x1, y1) is the coordinate of the first lane boundary line; m2 is the slope of the second lane boundary line in the lane boundary line position feature, b2 is a constant of the second lane boundary line, and (x2, y2) is the coordinate of the second lane boundary line; the lane boundary line position feature includes: the first lane boundary line and the second lane boundary line; based on the pixel width of the ROI region of interest in the enhanced video data, the source coordinates are converted into expected coordinates; according to eight preset key points in the lane boundary line, the expected coordinates are extracted to obtain eight key coordinate points; according to The perspective transformation matrix is obtained; where, Let be the perspective transformation matrix (3×3); and let be the homogeneous coordinates (x, y, 1). Τ The source coordinates for each frame of the image; homogeneous coordinates (x′, y′, w′). Τ The desired coordinates for each frame of the image; w′=h 31 x+h 32 y+h 33 The normalization factor is used; the eight key coordinate points are input into the perspective transformation matrix to calculate the perspective transformation coordinates.
[0015] In one feasible implementation, based on the lane boundary line position features and a perspective transformation matrix, geometric correction and spatial alignment are performed on each frame of the image to generate final video data, including: based on... The perspective-transformed Region of Interest (ROI) ROI′ is obtained; where m3 is the slope of the first lane boundary line after geometric correction and spatial alignment, b3 is a constant of the first lane boundary line, and (x3, y3) are the perspective-transformed coordinates of the first lane boundary line; m4 is the slope of the second lane boundary line after geometric correction and spatial alignment, b4 is a constant of the second lane boundary line, and (x4, y4) are the perspective-transformed coordinates of the second lane boundary line; based on the perspective-transformed ROI, geometric correction and spatial alignment processing are performed on each frame of the enhanced video data to obtain the final video data.
[0016] In one feasible implementation, the final video data is processed to identify the relationship between vehicles and the dashed white segments of lane dividers to determine vehicle trajectory data. This includes: using a preset YOLO model to identify all vehicles and all dashed white segments of lane dividers in the final video data, and labeling and generating detection box information for the vehicles and dashed white segments of lane dividers; and tracking all vehicles and all dashed white segments of lane dividers based on a preset DeepSORT algorithm, using the labels and detection box information, and generating the vehicle trajectory data.
[0017] In one feasible implementation, the vehicle speed in the vehicle trajectory data is estimated using the dynamic-static frame difference method to obtain the actual vehicle speed, including: based on... Obtain the dynamic relative speed of each vehicle. in, The speed of the i-th vehicle in the k-th frame of the final video data based on the vehicle trajectory data; N represents the displacement pixel distance of the i-th vehicle in the images from the k-th frame to the (k+1)-th frame based on the vehicle trajectory data. FPS The final video data is defined as the number of frames per second in the video; according to... Obtain the average static relative velocity in, The average speed of all dashed white segments of lane dividers in the k-th frame of the final video data based on the vehicle trajectory data; This represents the number of white dashed lane divider lines in the k-th frame image. This refers to the displacement pixel distance of the white segment of the dashed lane divider in the k-th to k+1-th frames of the vehicle trajectory data; based on... Pixel estimation speed in, To estimate the speed of vehicle i's pixels in the k-th frame based on the vehicle trajectory data; Drone↑Vehicle indicates that the vehicle and drone are traveling in the same direction; Drone↓Vehicle indicates that the vehicle and drone are traveling in opposite directions; according to The actual speed V of the vehicle is obtained. i k Among them, V i k This represents the actual estimated speed of vehicle i in the k-th frame based on the vehicle trajectory data; This indicates the actual length of the white dashed segment of the lane divider line on the road; This represents the pixel distance of lane divider j detected in the k-th frame based on the vehicle trajectory data.
[0018] Secondly, embodiments of this application also provide a vehicle speed estimation device based on drone aerial photography, the device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, enabling the at least one processor to execute a vehicle speed estimation method based on drone aerial photography as described in any of the above embodiments.
[0019] Thirdly, embodiments of this application also provide a non-volatile computer storage medium, which is a non-volatile computer-readable storage medium storing at least one program. Each program includes instructions, which, when executed by a terminal, cause the terminal to execute a vehicle speed estimation method based on UAV aerial photography as described in any of the above embodiments.
[0020] This application provides a method, device, and medium for estimating vehicle speed based on drone aerial photography. Compared with the prior art, the embodiments of this application have the following beneficial technical effects:
[0021] (1) In vehicle speed measurement using UAV aerial video, this application does not have strict requirements on flight altitude and shooting angle, but it requires stability during a single video segment acquisition without mid-journey changes. This design significantly reduces the dependence on UAV hardware performance and control precision, providing greater flexibility for the adaptability of the speed measurement system. Unlike traditional methods that strictly rely on fixed flight parameters, this application allows for accurate speed measurement under various combinations of altitude and angle. Stable speed measurement results can be obtained simply by ensuring that the acquisition parameters of a single video segment are consistent. This feature greatly expands its application scope, especially suitable for traffic monitoring and emergency tasks in rapidly deployable, complex scenarios, or resource-constrained environments.
[0022] (2) This application utilizes automated image correction technology to effectively eliminate video image offset caused by jitter, vibration, and wind interference during UAV flight, thereby ensuring the accuracy of the speed measurement process and the reliability of the data. Unlike traditional methods that rely on mechanical stabilization equipment or complex post-processing, this application employs image analysis algorithms to automatically extract and correct the offset of the image trajectory, achieving high-precision restoration of target motion information. This design not only significantly improves the system's anti-interference capability but also ensures that the speed measurement process remains stable even in complex environments, fully meeting the application requirements of high real-time performance, low cost, and high reliability, and opening up new paths for data acquisition and processing in UAV aerial photography scenarios.
[0023] (3) Furthermore, this application achieves vehicle speed estimation entirely based on video images, without relying on UAV flight speed, geographic coordinates, or other external sensor data. This fundamentally simplifies the integration complexity of hardware and software and significantly reduces implementation costs. The algorithm directly calculates the target's speed using inter-frame information from the video, reducing deployment difficulty while improving system independence and efficiency. The highly automated design enables the technology to be quickly applied to complex multi-target scenarios, operating efficiently without cumbersome parameter calibration, making it particularly suitable for scenarios requiring flexible deployment and rapid response, such as traffic monitoring and disaster emergency response. These characteristics not only enhance the practical value of this application but also provide important support for the further development of UAV-assisted traffic monitoring technology. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0025] Figure 1 is a flowchart of a vehicle speed estimation method based on UAV aerial photography provided in an embodiment of this application;
[0026] Figure 2 is a schematic diagram of a dashed white segment of a lane divider provided in an embodiment of this application;
[0027] Figure 3 is a schematic diagram of a vehicle speed estimation device based on drone aerial photography provided in an embodiment of this application. Detailed Implementation
[0028] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.
[0029] This application provides a vehicle speed estimation method based on UAV aerial photography, as shown in Figure 1. The vehicle speed estimation method based on UAV aerial photography includes steps S101-S106:
[0030] S101. Perform region of interest extraction and image noise reduction preprocessing on the video data collected by drone aerial photography to obtain preprocessed video data.
[0031] The drone is used to conduct aerial photography of the speed measurement section, collecting and obtaining the first video data.
[0032] Furthermore, based on the coordinates of four points in the preset region of interest, the first video data is processed to extract the region of interest, thus obtaining the second video data.
[0033] In one embodiment, a basic section of a highway is selected, and a drone is used to conduct mobile aerial photography of the speed measurement section. The collected video footage is recorded. (First video data). During filming, the drone's altitude, angle, and flight path should remain stable. There are no initial restrictions on altitude, angle, and flight path; simply ensure a clear view of the road. (Regarding the video...) Perform region of interest extraction, and record the extracted video as... (Second video data), the ROI calculation formula is as follows: ROI={(x1,y1),(x2,y1),(x2,y2),(x1,y2)}; where ROI is the extracted region of interest; (x1,y1)~(x1,y2) are the coordinates of the four points of the region of interest.
[0034] Furthermore, regarding the video Perform image denoising processing, and record the denoised video as... (Preprocessed video data). The image value I′(x) is obtained by denoising each pixel x using Non-Local Means (NLM), i.e., according to... The image value I′(x) after denoising the second video data is obtained. Here, I(x) and I(y) are the pixel values at pixels x and y, respectively; Ω is the set of all pixels in the image and represents the region for calculating similarity across the entire image. h is a smoothing parameter used to control the sensitivity of similarity; ||I(x)-I(y)|| 2 is the Euclidean distance between pixels x and y, used to measure their similarity; e is a mathematical symbol.
[0035] Furthermore, based on the image values after denoising the second video data, the preprocessed video data is obtained again.
[0036] S102. Based on the adaptive histogram equalization technique, the image pixel values in the preprocessed video data are enhanced to obtain enhanced video data.
[0037] The color images in the preprocessed video data are converted to grayscale, and the brightness information of each pixel is represented in grayscale.
[0038] In one embodiment, the input color image is first converted to a grayscale image, so that the brightness information of each pixel is represented by a grayscale value. The calculation formula is as follows:
[0039] G(x,y)=0.299·I R (x,y)+0.587·I G (x,y)+0.114·I B (x,y);
[0040] In the formula, I R (x,y), I G (x,y) and I B (x, y) are the values of the red, green, and blue channels of the corresponding pixels in the original image, respectively.
[0041] Furthermore, by using a preset binary mask, the grayscale value of each pixel in the preprocessed video data is marked with a brightness threshold to obtain the mask parameters.
[0042] In one embodiment, a binary mask is then defined to mark which pixels have grayscale values within a defined brightness range. The mask M(x,y) is defined as follows: In the formula, L min and L max The brightness threshold is set to (200, 255) in this application.
[0043] Furthermore, adaptive histogram equalization (CLAHE) is used to divide the image into multiple small blocks, and the gray-level distribution of each block is equalized to enhance the contrast of local areas. This means that it is necessary to adjust the gray-level distribution according to the specific conditions of the blocks. The image grayscale value G is obtained after enhancement by adaptive histogram equalization. enhanced (x,y). Where G(x,y) is the grayscale value of the original image in the preprocessed video data. H s (k′) is the histogram frequency of the gray level K of the s-th small block; L clip This is a clipping limit used to prevent excessive contrast enhancement in certain areas.
[0044] Furthermore, areas approaching white are enhanced, and the images are merged based on the entire image to obtain the final image. The final processed video is denoted as... (Enhanced video data), i.e., based on I final (x,y)=M(x,y)·G enhanced (x,y)+(1-M(x,y))·I(x,y) yields the final pixel value I of the synthesized image. final(x,y). Where M(x,y) is the mask parameter; I(x,y) is the image pixel value in the preprocessed video data. Then, based on the final image pixel value, the enhanced video data is determined.
[0045] S103. Perform straight line fitting processing on the lane boundary line region in the enhanced video data to obtain the lane boundary line position features.
[0046] Using a pre-defined deep learning model U-Net and based on an activation function, image region segmentation is performed on the lane region in the enhanced video data to obtain a lane region map.
[0047] Furthermore, the coordinates of the midpoint set in the lane area map are calculated to obtain the coordinate set of the midpoints of the lane area.
[0048] In one embodiment, lane region segmentation is first performed using the deep learning model U-Net, calculated as follows: O = σ(Decoder(Concatenate(Encoder(I),skipconnections))); where I is the input video. The image size is denoted by O; O represents the output lane region map; σ is the sigmoid activation function. Then, the set of lane region midpoints M, i.e., the coordinate set of the lane region midpoints, is calculated using the following formula:
[0049] Furthermore, for the segmented lane region map O, the lane boundary line is fitted within the lane boundary line region using Hough transform to generate the position parameters of the lane boundary line, i.e., based on... Obtain the lane boundary line position feature L fit Among them, (x i ,y i The coordinates are in the set M of the midpoint coordinates of the lane area, and the lane boundary line position feature is L. fit To fit a linear function, that is, for example, L... fit =y = mx + b; where m is the slope of the fitted linear function and b is a constant of the fitted linear function.
[0050] S104. Based on the positional characteristics of the lane boundary lines and the perspective transformation matrix, perform geometric correction and spatial alignment processing on each frame of the image to generate the final video data.
[0051] Based on the two obtained L... fit It can calculate the x-coordinates corresponding to y = 0 or y = y2 - y1, and obtain the source coordinates H of each frame before perspective transformation, that is, according to The source coordinates H of each frame of the enhanced video data before perspective transformation are obtained. Here, m1 is the slope of the first lane boundary line in the lane boundary line position features, b1 is a constant for the first lane boundary line, and (x1, y1) are the coordinates of the first lane boundary line; m2 is the slope of the second lane boundary line in the lane boundary line position features, b2 is a constant for the second lane boundary line, and (x2, y2) are the coordinates of the second lane boundary line; the lane boundary line position features include both the first and second lane boundary lines.
[0052] Furthermore, based on the pixel width of the ROI (Region of Interest) in the enhanced video data, the source coordinates are converted into desired coordinates.
[0053] In one embodiment, the transformed desired coordinates H′ are calculated based on the obtained source coordinates. The calculation formula is as follows:
[0054] In the formula: y2-y1 is the pixel width of the ROI (Region of Interest).
[0055] Furthermore, based on the eight key points preset in the lane boundary line, the corresponding coordinates of the desired coordinates are extracted to obtain the eight key coordinate points.
[0056] Furthermore, after obtaining eight key coordinate points on the lane edge, these eight points are substituted into the following equation to solve for the perspective transformation moments, based on... The perspective transformation matrix is obtained. Wherein, The perspective transformation matrix is 3×3; the homogeneous coordinates are (x, y, 1). Τ The source coordinates for each frame of the image; homogeneous coordinates (x′, y′, w′). Τ Here are the desired coordinates for each frame of the image; w′ = h 31 x+h 32 y+h 33 This is the normalization factor.
[0057] Furthermore, the eight key coordinate points are input into the perspective transformation matrix to calculate the perspective transformation coordinates.
[0058] Furthermore, according to The perspective-transformed region of interest (ROI) ROI′ is obtained. Here, m3 is the slope of the first lane boundary line after geometric correction and spatial alignment, b3 is a constant for the first lane boundary line, and (x3, y3) are the perspective-transformed coordinates of the first lane boundary line; m4 is the slope of the second lane boundary line after geometric correction and spatial alignment, b4 is a constant for the second lane boundary line, and (x4, y4) are the perspective-transformed coordinates of the second lane boundary line.
[0059] Furthermore, based on the perspective transformation ROI region of interest, geometric correction and spatial alignment are performed on each frame of the enhanced video data, and the extracted image pixel size is [missing information]. The final video data is obtained and denoted as
[0060] S105. Perform recognition processing on the final video data between the vehicle and the dashed white segment of the lane divider line to determine the vehicle trajectory data.
[0061] Figure 2 is a schematic diagram of a lane divider dashed white segment provided in an embodiment of this application. As shown in Figure 2, all vehicles and all lane divider dashed white segments in the final video data are identified by a preset YOLO model, and the vehicles and lane divider dashed white segments are labeled and detection box information is generated.
[0062] Furthermore, based on the preset DeepSORT algorithm and the label and detection box information, all vehicles and all lane divider dashed white segments are tracked, and vehicle trajectory data is generated.
[0063] S106. Estimate the vehicle speed from the vehicle trajectory data using the dynamic and static frame difference method to obtain the actual vehicle speed.
[0064] according to Obtain the dynamic relative speed of each vehicle. in, The speed of the i-th vehicle in the k-th frame of the final video data based on the vehicle trajectory data; N represents the pixel distance between the i-th vehicle and the k+1-th frame of the image based on vehicle trajectory data; FPS This refers to the number of frames per second in the final video data.
[0065] Furthermore, according to Obtain the average static relative velocity in, The average speed of all dashed white segments of lane dividers in the k-th frame of the final video data based on vehicle trajectory data; This represents the number of white dashed lane divider lines in the k-th frame image. This represents the displacement pixel distance of the white dashed line segment of the lane divider in the k-th to k+1-th frames of the image based on vehicle trajectory data.
[0066] Furthermore, according to Pixel estimation speed in, This function estimates the velocity of vehicle i's pixels in the k-th frame based on vehicle trajectory data; Drone↑Vehicle indicates that the vehicle and drone are traveling in the same direction; Drone↓Vehicle indicates that the vehicle and drone are traveling in opposite directions.
[0067] Furthermore, according to Obtain the actual speed V of the vehicle i k Among them, V i k This represents the actual estimated speed of vehicle i in the k-th frame based on vehicle trajectory data; This indicates the actual length of the white segment of the dashed lane divider on the road; This represents the pixel distance of lane divider j detected in the k-th frame based on vehicle trajectory data.
[0068] As a feasible implementation method, the technical solution of this application can overcome the limitations of existing traffic speed measurement technologies that rely on fixed equipment, coordinate systems, and complex sensor data. It can achieve high-precision vehicle speed estimation through video image processing technology, without relying on external coordinate information or dynamic data from drones and vehicles. Its core technologies include: using a group of drones to conduct aerial photography of the highway section under test, collecting video data of vehicles in motion; extracting and analyzing lane line features from the video, using deep learning algorithms (such as U-Net) for lane line detection and extraction to obtain lane separation information; using perspective transformation technology to correct the video images, eliminating the influence of drone vibration or changes in flight angle, ensuring accurate alignment of the image space; finally, using YOLO and DeepSORT algorithms to detect and track target vehicles in the video, estimating the actual dynamic speed based on the vehicle's static relative speed. This method does not rely on traditional radar speed measurement equipment or ground sensors, enabling flexible speed measurement applications, eliminating environmental interference, improving speed measurement accuracy, and possessing strong adaptability and low hardware costs.
[0069] In addition, this application embodiment also provides a vehicle speed estimation device based on UAV aerial photography, as shown in Figure 3. The vehicle speed estimation device 300 based on UAV aerial photography includes:
[0070] At least one processor 301; and a memory 302 communicatively connected to the at least one processor 301; wherein the memory 302 stores instructions executable by the at least one processor 301 to enable the at least one processor 301 to execute:
[0071] The video data collected by drone aerial photography is preprocessed by extracting regions of interest and denoising the image to obtain preprocessed video data;
[0072] Based on adaptive histogram equalization technology, the image pixel values in the preprocessed video data are enhanced to obtain enhanced video data.
[0073] The lane boundary line region in the enhanced video data is subjected to straight line fitting processing to obtain the lane boundary line position features;
[0074] Based on the positional features of the lane boundary lines and using the perspective transformation matrix, geometric correction and spatial alignment are performed on each frame of the image to generate the final video data.
[0075] The final video data is processed to identify the relationship between the vehicle and the dashed white segment of the lane divider line, thereby determining the vehicle trajectory data;
[0076] The vehicle speed in the vehicle trajectory data is estimated using the dynamic and static frame difference method to obtain the actual vehicle speed.
[0077] This application's embodiments allow UAVs to achieve accurate speed measurement under various combinations of altitude and angle. Stable speed measurement results can be obtained simply by ensuring consistent parameters in a single video segment. This feature greatly expands its application scope, making it particularly suitable for traffic monitoring and emergency tasks in rapidly deployable, complex scenarios, or resource-constrained environments. It not only significantly improves the system's anti-interference capability but also ensures stable speed measurement even in complex environments, fully meeting the application requirements of high real-time performance, low cost, and high reliability, thus opening up new pathways for data acquisition and processing in UAV aerial photography scenarios. Furthermore, vehicle speed estimation is entirely based on video images, without relying on UAV flight speed, geographic coordinates, or other external sensor data, fundamentally simplifying the integration complexity of hardware and software and significantly reducing implementation costs.
[0078] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments for devices and non-volatile computer storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0079] The devices and media provided in this application are one-to-one with the methods. Therefore, the devices and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0080] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0081] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more flowchart illustrations and / or one or more block diagrams.
[0082] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0083] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0084] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0085] The above description is merely an embodiment of this application and is not intended to limit this application. For those skilled in the art, various modifications and variations can be made to the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the embodiments of this application should be included within the scope of the claims of this application.
Claims
1. A method for estimating vehicle speed based on drone aerial photography, wherein, The method includes: The video data collected by drone aerial photography is preprocessed by extracting regions of interest and denoising the image to obtain preprocessed video data; Based on adaptive histogram equalization technology, the image pixel values in the preprocessed video data are enhanced to obtain enhanced video data. The lane boundary line region in the enhanced video data is subjected to linear fitting processing of the lane boundary line to obtain the lane boundary line position features. Based on the lane boundary line position features and the perspective transformation matrix, geometric correction and spatial alignment are performed on each frame of the image to generate the final video data. The final video data is processed to identify the relationship between the vehicle and the dashed white segment of the lane divider line, thereby determining the vehicle trajectory data. The vehicle speed in the vehicle trajectory data is estimated using the dynamic and static frame difference method to obtain the actual vehicle speed.
2. The vehicle speed estimation method based on UAV aerial photography according to claim 1, wherein, The video data captured by drone aerial photography undergoes region of interest extraction and image noise reduction preprocessing to obtain preprocessed video data, including: The drone is used to conduct mobile aerial photography of the speed measurement section, and collect and obtain the first video data. Based on the coordinates of four points in the preset region of interest, the first video data is processed to extract the region of interest, thereby obtaining the second video data; according to The image value I′(x) after denoising the second video data is obtained; where I(x) and I(y) are the pixel values at pixel x and pixel y, respectively; Ω is the set of all pixels in the image and represents the region for calculating similarity in the entire image; h is a smoothing parameter used to control the sensitivity of similarity; ||I(x)-I(y)|| 2 is the Euclidean distance between pixel x and pixel y, used to measure their similarity; e is a mathematical symbol; Based on the image values after denoising the second video data, the preprocessed video data is obtained again.
3. The vehicle speed estimation method based on UAV aerial photography according to claim 1, wherein, Based on adaptive histogram equalization technology, the image pixel values in the preprocessed video data are enhanced to obtain enhanced video data, including: The color images in the preprocessed video data are converted to grayscale images, and the brightness information of each pixel is represented in grayscale. By using a preset binary mask, the grayscale value of each pixel in the preprocessed video data is marked with a brightness threshold to obtain the mask parameters; according to The image grayscale value G is obtained after enhancement based on the adaptive histogram equalization technique. enhanced (x,y); where G(x,y) is the grayscale value of the original image in the preprocessed video data; H s (k′) is the histogram frequency of the gray level K of the s-th small block; L clip This is a shearing limit used to prevent excessive contrast enhancement in certain areas; According to I final (x,y)=M(x,y)·G enhanced (x,y)+(1-M(x,y))·I(x,y) yields the final pixel value I of the synthesized image. final (x,y); where M(x,y) is the mask parameter; I(x,y) is the image pixel value in the preprocessed video data; The enhanced video data is determined based on the final image pixel values.
4. The vehicle speed estimation method based on UAV aerial photography according to claim 1, wherein, The lane boundary line region in the enhanced video data is subjected to straight line fitting processing to obtain the lane boundary line position features, including: Using a pre-defined deep learning model U-Net and based on an activation function, the lane region in the enhanced video data is segmented to obtain a lane region map. The coordinates of the set of intermediate points in the lane area map are calculated to obtain the coordinate set of the intermediate points of the lane area. according to The lane boundary line position feature L is obtained. fit ; where (x i ,y i ) represents the coordinates in the coordinate set M of the midpoint of the lane area, and the position feature L of the lane boundary line. fit Let m be the slope of the fitted linear function and b be a constant of the fitted linear function.
5. The vehicle speed estimation method based on UAV aerial photography according to claim 1, wherein, Before generating the final video data by performing geometric correction and spatial alignment on each frame of the image based on the lane boundary line position features and a perspective transformation matrix, the method further includes: according to The source coordinates H of each frame of the enhanced video data before perspective transformation are obtained; where m1 is the slope of the first lane boundary line in the lane boundary line position feature, b1 is a constant of the first lane boundary line, and (x1, y1) are the coordinates of the first lane boundary line; m2 is the slope of the second lane boundary line in the lane boundary line position feature, b2 is a constant of the second lane boundary line, and (x2, y2) are the coordinates of the second lane boundary line; the lane boundary line position feature includes: the first lane boundary line and the second lane boundary line. Based on the pixel width of the ROI (Region of Interest) in the enhanced video data, the source coordinates are converted into desired coordinates; Based on eight key points preset in the lane boundary line, the corresponding coordinates of the desired coordinates are extracted to obtain eight key coordinate points. according to The perspective transformation matrix is obtained; in, Let be the perspective transformation matrix (3×3); and let be the homogeneous coordinates (x, y, 1). T The source coordinates for each frame of the image; homogeneous coordinates (x′, y′, w′). T The desired coordinates for each frame of the image; w′=h 31 x+h 32 y+h 33 Normalization factor; The eight key coordinate points are input into the perspective transformation matrix to calculate the perspective transformation coordinates.
6. The vehicle speed estimation method based on UAV aerial photography according to claim 5, wherein, Based on the lane boundary line position features and using the perspective transformation matrix, geometric correction and spatial alignment are performed on each frame of the image to generate the final video data, including: according to The perspective transformation ROI region of interest ROI′ is obtained; where m3 is the slope of the first lane boundary line after geometric correction and spatial alignment, b3 is a constant of the first lane boundary line, and (x3, y3) are the perspective transformation coordinates of the first lane boundary line; m4 is the slope of the second lane boundary line after geometric correction and spatial alignment, b4 is a constant of the second lane boundary line, and (x4, y4) are the perspective transformation coordinates of the second lane boundary line. Based on the perspective transformation ROI region of interest, geometric correction and spatial alignment are performed on each frame of the enhanced video data to obtain the final video data.
7. The vehicle speed estimation method based on UAV aerial photography according to claim 1, wherein, The final video data is processed to identify the relationship between the vehicle and the dashed white segment of the lane divider line, thereby determining the vehicle trajectory data, including: Using a preset YOLO model, all vehicles and all dashed white segments of lane dividers in the final video data are identified, and labels and detection box information are generated for the vehicles and the dashed white segments of lane dividers. Based on the preset DeepSORT algorithm and the labels and detection box information, all vehicles and all lane divider dashed white segments are tracked, and vehicle trajectory data is generated.
8. The vehicle speed estimation method based on UAV aerial photography according to claim 1, wherein, The vehicle speed in the vehicle trajectory data is estimated using the dynamic and static frame difference method to obtain the actual vehicle speed, including: according to Obtain the dynamic relative speed of each vehicle. in, The speed of the i-th vehicle in the k-th frame of the final video data based on the vehicle trajectory data; N represents the displacement pixel distance of the i-th vehicle in the images from the k-th frame to the (k+1)-th frame based on the vehicle trajectory data. FPS The number of frames per second in the final video data; according to Obtain the average static relative velocity in, The average speed of all dashed white segments of lane dividers in the k-th frame of the final video data based on the vehicle trajectory data; This represents the number of white dashed lane divider lines in the k-th frame image. The displacement pixel distance of the white dashed line segment of the lane divider in the k-th to k+1-th frame images based on the vehicle trajectory data; according to Pixel estimation speed in, The speed is estimated for the pixels of vehicle i in the k-th frame based on the vehicle trajectory data; Drone↑Vehicle indicates that the vehicle and the drone are traveling in the same direction; Drone↓Vehicle indicates that the vehicle and the drone are traveling in opposite directions; according to The actual speed of the vehicle was obtained. in, This represents the actual estimated speed of vehicle i in the k-th frame based on the vehicle trajectory data; This indicates the actual length of the white dashed segment of the lane divider line on the road; This represents the pixel distance of lane divider j detected in the k-th frame based on the vehicle trajectory data.
9. A vehicle speed estimation device based on drone aerial photography, wherein, The device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, enabling the at least one processor to execute a vehicle speed estimation method based on UAV aerial photography according to any one of claims 1-8.
10. A non-volatile computer storage medium, wherein, The storage medium is a non-volatile computer-readable storage medium, which stores at least one program, each program including instructions, which, when executed by a terminal, cause the terminal to perform a vehicle speed estimation method based on UAV aerial photography according to any one of claims 1-8.