Rapid traffic processing method based on unmanned aerial vehicle image recognition
Through drone image recognition technology, airborne camera calibration and traffic image preprocessing are used to build a vehicle rectangular model, calculate the traffic capacity model, and determine the ramp position, solving the complexity of dynamic target processing in drone image recognition, and achieving efficient and accurate rapid traffic processing.
Patent Information
- Application Number
- CN202510362570.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-07-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art cannot effectively process dynamic targets in drone image recognition, and the calculation process is complex and inefficient.
Through the steps of onboard camera calibration, traffic image preprocessing, vehicle rectangular model construction, passability model calculation and ramp position determination, the computing process is simplified and computing efficiency is improved.
It realizes efficient processing of dynamic traffic images, improves computing efficiency and accuracy, and can quickly generate traffic processing solutions to alleviate road congestion during accidents.
Smart Images

Figure CN120299235A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of UAV recognition, and particularly to a traffic rapid processing method based on UAV image recognition. Background Art
[0002] UAV image recognition is a technology that uses computer vision and artificial intelligence algorithms to process, analyze, and understand the images captured by UAVs. The traffic rapid processing method based on UAV image recognition mainly relies on the flexible flight ability of UAVs, high-definition cameras, and advanced image recognition algorithms to achieve real-time monitoring, data collection, and intelligent analysis of traffic conditions, so as to quickly respond to and process various traffic problems. In the prior art, the image threshold is generally obtained by the NSCT method in image processing and reconstruction is carried out. However, this method is generally only suitable for processing stationary targets. When generating traffic processing schemes, they are generally generated by artificial intelligence algorithms, and the calculation process is very complex, and the recognition efficiency of vehicles is low. Due to limitations in hardware devices, the operation results are not satisfactory. Summary of the Invention
[0003] Aiming at the deficiencies of the prior art, the present invention provides a traffic rapid processing method based on UAV image recognition, which solves the technical problems that the prior art cannot process dynamic targets in image processing and has a very complex and inefficient calculation process, and achieves the purpose of being able to dynamically process images and simplify the operation process to improve the calculation efficiency.
[0004] To solve the above technical problems, the present invention provides the following technical solutions: A traffic rapid processing method based on UAV image recognition, the method includes the following steps:
[0005] S1. Collect calibration plate images through an on-board camera and calibrate the on-board camera;
[0006] S2. Collect traffic images on the viaduct through an on-board camera and preprocess the traffic images to obtain preprocessed images;
[0007] S3. Calculate the single-lane width W according to the preprocessed image d ;
[0008] S4. Convert the vehicles in the preprocessed image into rectangular models, obtain the outer contour coordinates Jx ri (b p , c q ) and Jx li (d r , u s ) of the rectangular model of the accident vehicle, and calculate the remaining width Sy d ;
[0009] S5. According to the single-lane width W d and the remaining width Sy d Construct the traffic capacity model Nl of the fault lane;
[0010] S6. Calculate the total traffic capacity value N of the overall lane according to the traffic capacity model Nl zt ;
[0011] S7. Calculate the position of the cut-off ramp M according to the total traffic capacity value N, and generate an accident handling plan according to the total traffic capacity value N zt and the throttle ramp M. zt
[0012] Furthermore, in step S1, the specific implementation steps are as follows:
[0013] S11. Filter the calibration plate image by the median filtering method to obtain a filtered image;
[0014] S12. Obtain the pixel coordinates (X a , Y a ) of the central point pixel of the filtered image. According to the pixel coordinates (X a , Y a ), construct the internal parameter matrix G, and the expression is:
[0015]
[0016] where f x and f y respectively represent the horizontal and vertical focal lengths of the camera;
[0017] S13. Define the coordinates of each pixel point in the filtered image as (A c , B d ), and normalize the coordinates of the pixel point to obtain the normalized coordinates (μ, π). The calculation formula is:
[0018]
[0019] where μ and π respectively represent the normalized horizontal and vertical coordinate values of the pixel point in the filtered image;
[0020] S14. Calibrate the camera according to the normalized coordinates (μ, π), and the expression is:
[0021] R 2 = μ 2 + π 2
[0022] U Z = μ·(1 + k1R 2 + k2R 4 ) + 2p1μπ + p2(R 2 +2μ 2 )
[0023] V jz =π·(1 + k1R 2 + k2R 4 ) + 2p2μπ + p1(R 2 + 2π 2 )
[0024] Among them, U JZ and V jz respectively represent the calibrated coordinate values, k1 and k2 represent the radial distortion coefficients, p1 and p2 represent the tangential distortion coefficients, and R 2 represents the sum of the squares of the normalized horizontal and vertical coordinate values;
[0025] S15. Calibrate the external parameters of the camera by the world coordinate method.
[0026] Furthermore, in step S2, the specific implementation steps are as follows:
[0027] S21. Decompose the traffic image through the non - subsampled pyramid and the non - subsampled directional filter bank to obtain multiple sub - band values C e,f,g , where e represents the decomposition scale, f represents the direction, and g represents the value index;
[0028] S22. Obtain the length E and width F of the traffic image, and calculate the energy value En e,f,g in the e - scale and f - direction according to the sub - band value C d . The calculation formula is:
[0029]
[0030] Among them, En d represents the d - th energy value, and n represents the number of sub - band values C e,f,g ;
[0031] S23. Calculate the total energy value Ez r . The calculation formula is:
[0032]
[0033] Among them, D represents the number of energy values En d ;
[0034] S24. Calculate the adaptation threshold δ h used to reduce the pseudo - Gibbs phenomenon. The calculation formula is:
[0035]
[0036] Among them, δ k represents the fixed - scale threshold in the k - direction, δh denotes the h-th adaptation threshold, and F denotes the number of directions in the f direction;
[0037] S25. According to the adaptation threshold δ h Reconstruct the traffic image by the non-downsampling directional filter method to obtain a preprocessed image.
[0038] Furthermore, in step S3, the specific implementation steps are as follows:
[0039] S31. Determine the road edges in the preprocessed image by the edge detection method, establish a two-dimensional coordinate system with the central pixel point of the preprocessed image as the origin, and obtain the edge coordinates Zb of the pixel points on the left and right edges of the road Lc (K g , L m ) and Zb Rc (M l , N n );
[0040] S32. Calculate the fitting curves L and R of the road edges respectively according to the edge coordinates Zb yc (K g , L m ) and Zb Rc (M l , N n ). The calculation formulas are:
[0041] L = A1L m 2 + B1L m + C1
[0042] R = A2N n 2 + B2N n + C2
[0043] where A1, B1, and C1 represent the coefficients of the fitting curve L, A2, B2, and C2 represent the coefficients of the fitting curve R, Zb yc (K g , L m ) represents multiple left edge coordinates, and Zb Rc (M l , N n ) represents multiple right edge coordinates;
[0044] S33. Calculate the curvatures Ql yc (K g , L m ) and Zb Rc (M l , N n ) of the edge coordinates respectively, and Ql L and Ql R, The calculation formula is:
[0045]
[0046] Where, Q l L represents the curvature of the L-th edge coordinate on the left side, and Ql R represents the curvature of the R-th edge coordinate on the right side;
[0047] S34. Obtain two coordinate points (K’ g , L’ m ) and (M’ l , N’ n ) with equal curvatures, and calculate the distance D e between the two coordinate points. The calculation formula is:
[0048]
[0049] Where, D e represents the distance between two coordinate points with equal curvatures in the e-th group;
[0050] S35. Calculate the average value e of multiple distances D and use the average value as the single lane width W d . The calculation formula for the average value is:
[0051]
[0052] Where, represents the single lane width of H distances D e .
[0053] Furthermore, in step S4, the specific implementation steps are as follows:
[0054] S41. Identify the vehicle in motion through OpenCV, convert the vehicle into a rectangular model, and obtain the outer contour coordinates Jx ri (b p , c q ) and Jx li (d r , u s ) of the two corner points representing the width among the four corner points of the rectangular model at time θ;
[0055] S42. Obtain the outer contour coordinates Jx ri (b p+1 , c q+1 ) at the moment, and calculate the coordinate differences ΔCu and ΔCz. The calculation formulas are:
[0056] ΔCz = c q-c q+1
[0057] ΔCu = b p -b p+1
[0058] Among them, ΔCz represents the coordinate difference of the ordinate of the outline coordinates, and ΔCu represents the coordinate difference of the abscissa of the outline coordinates;
[0059] S43. Determine whether the vehicle is a faulty vehicle according to the coordinate differences ΔCu and ΔCz;
[0060] If ΔCu = 0 and ΔCz = 0, it indicates that the vehicle has a fault, and mark the vehicle corresponding to the outline coordinates as a faulty vehicle, and the coordinates are (Gr v , Hr w );
[0061] If ΔCu ≠ 0 or ΔCz ≠ 0, it indicates that the vehicle is not faulty and no marking is done;
[0062] S44. Calculate the remaining width Sy of the faulty lane according to Jx ri (b p , c q ) and Jx li (d r , u s ), and the calculation formula is: d That is:
[0063]
[0064] Among them, Sy d represents the d-th remaining width.
[0065] Furthermore, in step S5, the specific implementation steps are as follows:
[0066] S51. Obtain the reduction coefficient α of the road according to the lateral clearance reduction coefficient table zj ;
[0067] S52. Calculate the adjustment coefficient β of the faulty lane according to the remaining width Sy d , and the calculation formula is: tz That is:
[0068]
[0069] Among them, β tz represents the adjustment coefficient of the faulty lane;
[0070] S53. Construct the traffic capacity model Nl of the faulty lane according to the reduction coefficient α zj and the adjustment coefficient β tz , and the expression is:
[0071] Nl = R sj ×α zj ×β tz
[0072] Among them, R sj represents the actual traffic flow of the faulty lane.
[0073] Furthermore, in step S6, the specific implementation steps are as follows:
[0074] S61. Calculate the adjustment coefficient γ of the normal lane zc ;
[0075] S62. Obtain the number of one-way lanes S, and calculate the traffic capacity value Nz of the normal lane. The calculation formula is:
[0076] Nz = S × R gz ×α zj ×γ zc
[0077] Among them, Nz represents the sum of the traffic capacity values of multiple normal lanes, and R zc represents the actual traffic flow of the normal lane;
[0078] S63. Calculate the total traffic capacity value N of the overall lane according to the traffic capacity model Nl and the traffic capacity value Nz zt , and the calculation formula is:
[0079] N zt = Nl + Nz
[0080] Among them, N zt represents the total traffic capacity value of the t-th overall lane.
[0081] Furthermore, the calculation formula of the adjustment coefficient γ of the normal lane zc is:
[0082]
[0083] Among them, γ zc represents the c-th adjustment coefficient of the normal lane.
[0084] Furthermore, in step S7, the specific implementation steps are as follows:
[0085] S71. Calculate the congestion radius Ry according to the total traffic capacity value N zt , and the calculation formula is: p , and the calculation formula is:
[0086]
[0087] Among them, Ry p represents the p-th congestion radius Ryp ;
[0088] S72. With the congestion radius Ry p as the radius and the fault vehicle (Gr v , Hr w ) as the center O ab draw the congestion range of the viaduct, obtain the coordinates (Zd a , Zw x ) of multiple ramp exits Kc outside the congestion range, calculate the ramp distance Zd t , and the calculation formula is:
[0089]
[0090] where Zd t represents the distance of the t-th ramp;
[0091] S73. Determine the throttling ramp M among multiple ramp distances Zd t , and the expression is:
[0092] M = min(Zd t )
[0093] where min(Zd t ) represents the minimum value among the ramp distances Zd t .
[0094] By means of the above technical solutions, the present invention provides a traffic rapid processing method based on drone image recognition, which at least has the following beneficial effects:
[0095] 1. In the preprocessing process of traffic images, the present invention can process dynamic thresholds, enhance the preprocessing function of dynamic images, the adaptation threshold can complete the threshold operation of dynamic images in the process of processing dynamic images, and can also improve the robustness and accuracy of the algorithm.
[0096] 2. By converting the vehicle into a rectangular model, the present invention simplifies the recognition method of detailed vehicle modeling in the prior art, thereby grasping the key data of the vehicle length and width, calculating the driving data on the road more efficiently and accurately, not only improving the calculation efficiency, but also simplifying the overall operation steps and improving the accuracy and calculation efficiency of the overall road analysis.
[0097] 3. By closely relating the accident road and the traffic flow, the present invention forms a dynamic model of the traffic flow and ramp exits of the accident road, can find the most suitable ramp exit for traffic flow control according to the real-time change of the traffic flow, effectively relieve the congestion of the accident road, not only improve the dynamic change ability of the operation method, but also efficiently and accurately find the throttling ramp exit, quickly generate a processing plan, and improve the processing efficiency of traffic management personnel. Brief Description of the Drawings
[0098] The drawings described herein are provided to further understand the present application and form a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:
[0099] Figure 1 It is a flowchart of a traffic rapid processing method based on UAV image recognition according to the present invention. Detailed Embodiments
[0100] To make the above objects, features and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the drawings and specific embodiments. Thereby, the implementation process of how the present application uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.
[0101] Due to the technical problems that the prior art cannot process dynamic targets in image processing and the calculation process is very complex and inefficient, please refer to Figure 1 , this embodiment proposes a traffic rapid processing method based on UAV image recognition, which can perform dynamic processing on images and simplify the calculation process to improve the calculation efficiency. The method includes the following steps:
[0102] S1. Collect calibration board images through an on-board camera and calibrate the on-board camera; before using the UAV to collect traffic images, since the camera lens is distorted and the recognition accuracy of computer vision needs to be improved, it is necessary to calibrate the on-board camera. The specific implementation steps are as follows:
[0103] S11. Filter the calibration board image through the median filtering method to obtain a filtered image; the median filtering method sets the gray value of each pixel point to the median of the gray values of all pixel points in a certain neighborhood window of this point to complete the image filtering. The median filtering method is a common image filtering method and can achieve image filtering without additional steps, so it will not be elaborated here.
[0104] S12. Obtain the pixel coordinates (X a , Y a ) of the central point pixel of the filtered image, and construct an internal parameter matrix G according to the pixel coordinates (X a , Y a ). The expression is:
[0105]
[0106] Wherein, f x and f yrespectively represent the horizontal and vertical focal lengths of the camera; in actual operation, due to the continuous reuse of the camera, its horizontal and vertical focal lengths are obtained using the Zhang Zhengyou calibration method for the first time and the data is continued to be used in subsequent operations.
[0107] S13. Define the coordinates of each pixel point in the filtered image as (A c , B d ), and perform normalization processing on the coordinates of the pixel point to obtain the normalized coordinates (μ, π). The calculation formula is:
[0108]
[0109] where μ and π respectively represent the normalized horizontal and vertical coordinate values of the pixel point in the filtered image;
[0110] S14. Calibrate the camera according to the normalized coordinates (μ, π). The expression is:
[0111] R 2 = μ 2 + π 2
[0112] U JZ = μ·(1 + k1R 2 + k2R 4 ) + 2p1μπ + p2(R 2 + 2μ 2 )
[0113] V jz = π·(1 + k1R 2 + k2R 4 ) + 2p2μπ + p1(R 2 + 2π 2 )
[0114] where U JZ and V jz respectively represent the corrected coordinate values, k1 and k2 represent the radial distortion coefficients, p1 and p2 represent the tangential distortion coefficients, and R 2 represents the sum of the squares of the normalized horizontal and vertical coordinate values. The calibration process can reduce image distortion and enhance the clarity of the images captured by the camera.
[0115] S15. Calibrate the external parameters of the camera through the world coordinate method. After the internal and external parameters of the camera are calibrated, traffic images can be captured. The calibration steps can improve the clarity of the images and also enhance the accuracy and robustness of the algorithm.
[0116] S2. Collect traffic images on the viaduct through an on-board camera, and preprocess the traffic images to obtain preprocessed images. After using the camera to capture traffic images, since the traffic images may be affected by the environment and cause the images to be unclear, it is necessary to preprocess the images. The specific implementation steps are as follows:
[0117] S21. Decompose the traffic image through an undecimated pyramid and an undecimated directional filter bank to obtain multiple subband values C e,f,g , where e represents the decomposition scale, f represents the direction, and g represents the value index; the undecimated pyramid and the undecimated directional filter bank are a method for multi-scale and multi-directional decomposition of images. This method is a commonly used image processing method and will not be elaborated here.
[0118] S22. Obtain the length E and width F of the traffic image, and calculate the energy value En in the e scale and f direction according to the subband value C e,f,g , and the calculation formula is: d
[0119]
[0120] where En d represents the d-th energy value, and n represents the number of subband values C e,f,g ; the energy value En d represents the amount of information carried by the subband, which is called the energy value here.
[0121] S23. Calculate the overall energy value Ez r , and the calculation formula is:
[0122]
[0123] where D represents the number of energy values En d ;
[0124] S24. Calculate the adaptation threshold δ for reducing the pseudo-Gibbs phenomenon h , and the calculation formula is:
[0125]
[0126]
[0127] where δ k represents the fixed-scale threshold in the k direction, δ h represents the h-th adaptation threshold, and F represents the number of f directions; in this step, a threshold that can follow the change of the energy value is calculated through the changing energy value, that is, the adaptation threshold δ h , and the adaptation threshold δ h changes during the image change process, thereby increasing the accuracy of preprocessing.
[0128] S25. According to the adaptation threshold δ h Reconstruct the traffic image by the non - subsampled directional filter method to obtain a pre - processed image. The non - subsampled directional filter is a method for decomposing and reconstructing images, which is a commonly used image - processing method and will not be elaborated here. By the action of the adaptation threshold δ h The ability to process dynamic thresholds enhances the pre - processing function of dynamic images. The adaptation threshold can complete the threshold operation of dynamic images during the processing of dynamic images, and can also improve the robustness and accuracy of the algorithm.
[0129] S3. Calculate the single - lane width W according to the pre - processed image d ; Since the passable width of the traffic road in the pre - processed image is unknown, it is necessary to calculate the single - lane width W d to analyze the effective width of the road. The specific implementation steps are as follows:
[0130] S31. Determine the road edge in the pre - processed image by the edge - detection method. Establish a two - dimensional coordinate system with the central pixel point of the pre - processed image as the origin, and obtain the edge coordinates Zb of the pixel points on the left and right edges of the road Lc (K g , L m ) and Zb Rc (M l , N n );
[0131] S32. Calculate the fitting curves L and R of the road edges respectively according to the edge coordinates Zb yc (K g , L m ) and Zb Rc (M l , N n ). The calculation formula is:
[0132] L = A1L m 2 + B1L m + C1
[0133] R = A2N n 2 + B2N n + C2
[0134] Among them, A1, B1, and C1 represent the coefficients of the fitting curve L, A2, B2, and C2 represent the coefficients of the fitting curve R, Zb yc (K g , L m ) represents multiple left - hand edge coordinates, Zb Rc (M l , Nn ) represents multiple edge coordinates on the right side;
[0135] S33. Calculate the edge coordinates Zb yc (K g , L m ) and Zb Rc (M l , N n ) of the curvature Ql L and Ql R , and the calculation formula is:
[0136]
[0137] Among them, Q l L represents the curvature of the L-th edge coordinate on the left side, and Ql R represents the curvature of the R-th edge coordinate on the right side; find the accurate width of the road through points with the same curvature.
[0138] S34. Obtain two coordinate points (K’ g , L’ m ) and (M’ l , N’ n ) with equal curvature, and calculate the distance D
[0139] between the two coordinate e points, and the calculation formula is:
[0140]
[0141] Among them, D e represents the distance between two coordinate points with equal curvature in the e-th group;
[0142] S35. Calculate the average value of multiple distances D e and take the average value as the single-lane width W , and the calculation formula for the average value d is:
[0143]
[0144] Among them, represents the single-lane width of H distances D e . Since the road has curves and straight lines in the image, it is very easy to have errors in obtaining the width when dealing with curved roads. Here, the curvature of the road fitting curve is used to determine the two boundary points of the road, and then the width of the lane is accurately calculated. The calculation is more accurate and helps the operation of subsequent steps, greatly improving the efficiency and accuracy of the operation.
[0145] S4. Convert the vehicle in the preprocessed image into a rectangular model, and obtain the outer contour coordinates Jx of the rectangular model of the accident vehicle ri (b p ,c q ) and Jx li (d r ,u s ), and calculate the remaining width Sy of a single lane d ; The prior art presents and analyzes the external contour of the vehicle through an artificial intelligence algorithm, but this method is inefficient and seriously affects the operation time of the algorithm. The specific implementation steps are as follows:
[0146] S41. Identify the vehicle in motion through OpenCV, convert the vehicle into a rectangular model, and obtain the outer contour coordinates Jx of the two corner points representing the width among the four corner points of the rectangular model at time Y ri (b p ,c q ) and Jx li (d r ,u s ); The vehicle is transformed into a rectangular model or a quadrilateral model from top to bottom. Taking the rectangle presented in the directly overhead image as an example in the present invention, since in traffic image analysis, the width of the vehicle is mainly analyzed to facilitate the analysis of the smoothness of traffic, it is only necessary to obtain the coordinates of the two corner points representing the width among the four corner points of the rectangular model, and the selection can be made by identifying the length and width of the vehicle.
[0147] S42. Obtain the outer contour coordinates Jx at time Y + 1 ri (b p+1 ,c q+1 ), calculate the coordinate differences ΔCu and ΔCz, and the calculation formulas are as follows:
[0148] ΔCz = c q - c q+1
[0149] ΔCu = b p - b p+1
[0150] Among them, ΔCz represents the coordinate difference of the ordinate of the outer contour coordinates, and ΔCu represents the coordinate difference of the abscissa of the outer contour coordinates;
[0151] S43. Determine whether the vehicle is a faulty vehicle according to the coordinate differences ΔCu and ΔCz;
[0152] If ΔCu = 0 and ΔCz = 0, it means that the vehicle is faulty, and mark the vehicle corresponding to the outer contour coordinates as a faulty vehicle, and the coordinates are (Gr v ,Hr w) It is judged by the driving characteristics of the accident vehicle on the viaduct. Since the vehicles driving normally on the viaduct must have a certain speed, the vehicle whose position does not change in the front, back, left, and right within a certain time interval is determined as the accident vehicle.
[0153] If ΔCu≠0 or ΔCz≠0, it indicates a non-fault vehicle and no marking is done;
[0154] S44. According to Jx ri (b p , c q ) and Jx li (d r , u s ) Calculate the remaining width Sy of the fault lane d , and the calculation formula is:
[0155]
[0156] Among them, Sy d represents the d-th remaining width. By converting the vehicle into a rectangular model, the existing technology's identification method for detailed vehicle modeling is simplified. Furthermore, the key data of the vehicle's length and width are captured, and the driving data on the road is calculated more efficiently and accurately. This not only improves the calculation efficiency but also simplifies the overall operation steps and enhances the accuracy and calculation efficiency of the overall road analysis.
[0157] S5. According to the single-lane width W d and the remaining width Sy d construct the traffic capacity model Nl of the fault lane; after obtaining the single-lane width W d and the remaining width Sy d , it is also necessary to judge the traffic capacity of the accident road to make the treatment plan more complete. The specific implementation steps are as follows:
[0158] S51. Obtain the reduction coefficient α of the road according to the lateral clearance reduction coefficient table zj ; The lateral clearance reduction coefficient table is a table used to adjust the actual traffic capacity of a road or lane to consider factors such as the mutual influence between vehicles, road conditions, and traffic flow characteristics. The reduction coefficient α can be directly obtained from the table zj , and the lateral clearance reduction coefficient table is a commonly used table in the study of traffic roads and will not be elaborated here.
[0159] S52. Calculate the adjustment coefficient β of the fault lane according to the remaining width Sy d , and the calculation formula is: tz ,
[0160]
[0161] Among them, βtz Indicates the adjustment coefficient of the faulty lane;
[0162] S53. According to the reduction coefficient α zj and the adjustment coefficient β tz Construct the traffic capacity model Nl of the faulty lane, and the expression is:
[0163] Nl = R sj ×α zj ×β tz
[0164] where R sj Indicates the actual traffic flow of the faulty lane. By converting the vehicle into a rectangular model, the identification method of detailed vehicle modeling in the prior art is simplified, and then the key data of the vehicle length and width are captured, and the driving data on the road are calculated more efficiently and accurately. This not only improves the calculation efficiency, but also simplifies the overall operation steps and improves the accuracy and calculation efficiency of the overall road analysis. Through the construction of the traffic capacity model, the road traffic capacity can be dynamically obtained, which is convenient for the operation of subsequent steps and greatly improves the operation efficiency of the algorithm.
[0165] S6. Calculate the total traffic capacity value N of the overall lane according to the traffic capacity model Nl zt ; Through the establishment of the traffic capacity model of the accident road, the calculation of the traffic capacity of the normal road due to the occurrence of the accident is still lacking. The specific implementation steps are as follows:
[0166] S61. Calculate the adjustment coefficient γ of the normal lane zc , and the calculation formula is:
[0167]
[0168] where γ zc Indicates the c-th adjustment coefficient of the normal lane;
[0169] S62. Obtain the number of one-way lanes S, and calculate the traffic capacity value Nz of the normal lane. The calculation formula is:
[0170] Nz = S × R gz ×α zj ×γ zc
[0171] where Nz represents the sum of the traffic capacity values of multiple normal lanes, and R zc Indicates the actual traffic flow of the normal lane;
[0172] S63. Calculate the total traffic capacity value N of the overall lane according to the traffic capacity model Nl and the traffic capacity value Nz zt , and the calculation formula is:
[0173] Nzt = Nl + Nz
[0174] Wherein, N zt represents the total traffic capacity value of the t-th overall lane. By converting vehicles into rectangular models, the identification method of detailed vehicle modeling in the prior art is simplified, and then the key data of vehicle length and width are captured, enabling more efficient and accurate calculation of the driving data on the road. This not only improves the calculation efficiency but also simplifies the overall operation steps, enhancing the accuracy and calculation efficiency of the overall road analysis. Through the close relationship between the accident road and traffic flow, a dynamic model of the traffic flow and ramp of the accident road is formed, which can find the most suitable ramp according to the real-time change of traffic flow to control the traffic flow, effectively alleviating the congestion of the accident road. This not only improves the dynamic change ability of the operation method but also can efficiently and accurately find the intercepting ramp and quickly generate a treatment plan, improving the processing efficiency of traffic management personnel.
[0175] S7. According to the total traffic capacity value N zt calculate the position of the throttling ramp M, and generate an accident treatment plan according to the total traffic capacity value N zt and the throttling ramp M. In order to solve the traffic accident problem more quickly, it is also necessary to throttle the vehicles behind the accident point to determine the position of the ramp entrance that needs to be throttled. The specific implementation steps are as follows:
[0176] S71. According to the total traffic capacity value N zt calculate the congestion radius Ry p , and the calculation formula is:
[0177]
[0178] Wherein, Ry p represents the p-th congestion radius Ry p ; the congestion radius Ry p is a dynamic change model, an operation model that can change according to the road traffic capacity, which is more accurate for determining the throttling ramp and improves the calculation efficiency.
[0179] S72. With the congestion radius Ry p as the radius and the breakdown vehicle (Gr v , Hr w ) as the center O ab draw the congestion range of the viaduct, obtain the coordinates (Zd a , Zw x ) of multiple ramp mouths Kc outside the congestion range, and calculate the ramp distance Zd t , and the calculation formula is:
[0180]
[0181] Among them, Zd t represents the distance of the t-th ramp;
[0182] S73. Among multiple ramp distances Zd t determine the throttling ramp M, and the expression is:
[0183] M = min(Zd t )
[0184] Among them, min(Zd t ) represents the minimum value among the ramp distances Zd t . By closely relating to the accident road and traffic flow, a dynamic model of the traffic flow of the accident road and the ramp is formed. It can find the most suitable ramp according to the real-time change of the traffic flow to control the traffic flow, effectively relieve the congestion of the accident road, not only improve the dynamic change ability of the operation method, but also can efficiently and accurately find the throttling ramp, quickly generate a processing plan, and improve the processing efficiency of traffic management personnel.
[0185] Those of ordinary skill in the art can understand that all or part of the steps in implementing the method of the above embodiments can be completed by instructing relevant hardware through a program. Therefore, this application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application can adopt the form of a computer program product implemented 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.
[0186] The above embodiments have introduced the present invention in detail. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A traffic rapid processing method based on UAV image recognition, characterized in that, The method includes the following steps: S1. Collect the calibration board image through the airborne camera and calibrate the airborne camera; S2. Collect the traffic image on the overhead bridge through the airborne camera and preprocess the traffic image to obtain a preprocessed image; S3. Calculate the single-lane width W based on the preprocessed image d ; S4. Convert the vehicle in the preprocessed image into a rectangular model, and obtain the outer contour coordinates Jx of the rectangular model of the accident vehicle ri (b p , c q ) and Jx li (d r , u s ), and calculate the remaining width Sy of the single lane d ; S5. According to the single-lane width W d and the remaining width Sy d Construct the traffic capacity model Nl of the breakdown lane; S6. Calculate the total traffic capacity value N of the overall lane according to the traffic capacity model Nl zt ; S7. According to the total traffic capacity value N zt Calculate the location of the intercepting ramp M, and generate an accident handling plan based on the total traffic capacity value N zt and the throttling ramp M.
2. The traffic rapid processing method according to claim 1, characterized in that In step S1, the specific implementation steps are as follows: S11. Filter the calibration board image through the median filtering method to obtain a filtered image; S12. Obtain the pixel coordinates (X a , Y a ) of the central point pixel of the filtered image, and construct an internal parameter matrix G according to the pixel coordinates (X a , Y a ), and the expression is: where, f x and f y respectively represent the horizontal and vertical focal lengths of the camera; S13. Define the coordinates (A c , B d ) of each pixel in the filtered image, and normalize the coordinates (A c , B d ) of the pixel to obtain the normalized coordinates (μ, π). The calculation formula is as follows: where μ and π respectively represent the normalized horizontal and vertical coordinate values of the pixel points in the filtered image; S14. Calibrate the camera according to the normalized coordinates (μ, π), and the expression is: R 2 = μ 2 + π 2 U JZ = μ·(1 + k1R 2 + k2R 4 ) + 2p1μπ + p2(R 2 + 2μ 2 ) V jz = π·(1 + k1R 2 + k2R 4 ) + 2p2μπ + p1(R 2 + 2π 2 ) Among them, U JZ and V jz respectively represent the corrected coordinate values, k1 and k2 represent the radial distortion coefficients, p1 and p2 represent the tangential distortion coefficients, and R 2 represents the sum of the squares of the normalized horizontal and vertical coordinate values; S15. Calibrate the external parameters of the camera through the world coordinate method.
3. The traffic rapid processing method according to claim 1, wherein In step S2, the specific implementation steps are as follows: S21. Decompose the traffic image through a non - subsampled pyramid and a non - subsampled directional filter bank to obtain multiple sub - band values C e,f,g , where e represents the decomposition scale, f represents the direction, and g represents the value index; S22. Obtain the length E and width F of the traffic image, and calculate the energy value En in the f direction of the e scale according to the subband value C e,f,g The calculation formula is as follows: d for calculating the energy value En in the f direction of the e scale Among them, En d represents the d-th energy value, and n represents the number of sub-band values C e,f,g ; S23. Calculate the total energy value Ez r , and the calculation formula is as follows: where D represents the quantity of the energy value En d ; S24. Calculate the adaptive threshold δ for reducing the Gibbs phenomenon, h and the calculation formula is as follows: Among them, δ k represents the fixed scale threshold in the k direction, and δ h represents the h-th adaptation threshold, and F represents the number of f directions; S25. According to the adaptation threshold δ h Reconstruct the traffic image by the non - subsampled directional filter method and obtain the pre - processed image.
4. The traffic rapid processing method according to claim 1, characterized in that In step S3, the specific implementation steps are as follows: S31. Determine the road edges in the preprocessed image through edge detection method, establish a two-dimensional coordinate system with the central pixel point of the preprocessed image as the origin, and obtain the edge coordinates Zb of the pixel points on the left and right edges of the road Lc (K g ,L m ) and Zb Rc (M l ,N n ); S32. Calculate the fitting curves L and R of the road edge respectively according to the edge coordinates Zb yc (K g ,L m ) and Zb Rc (M l ,N n ) with the calculation formula as follows: L = A1L m 2 + B1L m + C1 R = A2N n 2 + B2N n + C2 Among them, A1, B1, and C1 represent the coefficients of the fitting curve L, and A2, B2, and C2 represent the coefficients of the fitting curve R, Zb yc (k g , L m ) represents multiple edge coordinates on the left side, Zb Rc (M l , N n ) represents multiple edge coordinates on the right side; S33. Calculate the edge coordinates Zb respectively yc (K g ,L m ) and the curvature Ql of Zb Rc (M l ,N n ), and the calculation formula is: L and Ql R , the calculation formula is: Among them, Ql L represents the curvature of the L-th edge coordinate on the left side, and Ql R represents the curvature of the R-th edge coordinate on the right side; S34. Obtain two coordinate points (K’ g , L’ m ) and (M’ l , N’n) with equal curvature, and calculate the distance D e between the two coordinate points. The calculation formula is as follows: Among them, D e represents the distance between two coordinate points with equal curvature in the e-th group; S35. Calculate the average value of multiple distances D e and use the average value as the single lane width W , and the calculation formula for the average value d is as follows: The calculation formula for the average value is: Among them, represents H distances of D e for the width of a single lane.
5. The traffic rapid processing method according to claim 1, characterized in that, In step S4, the specific implementation steps are as follows: S41. Identify the vehicle in motion through OpenCV, convert the vehicle into a rectangular model, and obtain the outer contour coordinates Jx of the two corner points representing the width among the four corner points of the rectangular model at time θ ri (b p ,c q ) and Jx li (d r ,u s ); S42. Obtain the outline coordinates Jx at the moment ri (b p+1 , c q+1 ), calculate the coordinate differences ΔCu and ΔCz, and the calculation formulas are as follows: ΔCz = c q -c q+1 ΔCu = b p -b p+1 where ΔCz represents the coordinate difference of the ordinate of the outline coordinate, and ΔCu represents the coordinate difference of the abscissa of the outline coordinate; S43. Judge whether the vehicle is a faulty vehicle according to the coordinate differences ΔCu and ΔCz; If ΔCu = 0 and ΔCz = 0, it indicates a vehicle fault. Mark the vehicle corresponding to the outline coordinates as a faulty vehicle, with coordinates (Gr v , Hr w ); If ΔCu≠0 or ΔCz≠0, it means it is a non-faulty vehicle and no marking is made; S44. Calculate the remaining width Sy of the faulty lane according to Jx ri (b p , c q ) and Jx li (d r , u s ), and the calculation formula is: d The calculation formula is: Among them, Sy d represents the d-th remaining width.
6. The traffic rapid processing method according to claim 1, characterized in that In step S5, the specific implementation steps are as follows: S51. Obtain the reduction coefficient α of the road according to the lateral clearance reduction coefficient table zj ; S52. According to the remaining width Sy d Calculate the adjustment coefficient β of the faulty lane tz , and the calculation formula is: Among them, β tz represents the adjustment coefficient of the faulty lane; S53. According to the reduction coefficient α zj and the adjustment coefficient β tz construct the traffic capacity model Nl of the faulty lane, and the expression is: Nl = R sj × α zj × β tz Among them, R sj represents the actual traffic flow of the faulty lane.
7. The traffic rapid processing method according to claim 1, characterized in that In step S6, the specific implementation steps are as follows: S61. Calculate the adjustment coefficient γ of the normal lane zc ; S62. Obtain the number of one-way lanes S, and calculate the traffic capacity value Nz of the normal lane. The calculation formula is: Nz = S × R gz × α zj × γ zc Among them, Nz represents the sum of the passing capacity values of multiple normal lanes, and R zc represents the actual passing flow of the normal lane; S63. Calculate the total traffic capacity value N of the overall lane according to the traffic capacity model Nl and the traffic capacity value Nz. zt , and the calculation formula is: N zt = Nl + Nz Among them, N zt represents the total traffic capacity value of the t-th overall lane.
8. The traffic rapid processing method according to claim 1, characterized in that The adjustment coefficient γ of the normal lane zc The calculation formula is as follows: Among them, γ zc represents the c-th adjustment coefficient of the normal lane.
9. The traffic rapid processing method according to claim 1, characterized in that In step S7, the specific implementation steps are as follows: S71. According to the total traffic capacity value N zt calculate the congestion radius Ry p , and the calculation formula is: Among them, Ry p represents the p-th congestion radius Ry p ; S72. Using the congestion radius Ry p as the radius and the coordinates of the breakdown vehicle (Gr v , Hr w ) as the center O ab to draw the congestion area of the viaduct, and obtaining the coordinates (Zd a , Zw x ) of multiple ramp entrances Kc outside the congestion area, and calculating the ramp distance Zd t . The calculation formula is as follows: Among them, Zd t represents the distance of the t-th ramp; S73. Determine the throttle ramp M among multiple ramp distances Zd t The expression is as follows: M = min(Zd t ) where, min(Zd t ) represents the minimum value of the ramp distance Zd t .