Expressway abnormal parking detection method and device
Through drone video stream processing and multi-objective tracking technology, the automation and real-time nature of abnormal parking detection on highways is achieved, and the accuracy and real-time problems of existing detection methods are solved, which significantly reduces the missed detection rate and manual workload.
Patent Information
- Application Number
- CN202411787188.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-28
AI Technical Summary
The existing highway abnormal parking detection methods have problems such as low detection accuracy, large manual workload, high missed detection rate and poor real-time performance.
The video stream is obtained by a drone equipped with a camera, and the drone's movement speed vector is calculated using feature point extraction and optical flow method. Combined with the YOLO object detection algorithm and the Bytrack multi-objective tracking algorithm, the actual speed vector of the vehicle is calculated and whether it is abnormal parking is determined.
It realizes automated real-time monitoring of abnormal highway parking events, reduces manual workload, improves detection accuracy and monitoring range, reduces missed detection rates, and has a low impact on bad weather and low visibility at night.
Smart Images

Figure CN119723478A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic safety monitoring and early warning, and in particular to a method and device for detecting abnormal parking on a highway. Background Art
[0002] With the development of social economy, the traffic volume on highways is increasing. Abnormal parking events may lead to serious traffic accidents, such as rear-end collisions and rollovers. These accidents not only threaten people's lives, but also cause huge economic losses and social impacts. In addition, abnormal parking on highways may also cause traffic congestion, affect the traffic efficiency of highways, increase transportation costs, and reduce logistics efficiency. Therefore, timely and accurate detection of abnormal parking events on highways is of great significance for preventing traffic accidents, reducing economic losses, and improving road use efficiency.
[0003] Traditional detection methods often rely on manual inspections or simple automation technologies, which not only requires a large workload, but also requires manual resetting of the monitoring area when the monitoring scene changes, which limits the versatility and convenience of the detection method. Furthermore, many existing methods lack intelligent processing capabilities and cannot effectively handle complex situations such as vehicle occlusion, changes in viewing angles, and changes in lighting, resulting in low detection accuracy and difficulty in achieving real-time monitoring and rapid response to highways. In addition, due to factors such as bad weather, low visibility at night, and monitoring points, the information collection of existing video surveillance management systems may have blind spots, resulting in a high missed detection rate. At the same time, existing detection equipment may have problems such as short detection distances and high error rates in detecting abnormal parking events. It does not have automatic identification functions, resulting in poor real-time performance. Summary of the invention
[0004] The purpose of the present invention is to solve the technical problems in the above-mentioned prior art that the traditional method for detecting abnormal parking on a highway has low detection accuracy, large manual workload, high missed detection rate and poor real-time performance, and to provide a method for detecting abnormal parking on a highway, which can automatically monitor abnormal parking events on a highway in real time and respond quickly, greatly reducing the manual workload, and has higher detection accuracy, a wide monitoring range, and is less affected by bad weather, low visibility at night, etc., and has a low missed detection rate.
[0005] In order to solve the above problems, the present invention is implemented according to the following technical solutions:
[0006] In a first aspect, the present invention provides a method for detecting abnormal parking on a highway, the method comprising:
[0007] S100, extracting feature points from the acquired video stream, and calculating the moving speed vector of the drone;
[0008] S200, extracting a vehicle detection frame of each vehicle from the video stream, and calculating an average diagonal length of the vehicle detection frame to obtain a ratio of the average diagonal length to an actual length of the vehicle;
[0009] S300, assigning a unique ID to each of the vehicle detection frames, and tracking each of the vehicle detection frames to track the movement of each vehicle;
[0010] S400, calculating the pixel length and angle of vehicle movement between each frame in the video stream;
[0011] S500, calculating a moving speed vector of the vehicle relative to the drone based on the pixel length and angle of the vehicle movement between each frame and the ratio of the average diagonal length to the actual length of the vehicle;
[0012] S600, calculating an actual speed vector of each of the vehicles based on a moving speed vector of the vehicle relative to the drone and a moving speed vector of the drone;
[0013] S700: When the actual speed vector of the vehicle is zero within a certain threshold time, the vehicle is abnormally parked.
[0014] Furthermore, the specific method of step S100 includes: S110, obtaining a real-time video stream from a highway through a drone equipped with a camera, the video stream including real-time image data of vehicles traveling on the highway; S120, extracting feature points from the video stream, the feature points including feature points of vehicles appearing in the video stream and other visible feature points other than the vehicles; S130, calculating optical flow data of the feature points based on the position changes of all feature points in consecutive frames of the video stream; S140, calculating the moving speed vector of the drone based on the optical flow data.
[0015] Furthermore, in step S120, feature points are extracted from the video stream by using one of the SIFT algorithm, the SURF algorithm or the ORB algorithm.
[0016] Furthermore, in step S200, the method for extracting the vehicle detection frame of each vehicle from the video stream is a YOLO target detection algorithm; wherein the information data of the vehicle detection frame includes its x-coordinate and y-coordinate in the image coordinate system, and the width and height of the detection frame.
[0017] Furthermore, in step S300, the method adopted for tracking each of the vehicle detection frames is an optical flow method and a Bytrack multi-target tracking algorithm.
[0018] Furthermore, in step S400, the step of calculating the pixel length and angle of vehicle movement between each frame in the video stream includes: S410, using the optical flow method to calculate the velocity vector of the feature point of the vehicle between each frame in the video stream; S420, based on the velocity vector, calculating the pixel angle of the vehicle movement; S430, the straight-line distance moved by the feature point of the vehicle in the image between each frame is the pixel length of the vehicle movement.
[0019] Furthermore, in step S500, the method for calculating the moving speed vector of the vehicle relative to the drone includes: the moving speed vector of the vehicle relative to the drone = the pixel length and angle of the vehicle moving between each frame * the ratio of the average diagonal length to the actual length of the vehicle.
[0020] Furthermore, in step S600, the method for calculating the actual speed vector of each vehicle includes: the actual speed vector of the vehicle = the moving speed vector of the vehicle relative to the drone - the moving speed vector of the drone.
[0021] Further, S710, when the vehicle is parked abnormally, the latitude and longitude data of the vehicle are obtained.
[0022] In a second aspect, the present invention provides a highway abnormal parking detection device, wherein the highway abnormal parking detection device is configured to execute the highway abnormal parking detection method according to the first aspect, and the highway abnormal parking detection device comprises:
[0023] A drone moving speed vector acquisition module, wherein the drone moving speed vector acquisition module is used to extract feature points from the acquired video stream and calculate the moving speed vector of the drone;
[0024] an average diagonal length to actual vehicle length ratio acquisition module, the average diagonal length to actual vehicle length ratio acquisition module is used to extract a vehicle detection frame of each vehicle from the video stream, calculate the average diagonal length of the vehicle detection frame, and obtain the ratio of the average diagonal length to the actual vehicle length;
[0025] A vehicle detection frame multi-target tracking module, the vehicle detection frame multi-target tracking module is used to assign a unique ID to each of the vehicle detection frames, and track each of the vehicle detection frames to track the movement of each vehicle;
[0026] A module for obtaining the pixel length and angle of vehicle movement between each frame, wherein the module is used to calculate the pixel length and angle of vehicle movement between each frame in the video stream;
[0027] A vehicle relative to the UAV movement speed vector acquisition module, the vehicle relative to the UAV movement speed vector acquisition module is used to calculate the vehicle relative to the UAV movement speed vector based on the pixel length and angle of the vehicle movement between each frame and the ratio of the average diagonal length to the actual vehicle length;
[0028] A vehicle actual speed vector acquisition module, the vehicle actual speed vector acquisition module is used to calculate the actual speed vector of each vehicle based on the moving speed vector of the vehicle relative to the drone and the moving speed vector of the drone;
[0029] The abnormal parking judgment module is used to judge that the vehicle is abnormally parked when the actual speed vector of the vehicle is zero within a certain threshold time.
[0030] Compared with the prior art, the present invention has the following beneficial effects:
[0031] The present invention provides a method for detecting abnormal parking on a highway. Firstly, the moving speed vector of a drone is calculated by combining feature point extraction with an optical flow method. Then, a vehicle detection frame is proposed by a YOLO target detection algorithm, and the ratio of the average diagonal length of the detection frame to the actual vehicle length is further calculated. Then, the moving speed vector of the vehicle relative to the drone is calculated by combining a Bytrack multi-target tracking algorithm with an optical flow method. Finally, based on the moving speed vector of the vehicle relative to the drone and the moving speed vector of the drone, the actual speed vector of the vehicle is obtained, and this is used to determine whether the vehicle is parked abnormally.
[0032] This method can automatically monitor abnormal parking events on highways in real time and respond quickly, greatly reducing manual workload. The monitoring range is wide and is less affected by bad weather, low visibility at night, etc., with a low missed detection rate and higher detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The specific embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings, wherein:
[0034] Figure 1 It is a flow chart of a preferred embodiment of a method for detecting abnormal parking on a highway according to the present invention;
[0035] Figure 2 It is a module diagram of a highway abnormal parking detection device of the present invention. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0037] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. Unless otherwise defined, the technical terms or scientific terms used in this specification should be understood by people with ordinary skills in the field to which this application belongs. The words "first", "second" and similar words used in this specification and claims do not indicate any order, quantity or importance, but are only used to distinguish different technical features.
[0038] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0039] like Figure 1 As shown, a method for detecting abnormal parking on a highway according to the present invention comprises the following steps:
[0040] S100, extracting feature points from the acquired video stream, and calculating the moving speed vector of the drone.
[0041] Specifically, S110, a real-time video stream is obtained from the highway by using a drone equipped with a camera, where the video stream includes real-time image data of vehicles traveling on the highway.
[0042] Further, S120, extracting feature points from the video stream, the feature points including feature points of the vehicle appearing in the video stream and other visible feature points except the vehicle.
[0043] It should be noted that in a video stream, feature points refer to points with unique properties in the image, such as corners, edges, or obvious texture changes, including feature points of vehicles that appear in the video stream and other visible feature points other than vehicles. Extracting feature points can facilitate the calculation of optical flow data based on these feature points in the future, thereby calculating the moving speed vector of the drone.
[0044] Preferably, in step S120, feature points are extracted from the video stream by one of the SIFT algorithm, the SURF algorithm or the ORB algorithm. The SIFT algorithm is known for its scale invariance, rotation invariance and robustness to noise, and can provide stable feature points; the SURF algorithm detects feature points by using integral images and fast Hessian matrices, significantly improving the calculation speed while maintaining scale and rotation invariance; the ORB algorithm has extremely high computational efficiency and low resource consumption. The ORB algorithm combines the FAST key point detector and the BRIEF descriptor, introduces direction information, improves the rotation invariance of the feature points, and generates binary descriptors for easy storage and comparison. In the present invention, the advantage of using these algorithms is that a suitable feature point extraction method can be selected according to the needs of actual application scenarios. For example, if it is necessary to increase the processing speed while maintaining high accuracy, the SURF algorithm may be selected; if the application scenario has extremely high real-time requirements, the ORB algorithm may be used. The flexible use of these algorithms enables this patent to meet the requirements of speed and resource consumption in different scenarios while ensuring the accuracy and robustness of feature point extraction.
[0045] Further, S130, based on the position changes of all feature points in consecutive frames of the video stream, optical flow data of the feature points are calculated.
[0046] It should be noted that optical flow is a computer vision technique used to estimate the motion information of pixels in an image sequence. It is based on the observation that when an object or camera in a scene moves, the pixel pattern in the image will also change. Optical flow data is a mathematical representation of this change, usually described as a two-dimensional vector field, where each vector represents the displacement of the corresponding pixel from one frame to the next.
[0047] Specifically, the steps of real-time processing of optical flow data by the drone during flight include: (10) Feature point tracking: In the video stream captured by the camera carried by the drone, feature points need to be extracted first. These feature points can be corners, edges or other significant texture change points in the image. By using an optical flow algorithm, such as the Lucas-Kanade method, the movement of these feature points between consecutive frames is tracked to estimate the movement pattern of the pixels in the image. (20) Optical flow data calculation: The calculation of optical flow data involves analyzing the position changes of feature points in consecutive video frames. By comparing the positions of feature points in consecutive frames, the velocity components of each feature point in the horizontal and vertical directions can be calculated to form a velocity vector. (30) Attitude compensation: The drone may tilt or shake during flight, which will affect the accuracy of the optical flow data. Therefore, the optical flow data needs to be attitude compensated to eliminate the misjudgment of speed caused by the change of the drone's attitude. This usually involves using the attitude angle of the drone (such as roll angle, pitch angle) to adjust the optical flow data to ensure the accurate speed and direction of the drone's movement. (40) Altitude correction: The accuracy of the optical flow data is related to the flight altitude of the drone. Optical flow data is relatively accurate at low altitudes, but the accuracy of the data decreases as the altitude increases. Therefore, the optical flow data may need to be scaled and corrected according to the flight altitude of the drone. (50) Data fusion: In practical applications, optical flow data is usually fused with other sensor data (such as accelerometers, gyroscopes, etc.) to improve the accuracy and robustness of positioning. Through data fusion, the effects caused by the movement of the drone can be corrected to ensure the accuracy and reliability of the detection results. (60) Real-time processing: The flight control system of the drone needs to process optical flow data in real time to respond quickly to environmental changes. This includes real-time analysis of optical flow data, attitude compensation, altitude correction and data fusion. The processed optical flow data can be used to adjust the flight control parameters of the drone to achieve accurate positioning and hovering. (70) Control algorithm: The processed optical flow data is input into the flight control algorithm, such as the PID controller, to achieve stable hovering and position control of the drone. This may involve adjusting the attitude and speed of the drone to offset drift caused by wind or other external factors.
[0048] Further, S140, based on the optical flow data, a moving speed vector of the drone is calculated.
[0049] It should be noted that the optical flow data can provide the amount of movement of each pixel in the horizontal and vertical directions, thereby obtaining a motion vector. Therefore, in the present invention, by analyzing the optical flow data, we can determine the moving speed vector of the drone. This is because if the drone is moving, the optical flow data will show obvious changes in the background feature points. By calculating the motion vectors of these feature points, we can obtain the moving speed vector of the drone. Calculating the moving speed vector of the drone helps to correct the impact caused by the movement of the camera and ensure the accuracy and reliability of the detection results.
[0050] S200, extracting a vehicle detection frame of each vehicle from the video stream, and calculating an average diagonal length of the vehicle detection frame to obtain a ratio of the average diagonal length to an actual length of the vehicle.
[0051] In step S200, the method for extracting the vehicle detection frame of each vehicle from the video stream is the YOLO target detection algorithm; wherein the information data of the vehicle detection frame includes its x-coordinate and y-coordinate in the image coordinate system, and the width and height of the detection frame.
[0052] It should be noted that YOLO (You Only Look Once) is a popular deep learning target detection algorithm that can quickly identify the bounding boxes and category probabilities of multiple objects in an image. The advantage of the YOLO algorithm is that it solves the target detection task as a regression problem, thereby enabling fast and accurate detection. In the present invention, each frame of the video stream is processed by the YOLO target detection algorithm, all regions in the image that may represent a vehicle are identified, and a vehicle detection frame (vehicle bounding frame) is generated for each region. Through this vehicle detection frame, we can quickly locate the position of the vehicle. For each vehicle detection frame, we can obtain the diagonal length by calculating the width and height of the detection frame. Specifically, the diagonal length can be calculated by the Pythagorean theorem, that is, the diagonal length is equal to the length of the hypotenuse of the right triangle formed by the width and height. Thus, we can calculate the average value of the diagonal lengths of all vehicle detection frames. And through the ratio of the average diagonal length to the actual length of the corresponding vehicle, we can more accurately estimate the actual size of the vehicle, which is very helpful for determining whether the vehicle is abnormally parked (for example, whether the vehicle is parked where it should not be parked). In addition, this approach can reduce false positives and improve the accuracy and reliability of detection.
[0053] S300: Assign a unique ID to each vehicle detection frame, and track each vehicle detection frame to track the movement of each vehicle.
[0054] It is understood that assigning a unique ID to each vehicle detection frame can distinguish different vehicles. This ID can be a simple serial number or a more complex identifier that contains the characteristic information of the vehicle. The purpose of assigning an ID is to ensure that the movement state of each vehicle can be accurately recorded and distinguished during the tracking process.
[0055] In step S300, the method used to track each vehicle detection frame is the optical flow method and the Bytrack multi-target tracking algorithm.
[0056] It should be noted that the Bytrack multi-target tracking algorithm combines the optical flow method and the Kalman filter to predict and track multiple targets. The Bytrack algorithm first uses the optical flow method to estimate the motion of the target, and then uses the Kalman filter to predict the position of the target in the future frame and track the target. This method can effectively handle occlusion and interaction between targets, and improve the accuracy and robustness of tracking. Because the traffic conditions on the highway are very complicated, occlusion may occur between vehicles, or move at different speeds in different lanes. If multi-target tracking technology is not used, it is difficult to accurately distinguish and track each vehicle. The present invention can effectively track the motion state of each vehicle through the optical flow + Bytrack method, and can accurately detect abnormal parking events even in complex traffic environments. This method improves the accuracy and robustness of the detection system, thereby improving the traffic safety level of the highway.
[0057] S400: Calculate the pixel length and angle of vehicle movement between each frame in the video stream.
[0058] Specifically, S410, the optical flow method is used to calculate the velocity vector of the feature point of the vehicle between each frame in the video stream.
[0059] Further, S420, based on the velocity vector, the pixel angle of the vehicle movement is calculated.
[0060] It can be understood that the velocity vector of the feature point includes the velocity components of the feature point in the horizontal and vertical directions. The pixel angle of the vehicle movement can be obtained through the angle between the horizontal and vertical directions.
[0061] Further, S430, the straight-line distance that the feature point of the vehicle moves in the image between each frame is the pixel length of the vehicle movement. For example, if we have a feature point with coordinates (x1, y1) in the first frame, and the coordinates of the feature point become (x2, y2) in the next frame, then the pixel length of the feature point movement can be calculated by the following formula:
[0062]
[0063] S500: Calculate a moving speed vector of the vehicle relative to the drone based on the pixel length and angle of the vehicle movement between each frame and the ratio of the average diagonal length to the actual length of the vehicle.
[0064] Specifically, the moving speed vector of the vehicle relative to the drone = the pixel length and angle of the vehicle's movement between each frame * the ratio of the average diagonal length to the actual length of the vehicle.
[0065] S600: Based on the moving speed vector of the vehicle relative to the drone and the moving speed vector of the drone, calculate the actual speed vector of each of the vehicles.
[0066] Specifically, the actual speed vector of the vehicle = the moving speed vector of the vehicle relative to the UAV - the moving speed vector of the UAV.
[0067] S700: When the actual speed vector of the vehicle is zero within a certain threshold time, the vehicle is abnormally parked.
[0068] It should be noted that the "certain threshold time" can be set according to the actual application scenario, such as 10 minutes, 15 minutes, etc.
[0069] Specifically, S710, when the vehicle is parked abnormally, the latitude and longitude data of the vehicle are obtained.
[0070] Figure 2 This is a module diagram of a highway abnormal parking detection device according to the present invention. Figure 2 As shown, the module includes:
[0071] (1) UAV moving speed vector acquisition module.
[0072] The UAV moving speed vector acquisition module is used to extract feature points from the acquired video stream and calculate the moving speed vector of the UAV.
[0073] (2) Module for obtaining the ratio of average diagonal length to actual vehicle length.
[0074] The module for obtaining the ratio of the average diagonal length to the actual vehicle length is used to extract the vehicle detection frame of each vehicle from the video stream, calculate the average diagonal length of the vehicle detection frame, and obtain the ratio of the average diagonal length to the actual vehicle length.
[0075] (3) Vehicle detection frame multi-target tracking module.
[0076] The vehicle detection frame multi-target tracking module is used to assign a unique ID to each vehicle detection frame and track each vehicle detection frame to track the movement of each vehicle.
[0077] (4) A module for acquiring the pixel length and angle of vehicle movement between each frame.
[0078] The module for obtaining the pixel length and angle of vehicle movement between each frame is used to calculate the pixel length and angle of vehicle movement between each frame in the video stream.
[0079] (5) Module for obtaining the vehicle’s moving speed vector relative to the UAV.
[0080] The vehicle's relative speed vector acquisition module is used to calculate the vehicle's relative speed vector based on the pixel length and angle of the vehicle's movement between each frame and the ratio of the average diagonal length to the actual length of the vehicle.
[0081] (6) Vehicle actual speed vector acquisition module.
[0082] The vehicle's actual speed vector acquisition module is used to calculate the actual speed vector of each vehicle based on the vehicle's moving speed vector relative to the drone and the drone's moving speed vector.
[0083] (7) Abnormal parking judgment module.
[0084] The abnormal parking judgment module is used to judge that the vehicle is abnormally parked when the actual speed vector of the vehicle is zero within a certain threshold time.
[0085] Compared with the prior art, the present invention has the following beneficial effects:
[0086] The present invention provides a method for detecting abnormal parking on a highway. Firstly, the moving speed vector of a drone is calculated by combining feature point extraction with an optical flow method. Then, a vehicle detection frame is proposed by a YOLO target detection algorithm, and the ratio of the average diagonal length of the detection frame to the actual vehicle length is further calculated. Then, the moving speed vector of the vehicle relative to the drone is calculated by combining a Bytrack multi-target tracking algorithm with an optical flow method. Finally, based on the moving speed vector of the vehicle relative to the drone and the moving speed vector of the drone, the actual speed vector of the vehicle is obtained, and this is used to determine whether the vehicle is parked abnormally.
[0087] This method can automatically monitor abnormal parking events on highways in real time and respond quickly, greatly reducing manual workload. The monitoring range is wide and is less affected by bad weather, low visibility at night, etc., with a low missed detection rate and higher detection accuracy.
[0088] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Therefore, any modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention shall still fall within the scope of the technical solution of the present invention.
Claims
1. A method for detecting abnormal parking on a highway, characterized in that: The method comprises: S100, extracting feature points from the acquired video stream, and calculating the moving speed vector of the drone; S200, extracting a vehicle detection frame of each vehicle from the video stream, and calculating an average diagonal length of the vehicle detection frame to obtain a ratio of the average diagonal length to an actual length of the vehicle; S300, assigning a unique ID to each of the vehicle detection frames, and tracking each of the vehicle detection frames to track the movement of each vehicle; S400, calculating the pixel length and angle of vehicle movement between each frame in the video stream; S500, calculating a moving speed vector of the vehicle relative to the drone based on the pixel length and angle of the vehicle movement between each frame and the ratio of the average diagonal length to the actual length of the vehicle; S600, calculating an actual speed vector of each of the vehicles based on a moving speed vector of the vehicle relative to the drone and a moving speed vector of the drone; S700: When the actual speed vector of the vehicle is zero within a certain threshold time, the vehicle is abnormally parked.
2. A method for detecting abnormal parking on a highway according to claim 1, characterized in that: The specific method of step S100 includes: S110, acquiring a real-time video stream from the highway by using a drone equipped with a camera, wherein the video stream includes real-time image data of vehicles traveling on the highway; S120, extracting feature points from the video stream, where the feature points include feature points of vehicles appearing in the video stream and other visible feature points other than the vehicles; S130, calculating optical flow data of the feature points based on position changes of all feature points in consecutive frames of the video stream; S140: Calculate a moving speed vector of the drone based on the optical flow data.
3. The method for detecting abnormal parking on a highway according to claim 2, characterized in that: In step S120, feature points are extracted from the video stream by using one of the SIFT algorithm, the SURF algorithm or the ORB algorithm.
4. The method for detecting abnormal parking on a highway according to claim 1, characterized in that: In step S200, the method for extracting the vehicle detection frame of each vehicle from the video stream is a YOLO target detection algorithm; The information data of the vehicle detection frame includes its x-coordinate and y-coordinate in the image coordinate system, and the width and height of the detection frame.
5. The method for detecting abnormal parking on a highway according to claim 1, characterized in that: In step S300, the method used to track each of the vehicle detection frames is the optical flow method and the Bytrack multi-target tracking algorithm.
6. The method for detecting abnormal parking on a highway according to claim 1, characterized in that: In step S400, the step of calculating the pixel length and angle of vehicle movement between each frame in the video stream includes: S410, calculating the velocity vector of the feature point of the vehicle between each frame in the video stream by using an optical flow method; S420, calculating a pixel angle of movement of the vehicle based on the velocity vector; S430: The straight-line distance that the feature point of the vehicle moves in the image between each frame is the pixel length of the vehicle movement.
7. The method for detecting abnormal parking on a highway according to claim 1, characterized in that: In step S500, the method for calculating the moving speed vector of the vehicle relative to the drone includes: The velocity vector of the vehicle relative to the drone = the pixel length and angle of the vehicle's movement between each frame * the ratio of the average diagonal length to the actual length of the vehicle.
8. The method for detecting abnormal parking on a highway according to claim 1, characterized in that: In step S600, the method for calculating the actual speed vector of each vehicle includes: The actual velocity vector of the vehicle = the moving velocity vector of the vehicle relative to the UAV - the moving velocity vector of the UAV.
9. The method for detecting abnormal parking on a highway according to claim 1, characterized in that: S710: When the vehicle is parked abnormally, obtain the latitude and longitude data of the vehicle.
10. A device for detecting abnormal parking on a highway, characterized in that: The highway abnormal parking detection device is configured to execute the highway abnormal parking detection method, and the highway abnormal parking detection device includes: A drone moving speed vector acquisition module, wherein the drone moving speed vector acquisition module is used to extract feature points from the acquired video stream and calculate the moving speed vector of the drone; an average diagonal length to actual vehicle length ratio acquisition module, the average diagonal length to actual vehicle length ratio acquisition module is used to extract a vehicle detection frame of each vehicle from the video stream, calculate the average diagonal length of the vehicle detection frame, and obtain the ratio of the average diagonal length to the actual vehicle length; A vehicle detection frame multi-target tracking module, the vehicle detection frame multi-target tracking module is used to assign a unique ID to each of the vehicle detection frames, and track each of the vehicle detection frames to track the movement of each vehicle; A module for obtaining the pixel length and angle of vehicle movement between each frame, wherein the module is used to calculate the pixel length and angle of vehicle movement between each frame in the video stream; A vehicle relative to the UAV movement speed vector acquisition module, the vehicle relative to the UAV movement speed vector acquisition module is used to calculate the vehicle relative to the UAV movement speed vector based on the pixel length and angle of the vehicle movement between each frame and the ratio of the average diagonal length to the actual vehicle length; A vehicle actual speed vector acquisition module, the vehicle actual speed vector acquisition module is used to calculate the actual speed vector of each vehicle based on the moving speed vector of the vehicle relative to the drone and the moving speed vector of the drone; The abnormal parking judgment module is used to judge that the vehicle is abnormally parked when the actual speed vector of the vehicle is zero within a certain threshold time.
Citation Information
Cited By
Static vehicle detection method and system based on vertical photography of unmanned aerial vehicle
CN120853062A
Highway vehicle parking detection method and device based on unmanned aerial vehicle cruise
CN121505493A