A road longitudinal slope estimation method based on drone aerial video

Through aerial video shooting of drones, combined with image processing and machine learning algorithms, the problems of high equipment cost and accuracy dependence of road longitudinal slope estimation methods in the prior art are solved, and fast and accurate road longitudinal slope estimation is achieved.

CN118015499BActive Publication Date: 2025-03-25HEFEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410315361.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-19
Publication Date
2025-03-25
Estimated Expiration
2044-03-19

AI Technical Summary

Technical Problem

The existing road longitudinal slope estimation methods have problems such as high equipment cost, accuracy dependence on GPS or CAN bus, and the estimation result delay when the slope change rate is large.

Method used

Using aerial video-based drone, road traffic flow video is captured by drones, and image processing and machine learning algorithms are used to extract lane centerline, vehicle trajectory and speed change point information. Combined with Bayesian network model, the actual length and longitudinal slope value of road pixel points are iteratively estimated.

Benefits of technology

It realizes rapid acquisition of road trajectory and traffic flow front spacing information, reduces labor and equipment costs, improves estimation accuracy, and controls the error within 10%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118015499B_ABST
    Figure CN118015499B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for estimating the longitudinal slope of a road based on drone aerial video, including: 1. collecting and correcting road traffic flow video; 2. taking the road centerline as the reference line, extracting pixels on the reference line, and outputting the pixel grayscale space-time map on the reference line; 3. extracting the contour of the pixel grayscale space-time map; 4. obtaining a complete trajectory data set through trajectory contour information; 5. identifying the vehicle speed change point by using the energy distribution of wavelet transform; 6. constructing a data set for estimating the road slope, and applying Bayesian network and machine learning algorithm on the basis of assuming the actual length distribution of road pixels and the longitudinal slope value of the road, iteratively obtaining the expected value and variance of the actual length of the road pixel points and the estimated value of the longitudinal slope of the road. The present invention can quickly obtain the trajectory, and can estimate the longitudinal slope value of the road according to the longitudinal slope data of the road and the distribution information of the head spacing of the traffic flow, thereby reducing the complexity of the experiment and improving the speed of obtaining the trajectory and the slope.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a road longitudinal slope estimation method based on unmanned aerial vehicle aerial video, belonging to the technical field of intelligent transportation. Background Art

[0002] Road longitudinal slope is a common traffic bottleneck. Exploring the congestion mechanism and control strategy on longitudinal slope sections is one of the important contents to alleviate traffic congestion. In order to study the congestion mechanism on road longitudinal slope, it is necessary to obtain road longitudinal slope data. Existing longitudinal slope estimation methods include estimating the vehicle mass and slope based on the vehicle longitudinal dynamics model and estimating the slope through sensors. However, due to the limitations of experimental equipment, the estimation of longitudinal slope has the problem of high equipment and labor costs.

[0003] The existing slope recognition methods are:

[0004] 1. Use GPS elevation information to estimate the road slope. The road slope is determined by calculating the height difference. This method has high accuracy, but requires high GPS accuracy, and its stability is affected by GPS signals.

[0005] 2. Use CAN bus information and driving equations to estimate road slope. The vehicle CAN bus is mainly used to collect engine driving information, vehicle speed and other information. No additional sensor information is required. A new data fusion algorithm based on nonlinear adaptive observer is proposed, and data fusion is used as part of the extended regressor. While the data fusion algorithm structure produces a good road slope estimate, it also provides a relatively undisturbed and noise-free vehicle mass estimate (WRAGGE-MORLEY R, HERRMANN G, BARBER P, et al. Gradient and Mass Estimation from CANBased Data for a light passenger Car [J].) 2015, 8(2015-01-0201): 137-45.). However, the accuracy provided by the CAN bus is limited, and the equipment required is high and expensive. Secondly, the vehicle parameters will change with the vehicle condition and environment.

[0006] 3. Adding additional sensors to estimate road slope. Sahlholm added GPS data to vehicle parameter estimation and used an estimation method based on Kalman filter and extended Kalman filter (EKF) (SAHLHOLM P, JOHANSSON KH JCE P. Road grade estimation for look-ahead vehicle control using multiple measurement runs [J]. 2010, 18(11): 1328-41.). The disadvantage is that it ignores the information on the rate of change of the road slope itself. Especially when the slope change rate is large, the estimation result will show a serious delay. Summary of the invention

[0007] In order to overcome the shortcomings of the prior art, the present invention proposes a road longitudinal slope estimation method based on drone aerial video, so as to quickly obtain the trajectory and the distribution information of the headway between traffic flows, so that the actual length of the road and the longitudinal slope of the road can be calculated according to the distribution, reducing the requirements for manpower and experimental equipment.

[0008] In order to achieve the above object, the present invention adopts the following technical scheme:

[0009] The method for estimating the longitudinal slope of a road based on drone aerial video of the present invention is characterized in that it is performed according to the following steps:

[0010] Step 1: Place the camera lens on the drone perpendicular to the horizontal plane of the road, so as to shoot the traffic flow video of the road through the drone; let the total number of frames of the traffic flow video be ;

[0011] Step 2: Correcting the traffic flow video to obtain a corrected traffic flow video;

[0012] Step 3: Determine the lane with the maximum traffic volume on the road in the modified traffic flow video , use polynomial curves to correct the lanes of a certain frame in the traffic flow video Fit the pixel points on the center line to obtain the baseline;

[0013] Extract the pixel points on the baseline of each frame of the modified traffic flow video and calculate the pixel points in the time dimension. Combine them to get the spatial dimension with the actual length of the road The lane centerline image is converted into a grayscale image ;

[0014] Step 4: Grayscale image Extract the trajectory contour, obtain the vehicle foreground contour as the trajectory data, and sort the trajectory data in ascending order according to the order of vehicle entry and exit to obtain the vehicle trajectory data set ;

[0015] Step 5: Processing to obtain a complete trajectory set ;

[0016] Step 6: According to , use wavelet transform to obtain the core speed change point set of all complete trajectories ;

[0017] Step 7: Assuming the actual length of the road pixel points and the road longitudinal slope value, obtain the distribution of the speed change point spacing and the reaction time, apply the Bayesian network and machine learning algorithm, iteratively obtain the expected value and variance of the actual length of the road pixel points and the road longitudinal slope estimation value, and output the optimal road longitudinal slope estimation value;

[0018] The method for estimating the longitudinal slope of a road based on drone aerial video according to the present invention is also characterized in that step 2 comprises:

[0019] Step 2.1: Perform static object recognition on the first frame and the last frame of the traffic flow video respectively, obtain the two frames of recognition results and perform static object matching to obtain a static feature template ;

[0020] Step 2.2, define the current frame number as ,initialization ;

[0021] Step 2.3, use The algorithm is used to analyze the traffic flow video Frame images and static feature templates Match and get Matching feature point set , and use formula (1) to get Perspective transformation matrix ;

[0022] (1)

[0023] Step 2.4: For The frame image is corrected to obtain the corrected Frame picture;

[0024] Step 2.4: Assign to , and judge Is it true? If so, return to step 2.3 and execute sequentially; otherwise, it means that the corrected traffic flow video is obtained.

[0025] The step 4 comprises:

[0026] Step 4.1: Pass The edge detection algorithm obtains the grayscale image The vehicle track in the image is separated from the background to obtain a binary image. , let the binary image The set of pixels with a value of 1 constitutes the foreground image. ;

[0027] Step 4.2: After the foreground image B is corroded and expanded, the processed foreground image is obtained. , and with the binary image Combine to form a new binary image ;

[0028] Step 4.3: Use the eight-connectivity criterion to After connecting the boundary points of the vehicle trajectory, a processed binary image is formed. ;

[0029] Step 4.4: Use exponential averaging filter to Filter to get the binary image after noise reduction ;

[0030] Step 4.5: According to the set time threshold , Vehicle length threshold and the threshold of headway right The boundary points of the vehicle trajectory in are separated to obtain The outlines of different vehicles in the

[0031] Step 4.6: The contour lines of different vehicles are accurately analyzed to obtain the vehicle foreground contour as the trajectory data, and the trajectory data is sorted in ascending order according to the order of vehicle entry and exit to obtain the vehicle trajectory data set .

[0032] The step 5 comprises:

[0033] Step 5.1. Calculate vehicles Trajectory Distance from start point to start point of road ,vehicle Trajectory Distance between the end point and the end of the road ;

[0034] Step 5.2, judgment Is it true? If so, go to step 5.3; otherwise, move the vehicle Trajectory Add lower boundary disconnect track ;in, Indicates vehicle The distance threshold between the starting point of the trajectory and the starting point of the road;

[0035] Step 5.3, judgment Is it true? If true, it means the vehicle Trajectory is a complete trajectory and is stored in the complete trajectory set Otherwise, the vehicle Trajectory Add upper boundary disconnect track ,in, Indicates vehicle The distance threshold between the end point of the trajectory and the end point of the road;

[0036] Step 5.4: Follow the process from step 5.1 to step 5.3 to The trajectories of different vehicles in the and ;

[0037] Step 5.5: Calculate any lower boundary disconnection trajectory The end point of the trajectory is disconnected from any upper boundary trajectory The starting point of the trajectory is in the time dimension The difference on , the lower boundary disconnected trajectory The end point of the trajectory is disconnected from any upper boundary trajectory The trajectory starts in the space dimension The difference on ;

[0038] Step 5.6, judgment and Are both true? If both are true, go to step 5.7; otherwise, it means that the vehicle Trajectory For lane change trajectories, not stored in the complete trajectory set ,in, Indicates the headway threshold between the lower boundary disconnected track and the upper boundary disconnected track, Indicates the spatial threshold of the lower boundary disconnected trajectory and the upper boundary disconnected trajectory;

[0039] Step 5.7: Use the first-order Bezier curve to The starting point of the lower boundary disconnection trajectory and End point of the upper boundary disconnection trajectory Connect them to get the missing track , and with and Connect to form a vehicle The complete track After that, save the complete trajectory set ;

[0040] Step 5.8: According to the order of the trajectory Sort in ascending order to get the sorted complete trajectory set ,make Any of The complete trajectory is recorded as ,in, It is A complete trajectory in the time dimension The time series on It is The complete trajectory in the spatial dimension The position sequence on .

[0041] The step 6 comprises:

[0042] Step 6.1: Calculate using formula (2) Any The approximation coefficients of the complete trajectory ;

[0043] (2)

[0044] In formula (2), is the scale factor, is the translation factor, ;

[0045] Step 6.2: Calculate the energy distribution using equation (3) ;

[0046] (3)

[0047] In formula (3), represents the minimum value of the scale factor, Indicates the maximum value of the scale factor;

[0048] Step 6.3, find , get the speed change point time set ,in, Indicates The speed change time, is the number of speed change points;

[0049] Step 6.4: Satisfy The speed change point corresponding to the condition is taken as the core speed change point, so as to obtain the time corresponding to the core speed change point and location , and combine Deposit ;

[0050] Step 6.5: Process all complete trajectories according to the process of step 6.1 to step 6.4, and obtain the core speed change point set .

[0051] The step 7 comprises:

[0052] Step 7.1: According to the position of the core speed change point, the core speed change points located at the road section are merged into the upper section core speed change point set. , merge the core speed change points located at the lower section of the road into the lower section core speed change point set ;

[0053] Calculate the upper road segment data set using formula (4) Middle The core speed change point and Reaction time between core shift points , thus obtaining the upper road segment data set The set of reaction times between all two adjacent core speed changes in ;

[0054] (4)

[0055] In formula (4), Represents the frame rate of the video;

[0056] Use formula (5) to calculate the upper section data set Middle The core shift point and The number of pixels between core speed change points , thus obtaining the upper road segment data set The set of the number of pixels between all adjacent core speed change points in ;

[0057] (5)

[0058] Use formula (6) to calculate the lower section data set Middle The core speed change point and Reaction time between core shift points , thus obtaining the next section data set The set of reaction times between all two adjacent core speed change points in ;

[0059] (6)

[0060] Use formula (7) to calculate the lower section data set Middle The core speed change point and The number of pixels between core speed change points , thus obtaining the next section data set The set of pixel numbers between all adjacent core speed change points in ;

[0061] (7)

[0062] Will , Merge into a time sample dataset , and The mean value of ,Will The standard deviation of ;

[0063] Will , Merge into a sample dataset of spacing pixels ;

[0064] Step 7.2: Define the maximum number of iterations as The error is , initialize the current number of iterations , No. The actual length of road pixels at iteration The actual length of the road pixels is , No. The standard deviation of the actual length of road pixels in the iteration is Normal distribution and Estimated road slope at the iteration , No. The objective function value at the iteration is ;

[0065] Step 7.3: Use equations (8), (9) and (10) to obtain The average of the actual headway distances under iterations , No. The standard deviation of the actual headway distance at the iteration , No. The covariance at the iteration , thus obtaining The reaction time between the core speed change points in the iteration and actual headroom Follows bivariate normal distribution Related parameters ;

[0066] (8)

[0067] (9)

[0068] (10)

[0069] In formula (8), formula (9) and formula (10), and , It is the upper road segment dataset The number of core speed change points, It is the lower section dataset The number of core speed change points, Indicates the camera field of view;

[0070] Using formula (11) to calculate the The actual headway distance at the iteration ; (11)

[0071] In formula (11), is the number of pixels in the sample dataset No. individual data;

[0072] Step 7.4: Calculate the Next iteration The actual length of road pixels , and splice to get the actual length range of road pixels ;

[0073] (12)

[0074] In formula (12), Indicates The first iteration of the road pixel An estimate of the actual length, is the minimum value of the actual length of road pixels, represents the step length, Indicates the maximum value of the actual length of road pixels;

[0075] Step 7.5: Use formula (13) to get Next iteration The actual length of road pixels under the condition Probability ;

[0076] (13)

[0077] In formula (13), is The increment on

[0078] Use formula (14) to calculate the current Iterations The actual length of road pixels under the conditions The probability density function of ;

[0079] (14)

[0080] Step 7.6: Calculate using formula (15) In the current Iterations Parameters for taking time sample data sets Middle Data And the sample dataset of the number of pixels of spacing Middle Data The conditional probability ;

[0081] (15)

[0082] In formula (15), Indicates that given parameters The following appears at the same time The joint probability of , and:

[0083] (16)

[0084] Calculate using formula (17) and In the Iterations The parameter value is The conditional probability ;

[0085] (17)

[0086] In formula (17), Indicated in The increment on express The increment on

[0087] Step 7.7: Update the first The iteration The actual length of the road pixels ;

[0088] (18)

[0089] Step 7.8: Use formula (19) to construct The objective function at the iteration :

[0090] (19)

[0091] Step 7.9: Solve the objective function using the least squares method When the maximum value is obtained The average actual length of the best road pixels under iterations , the standard deviation of the actual length of the best road pixel , the best estimate of the road longitudinal slope , and the optimal objective function value ;

[0092] Step 7.10, judgment and and and and Are they both true? If true, then output The best road slope estimation value under iterations As a final result, if it is not established, Assign to , Assign to , Assign to , Assign to , Assign to , return to step 7.3 and execute sequentially.

[0093] The electronic device of the present invention includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the road longitudinal slope estimation method based on drone aerial video, and the processor is configured to execute the program stored in the memory.

[0094] The present invention provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program, which is characterized in that when the computer program is run by a processor, the road longitudinal slope estimation method based on drone aerial video is executed.

[0095] Compared with the prior art, the present invention has the following beneficial effects:

[0096] 1. In acquiring trajectory data, the present invention uses the center line of the lane as the baseline, and the pixels on the baseline are stitched together as a trajectory map. The image processing method is used, and thresholds such as the relevant vehicle spacing, time interval, and vehicle length are set to separate the background and trajectory from the trajectory map. This method can quickly acquire the trajectory data of the vehicle, overcome the problems of traditional manual acquisition of trajectories, the need for special equipment, and the need for a large amount of data, and omits the process of deep learning manual label calibration, while ensuring a certain degree of accuracy.

[0097] 2. The present invention constructs the relationship between the actual length distribution of video pixel points, the reaction time between vehicles and the distribution of vehicle spacing through the Bayesian network model, can obtain the actual length distribution of road pixel points, construct the relationship between the actual length of pixels and the road slope value, and then estimate the slope value. It overcomes the problem of estimating the road slope through complex CAN bus data, improves the operating speed, and ensures that the error is within 10%. BRIEF DESCRIPTION OF THE DRAWINGS

[0098] Figure 1 It is a flow chart for obtaining the complete trajectory of the present invention;

[0099] Figure 2 Flow chart of slope calculation of the present invention. DETAILED DESCRIPTION

[0100] In this embodiment, a method for estimating the longitudinal slope of a road based on drone aerial video is to use Figure 1 The trajectory data extraction process shown Figure 1 class Figure 2 The slope estimation method, taking the Wulidun Interchange Road in Hefei City, Anhui Province as an example, is carried out in the following steps:

[0101] Step 1: Place the camera lens on the drone perpendicular to the horizontal plane of the road, so as to shoot a traffic flow video of the road through the drone;

[0102] Step 2: Traffic flow video correction;

[0103] Step 2.1: Perform static object recognition on the first frame and the last frame of the traffic flow video respectively, obtain the two frames of recognition results and perform static object matching to obtain a static feature template , let the total number of frames of the traffic flow video be ;

[0104] Step 2.2, define the current frame number as ,initialization ;

[0105] Step 2.3, use The algorithm is used to analyze the traffic flow video Frame images and static feature templates Match and get Matching feature point set , and use formula (1) to get Perspective transformation matrix ;

[0106] (1)

[0107] Step 2.4: For The frame image is corrected to obtain the corrected Frame picture;

[0108] Step 2.4: Assign to , and judge Is it true? If so, return to step 2.3 to execute sequentially; otherwise, it means that the corrected traffic flow video is obtained;

[0109] Step 3: Determine the lane with the maximum traffic volume on the road in the modified traffic flow video , use polynomial curves to correct the lanes of a certain frame in the traffic flow video Fit the pixel points on the center line to obtain the baseline;

[0110] Extract the pixel points on the baseline of each frame of the modified traffic flow video and calculate the pixel points in the time dimension. Combine them to get the spatial dimension with the actual length of the road The lane centerline image is converted into a grayscale image ;

[0111] Step 4: Grayscale image Extract trajectory contour;

[0112] Step 4.1: Pass The edge detection algorithm obtains the grayscale image The vehicle track in the image is separated from the background to obtain a binary image. , let the binary image The set of pixels with a value of 1 constitutes the foreground image. ;

[0113] Step 4.2: After the foreground image B is corroded and expanded, the processed foreground image is obtained. , and with the binary image Combine to form a new binary image ;

[0114] Step 4.3: Use the eight-connectivity criterion to After connecting the boundary points of the vehicle trajectory, a processed binary image is formed. ;

[0115] Step 4.4: Use exponential averaging filter to Filter to get the binary image after noise reduction ;

[0116] Step 4.5: According to the set time threshold , Vehicle length threshold and the threshold of headway right The boundary points of the vehicle trajectory in are separated to obtain The contours of different vehicles in the video, where the threshold can take different values ​​according to different videos;

[0117] Step 4.6: The contour lines of different vehicles are accurately analyzed to obtain the vehicle foreground contour as the trajectory data, and the trajectory data is sorted in ascending order according to the order of vehicle entry and exit to obtain the vehicle trajectory data set ;

[0118] Step 5: Processing to obtain a complete vehicle trajectory dataset ;

[0119] Step 5.1. Calculate vehicles Trajectory Distance from start point to start point of road ,vehicle The trajectory Distance between the end point and the end of the road ;

[0120] Step 5.2, Settings , and judge Is it true? If so, go to step 5.3; otherwise, move the vehicle Trajectory Add lower boundary disconnect track ;in, Indicates vehicle The distance threshold between the starting point of the trajectory and the starting point of the road;

[0121] Step 5.3, Settings , and judge Is it true? If true, it means the vehicle Trajectory is a complete trajectory and is stored in the complete trajectory set Otherwise, the vehicle Trajectory Add upper boundary disconnect track ,in, Indicates vehicle The distance threshold between the end point of the trajectory and the end point of the road;

[0122] Step 5.4: Follow the process from step 5.1 to step 5.3 to The trajectories of different vehicles in the and ;

[0123] Step 5.5: Calculate any lower boundary disconnection trajectory The end point of the trajectory is disconnected from any upper boundary trajectory The starting point of the trajectory is in the time dimension The difference on , the lower boundary disconnected trajectory The end point of the trajectory is disconnected from any upper boundary trajectory The trajectory starts in the space dimension The difference on ;

[0124] Step 5.6, Settings , , and judge and Are both true? If both are true, go to step 5.7; otherwise, it means that the vehicle Trajectory For lane change trajectories, not stored in the complete trajectory set ,in, Indicates the headway threshold between the lower boundary disconnected track and the upper boundary disconnected track, Indicates the spatial threshold of the lower boundary disconnected trajectory and the upper boundary disconnected trajectory;

[0125] Step 5.7: Use the first-order Bezier curve as shown in formula (2) to The starting point of the lower boundary disconnection trajectory and End point of the upper boundary disconnection trajectory The missing time series in the middle are connected to obtain the missing trajectory , and and Connect to form a vehicle The complete track After that, deposit ;

[0126] (2)

[0127] In the formula, yes The starting point of the lower boundary disconnection track and The end position of the upper boundary disconnection trajectory The time series between is the missing track to be supplemented Position function.

[0128] Step 5.8: According to the order of the trajectory Sort in ascending order to get the sorted complete trajectory set ,make Any of The complete trajectory is recorded as , It is A complete trajectory in the time dimension The time series on It is The complete trajectory in the spatial dimension The position sequence on ;

[0129] Step 6: According to , use wavelet transform to obtain the core speed change point set of all complete trajectories ;

[0130] Step 6.1: Calculate using formula (3) Any The approximation coefficients of the complete trajectory ;

[0131] (3)

[0132] In formula (3), is the scale factor, is the translation factor, ;

[0133] Step 6.2: Calculate the energy distribution using equation (4) ;

[0134] (4)

[0135] In formula (4), Indicates the minimum value of the scale factor, which is 1. Indicates the maximum value of the scale factor, which is 64;

[0136] Step 6.3, find , get the speed change point time set ,in, Indicates The speed change time, is the number of speed change points;

[0137] Step 6.4: Satisfaction The speed change point corresponding to the condition is the core speed change point, so the time corresponding to the core speed change point is obtained. and location , and Deposit ;

[0138] Step 6.5: Process all complete trajectories according to the process of step 6.1 to step 6.4, and obtain the core speed change point set ;

[0139] Step 6.6: According to the position of the core speed change point, the core speed change points located at the road section are merged into the upper section core speed change point set. , merge the core speed change points located at the lower section of the road into the lower section core speed change point set ;

[0140] Step 7: Assuming the actual length of the road pixel points and the road longitudinal slope value, obtain the distribution of the speed change point spacing and the reaction time, apply the Bayesian network and machine learning algorithm, iteratively obtain the expected value and variance of the actual length of the road pixel points and the estimated value of the road longitudinal slope;

[0141] Step 7.1: Calculate the upper road segment data set using formula (4a) Middle The core speed change point and Reaction time between core shift points , thus obtaining the upper road segment data set The set of reaction times between all two adjacent core speed changes in ;

[0142] (4a)

[0143] In formula (4a), Represents the frame rate of the video;

[0144] Use formula (5) to calculate the upper road segment data set Middle The core speed change point and The number of pixels between core speed change points , thus obtaining the upper road segment data set The set of the number of pixels between all adjacent core speed change points in ;

[0145] (5)

[0146] Use formula (6) to calculate the lower section data set Middle The core speed change point and Reaction time between core shift points , thus obtaining the next section data set The set of reaction times between all two adjacent core speed change points in ;

[0147] (6)

[0148] Use formula (7) to calculate the lower section data set Middle The core speed change point and The number of pixels between core speed change points , thus obtaining the next section data set The set of the number of pixels between all adjacent core speed change points in ;

[0149] (7)

[0150] Will , Merge into a time sample dataset , and The mean value of ,Will The standard deviation of ;

[0151] Will , Merge into a sample dataset of spacing pixels ;

[0152] Step 7.2: The initial maximum number of iterations is The error is , initialize the current number of iterations , No. The actual length of road pixels at iteration The actual length of the road pixels is , No. The standard deviation of the actual length of road pixels in the iteration is Normal distribution and Estimated road slope at the iteration , No. The objective function value at the iteration is ,Pick is 10000;

[0153] Step 7.3: Use equations (8), (9) and (10) to get The average of the actual headway distances under iterations , No. The standard deviation of the actual headway distance at the iteration , No. Covariance at iterations , thus obtaining The reaction time between the core speed change points in the iteration and actual headroom Follows bivariate normal distribution Related parameters ;

[0154] (8)

[0155] (9)

[0156] (10)

[0157] In formula (8), formula (9) and formula (10), and , It is the upper road segment dataset The number of core speed change points, It is the lower section dataset The number of core speed change points, Indicates the camera field of view;

[0158] Using formula (11) to calculate the The actual headway distance at the iteration ; (11)

[0159] In formula (11), is the number of pixels in the sample dataset No. individual data;

[0160] Step 7.4: Calculate the Next iteration The actual length of road pixels , and splice to get the actual length range of road pixels ;

[0161] (12)

[0162] In formula (12), Indicates The first iteration of the road pixel An estimate of the actual length, is the minimum value of the actual length of road pixels, The value is 1. represents the step length, The value is 0.00001. Indicates the maximum value of the actual length of road pixels. The value is 1;

[0163] Step 7.5: Use formula (13) to get Next iteration The actual length of road pixels under the condition Probability ;

[0164] (13)

[0165] In formula (13), is The increment on The value is 0.00001;

[0166] Use formula (14) to calculate the current Iterations The actual length of road pixels under the conditions The probability density function of ;

[0167] (14)

[0168] Step 7.6: Calculate using formula (15) In the current Iterations Parameters for taking time sample data sets Middle Data And the sample dataset of the number of pixels of spacing Middle Data The conditional probability ;

[0169] (15)

[0170] In formula (15), Indicates that given parameters The following appears at the same time The joint probability of , and:

[0171] (16)

[0172] Calculate using formula (17) and In the Iterations The parameter value is The conditional probability ;

[0173] (17)

[0174] In formula (17), Indicated in The increment on The value is 0.00001. express The increment on The value is 0.00001;

[0175] Step 7.7: Update the first The iteration The actual length of the road pixels ;

[0176] (18)

[0177] Step 7.8: Use formula (19) to construct The objective function at the iteration :

[0178] (19)

[0179] Step 7.9: Solve the objective function using the least squares method When the maximum value is obtained The best estimated parameters at the iteration , and the optimal objective function value ;

[0180] Step 7.10, judgment and and and and Are they both true? If true, then output The best road slope estimation value under iterations As a final result, if it is not established, Assign to , Assign to , Assign to , Assign to , Assign to , return to step 7.3 and execute sequentially.

[0181] In this embodiment, an electronic device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the above method, and the processor is configured to execute the program stored in the memory.

[0182] In this embodiment, a computer-readable storage medium stores a computer program on the computer-readable storage medium, and the computer program executes the steps of the above method when executed by a processor.

Claims

1. A method for estimating road longitudinal slope based on drone aerial video, characterized in that: The steps are as follows: Step 1: Place the camera lens on the drone perpendicular to the horizontal plane of the road, so as to shoot the traffic flow video of the road through the drone; let the total number of frames of the traffic flow video be ; Step 2: Correcting the traffic flow video to obtain a corrected traffic flow video; Step 3: Determine the lane with the maximum traffic volume on the road in the modified traffic flow video , use polynomial curves to correct the lanes of a certain frame in the traffic flow video Fit the pixel points on the center line to obtain the baseline; Extract the pixel points on the baseline of each frame of the modified traffic flow video and calculate the pixel points in the time dimension. Combine them to get the spatial dimension with the actual length of the road The lane centerline image is converted into a grayscale image ; Step 4: Grayscale image Extract the trajectory contour, obtain the vehicle foreground contour as the trajectory data, and sort the trajectory data in ascending order according to the order of vehicle entry and exit to obtain the vehicle trajectory data set ; Step 5: Processing to obtain a complete trajectory set ; Step 5.

1. Calculate vehicles The trajectory Distance from start point to start point of road ,vehicle The trajectory Distance between the end point and the end of the road ; Step 5.2, judgment Is it true? If so, go to step 5.3; otherwise, move the vehicle The trajectory Add lower boundary disconnect track ;in, Indicates vehicle The distance threshold between the starting point of the trajectory and the starting point of the road; Step 5.3, judgment Is it true? If true, it means the vehicle The trajectory is a complete trajectory and is stored in the complete trajectory set Otherwise, the vehicle The trajectory Add upper boundary disconnect track ,in, Indicates vehicle The distance threshold between the end point of the trajectory and the end point of the road; Step 5.4: Follow the process from step 5.1 to step 5.3 to The trajectories of different vehicles are processed to obtain the final and ; Step 5.5: Calculate any lower boundary disconnection trajectory The end point of the trajectory is disconnected from any upper boundary trajectory The trajectory starts in the time dimension The difference on , the lower boundary disconnected trajectory The end point of the trajectory is disconnected from any upper boundary trajectory The trajectory starts in the space dimension The difference on ; Step 5.6, judgment and Are both true? If both are true, go to step 5.7; otherwise, it means that the vehicle The trajectory For lane change trajectories, not stored in the complete trajectory set ,in, Indicates the headway threshold between the lower boundary disconnected track and the upper boundary disconnected track, Indicates the spatial threshold of the lower boundary disconnected trajectory and the upper boundary disconnected trajectory; Step 5.7: Use the first-order Bezier curve to Starting point of the lower boundary disconnection trajectory and End point of the upper boundary disconnection trajectory Connect them to get the missing track , and and Connect to form a vehicle The complete track After that, save the complete trajectory set ; Step 5.8: According to the order of the trajectory Sort in ascending order to get the sorted complete trajectory set ,make Any of The complete trajectory is recorded as ,in, It is A complete trajectory in the time dimension The time series on It is The complete trajectory in the spatial dimension The position sequence on ; Step 6: According to , use wavelet transform to obtain the core speed change point set of all complete trajectories ; Step 7: Assuming the actual length of the road pixel points and the road longitudinal slope value, obtain the distribution of the speed change point spacing and the reaction time, apply the Bayesian network and machine learning algorithm, iteratively obtain the expected value and variance of the actual length of the road pixel points and the road longitudinal slope estimation value, and output the optimal road longitudinal slope estimation value.

2. The method for estimating road longitudinal slope based on drone aerial video according to claim 1, characterized in that: The step 2 comprises: Step 2.1: Perform static object recognition on the first and last frames of the traffic flow video, obtain the two frames of recognition results, and perform static object matching to obtain a static feature template. ; Step 2.2, define the current frame number as ,initialization ; Step 2.3, use The algorithm is used to analyze the traffic flow video Frame images and static feature templates Match and get Matching feature point set , and use formula (1) to get Perspective transformation matrix ; (1) Step 2.4: For The frame image is corrected to obtain the corrected Frame picture; Step 2.4: Assign to , and judge Is it true? If so, return to step 2.3 and execute sequentially; otherwise, it means that the corrected traffic flow video is obtained.

3. The method for estimating road longitudinal slope based on drone aerial video according to claim 2 is characterized in that: The step 4 comprises: Step 4.1: Pass The edge detection algorithm obtains the grayscale image The vehicle track in the image is separated from the background to obtain a binary image. , let the binary image The set of pixels with a value of 1 constitutes the foreground image. ; Step 4.2: After the foreground image B is corroded and expanded, the processed foreground image is obtained. , and with the binary image Combine to form a new binary image ; Step 4.3: Use the eight-connectivity criterion to After connecting the boundary points of the vehicle trajectory, a processed binary image is formed. ; Step 4.4: Use exponential averaging filter to Filter to get the binary image after noise reduction ; Step 4.5: According to the set time threshold , Vehicle length threshold and the threshold of headway right The boundary points of the vehicle trajectory in are separated to obtain The outlines of different vehicles in the Step 4.6: The contour lines of different vehicles are accurately analyzed to obtain the vehicle foreground contour as the trajectory data, and the trajectory data is sorted in ascending order according to the order of vehicle entry and exit to obtain the vehicle trajectory data set .

4. The method for estimating road longitudinal slope based on drone aerial video according to claim 3 is characterized in that: The step 6 comprises: Step 6.1: Calculate using formula (2) Any The approximation coefficients of the complete trajectory ; (2) In formula (2), is the scale factor, is the translation factor, ; Step 6.2: Calculate the energy distribution using equation (3) ; (3) In formula (3), represents the minimum value of the scale factor, Indicates the maximum value of the scale factor; Step 6.3, find , get the speed change point time set ,in, Indicates The speed change time, is the number of speed change points; Step 6.4: Satisfy The speed change point corresponding to the condition is taken as the core speed change point, so as to obtain the time corresponding to the core speed change point and location , and combine Deposit ; Step 6.5: Process all complete trajectories according to the process of step 6.1 to step 6.4, and obtain the core speed change point set .

5. The method for estimating road longitudinal slope based on drone aerial video according to claim 4 is characterized in that: The step 7 comprises: Step 7.1: According to the position of the core speed change point, the core speed change points located at the road section are merged into the upper section core speed change point set. , merge the core speed change points located at the lower section of the road into the lower section core speed change point set ; Use formula (4) to calculate the upper road segment data set Middle The core shift point and Reaction time between core shift points , thus obtaining the upper road segment data set The set of reaction times between all two adjacent core speed changes in ; (4) In formula (4), Represents the frame rate of the video; Use formula (5) to calculate the upper road segment data set Middle The core shift point and The number of pixels between core speed change points , thus obtaining the upper road segment data set The set of the number of pixels between all adjacent core speed change points in ; (5) Use formula (6) to calculate the lower section data set Middle The core shift point and Reaction time between core shift points , thus obtaining the next section data set The set of reaction times between all two adjacent core speed change points in ; (6) Use formula (7) to calculate the lower section data set Middle The core shift point and The number of pixels between core speed change points , thus obtaining the next section data set The set of the number of pixels between all adjacent core speed change points in ; (7) Will , Merge into a time sample dataset , and The mean value of ,Will The standard deviation of ; Will , Merge into a sample dataset of spacing pixels ; Step 7.2: Define the maximum number of iterations as The error is , initialize the current number of iterations , No. The actual length of road pixels at iteration The actual length of the road pixels is , No. The standard deviation of the actual length of road pixels in the iteration is Normal distribution and Estimated road slope at the iteration , No. The objective function value at the iteration is ; Step 7.3: Use equations (8), (9) and (10) to obtain The average of the actual headway distances under iterations , No. The standard deviation of the actual headway distance at the iteration , No. Covariance at iterations , thus obtaining The reaction time between the core speed change points in the iteration and actual headroom Follows bivariate normal distribution Related parameters ; (8) (9) (10) In formula (8), formula (9) and formula (10), and , It is the upper road segment dataset The number of core speed change points, It is the lower section dataset The number of core speed change points, Indicates the camera field of view; Using formula (11) to calculate the The actual headway distance at the iteration ; (11) In formula (11), is the number of pixels in the sample dataset No. individual data; Step 7.4: Calculate the Next iteration The actual length of road pixels , and splice to get the actual length range of road pixels ; (12) In formula (12), Indicates The first iteration of the road pixel An estimate of the actual length, is the minimum value of the actual length of road pixels, represents the step length, Indicates the maximum value of the actual length of road pixels; Step 7.5: Use formula (13) to get Next iteration The actual length of road pixels under the condition Probability ; (13) In formula (13), is The increment on Use formula (14) to calculate the current Iterations The actual length of road pixels under the conditions The probability density function of ; (14) Step 7.6: Calculate using formula (15) In the current Iterations Parameters for taking time sample data sets Middle Data And the sample dataset of the number of pixels of spacing Middle Data The conditional probability ; (15) In formula (15), Indicates that given parameters The following appears at the same time The joint probability of , and: (16) Calculate using formula (17) and In the Iterations The parameter value is The conditional probability ; (17) In formula (17), Indicated in The increment on express The increment on Step 7.7: Update the first The iteration The actual length of the road pixels ; (18) Step 7.8: Use formula (19) to construct The objective function at the iteration : (19) Step 7.9: Solve the objective function using the least squares method When the maximum value is obtained The average actual length of the best road pixels under iterations , the standard deviation of the actual length of the best road pixel , the best estimate of the road longitudinal slope , and the optimal objective function value ; Step 7.10, judgment and and and and Are they both true? If true, then output The best road slope estimation value under iterations As a final result, if it is not established, Assign to , Assign to , Assign to , Assign to , Assign to , return to step 7.3 and execute sequentially.

6. An electronic device, comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the road longitudinal slope estimation method based on drone aerial video as described in any one of claims 1-5, and the processor is configured to execute the program stored in the memory.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, a method for estimating the longitudinal slope of a road based on drone aerial video as described in any one of claims 1 to 5 is executed.

Citation Information

Patent Citations

  • Markov chain-based identification method for ramp crawling behavior of heavy vehicle

    CN109979194A

  • Road plane output with lateral slope

    US20170270372A1