技术领域Technical Field
本发明实施例涉及车道线重建技术领域,具体而言,涉及一种车道线处理方法和装置、存储介质及电子设备。The embodiments of the present invention relate to the technical field of lane line reconstruction, and in particular, to a lane line processing method and device, a storage medium, and an electronic device.
背景技术Background Art
车道线是高精地图中关键的道路要素之一,在构建高精地图的过程中,车道线的重建质量决定了高精地图应用的性能表现;车道线的重建通常包括消隐点估计、单帧重建以及多帧融合三个过程。Lane lines are one of the key road elements in high-precision maps. In the process of building high-precision maps, the reconstruction quality of lane lines determines the performance of high-precision map applications; the reconstruction of lane lines usually includes three processes: hidden point estimation, single-frame reconstruction, and multi-frame fusion.
在车道线的多帧融合过程中,需要对道路帧序列中的目标道路的车道线进行追踪,以确定包含目标道路的车道线的一组目标道路帧,并基于一组目标道路帧对目标道路的车道线进行重建;相关技术中,无法准确地对道路帧序列中的目标道路的车道线进行追踪,进而降低了车道线的多帧融合效率。In the multi-frame fusion process of lane lines, it is necessary to track the lane lines of the target road in the road frame sequence to determine a group of target road frames containing the lane lines of the target road, and reconstruct the lane lines of the target road based on the group of target road frames; in the related art, it is impossible to accurately track the lane lines of the target road in the road frame sequence, thereby reducing the multi-frame fusion efficiency of the lane lines.
由此可见,相关技术中的车道线处理方法,存在由于对道路帧序列中的目标道路的车道线的追踪效率低导致的车道线多帧融合效率低的技术问题。It can be seen that the lane line processing method in the related art has a technical problem of low efficiency in multi-frame fusion of lane lines due to low efficiency in tracking the lane lines of the target road in the road frame sequence.
发明内容Summary of the invention
本发明实施例提供了一种车道线处理方法和装置、存储介质及电子设备,以至少解决相关技术中的车道线处理方法,存在由于对道路帧序列中的目标道路的车道线的追踪效率低导致的车道线多帧融合效率低的技术问题。Embodiments of the present invention provide a lane line processing method and device, a storage medium and an electronic device to at least solve the technical problem of low efficiency of lane line multi-frame fusion due to low efficiency in tracking the lane lines of the target road in the road frame sequence in the lane line processing method in the related art.
根据本发明的一个实施例,提供了一种车道线处理方法,包括:获取对道路帧序列中的每个道路帧进行车道线重建得到所述每个道路帧的车道线重建结果,其中,所述每个道路帧的车道线重建结果包括与所述每个道路帧对应的车道线曲线;按照第一车道线宽度将与所述每个道路帧对应的车道线曲线转换成与所述每个道路帧对应的多边形,其中,与所述每个道路帧对应的多边形用于表示所述每个道路帧中的车道线;通过将与所述道路帧序列中相邻的道路帧对应的多边形进行匹配,对目标道路的车道线进行追踪,得到所述目标道路的车道线的追踪结果,其中,所述目标道路是与所述道路帧序列对应的道路。According to one embodiment of the present invention, a lane line processing method is provided, comprising: obtaining a lane line reconstruction result of each road frame by performing lane line reconstruction on each road frame in a road frame sequence, wherein the lane line reconstruction result of each road frame includes a lane line curve corresponding to each road frame; converting the lane line curve corresponding to each road frame into a polygon corresponding to each road frame according to a first lane line width, wherein the polygon corresponding to each road frame is used to represent the lane line in each road frame; tracking the lane line of a target road by matching the polygons corresponding to adjacent road frames in the road frame sequence, thereby obtaining a tracking result of the lane line of the target road, wherein the target road is a road corresponding to the road frame sequence.
根据本发明的另一个实施例,提供了一种车道线处理装置,包括:获取单元,用于获取对道路帧序列中的每个道路帧进行车道线重建得到所述每个道路帧的车道线重建结果,其中,所述每个道路帧的车道线重建结果包括与所述每个道路帧对应的车道线曲线;第一转换单元,用于按照第一车道线宽度将与所述每个道路帧对应的车道线曲线转换成与所述每个道路帧对应的多边形,其中,与所述每个道路帧对应的多边形用于表示所述每个道路帧中的车道线;第一执行单元,用于通过将与所述道路帧序列中相邻的道路帧对应的多边形进行匹配,对目标道路的车道线进行追踪,得到所述目标道路的车道线的追踪结果,其中,所述目标道路是与所述道路帧序列对应的道路。According to another embodiment of the present invention, a lane line processing device is provided, comprising: an acquisition unit, configured to acquire a lane line reconstruction result of each road frame by performing lane line reconstruction on each road frame in a road frame sequence, wherein the lane line reconstruction result of each road frame includes a lane line curve corresponding to each road frame; a first conversion unit, configured to convert the lane line curve corresponding to each road frame into a polygon corresponding to each road frame according to a first lane line width, wherein the polygon corresponding to each road frame is used to represent the lane line in each road frame; and a first execution unit, configured to track the lane line of a target road by matching the polygons corresponding to adjacent road frames in the road frame sequence, thereby obtaining a tracking result of the lane line of the target road, wherein the target road is a road corresponding to the road frame sequence.
根据本发明的又一个实施例,还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when executed.
根据本发明的又一个实施例,还提供了一种电子设备,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。According to another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
通过本发明,获取对道路帧序列中的每个道路帧进行车道线重建得到每个道路帧的车道线重建结果,其中,每个道路帧的车道线重建结果包括与每个道路帧对应的车道线曲线;按照第一车道线宽度将与每个道路帧对应的车道线曲线转换成与每个道路帧对应的多边形,其中,与每个道路帧对应的多边形用于表示每个道路帧中的车道线;通过将与道路帧序列中相邻的道路帧对应的多边形进行匹配,对目标道路的车道线进行追踪,得到目标道路的车道线的追踪结果,其中,目标道路是与道路帧序列对应的道路,由于每个道路帧对应的多边形可以表示该道路帧对应的车道线曲线的宽度,将与道路帧序列中相邻的道路帧对应的多边形进行匹配,可以基于相邻多边形之间的相似程度判断其对应的车道线是否为相同的车道线,进而可以提高对道路帧序列中的目标道路的车道线的追踪效率,提高车道线多帧融合效率,因此,可以解决相关技术中的车道线处理方法,存在由于对道路帧序列中的目标道路的车道线的追踪效率低导致的车道线多帧融合效率低的技术问题,达到提高车道线多帧融合效率的效果。Through the present invention, a lane line reconstruction result of each road frame is obtained by reconstructing the lane line of each road frame in a road frame sequence, wherein the lane line reconstruction result of each road frame includes a lane line curve corresponding to each road frame; the lane line curve corresponding to each road frame is converted into a polygon corresponding to each road frame according to a first lane line width, wherein the polygon corresponding to each road frame is used to represent the lane line in each road frame; the lane line of the target road is tracked by matching the polygons corresponding to the adjacent road frames in the road frame sequence, thereby obtaining a tracking result of the lane line of the target road, wherein the target road is the lane line corresponding to the road frame sequence. For a road, since the polygon corresponding to each road frame can represent the width of the lane line curve corresponding to the road frame, it will be matched with the polygon corresponding to the adjacent road frame in the road frame sequence. Based on the similarity between the adjacent polygons, it can be judged whether the corresponding lane lines are the same lane lines, thereby improving the tracking efficiency of the lane lines of the target road in the road frame sequence, and improving the efficiency of multi-frame fusion of lane lines. Therefore, the technical problem of low multi-frame fusion efficiency of lane lines caused by low tracking efficiency of lane lines of the target road in the road frame sequence in the lane line processing method in the related art can be solved, thereby achieving the effect of improving the efficiency of multi-frame fusion of lane lines.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是根据本发明实施例的一种可选的车道线处理方法的硬件环境示意图;FIG1 is a schematic diagram of a hardware environment of an optional lane line processing method according to an embodiment of the present invention;
图2是根据本发明实施例的一种可选的车道线处理方法的流程示意图;FIG2 is a schematic flow chart of an optional lane line processing method according to an embodiment of the present invention;
图3是根据本发明实施例的一种可选的车道线处理方法的示意图;FIG3 is a schematic diagram of an optional lane line processing method according to an embodiment of the present invention;
图4是根据本发明实施例的另一种可选的车道线处理方法的示意图;FIG4 is a schematic diagram of another optional lane line processing method according to an embodiment of the present invention;
图5是根据本发明实施例的又一种可选的车道线处理方法的示意图;FIG5 is a schematic diagram of another optional lane line processing method according to an embodiment of the present invention;
图6是根据本发明实施例的又一种可选的车道线处理方法的示意图;FIG6 is a schematic diagram of another optional lane line processing method according to an embodiment of the present invention;
图7是根据本发明实施例的一种可选的车道线处理装置的结构框图;FIG7 is a structural block diagram of an optional lane line processing device according to an embodiment of the present invention;
图8是根据本发明实施例的一种可选的电子设备的计算机系统的结构框图。FIG8 is a structural block diagram of a computer system of an optional electronic device according to an embodiment of the present invention.
具体实施方式DETAILED DESCRIPTION
下文中将参考附图并结合实施例来详细说明本发明的实施例。Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
本申请实施例中所提供的方法实施例可以在移动终端、计算机终端或者类似的运算装置中执行。以运行在移动终端上为例,图1是本发明实施例的一种车道线处理方法的移动终端的硬件结构框图。如图1所示,移动终端可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和用于存储数据的存储器104,其中,上述移动终端还可以包括用于通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述移动终端的结构造成限定。例如,移动终端还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, FIG1 is a hardware structure block diagram of a mobile terminal of a lane line processing method in an embodiment of the present invention. As shown in FIG1 , the mobile terminal may include one or more (only one is shown in FIG1 ) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that the structure shown in FIG1 is only for illustration and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than those shown in FIG1 , or have a configuration different from that shown in FIG1 .
存储器104可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本发明实施例中的车道线处理方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至移动终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the lane line processing method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
传输设备106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括移动终端的通信供应商提供的无线网络。在一个实例中,传输设备106包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输设备106可以为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
可选地,本实施例中的车道线处理方法可以是移动终端执行的,这里,移动终端指的是移动终端整体,包括移动终端内需要执行车道线处理方法的相关部件以及处理器102等,移动终端可以是车辆的车机;本实施例中的文本数据的处理方法也可以是由与移动终端通信连接的云端服务器执行的。在本实施例的部分示例中,文本数据的处理方法以由移动终端执行为例进行说明。Optionally, the lane line processing method in this embodiment can be executed by a mobile terminal. Here, the mobile terminal refers to the entire mobile terminal, including the relevant components in the mobile terminal that need to execute the lane line processing method and the processor 102, etc. The mobile terminal can be a vehicle computer; the text data processing method in this embodiment can also be executed by a cloud server that is connected to the mobile terminal. In some examples of this embodiment, the text data processing method is described by taking the execution of the mobile terminal as an example.
本实施例中的车道线处理方法可以应用到对车道线进行重建的场景。高精地图是地图应用于无人驾驶领域内的特殊形式,构建高精地图的传统方式依赖于设备昂贵的车载传感器,且需要大量专业的人员对车辆实地采集的数据进行后处理,导致高精地图的生产成本高、更新周期长,高精地图的更新周期无法满足全场景自动驾驶的要求;随着自动驾驶的发展,对地图的需求呈现出要素上精简、几何上保相对精度以及大小上轻量的趋势,此类地图被称为轻量化语义地图,建立轻量化语义地图的设备包括后装的ADAS(AdvancedDriver Assistance System,高级驾驶辅助系统)设备,前装的L2(自动驾驶的级别标准)以及L2++,甚至L4自动驾驶均可构成轻量化语义地图源;车道线是高精地图中关键的道路要素之一,其重建的质量决定了高精地图应用的性能表现。The lane line processing method in this embodiment can be applied to the scene of reconstructing lane lines. High-precision map is a special form of map applied in the field of unmanned driving. The traditional way of building high-precision map relies on expensive on-board sensors and requires a large number of professional personnel to post-process the data collected by the vehicle on the spot, resulting in high production cost and long update cycle of high-precision map. The update cycle of high-precision map cannot meet the requirements of full-scene autonomous driving. With the development of autonomous driving, the demand for maps shows a trend of being simplified in elements, maintaining relative accuracy in geometry, and being lightweight in size. Such maps are called lightweight semantic maps. Equipment for building lightweight semantic maps includes post-installed ADAS (Advanced Driver Assistance System) equipment, pre-installed L2 (level standard of autonomous driving) and L2++, and even L4 autonomous driving can constitute lightweight semantic map sources. Lane lines are one of the key road elements in high-precision maps, and the quality of their reconstruction determines the performance of high-precision map applications.
车道线的重建通常包括消隐点估计、单帧重建以及多帧融合三个过程。在车道线的多帧融合过程中,需要对道路帧序列中的目标道路的车道线进行追踪,以确定包含目标道路的车道线的一组目标道路帧,并基于一组目标道路帧对目标道路的车道线进行重建;相关技术中,无法准确地对道路帧序列中的目标道路的车道线进行追踪,进而降低了车道线的多帧融合效率。The reconstruction of lane lines usually includes three processes: vanishing point estimation, single-frame reconstruction, and multi-frame fusion. In the multi-frame fusion process of lane lines, it is necessary to track the lane lines of the target road in the road frame sequence to determine a group of target road frames containing the lane lines of the target road, and reconstruct the lane lines of the target road based on the group of target road frames; in the related art, it is impossible to accurately track the lane lines of the target road in the road frame sequence, thereby reducing the efficiency of multi-frame fusion of lane lines.
在本实施例中提供了一种车道线处理方,图2是根据本发明实施例的一种可选的车道线处理方法的流程示意图,如图2所示,该流程包括如下步骤:In this embodiment, a lane line processing method is provided. FIG. 2 is a flow chart of an optional lane line processing method according to an embodiment of the present invention. As shown in FIG. 2 , the flow chart includes the following steps:
步骤S202,获取对道路帧序列中的每个道路帧进行车道线重建得到每个道路帧的车道线重建结果,其中,每个道路帧的车道线重建结果包括与每个道路帧对应的车道线曲线。Step S202 , obtaining a lane line reconstruction result of each road frame by performing lane line reconstruction on each road frame in the road frame sequence, wherein the lane line reconstruction result of each road frame includes a lane line curve corresponding to each road frame.
道路帧序列指的是包含顺序的一组道路帧,这里的顺序可以是道路帧序列中每一帧获取的时间顺序;道路帧序列可以是基于车辆的ADAS设备、车身传感器、车载摄像头或车载激光雷达等获取的一组道路帧。A road frame sequence refers to a set of road frames that contain an order, where the order may be the time order in which each frame in the road frame sequence is acquired; a road frame sequence may be a set of road frames acquired based on a vehicle's ADAS equipment, body sensors, vehicle-mounted cameras, or vehicle-mounted lidar.
对道路帧序列进行车道线重建可以得到每个道路帧的车道线重建结果,每个道路帧的车道线重建结果包括与每个道路帧对应的车道线曲线;对道路帧序列进行车道线重建的步骤可以包括对道路帧序列进行消隐点估计以及对道路帧序列中的每个道路帧进行单帧重建的步骤,对道路帧序列进行车道线重建的步骤还可以包括对道路帧序列中的每个道路帧进行抽稀处理,这里,对于车道线重建的具体步骤不做限定。Reconstructing lane lines on a road frame sequence can obtain a lane line reconstruction result for each road frame, and the lane line reconstruction result for each road frame includes a lane line curve corresponding to each road frame; the step of reconstructing lane lines on a road frame sequence can include estimating the hidden points of the road frame sequence and reconstructing each road frame in the road frame sequence as a single frame, and the step of reconstructing lane lines on a road frame sequence can also include thinning processing on each road frame in the road frame sequence. Here, the specific steps of lane line reconstruction are not limited.
需要说明的是,每个道路帧中可以包括多个车道线曲线,即,每个道路帧对应的车道线曲线可以是多条车道线曲线,每个车道线曲线由一组车道线点进行表示。It should be noted that each road frame may include multiple lane line curves, that is, the lane line curves corresponding to each road frame may be multiple lane line curves, and each lane line curve is represented by a group of lane line points.
步骤S204,按照第一车道线宽度将与每个道路帧对应的车道线曲线转换成与每个道路帧对应的多边形,其中,与每个道路帧对应的多边形用于表示每个道路帧中的车道线。Step S204: converting the lane line curve corresponding to each road frame into a polygon corresponding to each road frame according to the first lane line width, wherein the polygon corresponding to each road frame is used to represent the lane line in each road frame.
第一车道线宽度是预设的宽度,这里,按照第一车道线宽度将与每个道路帧对应的车道线曲线转换成与每个道路帧对应的多边形,可以是以每个道路帧对应的车道线曲线作为中心线构建多边形,多边形的宽度为第一车道线宽度;示例性地,当车道线曲线包含2个点时,车道线曲线为一条直线时,其对应的多边形为一个四边形(矩形),四边形的长度为车道线曲线的长度,四边形的长度宽度为第一车道线宽度,车道线曲线将四边形分割为上下对称的两个四边形,同理,当车道线曲线包含多个点时,可以将车道线曲线分割为多条直线进行转换,最后得到与车道线曲线对应的多边形。The first lane line width is a preset width. Here, the lane line curve corresponding to each road frame is converted into a polygon corresponding to each road frame according to the first lane line width. The polygon may be constructed with the lane line curve corresponding to each road frame as the center line, and the width of the polygon is the first lane line width. Exemplarily, when the lane line curve contains 2 points and the lane line curve is a straight line, the corresponding polygon is a quadrilateral (rectangle), the length of the quadrilateral is the length of the lane line curve, and the length and width of the quadrilateral are the first lane line width. The lane line curve divides the quadrilateral into two quadrilaterals that are symmetrical up and down. Similarly, when the lane line curve contains multiple points, the lane line curve can be divided into multiple straight lines for conversion, and finally a polygon corresponding to the lane line curve is obtained.
需要说明的是,每个道路帧中可以包括多个车道线曲线,对应的,将与每个道路帧对应的车道线曲线转换成的与每个道路帧对应的多边形的数量也为多个。It should be noted that each road frame may include a plurality of lane line curves. Correspondingly, the number of polygons corresponding to each road frame converted from the lane line curves corresponding to each road frame is also a plurality.
步骤S206,通过将与道路帧序列中相邻的道路帧对应的多边形进行匹配,对目标道路的车道线进行追踪,得到目标道路的车道线的追踪结果,其中,目标道路是与道路帧序列对应的道路。Step S206 , tracking the lane line of the target road by matching polygons corresponding to adjacent road frames in the road frame sequence, thereby obtaining a tracking result of the lane line of the target road, wherein the target road is a road corresponding to the road frame sequence.
目标道路是与道路帧序列对应的道路,目标道路可以包括多条车道线,对目标道路的车道线进行追踪,可以是对目标道路中的目标车道线进行追踪,得到目标道路的目标车道线的追踪结果,因此,通过将与道路帧序列中相邻的道路帧对应的多边形进行匹配,也应是将相邻的道路帧中与目标车道线对应的对变形进行匹配,对目标道路的目标车道线进行追踪。The target road is a road corresponding to the road frame sequence. The target road may include multiple lane lines. Tracking the lane lines of the target road may be tracking the target lane lines in the target road to obtain tracking results of the target lane lines of the target road. Therefore, by matching polygons corresponding to adjacent road frames in the road frame sequence, the deformations corresponding to the target lane lines in the adjacent road frames should also be matched to track the target lane lines of the target road.
在本实施例中,对目标道路的车道线进行追踪,可以是将相邻的道路帧对应的两个多边形进行相似度匹配,当两个多边形的相似度超过设定阈值时,可以判定其表示的为相同的车道线,代表追踪上,否则,其表示的为不同的车道线,代表没有追踪上。In this embodiment, the lane line of the target road is tracked by performing similarity matching on two polygons corresponding to adjacent road frames. When the similarity of the two polygons exceeds a set threshold, it can be determined that they represent the same lane line, indicating that it is being tracked. Otherwise, they represent different lane lines, indicating that it is not being tracked.
可选的,本实施例中的追踪过程可以是从道路帧序列的初始帧开始依次进行的,例如,将道路帧序列的第一帧和第二帧对应的多边形进行匹配,如果追踪上,将道路帧序列的第二帧和第三帧对应的多边形进行匹配,如果追踪上,…(均追踪上),将道路帧序列的第100帧和第101帧对应的多边形进行匹配,如果没有追踪上,则停止追踪,第1帧至第100帧对应的车道线曲线即可以代表追踪上的车道线,作为后续的提取车道线的步骤的输入。Optionally, the tracking process in this embodiment can be performed sequentially starting from the initial frame of the road frame sequence. For example, the polygons corresponding to the first frame and the second frame of the road frame sequence are matched. If they are tracked, the polygons corresponding to the second frame and the third frame of the road frame sequence are matched. If they are tracked, ... (all tracked), the polygons corresponding to the 100th frame and the 101st frame of the road frame sequence are matched. If they are not tracked, the tracking is stopped. The lane line curves corresponding to the 1st frame to the 100th frame can represent the tracked lane lines and serve as input for the subsequent step of extracting lane lines.
通过上述步骤,获取对道路帧序列中的每个道路帧进行车道线重建得到每个道路帧的车道线重建结果,其中,每个道路帧的车道线重建结果包括与每个道路帧对应的车道线曲线;按照第一车道线宽度将与每个道路帧对应的车道线曲线转换成与每个道路帧对应的多边形,其中,与每个道路帧对应的多边形用于表示每个道路帧中的车道线;通过将与道路帧序列中相邻的道路帧对应的多边形进行匹配,对目标道路的车道线进行追踪,得到目标道路的车道线的追踪结果,其中,目标道路是与道路帧序列对应的道路,解决了相关技术中的车道线处理方法,存在由于对道路帧序列中的目标道路的车道线的追踪效率低导致的车道线多帧融合效率低的技术问题,提高了车道线多帧融合效率。Through the above steps, the lane line reconstruction of each road frame in the road frame sequence is performed to obtain the lane line reconstruction result of each road frame, wherein the lane line reconstruction result of each road frame includes the lane line curve corresponding to each road frame; the lane line curve corresponding to each road frame is converted into a polygon corresponding to each road frame according to the first lane line width, wherein the polygon corresponding to each road frame is used to represent the lane line in each road frame; the lane line of the target road is tracked by matching the polygons corresponding to the adjacent road frames in the road frame sequence, and the tracking result of the lane line of the target road is obtained, wherein the target road is the road corresponding to the road frame sequence, and the lane line processing method in the related art is solved. The technical problem of low efficiency of multi-frame fusion of lane lines due to low tracking efficiency of the lane lines of the target road in the road frame sequence is caused, and the multi-frame fusion efficiency of lane lines is improved.
其中,上述步骤的执行主体可以为移动终端、云端服务器等,但不限于此。The execution entity of the above steps may be a mobile terminal, a cloud server, etc., but is not limited thereto.
作为一种可选的方案,按照第一车道线宽度将与每个道路帧对应的车道线曲线转换成与每个道路帧对应的多边形,包括:As an optional solution, converting the lane line curve corresponding to each road frame into a polygon corresponding to each road frame according to the first lane line width includes:
S11,将每个道路帧分别作为当前道路帧执行以下的处理操作,得到与每个道路帧对应的多边形,其中,与当前道路帧对应的车道线曲线为当前车道线曲线:S11, performing the following processing operations on each road frame as the current road frame to obtain a polygon corresponding to each road frame, wherein the lane line curve corresponding to the current road frame is the current lane line curve:
基于当前车道线曲线上的车道线点之间的位置关系,对当前车道线曲线上的车道线点进行抽稀处理,得到抽稀的当前车道线曲线;Based on the positional relationship between lane line points on the current lane line curve, the lane line points on the current lane line curve are thinned out to obtain a thinned current lane line curve;
以抽稀的当前车道线曲线上相邻的车道线点的连线为中心线、以第一车道线宽度为宽度进行多边形构建,得到与当前道路帧对应的多边形。A polygon is constructed with a line connecting adjacent lane line points on the thinned current lane line curve as a center line and a first lane line width as a width to obtain a polygon corresponding to the current road frame.
在本实施例中,抽稀处理的方法可以是通过等间隔抽样对当前车道线曲线进行抽稀处理,例如,通过等间隔地取当前车道线曲线中的车道线点作为抽稀的当前车道线曲线;抽稀处理的方法还可以是最大距离抽样,例如,选择当前车道线曲线中与其他车道线点距离最大的车道线点进行处理,以减少当前车道线曲线中的离群点和噪声;这里,对于抽稀处理的方法不做限定。In this embodiment, the thinning processing method may be to thin out the current lane line curve by sampling at equal intervals, for example, by taking lane line points in the current lane line curve at equal intervals as the thinned current lane line curve; the thinning processing method may also be maximum distance sampling, for example, selecting the lane line point in the current lane line curve with the largest distance from other lane line points for processing, so as to reduce outliers and noise in the current lane line curve; here, the thinning processing method is not limited.
以抽稀的当前车道线曲线上相邻的车道线点的连线为中心线、以第一车道线宽度为宽度进行多边形构建,得到与当前道路帧对应的多边形;图3是根据本发明实施例的一种可选的车道线处理方法的示意图,下面以图3为例对上述步骤进行说明,如图3所示,抽稀的当前车道线曲线为o1-o2-o3,多边形A1-A3-A5-A6-A4-A2为构建得到的与当前道路帧对应的多边形,直线A1-A3与直线A2-A4之间的距离即为第一车道线宽度,o1-o2即为四边形A1-A3-A4-A2的中心线;同理,对于抽稀的前车道线曲线中车道线点更多的情况,也可以通过上述方式得到与当前道路帧对应的多边形。A polygon is constructed with the line connecting adjacent lane line points on the thinned current lane line curve as the center line and the first lane line width as the width to obtain a polygon corresponding to the current road frame; FIG3 is a schematic diagram of an optional lane line processing method according to an embodiment of the present invention. The above steps are described below using FIG3 as an example. As shown in FIG3, the thinned current lane line curve is o1-o2-o3, and polygon A1-A3-A5-A6-A4-A2 is the constructed polygon corresponding to the current road frame. The distance between the straight line A1-A3 and the straight line A2-A4 is the first lane line width, and o1-o2 is the center line of the quadrilateral A1-A3-A4-A2; similarly, for the case where there are more lane line points in the thinned front lane line curve, the polygon corresponding to the current road frame can also be obtained in the above manner.
下面通过一个具体的示例对多边形构建过程进行说明。The following is an example to illustrate the polygon construction process.
参见图3,抽稀的当前车道线曲线为o1-o2-o3,多边形A1-A3-A5-A6-A4-A2为构建得到的与当前道路帧对应的多边形,下面以基于o1-o2生成四边形A1-A3-A4-A2为例展示计算过程,o1的坐标为(x1,y1),o2的坐标为(x2,y2):Referring to FIG3 , the thinned current lane line curve is o1-o2-o3, and the polygon A1-A3-A5-A6-A4-A2 is the constructed polygon corresponding to the current road frame. The calculation process is shown below by taking the generation of quadrilateral A1-A3-A4-A2 based on o1-o2 as an example. The coordinates of o1 are (x1, y1), and the coordinates of o2 are (x2, y2):
步骤1:通过o1(x1,y1),o2(x2,y2)计算线段o1-o2的长度h:Step 1: Calculate the length h of the line segment o1-o2 through o1(x1, y1) and o2(x2, y2):
h=sqrt(pow(x2-x1,2)+pow(y2-y1,2))/2h=sqrt(pow(x2-x1,2)+pow(y2-y1,2))/2
width=const_set_value//设定长值;width = const_set_value // set length value;
其中,width表示第一车道线宽度。Among them, width represents the width of the first lane line.
步骤2:计算o1-o2的角度:theta=atan((y2-y1)/(x2-x1))Step 2: Calculate the angle of o1-o2: theta = atan((y2-y1)/(x2-x1))
计算旋转矩阵:Rotation_matrix=[cos(theta),-sin(theta);sin(theta),cos(theta)]Calculate the rotation matrix: Rotation_matrix = [cos(theta), -sin(theta); sin(theta), cos(theta)]
步骤3:取中心点:center_point=((x2-x1)/2+x1,(y2-y1)/2+y1)Step 3: Take the center point: center_point = ((x2-x1)/2+x1, (y2-y1)/2+y1)
步骤4:取A1_origin(-width/2,-h/2),A2_origin(width/2,-h/2),Step 4: Take A1_origin(-width/2,-h/2), A2_origin(width/2,-h/2),
A3_origin(-width/2,h/2),A4_origin(width/2,h/2)A3_origin(-width/2,h/2),A4_origin(width/2,h/2)
步骤5:计算A1,A2,A3,A4的坐标:Ax=rotation_matrix*Ax_origin+center_point其中,x取值分别为1,2,3,4。Step 5: Calculate the coordinates of A1, A2, A3, and A4: Ax = rotation_matrix*Ax_origin+center_point, where x is 1, 2, 3, and 4 respectively.
通过上述步骤即可基于o1-o2的坐标计算得到A1,A2,A3,A4的坐标。Through the above steps, the coordinates of A1, A2, A3, and A4 can be calculated based on the coordinates of o1-o2.
通过本申请提供的实施例,通过对当前车道线曲线上的车道线点进行抽稀处理,可以有效地减少数据量,减少计算复杂度,进而提高数据处理和存储的效率。Through the embodiments provided in the present application, by thinning out the lane line points on the current lane line curve, the amount of data can be effectively reduced, the computational complexity can be reduced, and the efficiency of data processing and storage can be improved.
作为一种可选的方案,基于当前车道线曲线上的车道线点之间的位置关系,对当前车道线曲线上的车道线点进行抽稀处理,得到抽稀的当前车道线曲线,包括:As an optional solution, based on the positional relationship between lane line points on the current lane line curve, the lane line points on the current lane line curve are thinned out to obtain a thinned current lane line curve, including:
S21,将当前车道线曲线作为待抽稀曲线添加到待抽稀曲线队列中,并从待抽稀曲线队列中依次抽取待抽稀曲线作为当前待抽稀曲线执行以下的处理操作,直到待抽稀曲线队列为空:S21, adding the current lane line curve as a curve to be thinned out to a queue of curves to be thinned out, and sequentially extracting a curve to be thinned out from the queue of curves to be thinned out as the current curve to be thinned out to perform the following processing operations until the queue of curves to be thinned out is empty:
分别计算当前待抽稀曲线中的车道线点到当前参考直线的距离,其中,当前参考直线为当前待抽稀曲线上的第一个车道线点和当前待抽稀曲线上的最后一个车道线点所在的直线;Calculate the distances from the lane line points in the current thinning curve to the current reference straight line, where the current reference straight line is the straight line where the first lane line point on the current thinning curve and the last lane line point on the current thinning curve are located;
在当前待抽稀曲线中的车道线点中,存在到当前参考直线的距离大于或者等于预设距离阈值的车道线点的情况下,以当前待抽稀曲线中到当前参考直线的距离最大的车道线点为分割点,对当前待抽稀曲线进行曲线分割,并将分割得到的两个曲线分段作为待抽稀曲线添加到待抽稀曲线队列中;If there is a lane line point in the current curve to be thinned whose distance to the current reference line is greater than or equal to the preset distance threshold, the lane line point in the current curve to be thinned whose distance to the current reference line is the largest is used as the segmentation point to segment the current curve to be thinned, and the two curve segments obtained by segmentation are added as the curves to be thinned to the queue of curves to be thinned;
在当前待抽稀曲线中的车道线点到当前参考直线的距离均小于预设距离阈值的情况下,去除当前待抽稀曲线上除了当前待抽稀曲线的第一个车道线点和当前待抽稀曲线的最后一个车道线点以外的其他车道线点,得到抽稀的当前车道线曲线。When the distances from the lane line points in the current curve to be thinned to the current reference straight line are all less than a preset distance threshold, the lane line points on the current curve to be thinned except the first lane line point of the current curve to be thinned and the last lane line point of the current curve to be thinned are removed to obtain the thinned current lane line curve.
示例性地,图4是根据本发明实施例的另一种可选的车道线处理方法的示意图,下面结合图4的步骤进行说明,设当前待抽稀曲线(对应图4中的车道线点)上的第一个车道线点为A,当前待抽稀曲线上的最后一个车道线点为B,将A与B相连得到的直线AB即为当前参考直线,分别计算当前待抽稀曲线中的车道线点到直线AB的距离,即,做车道线点到直线AB的垂线,车道线点与垂足的距离即为车道线点到直线AB的距离。Exemplarily, Figure 4 is a schematic diagram of another optional lane line processing method according to an embodiment of the present invention, which is explained below in conjunction with the steps of Figure 4. Suppose the first lane line point on the current curve to be thinned (corresponding to the lane line point in Figure 4) is A, and the last lane line point on the current curve to be thinned is B. The straight line AB obtained by connecting A and B is the current reference straight line. The distance from the lane line point in the current curve to be thinned to the straight line AB is calculated respectively, that is, a perpendicular line is made from the lane line point to the straight line AB, and the distance between the lane line point and the foot of the perpendicular is the distance from the lane line point to the straight line AB.
在当前待抽稀曲线中的车道线点中,存在到直线AB的距离大于或者等于(也可以是大于)预设距离阈值(对应图4中的最大距离D)的车道线点的情况下,以当前待抽稀曲线中到直线AB的距离最大的车道线点C为分割点,对当前待抽稀曲线进行曲线分割,得到分割的两个曲线,分别为曲线AC以及曲线CB,并将分割得到的曲线AC以及曲线CB作为待抽稀曲线添加到待抽稀曲线队列中,对曲线AC以及曲线CB重新执行上述抽稀步骤,如果曲线AC中的车道线点到直线AC的距离均小于预设距离阈值,曲线CB中的车道线点到直线CB的距离均小于预设距离阈值,则折线ACB即为抽稀的当前车道线曲线。In the case where there are lane line points in the current curve to be thinned, whose distance to the straight line AB is greater than or equal to (or greater than) a preset distance threshold (corresponding to the maximum distance D in FIG4 ), the lane line point C in the current curve to be thinned, which has the largest distance to the straight line AB, is used as the segmentation point to perform curve segmentation on the current curve to be thinned, and two segmented curves, namely, curve AC and curve CB, are obtained. The segmented curves AC and CB are added as the curves to be thinned to the queue of curves to be thinned, and the above-mentioned thinning steps are re-executed on curves AC and curve CB. If the distances from the lane line points in curve AC to the straight line AC are both less than the preset distance threshold, and the distances from the lane line points in curve CB to the straight line CB are both less than the preset distance threshold, then the broken line ACB is the thinned current lane line curve.
在当前待抽稀曲线中的车道线点到直线AB的距离均小于预设距离阈值的情况下,去除当前待抽稀曲线上除了A、B两点以外的其他车道线点,直线AB即为抽稀的当前车道线曲线。When the distances from the lane line points in the current curve to be thinned to the straight line AB are all less than the preset distance threshold, the lane line points other than points A and B on the current curve to be thinned are removed, and the straight line AB is the thinned current lane line curve.
通过本申请提供的实施例,可以有效地减少数据量,减少计算复杂度的同时保留待抽稀曲线的核心数据,进而提高数据处理和存储的效率。Through the embodiments provided in the present application, the amount of data can be effectively reduced, the computational complexity can be reduced, and the core data of the curve to be thinned can be retained, thereby improving the efficiency of data processing and storage.
作为一种可选的方案,在按照第一车道线宽度将与每个道路帧对应的车道线曲线转换成与每个道路帧对应的多边形之后,方法还包括:As an optional solution, after converting the lane line curve corresponding to each road frame into a polygon corresponding to each road frame according to the first lane line width, the method further includes:
S31,将与每个道路帧对应的多边形分别作为当前多边形执行以下的顶点排序操作,得到与每个道路帧对应的多边形的顶点排序结果:S31, taking the polygons corresponding to each road frame as the current polygons, respectively, and performing the following vertex sorting operation to obtain the vertex sorting result of the polygons corresponding to each road frame:
分别确定当前多边形的每个顶点与当前多边形的中心点的连线与预设参考线之间的夹角,得到与当前多边形的每个顶点对应的参考角度;Determine the angles between the lines connecting each vertex of the current polygon and the center point of the current polygon and the preset reference line to obtain a reference angle corresponding to each vertex of the current polygon;
按照对应的参考角度由小到大或者由大到小的顺序对当前多边形的顶点进行排序,得到当前多边形的顶点排序结果;Sort the vertices of the current polygon in order from small to large or from large to small according to the corresponding reference angles to obtain the vertex sorting result of the current polygon;
其中,将与道路帧序列中相邻的道路帧对应的多边形进行匹配是基于与道路帧序列中相邻的道路帧对应的多边形的顶点排序结果执行的。The matching of polygons corresponding to adjacent road frames in the road frame sequence is performed based on the vertex sorting result of the polygons corresponding to adjacent road frames in the road frame sequence.
需要说明的是,当前多边形的中心点为当前多边形的每个顶点的坐标的平均值。It should be noted that the center point of the current polygon is the average value of the coordinates of each vertex of the current polygon.
示例性地,参见图3,下面以多边形为四边形A1-A3-A4-A2为例进行说明。Exemplarily, referring to FIG. 3 , the following description will be given by taking the polygon being a quadrilateral A1 - A3 - A4 - A2 as an example.
需要说明的是,这里,多边形的顶点均位于同一世界坐标系内,设该世界坐标系包括x轴,计算A1,A2,A3,A4的坐标的平均值得到四边形A1-A3-A4-A2的中心点o,设预设参考线为世界坐标系的x轴,则A1,A2,A3,A4分别与o的连线与x轴的夹角为A1,A2,A3,A4各自对应的参考角度,这里,连线与x轴的夹角可以是以中心点o为中心将连线顺时针旋转夹角对应的角度后可以与x轴平行且oA与x轴的正方向同向的角度,也可以是将连线逆时针旋转夹角对应的角度后可以与x轴平行的角度可以与x轴平行且oA与x轴的正方向同向的角度。It should be noted that, here, the vertices of the polygon are all located in the same world coordinate system. Suppose that the world coordinate system includes the x-axis, calculate the average value of the coordinates of A1, A2, A3, and A4 to obtain the center point o of the quadrilateral A1-A3-A4-A2, and suppose that the preset reference line is the x-axis of the world coordinate system, then the angles between the lines connecting A1, A2, A3, and A4 and o and the x-axis are the reference angles corresponding to A1, A2, A3, and A4 respectively. Here, the angle between the line and the x-axis can be an angle in which the line is rotated clockwise by an angle corresponding to the angle with the center point o as the center, and then the line can be parallel to the x-axis and oA is in the same direction as the positive direction of the x-axis; it can also be an angle in which the line is rotated counterclockwise by an angle corresponding to the angle and then the line can be parallel to the x-axis and oA is in the same direction as the positive direction of the x-axis.
按照对应的参考角度由小到大或者由大到小的顺序对当前多边形的顶点进行排序,得到当前多边形的顶点排序结果,例如,设参考线为世界坐标系的x轴,连线与x轴的夹角可以是以中心点o为中心将连线顺时针旋转夹角对应的角度后可以与x轴平行且oA与x轴的正方向同向的角度,按照对应的参考角度者由大到小的顺序对当前多边形的顶点进行排序,则,A1,A2,A3,A4四个点的顶点排序结果为A2,A1,A3,A4。Sort the vertices of the current polygon according to the corresponding reference angles from small to large or from large to small to obtain the vertex sorting result of the current polygon. For example, assume that the reference line is the x-axis of the world coordinate system, and the angle between the connecting line and the x-axis can be an angle at which the connecting line is rotated clockwise with the center point o as the center to a corresponding angle so that it can be parallel to the x-axis and oA is in the same direction as the positive direction of the x-axis. Sort the vertices of the current polygon according to the corresponding reference angles from large to small, then the vertex sorting results of the four points A1, A2, A3, A4 are A2, A1, A3, A4.
将与道路帧序列中相邻的道路帧对应的多边形进行匹配是基于与道路帧序列中相邻的道路帧对应的多边形的顶点排序结果执行的,例如,可以基于多边形的顶点排序结果勾勒确定出多边形的形状,基于相邻的道路帧对应的两个多边形的形状进行匹配。Matching polygons corresponding to adjacent road frames in the road frame sequence is performed based on vertex sorting results of polygons corresponding to adjacent road frames in the road frame sequence. For example, the shape of the polygon can be outlined and determined based on the vertex sorting results of the polygon, and matching is performed based on the shapes of two polygons corresponding to adjacent road frames.
通过本申请提供的实施例,通过将多边形的顶点进行排序,可以使多边形的顶点数据适配车道线处理方法中后续的匹配过程,进而提高车道线处理方法的处理效率。Through the embodiments provided in the present application, by sorting the vertices of the polygons, the vertex data of the polygons can be adapted to the subsequent matching process in the lane line processing method, thereby improving the processing efficiency of the lane line processing method.
作为一种可选的方案,通过将与道路帧序列中相邻的道路帧对应的多边形进行匹配,对目标道路的车道线进行追踪,得到目标道路的车道线的追踪结果,包括:As an optional solution, the lane line of the target road is tracked by matching the polygons corresponding to the adjacent road frames in the road frame sequence, and the tracking result of the lane line of the target road is obtained, including:
S41,将道路帧序列中相邻的道路帧依次作为当前相邻道路帧执行以下的车道线追踪操作,得到目标道路的车道线的追踪结果,其中,当前相邻道路帧中的前一个道路帧为第一当前道路帧,后一个道路帧为第二当前道路帧,与第一当前道路帧对应的多边形中,包括与目标道路的第一车道线对应的第一多边形:S41, using adjacent road frames in the road frame sequence as current adjacent road frames in sequence to perform the following lane line tracking operations to obtain a lane line tracking result of the target road, wherein the previous road frame in the current adjacent road frame is a first current road frame, the next road frame is a second current road frame, and the polygons corresponding to the first current road frame include a first polygon corresponding to the first lane line of the target road:
计算与第二当前道路帧对应的多边形和第一多边形之间的交并比;calculating an intersection-and-union ratio between a polygon corresponding to a second current road frame and the first polygon;
在与第二当前道路帧对应的多边形中,存在和第一多边形之间的交并比大于或者等于预设交并比阈值的第二多边形的情况下,确定对第一车道线追踪成功,并将第二多边形确定为与第一车道线对应的多边形;If there is a second polygon whose intersection-and-annex ratio with the first polygon is greater than or equal to a preset intersection-and-annex ratio threshold value among the polygons corresponding to the second current road frame, it is determined that the first lane line is tracked successfully, and the second polygon is determined as the polygon corresponding to the first lane line;
在与第二当前道路帧对应的多边形中,不存在和第一多边形之间的交并比大于或者等于预设交并比阈值的多边形的情况下,确定对第一车道线追踪失败。If there is no polygon in the polygons corresponding to the second current road frame whose intersection-and-annex ratio with the first polygon is greater than or equal to a preset intersection-and-annex ratio threshold, it is determined that the tracking of the first lane line has failed.
在本实施例中,计算多边形与多边形之间的交并比可以是两个多边形之间交集的面积与并集的面积的比值,多边形与多边形之间的交并比可以用于比较两个多边形之间的相似程度或者重叠程度。In this embodiment, the calculated intersection-and-union ratio between polygons may be the ratio of the area of the intersection to the area of the union between the two polygons. The intersection-and-union ratio between polygons may be used to compare the similarity or overlap between the two polygons.
目标道路可以包括多条车道线,因此,第二当前道路帧中可以包括与目标道路中的多条车道线相对应的多个多边形,通过计算与第二当前道路帧对应的多边形和第一多边形之间的交并比,可以判断第二当前道路帧是否存在与第一多边形相似程度较高的多边形。The target road may include multiple lane lines, and therefore the second current road frame may include multiple polygons corresponding to the multiple lane lines in the target road. By calculating the intersection ratio between the polygon corresponding to the second current road frame and the first polygon, it can be determined whether the second current road frame has a polygon with a high degree of similarity to the first polygon.
在与第二当前道路帧对应的多边形中,存在和第一多边形之间的交并比大于或者等于预设交并比阈值的第二多边形的情况下,说明第二当前道路帧对应的多边形中存在与第一多边形相似程度较高的第二多边形,即,可以认为第二当前道路帧中的第二多边形对应的车道线与第一车道线为同一条车道线,此时可以认为对第一车道线追踪成功,将第二多边形确定为与第一车道线对应的多边形。When there is a second polygon whose intersection-and-union ratio with the first polygon is greater than or equal to a preset intersection-and-union ratio threshold value among the polygons corresponding to the second current road frame, it means that there is a second polygon with a high degree of similarity to the first polygon among the polygons corresponding to the second current road frame, that is, it can be considered that the lane line corresponding to the second polygon in the second current road frame is the same lane line as the first lane line. At this time, it can be considered that the tracking of the first lane line is successful, and the second polygon is determined as the polygon corresponding to the first lane line.
在与第二当前道路帧对应的多边形中,不存在和第一多边形之间的交并比大于或者等于预设交并比阈值的多边形的情况下,说明第二当前道路帧对应的多边形中不存在与第一多边形相似程度较高的第二多边形,此时可以认为对第一车道线追踪失败。If there is no polygon whose intersection-and-annex ratio with the first polygon is greater than or equal to the preset intersection-and-annex ratio threshold among the polygons corresponding to the second current road frame, it means that there is no second polygon with a high degree of similarity to the first polygon among the polygons corresponding to the second current road frame. In this case, it can be considered that the tracking of the first lane line has failed.
通过本申请提供的实施例,通过计算多边形之间的交并比能够准确地判断车道线是否追踪上,进而提高了对车道线追踪的效率。Through the embodiments provided in the present application, by calculating the intersection-and-joint ratio between polygons, it is possible to accurately determine whether the lane line is tracked, thereby improving the efficiency of lane line tracking.
作为一种可选的方案,在通过将与道路帧序列中相邻的道路帧对应的多边形进行匹配,对目标道路的车道线进行追踪之后,方法还包括:As an optional solution, after tracking the lane line of the target road by matching the polygons corresponding to the adjacent road frames in the road frame sequence, the method further includes:
S51,在对目标道路的第二车道线追踪完成的情况下,对与第二车道线对应的车道线点集进行主成分分析,得到与第二车道线对应的车道线点集的主方向;S51, when the tracking of the second lane line of the target road is completed, performing principal component analysis on the lane line point set corresponding to the second lane line to obtain the main direction of the lane line point set corresponding to the second lane line;
S52,沿着与第二车道线对应的车道线点集的主方向对与第二车道线对应的车道线点集进行分段处理,得到一组分段点集;S52, segmenting the lane line point set corresponding to the second lane line along the main direction of the lane line point set corresponding to the second lane line to obtain a group of segmentation point sets;
S53,对一组分段点集中的每个分段点集进行二阶函数拟合,得到与每个分段点集对应的拟合函数;S53, performing a second-order function fitting on each segment point set in a group of segment point sets to obtain a fitting function corresponding to each segment point set;
S54,根据与每个分段点集对应的拟合函数以及每个分段点集的中心,从每个分段点集中抽取出目标车道线点,得到与第二车道线对应的融合车道线点曲线,其中,融合车道线曲线包含从每个分段点集中抽取出的目标车道线点;S54, extracting a target lane line point from each segment point set according to a fitting function corresponding to each segment point set and the center of each segment point set, to obtain a fused lane line point curve corresponding to the second lane line, wherein the fused lane line curve includes the target lane line point extracted from each segment point set;
S55,按照第二车道线宽度将融合车道线曲线转换成与第二车道线对应的多边形,得到第二车道线的多帧融合结果。S55, converting the fused lane line curve into a polygon corresponding to the second lane line according to the width of the second lane line, and obtaining a multi-frame fusion result of the second lane line.
参见图5,图5是根据本发明实施例的又一种可选的车道线处理方法的示意图,图5的步骤可以表示本申请的车道线处理方法的完整流程:Referring to FIG. 5 , FIG. 5 is a schematic diagram of another optional lane line processing method according to an embodiment of the present invention. The steps of FIG. 5 may represent the complete process of the lane line processing method of the present application:
步骤1,单帧车道线结果,对应于上述实施例中的获取对道路帧序列中的每个道路帧进行车道线重建得到每个道路帧的车道线重建结果。Step 1, single-frame lane line result, corresponds to the acquisition in the above embodiment of performing lane line reconstruction on each road frame in the road frame sequence to obtain the lane line reconstruction result of each road frame.
步骤2,车道线稀疏控制点提取,对应于上述实施例中的获取对道路帧序列中的每个道路帧进行车道线重建得到每个道路帧的车道线重建结果。Step 2, lane line sparse control point extraction, corresponds to the acquisition in the above embodiment of performing lane line reconstruction on each road frame in the road frame sequence to obtain the lane line reconstruction result of each road frame.
步骤3,多边形区域生成,对应于上述实施例中的将每个道路帧分别作为当前道路帧执行以下的处理操作,得到与每个道路帧对应的多边形。Step 3, polygonal area generation, corresponds to the above embodiment of taking each road frame as the current road frame and performing the following processing operations to obtain a polygon corresponding to each road frame.
步骤4,多边形角点排序,对应于上述实施例中的对多边形的顶点进行排序。Step 4, sorting the polygon corner points, corresponds to sorting the polygon vertices in the above embodiment.
步骤5,多边形跟踪,对应于上述实施例中的将道路帧序列中相邻的道路帧依次作为当前相邻道路帧执行以下的车道线追踪操作,得到目标道路的车道线的追踪结果。Step 5, polygon tracking, corresponds to the above embodiment of using adjacent road frames in the road frame sequence as current adjacent road frames to perform the following lane line tracking operation to obtain the tracking result of the lane line of the target road.
步骤6,跟踪判定,当判断为是时,对应于上述实施例中的对第一车道线追踪成功,多边形更新对应于上述实施例中的将第二多边形确定为与第一车道线对应的多边形。Step 6, tracking determination, when it is determined to be yes, it corresponds to the successful tracking of the first lane line in the above embodiment, and the polygon update corresponds to determining the second polygon as the polygon corresponding to the first lane line in the above embodiment.
步骤7,跟踪判定,当判断为否时,进行车道线多线段MLS(Moving Least Squares,移动最小二乘法)算法融合,对应于本实施例中S51-S55的步骤。Step 7, tracking determination, when the determination is no, a lane line multi-segment MLS (Moving Least Squares) algorithm fusion is performed, corresponding to steps S51-S55 in this embodiment.
相关技术中,在车道线的多帧融合过程中,通常基于车道线进行三阶系数的表征形式,对车道线点集进行反复拟合和更新,三阶系数表征在较复杂的车道线表征中会失效,需要在车道线融合至一定长度时进行截断,同时,三阶系数表征在较简单的直线车道线表征中会引起车道线的冗余表征,降低了车道线的多帧融合效率。In the related technology, in the multi-frame fusion process of lane lines, the lane line point set is usually repeatedly fitted and updated based on the third-order coefficient representation of the lane lines. The third-order coefficient representation will fail in the more complex lane line representation and needs to be truncated when the lane lines are fused to a certain length. At the same time, the third-order coefficient representation will cause redundant representation of the lane lines in the simpler straight lane line representation, reducing the multi-frame fusion efficiency of the lane lines.
为至少解决部分上述问题,在本实施例中,在对目标道路的第二车道线追踪完成的情况下,对与第二车道线对应的车道线点集进行主成分分析,得到与第二车道线对应的车道线点集的主方向;这里,主成分分析指的是PCA(Principal Component Analysis,主成分分析)分解技术,PCA是一种数据降维技术,PCA可以在保留数据中最重要信息的同时,消除数据中的噪声和冗余信息,通过PCA分解,可以得到与第二车道线对应的车道线点集的主方向,即,随时间推移,车辆所采集到的第二车道线的延伸方向。In order to at least solve some of the above problems, in this embodiment, when the second lane line of the target road is tracked, principal component analysis is performed on the lane line point set corresponding to the second lane line to obtain the main direction of the lane line point set corresponding to the second lane line; here, principal component analysis refers to PCA (Principal Component Analysis) decomposition technology. PCA is a data dimensionality reduction technology. PCA can eliminate noise and redundant information in the data while retaining the most important information in the data. Through PCA decomposition, the main direction of the lane line point set corresponding to the second lane line can be obtained, that is, the extension direction of the second lane line collected by the vehicle over time.
沿着与第二车道线对应的车道线点集的主方向对与第二车道线对应的车道线点集进行分段处理,得到一组分段点集;参见图6,图6是根据本发明实施例的又一种可选的车道线处理方法的示意图,追踪上的第二车道线包括一组连续的车道帧中第二车道线对应的车道线点集,将上述车道线点集投射至如图6所示的同一坐标系,并如图6所示对点集进行分段处理。The lane line point set corresponding to the second lane line is segmented along the main direction of the lane line point set corresponding to the second lane line to obtain a group of segmented point sets; see Figure 6, Figure 6 is a schematic diagram of another optional lane line processing method according to an embodiment of the present invention, the tracked second lane line includes a lane line point set corresponding to the second lane line in a group of continuous lane frames, the above lane line point set is projected to the same coordinate system as shown in Figure 6, and the point set is segmented as shown in Figure 6.
对一组分段点集中的每个分段点集进行二阶函数拟合,得到与每个分段点集对应的拟合函数;这里,对分段点集进行二阶函数拟合的具体函数不做限定。A second-order function is fitted to each segment point set in a group of segment point sets to obtain a fitting function corresponding to each segment point set; here, the specific function for fitting the second-order function to the segment point set is not limited.
根据与每个分段点集对应的拟合函数以及每个分段点集的中心,从每个分段点集中抽取出目标车道线点,得到与第二车道线对应的融合车道线点曲线,其中,融合车道线曲线包含从每个分段点集中抽取出的目标车道线点;这里,每个分段点集的中心是通过计算每个分段点集的平均值得到的。According to the fitting function corresponding to each segment point set and the center of each segment point set, the target lane line point is extracted from each segment point set to obtain a fused lane line point curve corresponding to the second lane line, wherein the fused lane line curve includes the target lane line point extracted from each segment point set; here, the center of each segment point set is obtained by calculating the average value of each segment point set.
按照第二车道线宽度将融合车道线曲线转换成与第二车道线对应的多边形,得到第二车道线的多帧融合结果,即,得到第二车道线;需要说明的是,在本实施例中,按照第二车道线宽度将融合车道线曲线转换成与第二车道线对应的多边形,可以是将融合车道线曲线作为中心线,基于第二车道线宽度转换得到的。The fused lane line curve is converted into a polygon corresponding to the second lane line according to the width of the second lane line, and a multi-frame fusion result of the second lane line is obtained, that is, the second lane line is obtained; it should be noted that, in this embodiment, the fused lane line curve is converted into a polygon corresponding to the second lane line according to the width of the second lane line, which can be obtained by taking the fused lane line curve as the center line and converting based on the width of the second lane line.
通过本申请提供的实施例,基于MLS算法对追踪上的车道线进行多线段融合,可以准确高效地得到多帧融合结果,进而提高了车道线的多帧融合效率。Through the embodiments provided in the present application, multi-segment fusion of the tracked lane lines is performed based on the MLS algorithm, and a multi-frame fusion result can be obtained accurately and efficiently, thereby improving the multi-frame fusion efficiency of the lane lines.
作为一种可选的方案,在按照第二车道线宽度将融合车道线曲线转换成与第二车道线对应的多边形之前,方法还包括:As an optional solution, before converting the fused lane line curve into a polygon corresponding to the second lane line according to the width of the second lane line, the method further includes:
S61,对融合车道线曲线上的目标车道线点进行抽稀处理,得到抽稀的融合车道线曲线。S61, performing thinning processing on the target lane line points on the fused lane line curve to obtain a thinned fused lane line curve.
在本实施例中,对融合车道线曲线上的目标车道线点进行抽稀处理,可以是采用上述实施例的抽稀处理方法,例如,可以基于道格拉斯-普克算法对融合车道线曲线上的目标车道线点进行抽稀处理,这里,对于抽稀处理的具体方法不做限定。In this embodiment, the target lane line points on the fused lane line curve are thinned out by using the thinning processing method of the above embodiment. For example, the target lane line points on the fused lane line curve can be thinned out based on the Douglas-Peucker algorithm. Here, the specific method of the thinning processing is not limited.
通过本申请提供的实施例,通过对融合车道线曲线上的目标车道线点进行抽稀处理,可以进一步地减少数据量,加快数据处理速度,提高车道线处理方法的效率。Through the embodiments provided in the present application, by thinning out the target lane line points on the fused lane line curve, the amount of data can be further reduced, the data processing speed can be accelerated, and the efficiency of the lane line processing method can be improved.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of various embodiments of the present invention.
在本实施例中还提供了一种车道线处理装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a lane line processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
图7是根据本发明实施例的一种可选的车道线处理装置的结构框图,如图7所示,该装置包括:FIG. 7 is a structural block diagram of an optional lane line processing device according to an embodiment of the present invention. As shown in FIG. 7 , the device includes:
获取单元702,用于获取对道路帧序列中的每个道路帧进行车道线重建得到每个道路帧的车道线重建结果,其中,每个道路帧的车道线重建结果包括与每个道路帧对应的车道线曲线;An acquisition unit 702 is used to acquire a lane line reconstruction result of each road frame by performing lane line reconstruction on each road frame in the road frame sequence, wherein the lane line reconstruction result of each road frame includes a lane line curve corresponding to each road frame;
第一转换单元704,用于按照第一车道线宽度将与每个道路帧对应的车道线曲线转换成与每个道路帧对应的多边形,其中,与每个道路帧对应的多边形用于表示每个道路帧中的车道线;A first conversion unit 704 is used to convert the lane line curve corresponding to each road frame into a polygon corresponding to each road frame according to the first lane line width, wherein the polygon corresponding to each road frame is used to represent the lane line in each road frame;
第一执行单元706,用于通过将与道路帧序列中相邻的道路帧对应的多边形进行匹配,对目标道路的车道线进行追踪,得到目标道路的车道线的追踪结果,其中,目标道路是与道路帧序列对应的道路。The first execution unit 706 is used to track the lane line of the target road by matching polygons corresponding to adjacent road frames in the road frame sequence to obtain a tracking result of the lane line of the target road, wherein the target road is a road corresponding to the road frame sequence.
需要说明的是,该实施例中的获取单元702可以用于执行上述步骤S202,该实施例中的第一转换单元704可以用于执行上述步骤S204,该实施例中的第一执行单元706可以用于执行上述步骤S206。It should be noted that the acquisition unit 702 in this embodiment can be used to execute the above step S202, the first conversion unit 704 in this embodiment can be used to execute the above step S204, and the first execution unit 706 in this embodiment can be used to execute the above step S206.
通过本申请提供的实施例,获取对道路帧序列中的每个道路帧进行车道线重建得到每个道路帧的车道线重建结果,其中,每个道路帧的车道线重建结果包括与每个道路帧对应的车道线曲线;按照第一车道线宽度将与每个道路帧对应的车道线曲线转换成与每个道路帧对应的多边形,其中,与每个道路帧对应的多边形用于表示每个道路帧中的车道线;通过将与道路帧序列中相邻的道路帧对应的多边形进行匹配,对目标道路的车道线进行追踪,得到目标道路的车道线的追踪结果,其中,目标道路是与道路帧序列对应的道路,解决了相关技术中的车道线处理方法,存在由于对道路帧序列中的目标道路的车道线的追踪效率低导致的车道线多帧融合效率低的技术问题,提高了车道线多帧融合效率。Through the embodiments provided by the present application, lane line reconstruction is performed on each road frame in a road frame sequence to obtain a lane line reconstruction result for each road frame, wherein the lane line reconstruction result for each road frame includes a lane line curve corresponding to each road frame; the lane line curve corresponding to each road frame is converted into a polygon corresponding to each road frame according to a first lane line width, wherein the polygon corresponding to each road frame is used to represent the lane line in each road frame; the lane line of the target road is tracked by matching the polygons corresponding to adjacent road frames in the road frame sequence to obtain a tracking result of the lane line of the target road, wherein the target road is a road corresponding to the road frame sequence, thereby solving the technical problem of low efficiency of multi-frame fusion of lane lines caused by low efficiency of tracking lane lines of the target road in the road frame sequence in the lane line processing method in the related art, thereby improving the multi-frame fusion efficiency of lane lines.
可选的,第一转换单元包括:Optionally, the first conversion unit includes:
第一执行模块,用于将每个道路帧分别作为当前道路帧执行以下的处理操作,得到与每个道路帧对应的多边形,其中,与当前道路帧对应的车道线曲线为当前车道线曲线:The first execution module is used to perform the following processing operations on each road frame as a current road frame to obtain a polygon corresponding to each road frame, wherein the lane line curve corresponding to the current road frame is the current lane line curve:
基于当前车道线曲线上的车道线点之间的位置关系,对当前车道线曲线上的车道线点进行抽稀处理,得到抽稀的当前车道线曲线;Based on the positional relationship between lane line points on the current lane line curve, the lane line points on the current lane line curve are thinned out to obtain a thinned current lane line curve;
以抽稀的当前车道线曲线上相邻的车道线点的连线为中心线、以第一车道线宽度为宽度进行多边形构建,得到与当前道路帧对应的多边形。A polygon is constructed with a line connecting adjacent lane line points on the thinned current lane line curve as a center line and a first lane line width as a width to obtain a polygon corresponding to the current road frame.
可选的,第一执行模块包括:Optionally, the first execution module includes:
执行子模块,用于将当前车道线曲线作为待抽稀曲线添加到待抽稀曲线队列中,并从待抽稀曲线队列中依次抽取待抽稀曲线作为当前待抽稀曲线执行以下的处理操作,直到待抽稀曲线队列为空:The execution submodule is used to add the current lane line curve as a curve to be thinned out to the queue of curves to be thinned out, and sequentially extract the curves to be thinned out from the queue of curves to be thinned out as the current curves to be thinned out to perform the following processing operations until the queue of curves to be thinned out is empty:
分别计算当前待抽稀曲线中的车道线点到当前参考直线的距离,其中,当前参考直线为当前待抽稀曲线上的第一个车道线点和当前待抽稀曲线上的最后一个车道线点所在的直线;Calculate the distances from the lane line points in the current thinning curve to the current reference straight line, where the current reference straight line is the straight line where the first lane line point on the current thinning curve and the last lane line point on the current thinning curve are located;
在当前待抽稀曲线中的车道线点中,存在到当前参考直线的距离大于或者等于预设距离阈值的车道线点的情况下,以当前待抽稀曲线中到当前参考直线的距离最大的车道线点为分割点,对当前待抽稀曲线进行曲线分割,并将分割得到的两个曲线分段作为待抽稀曲线添加到待抽稀曲线队列中;If there is a lane line point in the current curve to be thinned whose distance to the current reference line is greater than or equal to the preset distance threshold, the lane line point in the current curve to be thinned whose distance to the current reference line is the largest is used as the segmentation point to segment the current curve to be thinned, and the two curve segments obtained by segmentation are added as the curves to be thinned to the queue of curves to be thinned;
在当前待抽稀曲线中的车道线点到当前参考直线的距离均小于预设距离阈值的情况下,去除当前待抽稀曲线上除了当前待抽稀曲线的第一个车道线点和当前待抽稀曲线的最后一个车道线点以外的其他车道线点,得到抽稀的当前车道线曲线。When the distances from the lane line points in the current curve to be thinned to the current reference straight line are all less than a preset distance threshold, the lane line points on the current curve to be thinned except the first lane line point of the current curve to be thinned and the last lane line point of the current curve to be thinned are removed to obtain the thinned current lane line curve.
可选的,装置还包括:Optionally, the device further comprises:
第二执行单元,用于在按照第一车道线宽度将与每个道路帧对应的车道线曲线转换成与每个道路帧对应的多边形之后,将与每个道路帧对应的多边形分别作为当前多边形执行以下的顶点排序操作,得到与每个道路帧对应的多边形的顶点排序结果:The second execution unit is used for, after converting the lane line curve corresponding to each road frame into a polygon corresponding to each road frame according to the first lane line width, performing the following vertex sorting operation on the polygon corresponding to each road frame as a current polygon to obtain a vertex sorting result of the polygon corresponding to each road frame:
分别确定当前多边形的每个顶点与当前多边形的中心点的连线与预设参考线之间的夹角,得到与当前多边形的每个顶点对应的参考角度;Determine the angles between the lines connecting each vertex of the current polygon and the center point of the current polygon and the preset reference line to obtain a reference angle corresponding to each vertex of the current polygon;
按照对应的参考角度由小到大或者由大到小的顺序对当前多边形的顶点进行排序,得到当前多边形的顶点排序结果;Sort the vertices of the current polygon in order from small to large or from large to small according to the corresponding reference angles to obtain the vertex sorting result of the current polygon;
其中,将与道路帧序列中相邻的道路帧对应的多边形进行匹配是基于与道路帧序列中相邻的道路帧对应的多边形的顶点排序结果执行的。The matching of polygons corresponding to adjacent road frames in the road frame sequence is performed based on the vertex sorting result of the polygons corresponding to adjacent road frames in the road frame sequence.
可选的,第一执行单元包括:Optionally, the first execution unit includes:
第二执行模块,用于将道路帧序列中相邻的道路帧依次作为当前相邻道路帧执行以下的车道线追踪操作,得到目标道路的车道线的追踪结果,其中,当前相邻道路帧中的前一个道路帧为第一当前道路帧,后一个道路帧为第二当前道路帧,与第一当前道路帧对应的多边形中,包括与目标道路的第一车道线对应的第一多边形:The second execution module is used to perform the following lane line tracking operation on adjacent road frames in the road frame sequence as current adjacent road frames in sequence to obtain a lane line tracking result of the target road, wherein the previous road frame in the current adjacent road frame is the first current road frame, the next road frame is the second current road frame, and the polygons corresponding to the first current road frame include a first polygon corresponding to the first lane line of the target road:
计算与第二当前道路帧对应的多边形和第一多边形之间的交并比;calculating an intersection-and-union ratio between a polygon corresponding to a second current road frame and the first polygon;
在与第二当前道路帧对应的多边形中,存在和第一多边形之间的交并比大于或者等于预设交并比阈值的第二多边形的情况下,确定对第一车道线追踪成功,并将第二多边形确定为与第一车道线对应的多边形;If there is a second polygon whose intersection-and-annex ratio with the first polygon is greater than or equal to a preset intersection-and-annex ratio threshold value among the polygons corresponding to the second current road frame, it is determined that the first lane line is tracked successfully, and the second polygon is determined as the polygon corresponding to the first lane line;
在与第二当前道路帧对应的多边形中,不存在和第一多边形之间的交并比大于或者等于预设交并比阈值的多边形的情况下,确定对第一车道线追踪失败。If there is no polygon in the polygons corresponding to the second current road frame whose intersection-and-annex ratio with the first polygon is greater than or equal to a preset intersection-and-annex ratio threshold, it is determined that the tracking of the first lane line has failed.
可选的,装置还包括:Optionally, the device further comprises:
分析单元,用于在通过将与道路帧序列中相邻的道路帧对应的多边形进行匹配,对目标道路的车道线进行追踪之后,在对目标道路的第二车道线追踪完成的情况下,对与第二车道线对应的车道线点集进行主成分分析,得到与第二车道线对应的车道线点集的主方向;an analysis unit, configured to, after tracking the lane line of the target road by matching polygons corresponding to adjacent road frames in the road frame sequence, perform principal component analysis on a lane line point set corresponding to the second lane line when tracking of a second lane line of the target road is completed, to obtain a main direction of the lane line point set corresponding to the second lane line;
第三执行单元,用于沿着与第二车道线对应的车道线点集的主方向对与第二车道线对应的车道线点集进行分段处理,得到一组分段点集;A third execution unit is used to segment the lane line point set corresponding to the second lane line along the main direction of the lane line point set corresponding to the second lane line to obtain a group of segment point sets;
拟合单元,用于对一组分段点集中的每个分段点集进行二阶函数拟合,得到与每个分段点集对应的拟合函数;A fitting unit is used for fitting a second-order function to each segment point set in a group of segment point sets to obtain a fitting function corresponding to each segment point set;
抽取单元,用于根据与每个分段点集对应的拟合函数以及每个分段点集的中心,从每个分段点集中抽取出目标车道线点,得到与第二车道线对应的融合车道线点曲线,其中,融合车道线曲线包含从每个分段点集中抽取出的目标车道线点;an extraction unit, configured to extract a target lane line point from each segment point set according to a fitting function corresponding to each segment point set and a center of each segment point set, so as to obtain a fused lane line point curve corresponding to the second lane line, wherein the fused lane line curve includes the target lane line point extracted from each segment point set;
第二转换单元,用于按照第二车道线宽度将融合车道线曲线转换成与第二车道线对应的多边形,得到第二车道线的多帧融合结果。The second conversion unit is used to convert the fused lane line curve into a polygon corresponding to the second lane line according to the width of the second lane line, so as to obtain a multi-frame fusion result of the second lane line.
可选的,装置还包括:Optionally, the device further comprises:
抽稀单元,用于在按照第二车道线宽度将融合车道线曲线转换成与第二车道线对应的多边形之前,对融合车道线曲线上的目标车道线点进行抽稀处理,得到抽稀的融合车道线曲线。The thinning unit is used to perform thinning processing on the target lane line points on the fused lane line curve before converting the fused lane line curve into a polygon corresponding to the second lane line according to the second lane line width to obtain a thinned fused lane line curve.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
本发明的实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
在一个示例性实施例中,上述计算机可读存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
本发明的实施例还提供了一种电子设备,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
在一个示例性实施例中,上述电子设备还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。In an exemplary embodiment, the electronic device may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
本实施例中的具体示例可以参考上述实施例及示例性实施方式中所描述的示例,本实施例在此不再赘述。For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
根据本申请实施例的又一个方面,提供了一种计算机程序产品,该计算机程序产品包括计算机程序/指令,该计算机程序/指令包含用于执行流程图所示的方法的程序代码。在这样的实施例中,参考图8,该计算机程序可以通过通信部分809从网络上被下载和安装,和/或从可拆卸介质811被安装。在该计算机程序被中央处理器801执行时,执行本申请实施例提供的各种功能。上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。According to another aspect of an embodiment of the present application, a computer program product is provided, the computer program product comprising a computer program/instruction, the computer program/instruction comprising a program code for executing the method shown in the flowchart. In such an embodiment, with reference to FIG8, the computer program can be downloaded and installed from the network via a communication portion 809, and/or installed from a removable medium 811. When the computer program is executed by a central processing unit 801, various functions provided by the embodiment of the present application are executed. The above-mentioned serial numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.
参考图8,图8是根据本申请实施例的一种可选的电子设备的计算机系统的结构框图。Refer to FIG. 8 , which is a structural block diagram of a computer system of an optional electronic device according to an embodiment of the present application.
图8示意性地示出了用于实现本申请实施例的电子设备的计算机系统结构框图。如图8所示,计算机系统800包括中央处理器801(Central Processing Unit,CPU),其可以根据存储在只读存储器802(Read-Only Memory,ROM)中的程序或者从存储部分808加载到随机访问存储器803(Random Access Memory,RAM)中的程序而执行各种适当的动作和处理。在随机访问存储器803中,还存储有系统操作所需的各种程序和数据。中央处理器801、在只读存储器802以及随机访问存储器803通过总线804彼此相连。输入/输出接口805(Input/Output接口,即I/O接口)也连接至总线804。Fig. 8 schematically shows a computer system structure block diagram of an electronic device for implementing an embodiment of the present application. As shown in Fig. 8, computer system 800 includes a central processing unit 801 (Central Processing Unit, CPU), which can perform various appropriate actions and processes according to the program stored in a read-only memory 802 (Read-Only Memory, ROM) or the program loaded from a storage part 808 into a random access memory 803 (Random Access Memory, RAM). In the random access memory 803, various programs and data required for system operation are also stored. The central processing unit 801, the read-only memory 802 and the random access memory 803 are connected to each other through a bus 804. An input/output interface 805 (Input/Output interface, i.e., an I/O interface) is also connected to the bus 804.
以下部件连接至输入/输出接口805:包括键盘、鼠标等的输入部分806;包括诸如阴极射线管(Cathode Ray Tube,CRT)、液晶显示器(Liquid Crystal Display,LCD)等以及扬声器等的输出部分807;包括硬盘等的存储部分808;以及包括诸如局域网卡、调制解调器等的网络接口卡的通信部分809。通信部分809经由诸如因特网的网络执行通信处理。驱动器810也根据需要连接至输入/输出接口805。可拆卸介质811,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器810上,以便于从其上读出的计算机程序根据需要被安装入存储部分808。The following components are connected to the input/output interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a local area network card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input/output interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed so that a computer program read therefrom is installed into the storage section 808 as needed.
特别地,根据本申请的实施例,各个方法流程图中所描述的过程可以被实现为计算机软件程序。例如,本申请的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分809从网络上被下载和安装,和/或从可拆卸介质811被安装。在该计算机程序被中央处理器801执行时,执行本申请的系统中限定的各种功能。In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and/or installed from the removable medium 811. When the computer program is executed by the central processor 801, various functions defined in the system of the present application are executed.
需要说明的是,图8示出的电子设备的计算机系统800仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。It should be noted that the computer system 800 of the electronic device shown in FIG. 8 is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410850183.XACN118710833A (en) | 2024-06-27 | 2024-06-27 | Lane line processing method and device, storage medium and electronic device |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410850183.XACN118710833A (en) | 2024-06-27 | 2024-06-27 | Lane line processing method and device, storage medium and electronic device |
| Publication Number | Publication Date |
|---|---|
| CN118710833Atrue CN118710833A (en) | 2024-09-27 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410850183.XAPendingCN118710833A (en) | 2024-06-27 | 2024-06-27 | Lane line processing method and device, storage medium and electronic device |
| Country | Link |
|---|---|
| CN (1) | CN118710833A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119741320A (en)* | 2025-03-03 | 2025-04-01 | 智道网联科技(北京)有限公司 | Lane grouping method, device, electronic device and computer-readable storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119741320A (en)* | 2025-03-03 | 2025-04-01 | 智道网联科技(北京)有限公司 | Lane grouping method, device, electronic device and computer-readable storage medium |
| Publication | Publication Date | Title |
|---|---|---|
| US11380002B2 (en) | Map element extraction method and apparatus, and server | |
| CN114758337B (en) | Semantic instance reconstruction method, device, equipment and medium | |
| CN114626169B (en) | Traffic network optimization method, device, equipment, readable storage medium and product | |
| CN112330815B (en) | Three-dimensional point cloud data processing method, device and equipment based on obstacle fusion | |
| CN112509126B (en) | Method, device, equipment and storage medium for detecting three-dimensional object | |
| CN113298910A (en) | Method, apparatus and storage medium for generating traffic sign line map | |
| CN112651997A (en) | Map construction method, electronic device, and storage medium | |
| CN114283343B (en) | Map updating method, training method and device based on remote sensing satellite image | |
| CN118710833A (en) | Lane line processing method and device, storage medium and electronic device | |
| CN113723405B (en) | Method and device for determining regional outline and electronic equipment | |
| CN108573510B (en) | Grid map vectorization method and device | |
| CN116309832A (en) | A Mobile Robot Relocalization Method Based on Global Descriptor | |
| CN115170815A (en) | Method, device and medium for processing visual task and training model | |
| CN114186010A (en) | High-precision map generation method, related device and computer program product | |
| US20220333931A1 (en) | Road network data processing method, electronic device, and storage medium | |
| CN112148033A (en) | Method, device and equipment for determining unmanned aerial vehicle air route and storage medium | |
| CN114166238A (en) | Lane line identification method and device and electronic equipment | |
| CN112988932A (en) | High-precision map labeling method, device, equipment, readable storage medium and product | |
| CN116524372A (en) | Method, system, electronic equipment and storage medium for acquiring ground object information | |
| CN113591847B (en) | A vehicle positioning method, device, electronic equipment and storage medium | |
| CN118015203A (en) | A three-dimensional curb rendering method, device and system | |
| CN116150296A (en) | Road network skeleton generation method and device, electronic equipment and storage medium | |
| CN116229577A (en) | Three-dimensional human body pose estimation method and device based on RGBD multi-mode information | |
| CN114897931A (en) | Tracking method and device of image feature points, electronic equipment and program product | |
| CN114674328A (en) | Map generation method, device, electronic device, storage medium, and vehicle |
| 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 |