Method and device for determining road surface obstacle removal priority
By collecting road surface images in real time, generating virtual detection lines and detecting vehicle speed and traffic, determining the road congestion, deceleration and detour of obstacles, the problem of inaccurate obstacle removal order in the prior art is solved, and the obstacles are realized Accurate assessment of the degree of impact and accurate determination of clearance priorities improve road maintenance efficiency.
Patent Information
- Application Number
- CN202411342942.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-02-14
AI Technical Summary
The prior art is difficult to accurately determine the degree of impact of obstacles on traffic, which leads to the inability to accurately determine the order of removal of obstacles, which may cause a delay in the removal time of high priority obstacles, further aggravating traffic conditions.
By obtaining the road surface area images collected in real time, a virtual detection line is generated, and the average vehicle speed and traffic flow passing through the virtual detection line is detected. If the traffic is affected, it is determined as an obstacle, and the road congestion and vehicle deceleration are determined based on the vehicle speed and traffic. and the degree of vehicle detour, thereby determining the priority of clearing obstacles.
Accurate assessment of the degree of impact of obstacles and accurate determination of clearance priorities, reduce the influence of human subjective factors, improve the accuracy of the degree of impact of traffic management departments on obstacles and the order of removal, thereby improving road maintenance efficiency.
Smart Images

Figure CN119445500A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and in particular to a method and device for determining the priority of clearing road obstacles. Background Art
[0002] With the development of social economy, the total number of cars and traffic volume in major cities have increased dramatically, and urban traffic problems such as traffic congestion and traffic accidents have become increasingly serious. The causes of abnormal road congestion and traffic accidents are mostly related to obstacles on the road. For obstacles that have a great impact on traffic and pose a great threat to vehicle driving safety, traffic management departments need to remove the obstacles in a timely manner.
[0003] At present, due to the manpower limit of traffic management departments, reported obstacles are usually manually determined to determine the degree of impact of obstacles on traffic, and then determine the order of removal. However, since the staff's judgment of the obstacle situation is greatly affected by subjective factors, it is difficult for the traffic management department to accurately determine the degree of impact of the obstacle, and thus it is impossible to accurately determine the order of obstacle removal, which is likely to cause a lag in the removal of high-priority obstacles, further worsening the traffic situation. Summary of the invention
[0004] The present invention provides a method and device for determining the priority of clearing obstacles on a road surface, which are mainly capable of accurately determining the order of clearing obstacles to avoid further deterioration of traffic conditions.
[0005] According to a first aspect of an embodiment of the present invention, a method for determining a priority of clearing obstacles on a road surface is provided, comprising:
[0006] Obtaining road area images collected in real time;
[0007] If there is a detection target in the road area image, a virtual detection line is generated on the lane where the detection target is located, and the average speed and traffic volume of vehicles passing through the virtual detection line are detected;
[0008] If it is determined that the detection target has an impact on traffic according to the average vehicle speed and the traffic flow, the detection target is determined to be an obstacle, and the degree of road congestion, vehicle deceleration, and vehicle detour caused by the obstacle is determined according to the average vehicle speed and the traffic flow;
[0009] The clearance priority corresponding to the obstacle is determined according to the road congestion degree, the vehicle deceleration degree and the vehicle detour degree.
[0010] According to a second aspect of an embodiment of the present invention, there is provided a device for determining a priority of clearing obstacles on a road surface, comprising:
[0011] An acquisition unit, used for acquiring a road surface area image collected in real time;
[0012] A detection unit, configured to generate a virtual detection line on the lane where the detection target is located if there is a detection target in the road area image, and detect an average speed and traffic volume passing through the virtual detection line;
[0013] a first determination unit, configured to determine that the detection target is an obstacle if it is determined that the detection target has an impact on traffic according to the average vehicle speed and the traffic flow, and to determine the degree of road congestion, vehicle deceleration, and vehicle detour caused by the obstacle according to the average vehicle speed and the traffic flow;
[0014] The second determining unit is used to determine the clearance priority corresponding to the obstacle according to the road congestion degree, the vehicle deceleration degree and the vehicle detour degree.
[0015] According to a third aspect of an embodiment of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:
[0016] Obtaining road area images collected in real time;
[0017] If there is a detection target in the road area image, a virtual detection line is generated on the lane where the detection target is located, and the average speed and traffic volume of vehicles passing through the virtual detection line are detected;
[0018] If it is determined that the detection target has an impact on traffic according to the average vehicle speed and the traffic flow, the detection target is determined to be an obstacle, and the degree of road congestion, vehicle deceleration, and vehicle detour caused by the obstacle is determined according to the average vehicle speed and the traffic flow;
[0019] The clearance priority corresponding to the obstacle is determined according to the road congestion degree, the vehicle deceleration degree and the vehicle detour degree.
[0020] According to a fourth aspect of an embodiment of the present invention, there is provided an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the following steps are implemented:
[0021] Obtaining road area images collected in real time;
[0022] If there is a detection target in the road area image, a virtual detection line is generated on the lane where the detection target is located, and the average speed and traffic volume of vehicles passing through the virtual detection line are detected;
[0023] If it is determined that the detection target has an impact on traffic according to the average vehicle speed and the traffic flow, the detection target is determined to be an obstacle, and the degree of road congestion, vehicle deceleration, and vehicle detour caused by the obstacle is determined according to the average vehicle speed and the traffic flow;
[0024] The clearance priority corresponding to the obstacle is determined according to the road congestion degree, the vehicle deceleration degree and the vehicle detour degree.
[0025] The present invention provides a method and device for determining the priority of road obstacle removal. Compared with the prior art, the method and device can obtain a road area image collected in real time; if there is a detection target in the road area image, a virtual detection line is generated on the lane where the detection target is located, and the average speed and traffic volume passing through the virtual detection line are detected; if it is determined that the detection target has an impact on traffic according to the average speed and the traffic volume, the detection target is determined to be an obstacle, and the road congestion degree, vehicle deceleration degree and vehicle detour degree caused by the obstacle are determined according to the average speed and the traffic volume; the corresponding clearance priority of the obstacle is determined according to the road congestion degree, vehicle deceleration degree and vehicle detour degree. It can be seen that the present invention determines the road congestion degree, vehicle deceleration degree and vehicle detour degree caused by the obstacle according to the average speed and traffic volume passing through the virtual detection line, and then determines the corresponding clearance priority of the obstacle, which can eliminate the uncertainty of human subjective factors, so that the traffic management department can accurately know the impact degree and clearance order of the obstacle, thereby improving the efficiency of road maintenance.
[0026] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0028] Figure 1 A schematic flow chart of a method for determining the priority of clearing road obstacles provided by an embodiment of the present invention is shown;
[0029] Figure 2 A schematic diagram of a virtual detection line provided by an embodiment of the present invention is shown;
[0030] Figure 3 A schematic diagram showing the area before and after an obstacle provided by an embodiment of the present invention is shown;
[0031] Figure 4 A schematic diagram of the structure of a device for determining the priority of clearing road obstacles provided by an embodiment of the present invention is shown;
[0032] Figure 5 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 are within the scope of protection of the present invention.
[0034] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present invention and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0035] Existing technologies are unable to accurately determine the order in which obstacles are cleared, which may result in a delay in clearing high-priority obstacles, further worsening traffic conditions.
[0036] In order to overcome the above defects, an embodiment of the present invention provides a method for determining the priority of clearing obstacles on a road surface, such as Figure 1 As shown, the method includes:
[0037] Step 101: Acquire a road area image collected in real time.
[0038] Among them, the road area image is collected in real time by the detection camera at fixed points.
[0039] The embodiment of the present invention is mainly applicable to the scenario of determining the priority of clearing road obstacles. The execution subject of the embodiment of the present invention is a device or equipment capable of determining the priority of clearing road obstacles, such as a roadside unit.
[0040] For the embodiment of the present invention, a detection camera at a fixed point is used to shoot the road area, and a detection frame, i.e., a road area image, is selected at a fixed time interval, and it is determined whether there is a detection target in the road area image. For this process, the method includes: using a preset target detection model to identify the vehicle frame in the road area image; excluding the area corresponding to the vehicle frame from the road area image to obtain an excluded road area image; performing grid grayscale matching on the excluded road area image and a reference source image, and determining whether there is a difference area between the excluded road area image and the reference source image based on the matching result; if there is a difference area, the difference area is determined as the detection target.
[0041] The detection targets include stains and water accumulation that do not affect road traffic, as well as potholes and warning signs placed on the road that affect road traffic. The preset target detection model can be a YOLOv5 model or other models, which is not specifically limited in the embodiment of the present invention. The reference source image is a road monitoring picture without vehicles and shadows during the day.
[0042] Specifically, the detection unit can use the preset YOLOv5 model to identify the vehicle border in the road area image, then perform contrast enhancement and shadow removal on the road image area, and exclude the area corresponding to the vehicle border from the road area image to obtain the excluded road area image, and then use the preset image grayscale matching algorithm to perform grid grayscale matching on the excluded road area image and the reference source image, mark the difference area, and determine the difference area as the detection target, and generate the detection target ID at the same time.
[0043] Among them, the preset image grayscale matching algorithm can be specifically the mean absolute difference algorithm (MAD), the absolute error sum algorithm (SAD), the error square sum algorithm (SSD), the mean error square sum algorithm (MSD), the normalized product correlation algorithm (NCC), the sequential similarity detection algorithm (SSDA), the hadamard transform algorithm (SATD), etc.
[0044] Step 102: If there is a detection target in the road area image, a virtual detection line is generated on the lane where the detection target is located, and the average speed and traffic volume passing through the virtual detection line are detected.
[0045] The virtual detection line includes the first detection line, the second detection line and the third detection line of the lane where the detection target is located. The first detection line and the third detection line are respectively located at the starting position and the ending position of the effective detection range of the camera. The second detection line is located at the geometric center of the detection target. The first detection line, the second detection line and the third detection line are respectively perpendicular to the road direction. Figure 2As shown, the front detection line is the first detection line, the target detection line is the second detection line, and the rear detection line is the third detection line.
[0046] For the embodiment of the present invention, in order to determine whether the detection target is an obstacle, it is necessary to detect the average vehicle speed and traffic flow passing through the virtual detection line. For this process, step 102 specifically includes: respectively determining the starting position and the ending position of the effective detection range of the camera device, and the geometric center of the detection target; respectively generating the first detection line, the second detection line and the third detection line at the starting position, the geometric center and the ending position; detecting the average vehicle speed passing through the first detection line and the second detection line, and the traffic flow passing through the first detection line and the second detection line, respectively.
[0047] Furthermore, detecting the average vehicle speed passing through the first detection line and the second detection line respectively includes: counting the moving distance of each vehicle passing through the first detection line and the second detection line in two adjacent frames of images within a preset time period; calculating the speed of each vehicle passing through the first detection line and the second detection line according to the moving distance and the frequency of the video frames; and calculating the average vehicle speed passing through the first detection line and the second detection line respectively according to the speed of each vehicle passing through the first detection line and the second detection line.
[0048] Specifically, when the head of the vehicle touches the virtual detection line (the first detection line and the second detection line), the calculation frame starts to be recorded, and the image coordinate distance of the vehicle moving in two adjacent frames is calculated. Then, the image coordinate distance is converted into the world coordinate distance using the camera calibration technology. At the same time, the time is determined according to the frequency of the video frame. Finally, the speed of each vehicle passing through the first detection line and the second detection line is calculated respectively according to the world coordinate distance and time, and then the average speed of the vehicles passing through the first detection line and the second detection line respectively is calculated.
[0049] Furthermore, detecting the vehicle flow rates passing through the first detection line and the second detection line respectively includes: counting the number of vehicle frames passing through the first detection line and the second detection line respectively within a preset time period; and determining the vehicle flow rates passing through the first detection line and the second detection line respectively according to the number of vehicle frames passing through the first detection line and the second detection line.
[0050] Specifically, within a preset time period, the preset target detection model is used to identify the number of vehicle frames, and the number of vehicle frames passing through the first detection line and the second detection line is counted, thereby determining the traffic volume. Each lane is counted separately during statistics, and vehicles crossing lanes are counted according to the lane with a larger frame ratio.
[0051] Furthermore, in order to determine whether the detection target will have an impact on traffic, the method also includes: determining whether the vehicle decelerates or detours with respect to the detection target based on the average vehicle speed and traffic volume passing the first detection line, and the average vehicle speed and traffic volume passing the second detection line; if the vehicle decelerates or detours with respect to the detection target, it is determined that the detection target has an impact on traffic; if the vehicle does not decelerate or detour with respect to the detection target, it is determined that the detection target has no impact on traffic.
[0052] Specifically, after calculating the average vehicle speed and vehicle flow rate passing through the first detection line and the second detection line respectively, it is determined whether the vehicle has decelerated with respect to the detection target according to the average vehicle speed passing through the first detection line and the average vehicle speed passing through the second detection line. The specific formula is as follows:
[0053]
[0054] in, is the average speed of vehicles passing the first detection line, is the average speed of the vehicle passing the second detection line, and α is the speed threshold control factor, which is generally 0.8 to 0.95.
[0055] , it means that the vehicle is decelerating; if This indicates that the vehicle does not decelerate.
[0056] At the same time, according to the traffic volume passing through the first detection line and the traffic volume passing through the second detection line, it is determined whether the vehicle has detoured to the detection target. The specific formula is as follows:
[0057] q T-c <βq F-c
[0058] Among them, q F-c is the traffic volume passing through the first detection line, q T-c is the traffic volume passing through the second detection line, β is the traffic volume threshold control factor, which is generally 0.7 to 0.9. T-c <βq F-c , it means that the vehicle has detoured; if q T-c ≥βq F-c , it means that the vehicle does not have any detour behavior.
[0059] Furthermore, when And q T-c ≥βq F-c When , it is determined that the vehicle has no deceleration behavior or detour behavior, and the detection target has no impact on the passage; when or T-c<βq F-c When the vehicle is decelerating or making a detour, the detection target affects the traffic.
[0060] It should be noted that if it is determined that the detection target has no impact on the passage, the determination process is stopped, otherwise the following steps are continued. When there are multiple detection targets, the above determination process is performed for each detection target.
[0061] Step 103: If it is determined that the detection target has an impact on traffic based on the average vehicle speed and the traffic flow, the detection target is determined to be an obstacle, and the degree of road congestion, vehicle deceleration, and vehicle detour caused by the obstacle is determined based on the average vehicle speed and the traffic flow.
[0062] For the embodiment of the present invention, after determining that the detection target has an impact on the passage, it is explained that the detection target is an obstacle. At this time, it is necessary to determine the road congestion degree, vehicle deceleration degree and vehicle detour degree caused by the obstacle according to the average vehicle speed and vehicle flow passing through the virtual detection line. For this process, the method includes: extracting image frames at preset time intervals, and determining the lane occupancy of a first area located before the obstacle and the lane occupancy of a second area located after the obstacle in each frame of the image; calculating the lane occupancy average value and lane occupancy variance of the first area and the lane occupancy average value of the second area according to the lane occupancy of the first area and the lane occupancy of the second area in each frame of the image; determining the road congestion degree, vehicle deceleration degree and vehicle detour degree caused by the obstacle according to the lane occupancy average value and lane occupancy variance of the first area, and the lane occupancy average value of the second area, the average vehicle speed and vehicle flow passing through the first detection line, and the average vehicle speed and vehicle flow passing through the second detection line.
[0063] Furthermore, the degree of road congestion, vehicle deceleration and vehicle detour caused by the obstacle is determined based on the lane occupancy average value and lane occupancy variance of the first area, the lane occupancy average value of the second area, the average vehicle speed and vehicle flow passing the first detection line, and the average vehicle speed and vehicle flow passing the second detection line, including: if the lane occupancy average value of the first area is greater than a preset average value, and the lane occupancy variance of the first area is greater than a preset variance, it is determined that there is road congestion in the first area, and the degree of road congestion caused by the obstacle is determined based on the lane occupancy average value of the second area and the lane occupancy average value of the first area; the degree of vehicle deceleration is determined based on the average vehicle speed passing the first detection line and the average vehicle speed passing the second detection line; the degree of vehicle detour is determined based on the vehicle flow passing the first detection line and the vehicle flow passing the second detection line.
[0064] The first area and the second area are determined based on the first detection line and the third detection line, respectively. Figure 3 In addition, the preset mean value and the preset variance can be set according to actual business requirements, and the embodiment of the present invention does not specifically limit this.
[0065] Specifically, in order to evaluate the road congestion, it is necessary to detect the lane occupancy within a certain period of time, that is, extract detection frames at fixed time intervals, extract K frames in total, and for each detection frame, count the lane occupancy of the first area and the second area respectively, so as to calculate the average lane occupancy of the first area and the second area within the period of time. The specific formula is as follows:
[0066]
[0067]
[0068] Among them, T F (t) is the lane occupancy rate of the first area, T B (t) is the lane occupancy rate of the second area, T F (avg) is the average lane occupancy rate of the first area, T B (avg) is the average lane occupancy rate of the second area.
[0069] Furthermore, the lane occupancy variance between the first area and the second area can also be calculated. The specific formula is as follows:
[0070]
[0071]
[0072] Among them, T F(var) is the lane occupancy variance of the first area, T B (var) is the lane occupancy variance of the second area, T F (t) is the lane occupancy rate of the first area, T B (t) is the lane occupancy rate of the second area, T F (avg) is the average lane occupancy rate of the first area, T B (avg) is the average lane occupancy rate of the second area.
[0073] After calculating the lane occupancy average and lane occupancy variance of the first area, and the lane occupancy average and lane occupancy variance of the second area, if the lane occupancy average of the first area is greater than the preset average, and the lane occupancy variance of the first area is greater than the preset variance, it is determined that there is road congestion in the first area, and then the occupancy ratio of the road before and after the obstacle is calculated. The specific formula is as follows:
[0074]
[0075] Among them, R T It reflects the difference in road congestion before and after the obstacle. According to the size of this ratio, the road congestion level can be divided into multiple levels, as shown in Table 1.
[0076] Table 1
[0077]
[0078]
[0079] Furthermore, the vehicle deceleration rate is calculated according to the average vehicle speed after the first detection and the average vehicle speed after the second detection line. The specific formula is as follows:
[0080]
[0081] Among them, R v It reflects the deceleration of the vehicle when passing an obstacle compared to normal driving. According to the size of this ratio, the degree of vehicle deceleration can be divided into multiple levels, as shown in Table 2.
[0082] Table 2
[0083] <![CDATA[R v Value]]> 0~0.5 0.5~0.8 0.8~0.95 0.95~ Vehicle deceleration Significant slowdown Moderate deceleration Slight deceleration No deceleration <![CDATA[Judgment score P v > 5 3 1 0
[0084] Furthermore, the vehicle detour rate is calculated according to the vehicle flow rate passing through the first detection line and the vehicle flow rate passing through the second detection line. The specific formula is as follows:
[0085]
[0086] Among them, Rq It reflects the probability of the vehicle detouring to avoid obstacles. According to the size of this ratio, the degree of vehicle detour can be divided into multiple levels, as shown in Table 3.
[0087] Table 3
[0088] <![CDATA[R q Value]]> 0 0.01~0.6 0.6~0.9 0.9~ Vehicle detour degree Bypass All A lot of detours A small detour Not bypassed <![CDATA[Judgment score P q > 5 3 1 0
[0089] Step 104: Determine the clearance priority corresponding to the obstacle according to the road congestion level, the vehicle deceleration level and the vehicle detour level.
[0090] For the embodiment of the present invention, after determining the road congestion degree, vehicle deceleration degree and vehicle detour degree corresponding to the obstacle, the clearance priority corresponding to the obstacle can be determined by scoring. For this process, step 104 specifically includes: determining the road congestion score, vehicle deceleration score and vehicle detour score respectively according to the road congestion degree, vehicle deceleration degree and vehicle detour degree; based on the road congestion score, vehicle deceleration score and vehicle detour score, using corresponding evaluation criteria, determining the total score corresponding to the obstacle; according to the total score corresponding to the obstacle, determining the clearance priority corresponding to the obstacle.
[0091] Specifically, the road congestion degree is used as one of the bases for obstacle removal priority, and its corresponding score is expressed as P T As shown in Table 1, the more serious the road congestion, the greater the corresponding score. It should be noted that when it is determined that there is no road congestion in the first area, the score of this item is 0. In addition, the degree of vehicle deceleration is one of the bases for obstacle removal priority, and its corresponding score is expressed as P v As shown in Table 2, the more severe the vehicle deceleration, the greater the corresponding score. v = 0, that is, when no vehicle passes through the obstacle, P v The maximum value is 5. Furthermore, the degree of vehicle detour is used as one of the bases for obstacle removal priority, and its corresponding score is expressed as P q As shown in Table 3.
[0092] Furthermore, the embodiment of the present invention provides two sets of evaluation criteria. The first is to give priority to ensuring safety, which is based on ensuring the safety of normal vehicle driving as the priority judgment basis; the second is to give priority to solving congestion, which is based on preventing roads from being blocked by obstacles and causing traffic congestion.
[0093] For the above two sets of evaluation criteria, the embodiment of the present invention adopts a weighted summation method to calculate the total priority score, and different weighting coefficients are used for calculation for different evaluation criteria. Finally, the obstacle with the highest total score has the highest clearance priority.
[0094] The total score of obstacle clearance priority based on safety priority is calculated according to the following formula:
[0095] P(S)=A SI P SI +A ST P T +A Sv P v +A Sq P q
[0096] Among them, P T is the score corresponding to the road congestion level, P v is the score corresponding to the vehicle deceleration degree, P q is the score corresponding to the degree of vehicle detour, P SI Related to basic road information, the preset basic score is 1-10 points, P SI It can be determined comprehensively based on the safety importance of the types of vehicles on the road, the possibility of obstacles affecting driving safety, etc. For roads with vehicles transporting dangerous goods, the basic score is higher. Since expressways are more likely to have traffic safety accidents, the basic score is higher. In addition, A SI , A ST , A Sv and A Sq is the weighting coefficient, as shown in Table 4.
[0097] Furthermore, the total score of obstacle removal priority based on congestion resolution is calculated according to the following formula:
[0098] P(J)=A JI P JI +A JT P T +A Jv P v +A Jq P q
[0099] Among them, P T is the score corresponding to the road congestion level, P v is the score corresponding to the vehicle deceleration degree, P q is the score corresponding to the degree of vehicle detour, P JI Related to basic road information, the preset basic score is 1-10 points, P JI It can be determined comprehensively based on the importance of the road in the traffic system, the average daily traffic volume of the road, etc. JI , A JT , A Jv and A Jq is the weighting coefficient, as shown in Table 4.
[0100]
[0101] According to the above method, the total score corresponding to the obstacle can be calculated, so that the obstacle removal priority can be determined according to the total score. The higher the total score, the higher the obstacle removal priority.
[0102] Furthermore, after the above results are determined, they are uploaded to the traffic management system, and obstacle detection is performed again after a fixed period of time, and the scores are recalculated, and then the results are updated and uploaded to the traffic management system.
[0103] A method for determining the priority of clearing road obstacles provided by an embodiment of the present invention determines the degree of road congestion, vehicle deceleration and vehicle detour caused by obstacles based on the average vehicle speed and traffic volume passing through a virtual detection line, and then determines the clearance priority corresponding to the obstacles. This method can eliminate the uncertainty of human subjective factors, so that traffic management departments can accurately know the impact degree and clearance order of obstacles, thereby improving road maintenance efficiency.
[0104] Further, as Figure 1 In a specific implementation, an embodiment of the present invention provides a path planning device based on graph search, such as Figure 4 As shown, the device includes: an acquisition unit 31, a detection unit 32, a first determination unit 33 and a second determination unit 34.
[0105] The acquisition unit 31 may be used to acquire a road surface area image collected in real time.
[0106] The detection unit 32 may be configured to generate a virtual detection line on the lane where the detection target is located if there is a detection target in the road area image, and detect the average vehicle speed and vehicle flow passing through the virtual detection line.
[0107] The first determination unit 33 can be used to determine that the detection target is an obstacle if it is determined that the detection target has an impact on traffic based on the average vehicle speed and the traffic flow, and determine the degree of road congestion, vehicle deceleration and vehicle detour caused by the obstacle based on the average vehicle speed and the traffic flow.
[0108] The second determining unit 34 may be configured to determine a clearance priority corresponding to the obstacle according to the road congestion level, the vehicle deceleration level, and the vehicle detour level.
[0109] In a specific application scenario, the device further includes: an identification unit.
[0110] The recognition unit is used to use a preset target detection model to identify the vehicle frame in the road surface area image; exclude the area corresponding to the vehicle frame from the road surface area image to obtain an excluded road surface area image; perform grid grayscale matching on the excluded road surface area image and a reference source image, and determine whether there is a different area between the excluded road surface area image and the reference source image based on the matching result; if there is a different area, determine the different area as the detection target.
[0111] Furthermore, the second determination unit 34 can be specifically used to determine a road congestion score, a vehicle deceleration score and a vehicle detour score according to the road congestion level, the vehicle deceleration level and the vehicle detour level, respectively; based on the road congestion score, the vehicle deceleration score and the vehicle detour score, using corresponding evaluation criteria, determine the total score corresponding to the obstacle; and determine the clearance priority corresponding to the obstacle according to the total score corresponding to the obstacle.
[0112] In a specific application scenario, when the virtual detection line includes a first detection line, a second detection line, and a third detection line, the detection unit 32 includes: a first determination module, a generation module, and a detection module.
[0113] The first determination module can be used to respectively determine the starting position and the ending position of the effective detection range of the camera device, and the geometric center of the detection target.
[0114] The generating module may be configured to generate the first detection line, the second detection line and the third detection line at the starting position, the geometric center and the ending position respectively.
[0115] The detection module may be used to detect an average speed of vehicles passing through the first detection line and the second detection line, and a flow rate of vehicles passing through the first detection line and the second detection line, respectively.
[0116] Furthermore, the detection module can be specifically used to count the moving distance of each vehicle passing through the first detection line and the second detection line in two adjacent frames of images within a preset time period; calculate the speed of each vehicle passing through the first detection line and the second detection line based on the moving distance and the frequency of the video frames; and calculate the average speed of vehicles passing through the first detection line and the second detection line respectively based on the speed of each vehicle passing through the first detection line and the second detection line.
[0117] Furthermore, the detection module can also be specifically used to count the number of vehicle frames passing through the first detection line and the second detection line respectively within a preset time period; and determine the vehicle flow passing through the first detection line and the second detection line respectively based on the number of vehicle frames passing through the first detection line and the second detection line.
[0118] In a specific application scenario, the device further includes: a determination unit.
[0119] The determination unit may be configured to determine whether the vehicle decelerates or detours with respect to the detection target based on an average vehicle speed and a vehicle volume passing through the first detection line, and an average vehicle speed and a vehicle volume passing through the second detection line; if the vehicle decelerates or detours with respect to the detection target, it is determined that the detection target has an impact on traffic; if the vehicle does not decelerate or detour with respect to the detection target, it is determined that the detection target has no impact on traffic.
[0120] In a specific application scenario, the first determining unit 33 includes: a second determining module and a calculating module.
[0121] The second determination module can be used to extract image frames at preset time intervals and determine the lane occupancy of a first area located before the obstacle and the lane occupancy of a second area located after the obstacle in each frame of the image, wherein the first area and the second area are determined based on the first detection line and the third detection line, respectively.
[0122] The calculation module can be used to calculate the lane occupancy average value and lane occupancy variance of the first area and the lane occupancy average value of the second area according to the lane occupancy of the first area and the lane occupancy of the second area in each frame of the image.
[0123] The second determination module can also be used to determine the degree of road congestion, vehicle deceleration and vehicle detour caused by the obstacle based on the lane occupancy average value and lane occupancy variance of the first area, the lane occupancy average value of the second area, the average vehicle speed and traffic volume passing the first detection line, and the average vehicle speed and traffic volume passing the second detection line.
[0124] Furthermore, the second determination module can be specifically used to determine that there is road congestion in the first area if the average lane occupancy rate of the first area is greater than a preset average value and the lane occupancy variance of the first area is greater than a preset variance, and determine the degree of road congestion caused by the obstacle based on the average lane occupancy rate of the second area and the average lane occupancy rate of the first area; determine the degree of vehicle deceleration based on the average vehicle speed passing the first detection line and the average vehicle speed passing the second detection line; and determine the degree of vehicle detour based on the vehicle flow rate passing the first detection line and the vehicle flow rate passing the second detection line.
[0125] It should be noted that for other corresponding descriptions of the functional modules involved in the device for determining the priority of removing road obstacles provided in the embodiment of the present invention, reference can be made to Figure 1 The corresponding description of the method shown will not be repeated here.
[0126] Based on the above Figure 1 The method shown, accordingly, an embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the following steps are implemented: obtaining a road area image collected in real time; if there is a detection target in the road area image, generating a virtual detection line on the lane where the detection target is located, and detecting the average vehicle speed and traffic flow passing through the virtual detection line; if it is determined that the detection target has an impact on traffic based on the average vehicle speed and the traffic flow, then determining that the detection target is an obstacle, and determining the degree of road congestion, vehicle deceleration and vehicle detour caused by the obstacle based on the average vehicle speed and the traffic flow; determining the clearance priority corresponding to the obstacle based on the road congestion, vehicle deceleration and vehicle detour.
[0127] Based on the above Figure 1 The method shown and Figure 4 The embodiment of the device shown in the figure, the embodiment of the present invention also provides a physical structure diagram of an electronic device, such as Figure 5As shown, the electronic device includes: a processor 41, a memory 42, and a computer program stored in the memory 42 and executable on the processor, wherein the memory 42 and the processor 41 are both arranged on a bus 43, and the processor 41 implements the following steps when executing the program: obtaining a road surface area image collected in real time; if there is a detection target in the road surface area image, generating a virtual detection line on the lane where the detection target is located, and detecting the average vehicle speed and vehicle flow passing through the virtual detection line; if it is determined that the detection target has an impact on the passage according to the average vehicle speed and the vehicle flow, determining that the detection target is an obstacle, and determining the degree of road congestion, vehicle deceleration and vehicle detour caused by the obstacle according to the average vehicle speed and the vehicle flow; determining the clearance priority corresponding to the obstacle according to the road congestion, the vehicle deceleration and the vehicle detour.
[0128] The embodiment of the present invention determines the degree of road congestion, vehicle deceleration and vehicle detour caused by obstacles based on the average vehicle speed and traffic volume passing through the virtual detection line, and then determines the clearance priority corresponding to the obstacle. This can eliminate the uncertainty of human subjective factors, so that the traffic management department can accurately know the impact degree and clearance order of the obstacle, thereby improving road maintenance efficiency.
[0129] Those skilled in the art can understand that the accompanying drawings are only schematic diagrams of an embodiment, and the modules or processes in the accompanying drawings are not necessarily required to implement the present invention.
[0130] Those skilled in the art can understand that the modules in the device in the embodiment can be distributed in the device in the embodiment according to the description of the embodiment, or can be changed accordingly and located in one or more devices different from the embodiment. The modules in the above embodiment can be combined into one module, or can be further divided into multiple sub-modules.
[0131] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for determining the priority of clearing road obstacles, characterized in that: include: Obtaining road area images collected in real time; If there is a detection target in the road area image, a virtual detection line is generated on the lane where the detection target is located, and the average speed and traffic volume of vehicles passing through the virtual detection line are detected; If it is determined that the detection target has an impact on traffic according to the average vehicle speed and the traffic flow, the detection target is determined to be an obstacle, and the degree of road congestion, vehicle deceleration, and vehicle detour caused by the obstacle is determined according to the average vehicle speed and the traffic flow; The clearance priority corresponding to the obstacle is determined according to the road congestion degree, the vehicle deceleration degree and the vehicle detour degree.
2. The method according to claim 1, characterized in that After acquiring the road surface area image collected in real time, the method further includes: Using a preset target detection model to identify the vehicle frame in the road area image; Excluding the area corresponding to the vehicle frame from the road surface area image to obtain an excluded road surface area image; Performing grid grayscale matching on the excluded road area image and the reference source image, and determining whether there is a difference area between the excluded road area image and the reference source image according to the matching result; If there is a difference area, determining the difference area as the detection target; Determining the clearance priority corresponding to the obstacle according to the road congestion degree, the vehicle deceleration degree and the vehicle detour degree, including: Determining a road congestion score, a vehicle deceleration score, and a vehicle detour score, respectively, according to the road congestion degree, the vehicle deceleration degree, and the vehicle detour degree; Based on the road congestion score, the vehicle deceleration score and the vehicle detour score, a total score corresponding to the obstacle is determined by using corresponding evaluation criteria; The clearing priority of the obstacle is determined according to the total score of the obstacle.
3. The method according to claim 1, characterized in that: When the virtual detection line includes a first detection line, a second detection line, and a third detection line, generating a virtual detection line on the lane where the detection target is located, and detecting an average vehicle speed and a vehicle flow rate passing through the virtual detection line, including: Determining the starting position and the ending position of the effective detection range of the camera device and the geometric center of the detection target respectively; Generating the first detection line, the second detection line and the third detection line at the starting position, the geometric center and the ending position respectively; The average speed of vehicles passing through the first detection line and the second detection line, and the traffic volume passing through the first detection line and the second detection line, are detected.
4. The method according to claim 3, characterized in that Detecting the average speed of vehicles passing through the first detection line and the second detection line respectively includes: Within a preset time period, respectively counting the moving distance of each vehicle passing through the first detection line and the second detection line in two adjacent frames of images; Calculating the speed of each vehicle passing through the first detection line and the second detection line according to the moving distance and the frequency of the video frame; Calculate the average speed of each vehicle passing through the first detection line and the second detection line according to the speed of each vehicle passing through the first detection line and the second detection line; Detecting the traffic flow passing through the first detection line and the second detection line respectively includes: Counting the number of vehicle frames passing through the first detection line and the second detection line respectively within a preset time period; The vehicle flow rates passing through the first detection line and the second detection line are determined according to the number of vehicle frames passing through the first detection line and the second detection line.
5. The method according to claim 3, characterized in that: After generating a virtual detection line on the lane where the detection target is located and detecting the average speed and traffic volume of vehicles passing through the virtual detection line, the method further includes: According to the average speed and traffic volume of vehicles passing through the first detection line and the average speed and traffic volume of vehicles passing through the second detection line, respectively determining whether the vehicle decelerates or detours with respect to the detection target; If the vehicle decelerates or detours the detection target, it is determined that the detection target has an impact on traffic; If the vehicle does not decelerate or detour the detection target, it is determined that the detection target has no impact on traffic.
6. The method according to claim 3, characterized in that Determining the degree of road congestion, vehicle deceleration, and vehicle detour caused by the obstacle according to the average vehicle speed and the vehicle flow rate, including: Extracting image frames at preset time intervals, and determining a lane occupancy rate of a first area located before the obstacle and a lane occupancy rate of a second area located after the obstacle in each frame of the image, wherein the first area and the second area are determined based on the first detection line and the third detection line, respectively; According to the lane occupancy of the first area and the lane occupancy of the second area in each frame of the image, respectively calculating the lane occupancy average value and lane occupancy variance of the first area, and the lane occupancy average value of the second area; The degree of road congestion, vehicle deceleration and vehicle detour caused by the obstacle is determined based on the average lane occupancy and lane occupancy variance of the first area, the average lane occupancy of the second area, the average vehicle speed and vehicle flow passing the first detection line, and the average vehicle speed and vehicle flow passing the second detection line.
7. The method according to claim 6, characterized in that Determining the degree of road congestion, vehicle deceleration, and vehicle detour caused by the obstacle based on the lane occupancy average value and lane occupancy variance of the first area, the lane occupancy average value of the second area, the average speed and traffic volume of vehicles passing through the first detection line, and the average speed and traffic volume of vehicles passing through the second detection line, includes: If the average lane occupancy rate of the first area is greater than a preset average value, and the lane occupancy rate variance of the first area is greater than a preset variance, it is determined that the first area has road congestion, and the degree of road congestion caused by the obstacle is determined according to the average lane occupancy rate of the second area and the average lane occupancy rate of the first area; Determining a degree of vehicle deceleration according to an average vehicle speed passing through the first detection line and an average vehicle speed passing through the second detection line; The degree of vehicle detour is determined according to the vehicle flow rate passing through the first detection line and the vehicle flow rate passing through the second detection line.
8. A device for determining the priority of clearing road obstacles, characterized in that: include: An acquisition unit, used for acquiring a road surface area image collected in real time; A detection unit, configured to generate a virtual detection line on the lane where the detection target is located if there is a detection target in the road area image, and detect an average speed and traffic volume passing through the virtual detection line; a first determination unit, configured to determine that the detection target is an obstacle if it is determined that the detection target has an impact on traffic according to the average vehicle speed and the traffic flow, and to determine the degree of road congestion, vehicle deceleration, and vehicle detour caused by the obstacle according to the average vehicle speed and the traffic flow; The second determining unit is used to determine the clearance priority corresponding to the obstacle according to the road congestion degree, the vehicle deceleration degree and the vehicle detour degree.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Traffic flow statistics and congestion analysis method and system based on video analysis
CN119889057A