CN116386000A - Method and system for measuring obstacle distance based on high-precision map and monocular camera - Google Patents
Method and system for measuring obstacle distance based on high-precision map and monocular camera Download PDFInfo
- Publication number
- CN116386000A CN116386000A CN202310159114.XA CN202310159114A CN116386000A CN 116386000 A CN116386000 A CN 116386000A CN 202310159114 A CN202310159114 A CN 202310159114A CN 116386000 A CN116386000 A CN 116386000A
- Authority
- CN
- China
- Prior art keywords
- obstacle
- distance
- precision map
- monocular camera
- vehicle
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/56—Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
- G06V20/58—Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/10—Image acquisition
- G06V10/12—Details of acquisition arrangements; Constructional details thereof
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/56—Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
- G06V20/588—Recognition of the road, e.g. of lane markings; Recognition of the vehicle driving pattern in relation to the road
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30248—Vehicle exterior or interior
- G06T2207/30252—Vehicle exterior; Vicinity of vehicle
- G06T2207/30261—Obstacle
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Databases & Information Systems (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Remote Sensing (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Measurement Of Optical Distance (AREA)
Abstract
本发明提供一种基于高精地图和单目摄像头测量障碍物距离的方法、系统,该方法包括:识别高精地图上的元素;获取车辆上的单目摄像头拍摄的图像,并将单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的元素进行匹配分析;判断障碍物的高度信息是否已知;若障碍物的高度信息已知,则基于单目测距原理以及障碍物的高度信息,获取障碍物与车辆之间的距离。本发明能够解决现有技术无法通过单目摄像头单独获取障碍物距离,必须知道障碍物的大小和方向,或者用双目摄像头才能获得障碍物的距离的技术问题。
The present invention provides a method and system for measuring obstacle distance based on a high-precision map and a monocular camera. The method includes: identifying elements on the high-precision map; The obstacle in the captured image is matched with the elements on the recognized high-precision map; it is judged whether the height information of the obstacle is known; if the height information of the obstacle is known, it is based on the principle of monocular distance measurement and the obstacle height information to obtain the distance between the obstacle and the vehicle. The invention can solve the technical problem in the prior art that the distance of the obstacle cannot be acquired solely by a monocular camera, the size and direction of the obstacle must be known, or the distance of the obstacle can only be obtained by using a binocular camera.
Description
技术领域technical field
本发明涉及智能驾驶技术领域,特别是涉及一种基于高精地图和单目摄像头测量障碍物距离的方法、系统。The present invention relates to the technical field of intelligent driving, in particular to a method and system for measuring obstacle distances based on a high-precision map and a monocular camera.
背景技术Background technique
自动驾驶技术是汽车电子、智能控制以及互联网等技术发展融合的产物,其原理为自动驾驶系统通过感知系统,获取车辆自身信息与周围环境信息,经过处理器对采集到的数据信息进行分析计算和处理,从而做出决策控制执行系统实现车辆加减速和转向等动作。Autonomous driving technology is the product of the development and integration of automotive electronics, intelligent control, and the Internet. Its principle is that the autonomous driving system obtains the vehicle's own information and surrounding environment information through the perception system, and the collected data information is analyzed and calculated by the processor. Processing, so as to make decisions and control the execution system to realize vehicle acceleration, deceleration and steering.
感知系统是无人车辆的眼睛,自动驾驶安全不安全很大程度上取决于感各系统做的好不好。单目摄像头是车辆中常用的、成本交底的感知元件。但是由于单目成像原理的限制,现有技术中,还不能通过单目摄像头单独获取障碍物距离,必须知道障碍物的大小和方向,或者用双目摄像头才能获得障碍物的距离。The perception system is the eyes of unmanned vehicles, and the safety of autonomous driving largely depends on how well the sensing systems are doing. Monocular cameras are commonly used, cost-disclosed sensing elements in vehicles. However, due to the limitation of the monocular imaging principle, in the prior art, the obstacle distance cannot be obtained by the monocular camera alone, and the size and direction of the obstacle must be known, or the distance of the obstacle can only be obtained by using the binocular camera.
发明内容Contents of the invention
为此,本发明的一个实施例提出一种基于高精地图和单目摄像头测量障碍物距离的方法,以解决现有技术无法通过单目摄像头单独获取障碍物距离,必须知道障碍物的大小和方向,或者用双目摄像头才能获得障碍物的距离的技术问题。To this end, an embodiment of the present invention proposes a method for measuring obstacle distance based on a high-precision map and a monocular camera, to solve the problem that the existing technology cannot obtain the obstacle distance alone through the monocular camera, and the size and size of the obstacle must be known. Orientation, or the technical problem of using a binocular camera to obtain the distance of obstacles.
根据本发明一实施例的基于高精地图和单目摄像头测量障碍物距离的方法,包括:A method for measuring obstacle distances based on a high-precision map and a monocular camera according to an embodiment of the present invention includes:
识别高精地图上的元素;Identify elements on the HD map;
获取车辆上的单目摄像头拍摄的图像,并将单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的元素进行匹配分析;Obtain the image captured by the monocular camera on the vehicle, and perform matching analysis on the obstacles in the image captured by the monocular camera and the recognized elements on the high-precision map;
判断障碍物的高度信息是否已知;Determine whether the height information of the obstacle is known;
若障碍物的高度信息已知,则基于单目测距原理以及障碍物的高度信息,获取障碍物与车辆之间的距离。If the height information of the obstacle is known, the distance between the obstacle and the vehicle is obtained based on the principle of monocular ranging and the height information of the obstacle.
根据本发明实施例的基于高精地图和单目摄像头测量障碍物距离的方法,首先识别高精地图上的元素,然后获取车辆上的单目摄像头拍摄的图像,并将单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的元素进行匹配分析,若障碍物的高度信息已知,则可以基于单目测距原理以及障碍物的高度信息直接获取障碍物与车辆之间的距离,本发明只需要采用单目摄像头,无需使用双目摄像头,且无需知道障碍物的大小和方向,就可以直接测量障碍物的距离,实现成本低。According to the method for measuring obstacle distance based on a high-precision map and a monocular camera according to an embodiment of the present invention, firstly identify elements on the high-precision map, then acquire images captured by the monocular camera on the vehicle, and convert the images captured by the monocular camera to The obstacles in the system are matched with the elements on the recognized high-precision map. If the height information of the obstacles is known, the distance between the obstacles and the vehicle can be directly obtained based on the principle of monocular distance measurement and the height information of the obstacles. distance, the present invention only needs to use a monocular camera, does not need to use a binocular camera, and does not need to know the size and direction of the obstacle, and can directly measure the distance of the obstacle, and the implementation cost is low.
另外,根据本发明上述实施例的基于高精地图和单目摄像头测量障碍物距离的方法,还可以具有如下附加的技术特征:In addition, the method for measuring obstacle distance based on a high-precision map and a monocular camera according to the above-mentioned embodiments of the present invention may also have the following additional technical features:
进一步地,确认是否已知障碍物的高度信息的步骤之后,所述方法还包括:Further, after the step of confirming whether the height information of the obstacle is known, the method further includes:
若障碍物的高度信息未知,则判断单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的元素是否匹配;If the height information of the obstacle is unknown, judge whether the obstacle in the image captured by the monocular camera matches the elements on the recognized high-precision map;
若单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的元素匹配,则基于单目测距原理以及高精地图的信息,获取障碍物与车辆之间的距离。If the obstacle in the image captured by the monocular camera matches the recognized elements on the high-precision map, the distance between the obstacle and the vehicle is obtained based on the principle of monocular ranging and the information of the high-precision map.
进一步地,判断单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的元素是否匹配的步骤之后,所述方法还包括:Further, after the step of judging whether the obstacle in the image captured by the monocular camera matches the recognized element on the high-precision map, the method further includes:
若单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的所有元素均不匹配,则进一步判断是否存在车道线;If the obstacle in the image taken by the monocular camera does not match all the elements on the recognized high-precision map, it is further judged whether there is a lane line;
若存在车道线,则通过车道线计算障碍物与车辆之间的距离。If there is a lane line, the distance between the obstacle and the vehicle is calculated through the lane line.
进一步地,通过车道线计算障碍物与车辆之间的距离的步骤具体包括:Further, the step of calculating the distance between the obstacle and the vehicle through the lane line specifically includes:
从高精地图上获取车道的宽度,然后通过车道在图像的像素点、车道的宽度、单目摄像头的相机参数、障碍物在图像中的高度像素,计算出障碍物的距离、以及车道线计算障碍物与车辆之间的距离。Obtain the width of the lane from the high-precision map, and then calculate the distance of the obstacle and lane line calculation through the pixel points of the lane in the image, the width of the lane, the camera parameters of the monocular camera, and the height pixels of the obstacle in the image The distance between the obstacle and the vehicle.
进一步地,判断是否存在车道线的步骤之后,所述方法还包括:Further, after the step of judging whether there is a lane line, the method further includes:
若不存在车道线,则判断是否存在预设道路元素,所述预设道路元素为有道路标线、人行横道、路杆中的任一种;If there is no lane line, it is judged whether there is a preset road element, and the preset road element is any one of road markings, pedestrian crossings, and road poles;
若存在预设道路元素,则将透视图通过逆透视变换,转换为俯视图,然后进行插值变化来确定车道线计算障碍物与车辆之间的距离。If there are preset road elements, the perspective view is converted into a top view through inverse perspective transformation, and then interpolated to determine the lane line and calculate the distance between the obstacle and the vehicle.
本发明的另一个实施例提出一种基于高精地图和单目摄像头测量障碍物距离的系统,以解决现有技术无法通过单目摄像头单独获取障碍物距离,必须知道障碍物的大小和方向,或者用双目摄像头才能获得障碍物的距离的技术问题。Another embodiment of the present invention proposes a system for measuring obstacle distances based on a high-precision map and a monocular camera to solve the problem that the existing technology cannot obtain the obstacle distance alone through the monocular camera, and the size and direction of the obstacle must be known. Or the technical problem of using binocular cameras to obtain the distance of obstacles.
根据本发明一实施例的基于高精地图和单目摄像头测量障碍物距离的系统,所述系统包括:According to an embodiment of the present invention, a system for measuring obstacle distance based on a high-precision map and a monocular camera, the system includes:
识别模块,用于识别高精地图上的元素;The recognition module is used to recognize elements on the high-precision map;
获取模块,用于获取车辆上的单目摄像头拍摄的图像,并将单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的元素进行匹配分析;The acquisition module is used to acquire the image taken by the monocular camera on the vehicle, and perform matching analysis on the obstacles in the image taken by the monocular camera and the recognized elements on the high-precision map;
第一判断模块,用于判断障碍物的高度信息是否已知;The first judging module is used to judge whether the height information of the obstacle is known;
第一计算模块,用于若障碍物的高度信息已知,则基于单目测距原理以及障碍物的高度信息,获取障碍物与车辆之间的距离。The first calculation module is configured to obtain the distance between the obstacle and the vehicle based on the principle of monocular ranging and the height information of the obstacle if the height information of the obstacle is known.
根据本发明实施例的基于高精地图和单目摄像头测量障碍物距离的系统,首先识别高精地图上的元素,然后获取车辆上的单目摄像头拍摄的图像,并将单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的元素进行匹配分析,若障碍物的高度信息已知,则可以基于单目测距原理以及障碍物的高度信息直接获取障碍物与车辆之间的距离,本发明只需要采用单目摄像头,无需使用双目摄像头,且无需知道障碍物的大小和方向,就可以直接测量障碍物的距离,实现成本低。According to the system for measuring the distance of obstacles based on a high-precision map and a monocular camera according to an embodiment of the present invention, the elements on the high-precision map are first identified, and then the image captured by the monocular camera on the vehicle is acquired, and the image captured by the monocular camera is The obstacles in the system are matched with the elements on the recognized high-precision map. If the height information of the obstacles is known, the distance between the obstacles and the vehicle can be directly obtained based on the principle of monocular distance measurement and the height information of the obstacles. distance, the present invention only needs to use a monocular camera, does not need to use a binocular camera, and does not need to know the size and direction of the obstacle, and can directly measure the distance of the obstacle, and the implementation cost is low.
另外,根据本发明上述实施例的基于高精地图和单目摄像头测量障碍物距离的系统,还可以具有如下附加的技术特征:In addition, the system for measuring obstacle distances based on high-precision maps and monocular cameras according to the above-mentioned embodiments of the present invention may also have the following additional technical features:
进一步地,所述系统还包括:Further, the system also includes:
第二判断模块,用于若障碍物的高度信息未知,则判断单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的元素是否匹配;The second judging module is used to judge whether the obstacle in the image captured by the monocular camera matches the elements on the recognized high-precision map if the height information of the obstacle is unknown;
第二计算模块,用于若单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的元素匹配,则基于单目测距原理以及高精地图的信息,获取障碍物与车辆之间的距离。The second calculation module is used to obtain the distance between the obstacle and the vehicle based on the principle of monocular ranging and the information of the high-precision map if the obstacle in the image captured by the monocular camera matches the recognized element on the high-precision map. distance between.
进一步地,所述系统还包括:Further, the system also includes:
第三判断模块,用于若单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的所有元素均不匹配,则进一步判断是否存在车道线;The third judging module is used to further judge whether there is a lane line if the obstacle in the image captured by the monocular camera does not match all the elements on the recognized high-precision map;
第三计算模块,用于若存在车道线,则通过车道线计算障碍物与车辆之间的距离。The third calculation module is used to calculate the distance between the obstacle and the vehicle through the lane line if there is a lane line.
进一步地,第三计算模块具体用于:Further, the third calculation module is specifically used for:
从高精地图上获取车道的宽度,然后通过车道在图像的像素点、车道的宽度、单目摄像头的相机参数、障碍物在图像中的高度像素,计算出障碍物的距离、以及车道线计算障碍物与车辆之间的距离。Obtain the width of the lane from the high-precision map, and then calculate the distance of the obstacle and lane line calculation through the pixel points of the lane in the image, the width of the lane, the camera parameters of the monocular camera, and the height pixels of the obstacle in the image The distance between the obstacle and the vehicle.
进一步地,所述系统还包括:Further, the system also includes:
第四判断模块,用于若不存在车道线,则判断是否存在预设道路元素,所述预设道路元素为有道路标线、人行横道、路杆中的任一种;The fourth judging module is used to judge whether there is a preset road element if there is no lane line, and the preset road element is any one of road markings, pedestrian crossings, and road poles;
第四计算模块,用于若存在预设道路元素,则将透视图通过逆透视变换,转换为俯视图,然后进行插值变化来确定车道线计算障碍物与车辆之间的距离。The fourth calculation module is used to convert the perspective view into a top view through inverse perspective transformation if there is a preset road element, and then perform interpolation changes to determine the lane line and calculate the distance between the obstacle and the vehicle.
附图说明Description of drawings
本发明实施例的上述和/或附加的方面和优点从结合下面附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the embodiments of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, wherein:
图1是根据本发明一实施例的基于高精地图和单目摄像头测量障碍物距离的方法的流程示意图;Fig. 1 is a schematic flowchart of a method for measuring obstacle distance based on a high-precision map and a monocular camera according to an embodiment of the present invention;
图2是障碍物在车道上的示意图;Fig. 2 is a schematic diagram of obstacles on the lane;
图3是通过相似三角形计算障碍物的高度和障碍物到相机的距离原理示意图;Figure 3 is a schematic diagram of the principle of calculating the height of the obstacle and the distance from the obstacle to the camera through similar triangles;
图4是根据本发明一实施例的基于高精地图和单目摄像头测量障碍物距离的系统的结构示意图。Fig. 4 is a schematic structural diagram of a system for measuring obstacle distances based on a high-definition map and a monocular camera according to an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions 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 It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
请参阅图1,本发明一实施例提出的基于高精地图和单目摄像头测量障碍物距离的方法,所述方法包括以下步骤S1~步骤S10:Please refer to Fig. 1, a method for measuring obstacle distance based on a high-precision map and a monocular camera proposed by an embodiment of the present invention, the method includes the following steps S1 to S10:
S1,识别高精地图上的元素。S1, identify elements on the HD map.
S2,获取车辆上的单目摄像头拍摄的图像,并将单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的元素进行匹配分析。S2. Obtain the image captured by the monocular camera on the vehicle, and perform matching analysis on the obstacles in the image captured by the monocular camera and the recognized elements on the high-precision map.
S3,判断障碍物的高度信息是否已知。S3, judging whether the height information of the obstacle is known.
S4,若障碍物的高度信息已知,则基于单目测距原理以及障碍物的高度信息,获取障碍物与车辆之间的距离。S4. If the height information of the obstacle is known, the distance between the obstacle and the vehicle is obtained based on the monocular ranging principle and the height information of the obstacle.
障碍物高度可以辅助测距,在没有地图元素时可通过高度测距,如果知道物体的真实高度和图像上的像素可以直接算出障碍物与车辆之间的距离。The height of obstacles can be used to assist distance measurement. When there is no map element, it can be measured by height. If you know the real height of the object and the pixels on the image, you can directly calculate the distance between the obstacle and the vehicle.
本实施例中,确认是否已知障碍物的高度信息的步骤之后,所述方法还包括:In this embodiment, after the step of confirming whether the height information of the obstacle is known, the method further includes:
S5,若障碍物的高度信息未知,则判断单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的元素是否匹配;S5, if the height information of the obstacle is unknown, judge whether the obstacle in the image captured by the monocular camera matches the elements on the recognized high-precision map;
S6,若单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的元素匹配,则基于单目测距原理以及高精地图的信息,获取障碍物与车辆之间的距离。S6, if the obstacle in the image captured by the monocular camera matches the recognized elements on the high-precision map, then based on the principle of monocular ranging and the information of the high-precision map, the distance between the obstacle and the vehicle is obtained.
本实施例中,判断单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的元素是否匹配的步骤之后,所述方法还包括:In this embodiment, after the step of judging whether the obstacle in the image captured by the monocular camera matches the recognized element on the high-precision map, the method further includes:
S7,若单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的所有元素均不匹配,则进一步判断是否存在车道线;S7, if the obstacle in the image captured by the monocular camera does not match all the elements on the recognized high-precision map, further determine whether there is a lane line;
S8,若存在车道线,则通过车道线计算障碍物与车辆之间的距离。S8. If there is a lane line, calculate the distance between the obstacle and the vehicle through the lane line.
本实施例中,通过车道线计算障碍物与车辆之间的距离的步骤具体包括:In this embodiment, the step of calculating the distance between the obstacle and the vehicle through the lane line specifically includes:
从高精地图上获取车道的宽度,然后通过车道在图像的像素点、车道的宽度、单目摄像头的相机参数、障碍物在图像中的高度像素,计算出障碍物的距离、以及车道线计算障碍物与车辆之间的距离。Obtain the width of the lane from the high-precision map, and then calculate the distance of the obstacle and lane line calculation through the pixel points of the lane in the image, the width of the lane, the camera parameters of the monocular camera, and the height pixels of the obstacle in the image The distance between the obstacle and the vehicle.
本实施例中,判断是否存在车道线的步骤之后,所述方法还包括:In this embodiment, after the step of judging whether there is a lane line, the method further includes:
S9,若不存在车道线,则判断是否存在预设道路元素,所述预设道路元素为有道路标线、人行横道、路杆中的任一种;S9, if there is no lane line, it is judged whether there is a preset road element, and the preset road element is any one of road markings, pedestrian crossings, and road poles;
S10,若存在预设道路元素,则将透视图通过逆透视变换,转换为俯视图,然后进行插值变化来确定车道线计算障碍物与车辆之间的距离。S10, if there is a preset road element, convert the perspective view into a top view through inverse perspective transformation, and then perform interpolation changes to determine the lane line and calculate the distance between the obstacle and the vehicle.
具体的,如果障碍物在车道上,过障碍物与地面的交点做一个与车道线的垂直的线,如图2,就可以将计算障碍物到相机的距离转换成计算该点到相机距离。假设该车道的车道宽度相同,通过高精地图获得该车道宽度,就可以通过相似三角形计算障碍物的高度和障碍物到相机的距离,如图3。假设障碍物高度不变,后面就可以不断优化障碍物的高度。在没有高精地图可匹配的路标时就可以通过障碍物的高度进行通过相似三角形计算距离。Specifically, if the obstacle is on the lane, make a line perpendicular to the lane line through the intersection point of the obstacle and the ground, as shown in Figure 2, then the calculation of the distance from the obstacle to the camera can be converted into the distance from the point to the camera. Assuming that the lane width of the lane is the same, and the lane width is obtained through the high-precision map, the height of the obstacle and the distance from the obstacle to the camera can be calculated through similar triangles, as shown in Figure 3. Assuming that the height of the obstacle remains unchanged, the height of the obstacle can be continuously optimized later. When there is no high-precision map to match the landmarks, the height of the obstacle can be used to calculate the distance through similar triangles.
假设两个车道线平行且等宽,可以从地图上获取当前车道的宽度,然后通过车道在图像的像素点,车道的宽度,相机内参,和障碍物在图像中的高度像素,就可以算出障碍物的距离和高度。其中,障碍物投影到车道线,通过小孔成像模型,根据相似三角形,设B、P’是像素上的投影点,X’可知。X可通过地图获得,焦距已知,可算出障碍物与车辆之间的距离Z。Assuming that the two lane lines are parallel and equal in width, the width of the current lane can be obtained from the map, and then the obstacle can be calculated by the pixel point of the lane in the image, the width of the lane, the camera internal reference, and the height pixel of the obstacle in the image object distance and height. Among them, the obstacle is projected to the lane line, through the small hole imaging model, according to the similar triangle, let B, P' be the projection point on the pixel, and X' can be known. X can be obtained through the map, the focal length is known, and the distance Z between the obstacle and the vehicle can be calculated.
如果障碍物就是高精地图上的元素,就可以直接通过高精地图获得其原始的尺寸并通过相机投影原理获得与其的距离If the obstacle is an element on the HD map, its original size can be obtained directly through the HD map and the distance to it can be obtained through the camera projection principle
如果障碍物就在人行横道/车道标线上就可以通过高精地图比较准确的获得障碍物到,将透视图通过逆透视变换,转换为俯视图,然后进行插值变化来确定车道线计算障碍物与车辆之间的距离。If the obstacle is on the pedestrian crossing/lane marking line, the obstacle can be obtained more accurately through the high-precision map. The perspective view is transformed into a top view through inverse perspective transformation, and then interpolated to determine the lane line calculation Obstacles and vehicles the distance between.
以路杆为例,路杆到相机的实际距离已知,逆投影变换后的图像上路杆到相机的距离和障碍物到相机的距离已知,就可以计算出障碍物与车辆之间的距离。Taking the road pole as an example, the actual distance between the road pole and the camera is known, and the distance between the road pole and the camera and the distance between the obstacle and the camera are known on the image after the inverse projection transformation, and the distance between the obstacle and the vehicle can be calculated .
综上,根据本实施例提供的基于高精地图和单目摄像头测量障碍物距离的系统,首先识别高精地图上的元素,然后获取车辆上的单目摄像头拍摄的图像,并将单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的元素进行匹配分析,若障碍物的高度信息已知,则可以基于单目测距原理以及障碍物的高度信息直接获取障碍物与车辆之间的距离,本发明只需要采用单目摄像头,无需使用双目摄像头,且无需知道障碍物的大小和方向,就可以直接测量障碍物的距离,实现成本低。To sum up, according to the system for measuring obstacle distance based on high-precision map and monocular camera provided in this embodiment, the elements on the high-precision map are firstly identified, and then the image captured by the monocular camera on the vehicle is obtained, and the monocular camera The obstacles in the captured image are matched with the elements on the recognized high-precision map. If the height information of the obstacle is known, the obstacle and the vehicle can be directly obtained based on the principle of monocular distance measurement and the height information of the obstacle. The distance between obstacles, the present invention only needs to use a monocular camera, does not need to use a binocular camera, and does not need to know the size and direction of the obstacle, it can directly measure the distance of the obstacle, and the implementation cost is low.
请参阅图4,本发明另一实施例提出的基于高精地图和单目摄像头测量障碍物距离的系统,所述系统包括:Please refer to FIG. 4 , another embodiment of the present invention proposes a system for measuring obstacle distances based on a high-precision map and a monocular camera. The system includes:
识别模块,用于识别高精地图上的元素;The recognition module is used to recognize elements on the high-precision map;
获取模块,用于获取车辆上的单目摄像头拍摄的图像,并将单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的元素进行匹配分析;The acquisition module is used to acquire the image taken by the monocular camera on the vehicle, and perform matching analysis on the obstacles in the image taken by the monocular camera and the recognized elements on the high-precision map;
第一判断模块,用于判断障碍物的高度信息是否已知;The first judging module is used to judge whether the height information of the obstacle is known;
第一计算模块,用于若障碍物的高度信息已知,则基于单目测距原理以及障碍物的高度信息,获取障碍物与车辆之间的距离。The first calculation module is configured to obtain the distance between the obstacle and the vehicle based on the principle of monocular ranging and the height information of the obstacle if the height information of the obstacle is known.
本实施例中,所述系统还包括:In this embodiment, the system also includes:
第二判断模块,用于若障碍物的高度信息未知,则判断单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的元素是否匹配;The second judging module is used to judge whether the obstacle in the image captured by the monocular camera matches the elements on the recognized high-precision map if the height information of the obstacle is unknown;
第二计算模块,用于若单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的元素匹配,则基于单目测距原理以及高精地图的信息,获取障碍物与车辆之间的距离。The second calculation module is used to obtain the distance between the obstacle and the vehicle based on the principle of monocular ranging and the information of the high-precision map if the obstacle in the image captured by the monocular camera matches the recognized element on the high-precision map. distance between.
本实施例中,所述系统还包括:In this embodiment, the system also includes:
第三判断模块,用于若单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的所有元素均不匹配,则进一步判断是否存在车道线;The third judging module is used to further judge whether there is a lane line if the obstacle in the image captured by the monocular camera does not match all the elements on the recognized high-precision map;
第三计算模块,用于若存在车道线,则通过车道线计算障碍物与车辆之间的距离。The third calculation module is used to calculate the distance between the obstacle and the vehicle through the lane line if there is a lane line.
本实施例中,第三计算模块具体用于:In this embodiment, the third calculation module is specifically used for:
从高精地图上获取车道的宽度,然后通过车道在图像的像素点、车道的宽度、单目摄像头的相机参数、障碍物在图像中的高度像素,计算出障碍物的距离、以及车道线计算障碍物与车辆之间的距离。Obtain the width of the lane from the high-precision map, and then calculate the distance of the obstacle and lane line calculation through the pixel points of the lane in the image, the width of the lane, the camera parameters of the monocular camera, and the height pixels of the obstacle in the image The distance between the obstacle and the vehicle.
本实施例中,所述系统还包括:In this embodiment, the system also includes:
第四判断模块,用于若不存在车道线,则判断是否存在预设道路元素,所述预设道路元素为有道路标线、人行横道、路杆中的任一种;The fourth judging module is used to judge whether there is a preset road element if there is no lane line, and the preset road element is any one of road markings, pedestrian crossings, and road poles;
第四计算模块,用于若存在预设道路元素,则将透视图通过逆透视变换,转换为俯视图,然后进行插值变化来确定车道线计算障碍物与车辆之间的距离。The fourth calculation module is used to convert the perspective view into a top view through inverse perspective transformation if there is a preset road element, and then perform interpolation changes to determine the lane line and calculate the distance between the obstacle and the vehicle.
根据本实施例提供的基于高精地图和单目摄像头测量障碍物距离的系统,首先识别高精地图上的元素,然后获取车辆上的单目摄像头拍摄的图像,并将单目摄像头拍摄的图像中的障碍物与识别到的高精地图上的元素进行匹配分析,若障碍物的高度信息已知,则可以基于单目测距原理以及障碍物的高度信息直接获取障碍物与车辆之间的距离,本发明只需要采用单目摄像头,无需使用双目摄像头,且无需知道障碍物的大小和方向,就可以直接测量障碍物的距离,实现成本低。According to the system for measuring the obstacle distance based on the high-precision map and the monocular camera provided in this embodiment, the elements on the high-precision map are first identified, and then the image captured by the monocular camera on the vehicle is acquired, and the image captured by the monocular camera is The obstacles in the system are matched with the elements on the recognized high-precision map. If the height information of the obstacles is known, the distance between the obstacles and the vehicle can be directly obtained based on the principle of monocular distance measurement and the height information of the obstacles. distance, the present invention only needs to use a monocular camera, does not need to use a binocular camera, and does not need to know the size and direction of the obstacle, and can directly measure the distance of the obstacle, and the implementation cost is low.
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,“计算机可读介质”可以是任何可以包含、存储、通讯、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。The logic and/or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium, For use with instruction execution systems, devices, or devices (such as computer-based systems, systems including processors, or other systems that can fetch instructions from instruction execution systems, devices, or devices and execute instructions), or in conjunction with these instruction execution systems, devices or equipment used. For the purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use in or in conjunction with an instruction execution system, device or device.
计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。More specific examples (non-exhaustive list) of computer-readable media include the following: electrical connection with one or more wires (electronic device), portable computer disk case (magnetic device), random access memory (RAM), Read Only Memory (ROM), Erasable and Editable Read Only Memory (EPROM or Flash Memory), Fiber Optic Devices, and Portable Compact Disc Read Only Memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program can be printed, as it may be possible, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or other suitable processing if necessary. The program is processed electronically and stored in computer memory.
应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that various parts of the present invention can be realized by hardware, software, firmware or their combination. In the embodiments described above, various steps or methods may be implemented by software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques known in the art: Discrete logic circuits, ASICs with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。In the description of this specification, descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific examples", or "some examples" mean that specific features described in connection with the embodiment or example , structure, material or characteristic is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
尽管已经示出和描述了本发明的实施例,本领域的普通技术人员可以理解:在不脱离本发明的原理和宗旨的情况下可以对这些实施例进行多种变化、修改、替换和变型,本发明的范围由权利要求及其等同物限定。Although the embodiments of the present invention have been shown and described, those skilled in the art can understand that various changes, modifications, substitutions and modifications can be made to these embodiments without departing from the principle and spirit of the present invention. The scope of the invention is defined by the claims and their equivalents.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310159114.XA CN116386000A (en) | 2023-02-23 | 2023-02-23 | Method and system for measuring obstacle distance based on high-precision map and monocular camera |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310159114.XA CN116386000A (en) | 2023-02-23 | 2023-02-23 | Method and system for measuring obstacle distance based on high-precision map and monocular camera |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN116386000A true CN116386000A (en) | 2023-07-04 |
Family
ID=86975870
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310159114.XA Pending CN116386000A (en) | 2023-02-23 | 2023-02-23 | Method and system for measuring obstacle distance based on high-precision map and monocular camera |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116386000A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116953680A (en) * | 2023-09-15 | 2023-10-27 | 成都中轨轨道设备有限公司 | Image-based real-time ranging method and system for target object |
| CN117058210A (en) * | 2023-10-11 | 2023-11-14 | 比亚迪股份有限公司 | Distance calculation method and device based on vehicle-mounted sensors, storage medium and vehicle |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111873995A (en) * | 2020-08-04 | 2020-11-03 | 禾多科技(北京)有限公司 | System and method for automatically driving on-off ramps on highway |
| WO2021120574A1 (en) * | 2019-12-19 | 2021-06-24 | Suzhou Zhijia Science & Technologies Co., Ltd. | Obstacle positioning method and apparatus for autonomous driving system |
| CN114943767A (en) * | 2022-05-16 | 2022-08-26 | 北京铁科时代科技有限公司 | Monocular vision-based obstacle type and distance identification method, device, medium and equipment |
-
2023
- 2023-02-23 CN CN202310159114.XA patent/CN116386000A/en active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2021120574A1 (en) * | 2019-12-19 | 2021-06-24 | Suzhou Zhijia Science & Technologies Co., Ltd. | Obstacle positioning method and apparatus for autonomous driving system |
| CN111873995A (en) * | 2020-08-04 | 2020-11-03 | 禾多科技(北京)有限公司 | System and method for automatically driving on-off ramps on highway |
| CN114943767A (en) * | 2022-05-16 | 2022-08-26 | 北京铁科时代科技有限公司 | Monocular vision-based obstacle type and distance identification method, device, medium and equipment |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116953680A (en) * | 2023-09-15 | 2023-10-27 | 成都中轨轨道设备有限公司 | Image-based real-time ranging method and system for target object |
| CN116953680B (en) * | 2023-09-15 | 2023-11-24 | 成都中轨轨道设备有限公司 | Image-based real-time ranging method and system for target object |
| CN117058210A (en) * | 2023-10-11 | 2023-11-14 | 比亚迪股份有限公司 | Distance calculation method and device based on vehicle-mounted sensors, storage medium and vehicle |
| CN117058210B (en) * | 2023-10-11 | 2024-06-18 | 比亚迪股份有限公司 | Distance calculation method and device based on vehicle-mounted sensor, storage medium and vehicle |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109084782B (en) | Lane line map construction method and system based on camera sensors | |
| CN113657224B (en) | Method, device and equipment for determining object state in vehicle-road coordination | |
| JP2020064046A (en) | Vehicle position determining method and vehicle position determining device | |
| KR102267562B1 (en) | Device and method for recognition of obstacles and parking slots for unmanned autonomous parking | |
| KR102815456B1 (en) | Learning data generation method for image processing, image processing method, and apparatus thereof | |
| US9536306B2 (en) | Vehicle vision system | |
| CN106503653B (en) | Region labeling method and device and electronic equipment | |
| CN104833370B (en) | System and method for mapping, positioning and pose correction | |
| CN110969055B (en) | Methods, devices, equipment and computer-readable storage media for vehicle positioning | |
| CN112654998B (en) | Lane line detection method and device | |
| CN112654997B (en) | A kind of lane line detection method and device | |
| CN103770704A (en) | System and method for recognizing parking space line markings for vehicle | |
| CN108692719A (en) | Article detection device | |
| CN116386000A (en) | Method and system for measuring obstacle distance based on high-precision map and monocular camera | |
| CN112232275A (en) | Obstacle detection method, system, equipment and storage medium based on binocular recognition | |
| CN110728720B (en) | Method, apparatus, device and storage medium for camera calibration | |
| CN110660113A (en) | Method, device, acquisition device and storage medium for establishing feature map | |
| CN114694116A (en) | A road boundary detection method, device, electronic device and storage medium | |
| CN115456898A (en) | Method and device for building image of parking lot, vehicle and storage medium | |
| CN115345978A (en) | Sensor fusion based look-down three-dimensional texture representation for general obstacle detection in vehicles | |
| CN116997771A (en) | Vehicle and positioning method, device, equipment, computer-readable storage medium | |
| CN113674245A (en) | Target parking space determining method and device, electronic equipment and storage medium | |
| CN113566834A (en) | Positioning method, positioning device, vehicle, and storage medium | |
| CN110677491B (en) | Method for estimating position of vehicle | |
| US20230186638A1 (en) | Device for determining a topography of a vehicle environment, vehicle and method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |