CN-121999446-A - Method and device for road monitoring and confirming lane where vehicle is located and electronic equipment
Abstract
The invention relates to a method, a device and electronic equipment for confirming a lane where a vehicle is located by road monitoring, wherein the method comprises the steps of acquiring an image to be processed acquired by the road monitoring; the method comprises the steps of adopting a YOLOv target detection model to identify the bottom edge center point of a target detection frame of a vehicle in an image to be processed, judging whether the vehicle spans a plurality of lanes according to the target detection frame, calculating lane line slopes of two lanes corresponding to the vehicle in the image to be processed if the vehicle spans the plurality of lanes, determining a reference point according to the two lane line slopes, and determining an actual lane of the vehicle in the image to be processed according to the reference point. The method can accurately determine the actual lane position of the vehicle in the image, particularly under the complex condition that the vehicle spans multiple lanes, effectively improves the accuracy and the robustness of lane judgment by selecting the proper reference point, reduces the hardware cost and improves the efficiency and the practicability of the intelligent traffic monitoring system.
Inventors
- CHEN ZHIQIANG
- YAN JINYU
- WU KEWEI
- HE XIAOGANG
Assignees
- 北京卓视智通科技有限责任公司
Dates
- Publication Date
- 20260508
- Application Date
- 20251219
Claims (10)
- 1. A method for road monitoring a lane in which a vehicle is located, comprising: Acquiring an image to be processed acquired through road monitoring, wherein the image to be processed comprises vehicles and roads; Identifying the bottom edge center point of a target detection frame of the vehicle in the image to be processed by adopting YOLOv target detection model; judging whether the vehicle spans multiple lanes or not according to the target detection frame; If the vehicle spans multiple lanes, calculating lane line slopes of two lanes corresponding to the vehicle in the image to be processed, determining a reference point according to the two lane line slopes, and determining an actual lane of the vehicle in the image to be processed according to the reference point.
- 2. The method of claim 1, wherein determining whether the vehicle is traversing multiple lanes based on the target detection frame comprises: judging whether the proportion of the overlapping area of the bottom line of the target detection frame and the lane lines to the bottom line exceeds a set threshold value.
- 3. The method of claim 1, wherein if the vehicle does not traverse multiple lanes, the method further comprises: and determining the actual lane of the vehicle in the image to be processed according to the bottom edge center point of the target detection frame.
- 4. A method according to any one of claims 1 to 3, wherein determining a reference point from the two lane line slopes comprises: If the slopes of the two lane lines are both greater than 0, determining a point at the left side of the bottom of the target detection frame as the reference point, wherein the left side of the bottom is the left side of the bottom edge center point of the target detection frame; if the slopes of the two lane lines are smaller than 0, determining a point on the right side of the bottom of the target detection frame as the reference point, wherein the right side of the bottom is the right side of the bottom edge center point of the target detection frame; and if one lane line slope of the two lane line slopes is larger than 0 and the other lane line slope is smaller than 0, determining the bottom edge center point of the target detection frame as the reference point.
- 5. A method according to any one of claims 1 to 3, characterized in that said determining the actual lane to which the vehicle belongs in the image to be processed from the reference point comprises: determining a preliminary belonged lane of the vehicle in the image to be processed according to the reference point; And according to the direction of the reference point relative to the center point of the bottom edge of the target detection frame, extending the width of the lane to which the preliminary belongs, and determining the actual lane to which the vehicle belongs in the image to be processed.
- 6. An apparatus for road monitoring and confirming a lane in which a vehicle is located, comprising: The acquisition module is used for acquiring an image to be processed acquired through road monitoring, wherein the image to be processed comprises a vehicle and a road; the target detection frame determining module is used for identifying the bottom edge center point of the target detection frame of the vehicle in the image to be processed by adopting a YOLOv target detection model; the lane crossing judging module is used for judging whether the vehicle crosses a plurality of lanes or not according to the target detection frame; The actual lane judging module is used for calculating lane line slopes of two lanes corresponding to the vehicle in the image to be processed when the vehicle spans multiple lanes, determining a reference point according to the two lane line slopes, and determining an actual lane of the vehicle in the image to be processed according to the reference point.
- 7. The apparatus of claim 6, wherein the lane crossing determination module is configured to, when determining whether the vehicle crosses a plurality of lanes based on the target detection frame: judging whether the proportion of the overlapping area of the bottom line of the target detection frame and the lane lines to the bottom line exceeds a set threshold value.
- 8. The apparatus of claim 6, wherein if the vehicle does not traverse multiple lanes, the apparatus further comprises: and the lane determining module is used for determining the actual lane of the vehicle in the image to be processed according to the bottom edge center point of the target detection frame.
- 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any one of claims 1-5 when the computer program is executed.
- 10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the method of any of claims 1-5.
Description
Method and device for road monitoring and confirming lane where vehicle is located and electronic equipment Technical Field The invention relates to the technical field of computer vision target detection, in particular to a method and device for confirming a lane where a vehicle is located by road monitoring and electronic equipment. Background In the intelligent traffic field, accurate target lane determination is important for intelligent monitoring. The existing scheme mainly comprises a lane judging method based on the laser radar, namely, the vehicle and the position of the vehicle in a road are identified through 3D point cloud data, the accuracy is high, but the hardware cost is high, and the method is difficult to apply in a large-scale monitoring scene. The detection method based on the traditional visual characteristics adopts the traditional visual methods based on color, edge, hough transformation and the like to detect the lane, but has insufficient robustness in complex road environments. The depth estimation method based on the monocular or binocular camera combines the depth learning technology to perform target detection and depth estimation, but has higher calculation cost and depends on high-quality depth data. In the prior art, the following problems exist: The accuracy is not enough, namely, the lane judgment is carried out by simply relying on the center point or the bottom point of the target detection frame, and misjudgment can be caused. The hardware cost is high, and although the scheme based on the laser radar has high precision, the deployment cost is too high in a large-scale road camera monitoring system. Part of the existing methods cannot adapt to different road environments, such as the conditions of fuzzy lane lines, curve roads and the like. Disclosure of Invention The invention aims to solve at least one technical problem by providing a method, a device and electronic equipment for confirming a lane where a vehicle is located by road monitoring. In a first aspect, the present invention provides a method for road monitoring to confirm a lane in which a vehicle is located, the method comprising: Acquiring an image to be processed acquired through road monitoring, wherein the image to be processed comprises vehicles and roads; Identifying the bottom edge center point of a target detection frame of the vehicle in the image to be processed by adopting a YOLOv target detection model; Judging whether the vehicle spans multiple lanes or not according to the target detection frame; If the vehicle crosses a plurality of lanes, calculating lane line slopes of two lanes corresponding to the vehicle in the image to be processed, determining a reference point according to the two lane line slopes, and determining an actual lane of the vehicle in the image to be processed according to the reference point. The vehicle lane judgment method has the beneficial effects that by adopting the YOLOv target detection model to identify the center point of the bottom edge of the target detection frame of the vehicle and combining the calculation of the slope of the lane line and the determination of the reference point, the complex situation that the vehicle spans a plurality of lanes can be effectively processed, and the accuracy and the robustness of the lane judgment are improved. In addition, the method is based on two-dimensional image data, an additional 3D sensor is not needed, hardware cost is reduced, and the method is suitable for a large-scale road monitoring system. Meanwhile, through judgment of the bottom edge center point of the target detection frame and analysis of the slope of the lane line, the lane to which the vehicle belongs can be rapidly and accurately determined, and the efficiency and the practicability of the intelligent traffic monitoring system are improved. On the basis of the technical scheme, the invention can be improved as follows. Further, the determining whether the vehicle crosses a plurality of lanes according to the target detection frame includes: Judging whether the proportion of the overlapping area of the bottom line of the target detection frame and the lane lines to the bottom line exceeds a set threshold value. Further, if the vehicle does not traverse multiple lanes, the method further comprises: and determining the actual lane of the vehicle in the image to be processed according to the bottom edge center point of the target detection frame. Further, determining the reference point according to the slopes of the two lane lines includes: if the slopes of the two lane lines are both greater than 0, determining a point at the left side of the bottom of the target detection frame as a reference point, wherein the left side of the bottom is the left side of the bottom edge center point of the target detection frame; if the slopes of the two lane lines are smaller than 0, determining a point on the right side of the bottom of the target detection frame as