Method and System for Generating Road Element Vectors
By projecting point cloud data to a two-dimensional plane and semantic segmentation, road feature vectors are generated, which solves the problem of large errors in the existing technology and realizes high-precision road feature vector generation.
Patent Information
- Application Number
- CN202210233930.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-09
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-03-09
AI Technical Summary
In the prior art, due to data collection accuracy and angle limitations, road element vector generation errors are large, which cannot meet the accuracy requirements of high-precision maps.
By obtaining point cloud data and original images, projecting them to a two-dimensional plane and semantic segmentation, vectorizing them with point cloud data and semantic segmentation results, and generating road feature vectors.
It improves the generation accuracy of road element vectors, ensures vector integrity and data redundancy, and meets the accuracy requirements of high-precision maps.
Smart Images

Figure CN114693836B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent navigation, and in particular, to a method and system for generating road element vectors. Background Art
[0002] In order to digitize various road elements in the real world (such as lane lines, stop lines, zebra crossings, etc.), high-precision maps can be made using the data collected by driverless vehicles and high-precision map collection vehicles. However, due to the limitations of the data collection accuracy and collection angle, the generation error of the existing road element vectors is relatively large, which does not meet the accuracy requirements of high-precision maps.
[0003] In view of the above problems, no effective solution has been proposed yet. Summary of the Invention
[0004] Embodiments of the present invention provide a method and system for generating road element vectors to at least solve the technical problem of relatively large generation errors of road element vectors in related technologies.
[0005] According to one aspect of the embodiments of the present invention, a method for generating road element vectors is provided, including: obtaining point cloud data and an original image collected in the same area; projecting the point cloud data onto a two-dimensional plane to obtain a target image corresponding to the point cloud data; respectively performing semantic segmentation on road elements in the original image and the target image to obtain semantic segmentation results; and vectorizing the road elements based on the point cloud data and the semantic segmentation results to obtain road element vectors.
[0006] According to another aspect of the embodiments of the present invention, a method for generating road element vectors is further provided, including: a cloud server receiving point cloud data and an original image collected in the same area; the cloud server projecting the point cloud data onto a two-dimensional plane to obtain a target image corresponding to the point cloud data; the cloud server respectively performing semantic segmentation on road elements in the original image and the target image to obtain semantic segmentation results; the cloud server vectorizing the road elements based on the point cloud data and the semantic segmentation results to obtain road element vectors; and the cloud server outputting the road element vectors.
[0007] According to another aspect of the embodiments of the present invention, a storage medium is further provided, where the storage medium includes a stored program, and when the program runs, it controls the device where the storage medium is located to execute the method for generating road element vectors in the above embodiments.
[0008] According to another aspect of the embodiments of the present invention, an electronic terminal is further provided, including: a memory; a processor connected to the memory, where the processor is used to run a program, and when the program runs, it executes the method for generating road element vectors in the above embodiments.
[0009] According to another aspect of the embodiments of the present invention, a system for generating a road element vector is further provided, including: a processor; and a memory connected to the processor for providing instructions for the processor to process the method for generating a road element vector in the above embodiments.
[0010] In the embodiments of the present invention, after obtaining the point cloud data and the original image in the same area, the point cloud data can be projected onto a two-dimensional plane to obtain a target image, and semantic segmentation is respectively performed on the original image and the target image to obtain semantic segmentation results. Thus, the purpose of vectorizing road elements can be achieved based on the point cloud data and the semantic segmentation results. It is easy to notice that by projecting the point cloud data into a two-dimensional plane image and then performing semantic segmentation to extract road elements, the road element vector not only has three-dimensional information but also can avoid the problem of missing road elements in the original image due to objective factors such as occlusion and observation limitations, meet the accuracy requirements of high-precision maps, achieve the technical effect of ensuring the integrity of the road element vector, increasing data redundancy, and improving the generation accuracy of the road element vector, and further solve the technical problem of large generation errors of road element vectors in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of this application, and the schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:
[0012] Figure 1 is a hardware structure block diagram of a computer terminal for implementing a method for generating a road element vector according to an embodiment of the present invention;
[0013] Figure 2 is a flowchart of a method for generating a road element vector according to an embodiment of the present invention;
[0014] Figure 3 is a flowchart of a method for generating a stop line vector according to an embodiment of the present invention;
[0015] Figure 4 is a flowchart of a method for generating a lane line vector according to an embodiment of the present invention;
[0016] Figure 5 is a flowchart of a method for vectorizing a stop line according to an embodiment of the present invention;
[0017] Figure 6 is a flowchart of a method for vectorizing a lane line according to an embodiment of the present invention;
[0018] Figure 7 is a flowchart of another method for generating a road element vector according to an embodiment of the present invention;
[0019] Figure 8 is a schematic diagram of a generating device for road element vectors according to an embodiment of the present invention;
[0020] Figure 9 is a schematic diagram of another generating device for road element vectors according to an embodiment of the present invention;
[0021] Figure 10 is a structural block diagram of a computer terminal according to an embodiment of the present invention. Detailed implementation manners
[0022] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0023] 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 do not necessarily need to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present invention described here can be implemented in an order different from those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those clearly listed steps or units, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0024] First, some nouns or terms that appear in the process of describing the embodiments of the present application are applicable to the following explanations:
[0025] High-precision acquisition vehicle: A professional acquisition device for driverless high-precision maps, including lidar, cameras, GNSS (Global Navigation Satellite System) receivers, IMUs (Inertial Measurement Unit), DMIs (Distance Measuring Instrument), control and storage units, and vehicles.
[0026] Raster map: It can refer to a grid map composed of grids. By gridifying the three-dimensional lidar point cloud data, a two-dimensional raster map can be obtained.
[0027] Lane line: It can be a demarcation line used to distinguish lanes, which can be a white dotted line, a white solid line, a yellow double solid line, a yellow double dotted line, etc., indicating the driving position of vehicles.
[0028] Stop line: It can refer to a traffic sign at a signalized intersection, which can be a white solid line, indicating the parking position of vehicles waiting for release.
[0029] Traditional solutions for extracting road elements using lidar point clouds and panoramic photos mainly rely on the observation of photos, and often result in incomplete or missing vector road elements due to problems such as photo occlusion and camera observation range limitations; while computer vision solutions for extracting road elements using images and trajectories rely on the accuracy of trajectories and camera observations, and the resulting vector errors are extremely large, often not meeting the accuracy requirements of high-precision maps.
[0030] To solve the problem of automatically generating vector road elements of high-precision maps for driverless vehicles and high-precision map acquisition vehicles, this application provides a method for automatically generating vector road elements of high-precision maps.
[0031] Embodiment 1
[0032] According to an embodiment of the present invention, a method for generating vector road elements is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0033] The method embodiment provided by the first embodiment of this application can be executed on a mobile terminal, a computer terminal, or a similar computing device. Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing the method for generating vector road elements is shown. As Figure 1 shown, the computer terminal 10 (or mobile device 10) can include one or more (shown as 102a, 102b,..., 102n in the figure) processors (the processor can include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it can also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which can be included as one of the ports of the BUS bus), a network interface, a power supply, and / or a camera. Those of ordinary skill in the art can understand, Figure 1The structure shown is only schematic and does not limit the structure of the above electronic device. For example, the computer terminal 10 may further include more or fewer components than those shown in Figure 1 or have a different configuration from that shown in Figure 1 .
[0034] It should be noted that the above one or more processors and / or other data processing circuits can generally be referred to as "data processing circuits" herein. The data processing circuit can be embodied in software, hardware, firmware, or any combination thereof, in whole or in part. In addition, the data processing circuit can be a single independent processing module, or incorporated in whole or in part into any one of the other elements in the computer terminal 10 (or mobile device). As involved in the embodiments of the present application, the data processing circuit is a kind of processor control (such as the selection of a variable resistance terminal path connected to an interface).
[0035] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage devices corresponding to the method for generating road element vectors in the embodiments of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implements the above method for generating road element vectors. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal 10 through a network. Examples of the above network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and combinations thereof.
[0036] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include the wireless network provided by the communication provider of the computer terminal 10. In one instance, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0037] The display can be, for example, a touch-screen liquid crystal display (LCD), which enables the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0038] It should be noted here that in some alternative embodiments, the above Figure 1The computer device (or mobile device) shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware elements and software elements. It should be noted that Figure 1 is only an example of a specific concrete instance and is intended to illustrate the types of components that may exist in the above computer device (or mobile device).
[0039] Under the above operating environment, the present application provides a method for generating a vector of road elements as Figure 2 shown. Figure 2 is a flowchart of a method for generating a vector of road elements according to an embodiment of the present invention. As Figure 2 shown, the method may include the following steps:
[0040] Step S202, obtaining point cloud data and original images collected in the same area.
[0041] The point cloud data in the above steps may be laser point clouds collected by a driverless vehicle or a high-precision map collection vehicle through a lidar. The point cloud data has the advantages of depth information and high ranging accuracy; the original images may be images collected by a driverless vehicle or a high-precision map collection vehicle through a camera, and have the advantages of dense perception and long range. The same area in the above steps may be an area where a high-precision map needs to be generated, and this area may be preset by the user.
[0042] In order to improve the generation accuracy of the vector of road elements, in an embodiment of the present application, the advantages of the point cloud data and the original images may be combined, and the point cloud data and the original images may be fused to generate a vector of road elements. In an optional embodiment, data may be collected in the above area by a driverless vehicle or a high-precision map collection vehicle, so that point cloud data and original images collected in the same area can be obtained; in another optional embodiment, data may be collected in different areas by a driverless vehicle or a high-precision map collection vehicle, and then the point cloud data and the original images may be associated, and then the point cloud data and the original images in the same area may be extracted.
[0043] In order to improve the accuracy and efficiency in the subsequent processing process, after obtaining the point cloud data and the original images, preprocessing may be performed to eliminate incorrect point clouds or images with low accuracy and irrelevant to road elements.
[0044] Step S204, projecting the point cloud data onto a two-dimensional plane to obtain a target image corresponding to the point cloud data.
[0045] The target image in the above steps may be a two-dimensional grid image, and the size of each grid and the number of grids in the image may be preset by the user.
[0046] Since point cloud data belongs to three-dimensional data while the original image belongs to two-dimensional data, in order to fuse point cloud data and the original data, in an alternative embodiment, an initial raster image is first generated according to user settings, and then the point cloud data is projected onto the two-dimensional plane corresponding to the initial raster image based on the spatial position relationship, so that the corresponding two-dimensional raster image can be obtained.
[0047] It should be noted that the above projection process is a process of converting three-dimensional point cloud data into a two-dimensional image. Therefore, it can be considered that the depth information in the three-dimensional point cloud data is discarded, and then based on the spatial coordinates of the other two dimensions, the information of the other two dimensions is corresponding to each raster in the two-dimensional raster image.
[0048] Step S206: Perform semantic segmentation on the road elements in the original image and the target image respectively to obtain the semantic segmentation results.
[0049] The road elements in the above steps can be elements for generating a high-precision map, and can include: linear elements and non-linear elements. Among them, the linear elements can be lane lines, etc., but are not limited to this. The non-linear elements can be stop lines, zebra crossings, turning arrows, etc., but are not limited to this. In the embodiments of the present application, the lane line and the stop line are taken as examples for illustration respectively. The semantic segmentation results in the above steps can be the results of annotating the road elements in the original image and the target image. Here, the annotation can refer to pixel-level annotation, that is, determining whether each pixel in the two images belongs to the road element. Therefore, the result of semantic segmentation of the original image can be represented by the original image Mask, and the result of semantic segmentation of the target image can be represented by the target image Mask.
[0050] In an alternative embodiment, semantic segmentation algorithms provided in related technologies can be used to process the original image and the target image respectively. The road element information can be extracted from the original image, and the road element information can be extracted from the target image. For example, in the embodiments of the present application, the original image and the target image are processed by a pre-trained semantic segmentation model.
[0051] Step S208: Vectorize the road elements based on the point cloud data and the semantic segmentation results to obtain the road element vectors.
[0052] In an alternative embodiment, the point cloud data is discrete data points in three-dimensional space, while the road elements are linear or non-linear elements, often straight lines or curves. In addition, the semantic segmentation results respectively represent the pixel ranges in the original image and the target image and in the point cloud data that belong to the road elements. On this basis, the point cloud in the point cloud data that belongs to this pixel range can be clustered and fitted to achieve the purpose of vectorization, so as to obtain the road element vectors.
[0053] For example, taking the method for generating a stop line vector as shown in Figure 3 as an example for illustration, as shown in Figure 3 the method may include the following steps:
[0054] Step S302, the high-precision map acquisition vehicle acquires point cloud data and original images, performs preprocessing, and associates the point cloud data and the original images;
[0055] Step S304, project the point cloud data within a certain range (i.e., the same area mentioned above) onto a plane to obtain a two-dimensional grid map (i.e., the target image mentioned above);
[0056] Step S306, respectively extract the stop line feature information in the original image and the two-dimensional grid map through a semantic segmentation model to obtain a semantic segmentation result;
[0057] Step S308, perform clustering on the point cloud data according to the semantic segmentation result, perform lane line vectorization, and obtain a stop line vector.
[0058] For example, taking the method for generating a lane line vector as shown in Figure 4 as an example for illustration, as shown in Figure 4 the method may include the following steps:
[0059] Step S402, the high-precision map acquisition vehicle acquires point cloud data and original images, performs preprocessing, and associates the point cloud data and the original images;
[0060] Step S404, project the point cloud data within a certain range (i.e., the same area mentioned above) onto a plane to obtain a two-dimensional grid map (i.e., the target image mentioned above);
[0061] Step S406, respectively extract the lane line feature information in the original image and the two-dimensional grid map through a semantic segmentation model to obtain a semantic segmentation result;
[0062] Step S408, perform lane line vectorization according to the point cloud data and the semantic segmentation result to obtain a lane line vector.
[0063] Through the solution provided by the above embodiments of the present application, after obtaining the point cloud data and the original image in the same area, the point cloud data can be projected onto a two-dimensional plane to obtain a target image, and semantic segmentation is performed on the original image and the target image respectively to obtain semantic segmentation results. Thus, the purpose of vectorizing road elements can be achieved based on the point cloud data and the semantic segmentation results. It is easy to notice that by projecting the point cloud data into a two-dimensional plane image and then performing semantic segmentation to extract road elements, the road element vector not only has three-dimensional information but also can avoid the problem of missing road elements in the original image due to objective factors such as occlusion and observation limitations, meet the accuracy requirements of high-precision maps, achieve the technical effect of ensuring the integrity of road element vectors, increasing data redundancy, and improving the generation accuracy of road element vectors, and further solve the technical problem of large generation errors of road element vectors in the related art.
[0064] In the above embodiments of the present application, the semantic segmentation results may include: a first result corresponding to the original image and a second result corresponding to the target image. Among them, vectorizing the road elements based on the point cloud data and the semantic segmentation results to obtain road element vectors includes: performing pixel clustering on the first result and the second result respectively to obtain a first pixel range and a second pixel range corresponding to the road elements; respectively clustering the point cloud data based on the first pixel range and the second pixel range to obtain a first point cloud and a second point cloud corresponding to the road elements; and fitting the first point cloud and the second point cloud to generate road element vectors.
[0065] In an alternative embodiment, the distances of the road element pixels in the first result and the second result can be respectively determined to determine the pixel ranges corresponding to the road elements in different images, and then the point cloud data is projected onto the first result and the second result respectively to determine the point cloud falling within the pixel range, and clustering is performed according to the spatial relationship. Finally, the clustered road element point cloud is fitted to generate road element vectors.
[0066] For linear elements, the vectorization of linear elements requires fitting the point cloud data into a curve. In an alternative embodiment, the original image and the target image can be processed separately. Clustering is performed on the original image and a linear element vector is fitted. At the same time, clustering is performed on the target image and a linear element vector is also fitted. Curve fitting is performed on multiple linear element vectors within the same range to obtain a unique linear element vector.
[0067] For non-linear elements, the vectorization of non-linear elements also requires fitting the point cloud data to a curve. In an alternative embodiment, the original image and the target image can be processed separately. The original image is clustered to obtain a clustered point cloud set. At the same time, the target image is clustered to obtain a clustered point cloud set as well. The two point cloud sets are directly fused into a single point cloud set for fitting, and the vertex coordinates of the bounding box of the non-linear element can be extracted, and the non-linear element vector can be formed based on the above coordinates.
[0068] In the above embodiments of the present application, the point cloud data is clustered based on the first pixel range and the second pixel range respectively to obtain the first point cloud and the second point cloud corresponding to the road element, including: projecting the point cloud data onto the first result and the second result respectively to obtain the first projection image and the second projection image; determining the first target pixels within the first pixel range in the first projection image and the second target pixels within the second pixel range in the second projection image; clustering the point cloud corresponding to the first target pixels and the point cloud corresponding to the second target pixels respectively based on the spatial relationship to obtain the first point cloud and the second point cloud.
[0069] In an alternative embodiment, the original image and the target image are different, but the entire processing flow is the same. Therefore, the same processing method can be used to process the two images separately to obtain the corresponding two results. Among them, the clustering process of the point cloud data is as follows: project the point cloud data on the semantic segmentation result (i.e., the first result or the second result above), that is, the Mask image, mark the point cloud falling within the pixel range of the road element, and cluster according to the spatial relationship to obtain the clustered road element point cloud (i.e., the first point cloud or the second point cloud above). Among them, all the pixels within the pixel range of the road element in the projection image (i.e., the first projection image or the second projection image above) can be determined first. Since there is a corresponding relationship between the point cloud data and the projection image, the point cloud corresponding to all the pixels within the pixel range of the road element can be determined to obtain the point cloud falling within the pixel range of the road element.
[0070] In the above embodiments of the present application, when the road element includes non-linear elements, fitting the first point cloud and the second point cloud to generate a road element vector includes: fusing the first point cloud and the second point cloud based on the spatial relationship to obtain a target point cloud; fitting the target point cloud to obtain the bounding box coordinates of the non-linear element; generating a road element vector based on the bounding box coordinates.
[0071] The non-linear elements in the above steps may be road elements that cannot be represented by straight lines or curves in the map. For example, non-linear elements may be stop lines, zebra crossings, turn arrows, etc., but are not limited thereto. For non-linear elements, corresponding non-linear element vectors may be generated by the bounding box of the non-linear elements. The bounding box coordinates in the above steps may refer to the coordinates of the bounding box vertices. The bounding box is usually a rectangle, so the bounding box coordinates may be the coordinates of the four vertices of the rectangle.
[0072] In an optional embodiment, for non-linear elements, the first point cloud and the second point cloud obtained by clustering can be fused to obtain a target point cloud, that is, the target point cloud can be obtained by obtaining the union of the first point cloud and the second point cloud. Then, the target point cloud can be fitted by the RANSAC point cloud plane segmentation method, the coordinates of the bounding box vertices can be extracted, and the non-linear element vector can be constructed based on the coordinates of the bounding box vertices.
[0073] For example, Figure 5 The stop line vectorization method shown in FIG. Figure 5 As shown, the method may include the following steps:
[0074] Step S502, clustering the stop line pixels in the original image semantic segmentation Mask and the grid image semantic segmentation Mask respectively, and marking the pixel range corresponding to the stop line;
[0075] Step S504, projecting the point cloud data onto the original image semantic segmentation Mask and the grid map semantic segmentation Mask, marking the point clouds falling within the pixel range of the stop line, and clustering them according to the spatial relationship;
[0076] Step S506, the clustered stop line point cloud is fused, and the fused point cloud is fitted to extract the fixed point coordinates of the stop line bounding box to form a vector.
[0077] It should be noted that, before step S506, the stop line point cloud after clustering may be denoised, and the denoised stop line point cloud may be fitted.
[0078] In the above-mentioned embodiment of the present application, when the road element includes a linear element, the first point cloud and the second point cloud are fitted to generate a road element vector, including: fitting the first point cloud and the second point cloud respectively to generate multiple center line vectors of the linear element; and performing curve fitting on the multiple center line vectors at the same position according to the spatial position relationship to obtain the road element vector.
[0079] The linear elements in the above steps can be road elements that can be represented by straight lines or curves in a map. For example, the linear elements can be lane lines, etc., but are not limited to this. For the linear elements, the road element vectors can be generated through a set of curves.
[0080] In an alternative embodiment, for the linear elements, curve fitting can be performed respectively on the first point cloud and the second point cloud obtained by clustering through fitting methods such as the least squares method and the RANSAC method, to obtain the center line vector corresponding to the first point cloud and the center line vector corresponding to the second point cloud, that is, to obtain multiple center line vectors. Then, curve fitting is performed on the multiple center line vectors at the same position, that is, the center line vector corresponding to the first point cloud and the center line vector corresponding to the second point cloud are curve-fitted to obtain a unique linear element vector.
[0081] For example, taking Figure 6 the lane line vectorization method shown as an example for illustration, as Figure 6 shown, this method may include the following steps:
[0082] Step S602: Cluster the lane line pixels in the original image semantic segmentation Mask and the raster image semantic segmentation Mask respectively, and mark the pixel ranges corresponding to the lane lines.
[0083] Step S604: Project the point cloud data onto the original image semantic segmentation Mask and the raster image semantic segmentation Mask, mark the point cloud falling within the lane line pixel range, and perform clustering according to the spatial relationship.
[0084] Step S606: Fit the lane line point cloud after clustering respectively, and extract the lane line center line vector.
[0085] Step S608: According to the spatial position relationship, fuse the multiple lane line vectors at the same position, and perform curve fitting to obtain a unique lane line vector.
[0086] In the above embodiments of the present application, semantic segmentation is performed on the road elements in the original image and the target image respectively to obtain the semantic segmentation results, including: performing semantic segmentation on the original image and the target image respectively through the semantic segmentation model to obtain the semantic segmentation results.
[0087] The semantic segmentation model in the above steps can be a model provided in the related art, or a model trained according to the recognition requirements of road elements. In the actual usage scenario, it can be selected and set according to the needs of different users.
[0088] In an alternative embodiment, the original image can be semantically segmented through a semantic segmentation model to obtain a first result corresponding to the original image. At the same time, the target image can be semantically segmented through the semantic segmentation model to obtain a second result corresponding to the target image. Thus, the first result and the second result constitute the above-mentioned semantic segmentation result. By using the semantic segmentation model for semantic segmentation, the effect of improving the efficiency and accuracy of semantic segmentation can be achieved.
[0089] In the above embodiment of the present application, the method further includes: segmenting the point cloud data to obtain a plurality of point cloud blocks; extracting the point cloud blocks containing road elements from the plurality of point cloud blocks to obtain target point cloud blocks; and projecting the target point cloud blocks onto a two-dimensional plane to obtain a target image.
[0090] In an alternative embodiment, due to the large amount of data in the point cloud data, there are problems of low processing efficiency and low accuracy in directly performing operations such as mapping, clustering, and fitting on the point cloud data. To solve this problem, after obtaining the point cloud data, first, according to the requirements of the customer for processing efficiency and accuracy, the point cloud data can be segmented to obtain a plurality of point cloud blocks. Then, the point cloud blocks that do not contain road elements in the plurality of point cloud blocks are deleted, and only the point cloud blocks that contain road elements are retained to obtain target point cloud blocks. At this time, the number of target point cloud blocks is much smaller than the point cloud data. Then, the point cloud data contained in the target point cloud blocks can be projected onto a two-dimensional plane to obtain a two-dimensional grid map.
[0091] In the above embodiment of the present application, after vectorizing the road elements based on the point cloud data and the semantic segmentation result to obtain the road element vector, the method further includes: generating a target map based on the road element vector.
[0092] The target map in the above steps can be a high-precision map, and the accuracy of this map can be set by the user.
[0093] In an alternative embodiment, a usable high-precision map can be generated based on the generated road element vector. For example, taking the road element vector including a stop line vector as an example, the method may further include the following steps: generating a usable high-precision map based on the vertex coordinates of the bounding box of the stop line after fitting. Another example, taking the road element vector including a lane line vector as an example, the method may further include the following steps: generating a usable high-precision map based on the lane line vector after fitting by calculating information such as the curvature and slope of the lane line.
[0094] In the above embodiment of the present application, when the road elements include linear elements, generating a target map based on the road element vector includes: determining the physical parameter information of the road element vector; and generating a target map based on the road element vector and the physical parameter information.
[0095] The physical parameter information in the above steps may be information such as the curvature and slope of the linear feature, but is not limited thereto.
[0096] In an alternative embodiment, after generating the linear feature vector, physical parameter information such as the curvature and slope of the linear feature vector can be calculated, and a usable high-precision map can be generated.
[0097] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0098] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it 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, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0099] Embodiment 2
[0100] According to an embodiment of the present invention, there is also provided a method for generating a road element vector. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And, although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0101] Figure 7 is a flowchart of another method for generating a road element vector according to an embodiment of the present invention. As Figure 7 shown, the method may include the following steps:
[0102] Step S702, the cloud server receives the point cloud data and the original image collected in the same area;
[0103] Step S704, the cloud server projects the point cloud data onto a two-dimensional plane to obtain a target image corresponding to the point cloud data;
[0104] Step S706: The cloud server performs semantic segmentation on the road elements in the original image and the target image respectively to obtain the semantic segmentation results.
[0105] Step S708: The cloud server vectorizes the road elements based on the point cloud data and the semantic segmentation results to obtain the road element vectors.
[0106] Step S710: The cloud server outputs the road element vectors.
[0107] In an optional embodiment, the cloud server may send the road element vectors to the client for the client to display to the customer for viewing, so that the customer can confirm the road element vectors to ensure the accuracy of the subsequent generated high-precision map.
[0108] In the above embodiments of the present application, the semantic segmentation results may include: a first result corresponding to the original image and a second result corresponding to the target image. Among them, vectorizing the road elements based on the point cloud data and the semantic segmentation results to obtain the road element vectors includes: performing pixel clustering on the first result and the second result respectively to obtain a first pixel range and a second pixel range corresponding to the road elements; clustering the point cloud data based on the first pixel range and the second pixel range respectively to obtain a first point cloud and a second point cloud corresponding to the road elements; fitting the first point cloud and the second point cloud to generate the road element vectors.
[0109] In the above embodiments of the present application, clustering the point cloud data based on the first pixel range and the second pixel range respectively to obtain a first point cloud and a second point cloud corresponding to the road elements includes: projecting the point cloud data onto the first result and the second result respectively to obtain a first projection image and a second projection image; determining a first target pixel within the first pixel range in the first projection image and a second target pixel within the second pixel range in the second projection image; clustering the point clouds corresponding to the first target pixel and the second target pixel respectively based on the spatial relationship to obtain the first point cloud and the second point cloud.
[0110] In the above embodiments of the present application, when the road elements include non-linear elements, fitting the first point cloud and the second point cloud to generate the road element vectors includes: fusing the first point cloud and the second point cloud based on the spatial relationship to obtain a target point cloud; fitting the target point cloud to obtain the bounding box coordinates of the non-linear elements; generating the road element vectors based on the bounding box coordinates.
[0111] In the above embodiments of the present application, when the road element includes a linear element, fitting the first point cloud and the second point cloud to generate a road element vector includes: respectively fitting the first point cloud and the second point cloud to generate multiple center line vectors of the linear element; according to the spatial position relationship, performing curve fitting on the multiple center line vectors at the same position to obtain the road element vector.
[0112] In the above embodiments of the present application, respectively performing semantic segmentation on the road elements in the original image and the target image to obtain a semantic segmentation result includes: respectively performing semantic segmentation on the original image and the target image through a semantic segmentation model to obtain the semantic segmentation result.
[0113] In the above embodiments of the present application, the method further includes: the cloud server segmenting the point cloud data to obtain multiple point cloud blocks; the cloud server extracting the point cloud blocks containing road elements from the multiple point cloud blocks to obtain target point cloud blocks; the cloud server projecting the target point cloud blocks onto a two-dimensional plane to obtain a target image.
[0114] In the above embodiments of the present application, after vectorizing the road elements based on the point cloud data and the semantic segmentation result to obtain a road element vector, the method further includes: the cloud server generating a target map based on the road element vector; the cloud server outputting the target map.
[0115] In the above embodiments of the present application, when the road element includes a linear element, generating a target map based on the road element vector includes: determining the physical parameter information of the road element vector; generating a target map based on the road element vector and the physical parameter information.
[0116] It should be noted that the preferred implementation schemes involved in the above embodiments of the present application are the same as the schemes, application scenarios, and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.
[0117] Embodiment 3
[0118] According to an embodiment of the present invention, there is also provided a road element vector generation device for implementing the road element vector generation method in the above Embodiment 1, as Figure 8 shown, the device 800 includes: an acquisition module 802, a projection module 804, a semantic segmentation module 806, and a vectorization module 808.
[0119] Among them, the acquisition module 802 is used to acquire the point cloud data and the original image collected in the same area; the projection module 804 is used to project the point cloud data onto a two-dimensional plane to obtain a target image corresponding to the point cloud data; the semantic segmentation module 806 is used to perform semantic segmentation on the road elements in the original image and the target image respectively to obtain a semantic segmentation result; the vectorization module 808 is used to vectorize the road elements based on the point cloud data and the semantic segmentation result to obtain a road element vector.
[0120] It should be noted here that the above acquisition module 802, projection module 804, semantic segmentation module 806, and vectorization module 808 correspond to steps S202 to S208 in Embodiment 1. The examples and application scenarios implemented by the four modules and the corresponding steps are the same, but are not limited to the content disclosed in the above Embodiment 1. It should be noted that the above modules, as part of the device, can run in the computer terminal 10 provided in Embodiment 1.
[0121] In the above embodiments of the present application, the semantic segmentation result may include: a first result corresponding to the original image and a second result corresponding to the target image. Among them, the vectorization module includes: a pixel clustering unit, a point cloud clustering unit, and a fitting unit.
[0122] Among them, the pixel clustering unit is used to perform pixel clustering on the first result and the second result respectively to obtain a first pixel range and a second pixel range corresponding to the road element; the point cloud clustering unit is used to cluster the point cloud data based on the first pixel range and the second pixel range respectively to obtain a first point cloud and a second point cloud corresponding to the road element; the fitting unit is used to fit the first point cloud and the second point cloud to generate a road element vector.
[0123] In the above embodiments of the present application, the point cloud clustering unit is further used to perform the following steps: project the point cloud data onto the first result and the second result respectively to obtain a first projection image and a second projection image; determine a first target pixel within the first pixel range in the first projection image and a second target pixel within the second pixel range in the second projection image; cluster the point cloud corresponding to the first target pixel and the point cloud corresponding to the second target pixel respectively based on the spatial relationship to obtain a first point cloud and a second point cloud.
[0124] In the above embodiments of the present application, when the road element includes a non-linear element, the point cloud clustering unit is further used to perform the following steps: fuse the first point cloud and the second point cloud based on the spatial relationship to obtain a target point cloud; fit the target point cloud to obtain the bounding box coordinates of the non-linear element; generate a road element vector based on the bounding box coordinates.
[0125] In the above embodiments of the present application, when the road element includes a linear element, the point cloud clustering unit is further configured to perform the following steps: respectively fitting the first point cloud and the second point cloud to generate multiple center line vectors of the linear element; according to the spatial position relationship, performing curve fitting on the multiple center line vectors at the same position to obtain the road element vector.
[0126] In the above embodiments of the present application, the semantic segmentation module is further configured to perform semantic segmentation on the original image and the target image respectively through the semantic segmentation model to obtain the semantic segmentation result.
[0127] In the above embodiments of the present application, the device further includes: a point cloud segmentation module and an extraction module.
[0128] Among them, the point cloud segmentation module is configured to segment the point cloud data to obtain multiple point cloud blocks; the extraction module is configured to extract the point cloud blocks containing road elements from the multiple point cloud blocks to obtain the target point cloud blocks; the projection module is further configured to project the target point cloud blocks onto a two-dimensional plane to obtain the target image.
[0129] In the above embodiments of the present application, the device further includes: a map generation module.
[0130] Among them, the map generation module is configured to generate a target map based on the road element vector after vectorizing the road element based on the point cloud data and the semantic segmentation result.
[0131] In the above embodiments of the present application, when the road element includes a linear element, the map generation module includes: a determination unit and a generation unit.
[0132] Among them, the determination unit is configured to determine the physical parameter information of the road element vector; the generation unit is configured to generate a target map based on the road element vector and the physical parameter information.
[0133] It should be noted that the preferred implementation schemes involved in the above embodiments of the present application are the same as the schemes, application scenarios, and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.
[0134] Embodiment 4
[0135] According to an embodiment of the present invention, there is also provided a road element vector generation device for implementing the road element vector generation method in Embodiment 2 above. The device is located in a cloud server, as Figure 9 shown. The device 900 includes: an acquisition module 902, a projection module 904, a semantic segmentation module 906, a vectorization module 908, and an output module 910.
[0136] Among them, the acquisition module 902 is used to acquire the point cloud data and the original image collected in the same area; the projection module 904 is used to project the point cloud data onto a two-dimensional plane to obtain a target image corresponding to the point cloud data; the semantic segmentation module 906 is used to perform semantic segmentation on the road elements in the original image and the target image respectively to obtain a semantic segmentation result; the vectorization module 908 is used to vectorize the road elements based on the point cloud data and the semantic segmentation result to obtain a road element vector; the output module 910 is used to output the road element vector.
[0137] It should be noted here that the above acquisition module 902, projection module 904, semantic segmentation module 906, vectorization module 908, and output module 910 correspond to steps S702 to S710 in Embodiment 2. The examples and application scenarios implemented by the five modules and the corresponding steps are the same, but are not limited to the content disclosed in the above Embodiment 2. It should be noted that the above modules, as a part of the device, can run in the computer terminal 10 provided in Embodiment 1.
[0138] In the above embodiments of the present application, the semantic segmentation result may include: a first result corresponding to the original image and a second result corresponding to the target image. Among them, the vectorization module includes: a pixel clustering unit, a point cloud clustering unit, and a fitting unit.
[0139] Among them, the pixel clustering unit is used to perform pixel clustering on the first result and the second result respectively to obtain a first pixel range and a second pixel range corresponding to the road element; the point cloud clustering unit is used to cluster the point cloud data based on the first pixel range and the second pixel range respectively to obtain a first point cloud and a second point cloud corresponding to the road element; the fitting unit is used to fit the first point cloud and the second point cloud to generate a road element vector.
[0140] In the above embodiments of the present application, the point cloud clustering unit is further used to perform the following steps: project the point cloud data onto the first result and the second result respectively to obtain a first projection image and a second projection image; determine a first target pixel within the first pixel range in the first projection image and a second target pixel within the second pixel range in the second projection image; cluster the point cloud corresponding to the first target pixel and the point cloud corresponding to the second target pixel respectively based on the spatial relationship to obtain a first point cloud and a second point cloud.
[0141] In the above embodiments of the present application, when the road element includes a non-linear element, the point cloud clustering unit is further used to perform the following steps: fuse the first point cloud and the second point cloud based on the spatial relationship to obtain a target point cloud; fit the target point cloud to obtain the bounding box coordinates of the non-linear element; generate a road element vector based on the bounding box coordinates.
[0142] In the above embodiments of the present application, when the road element includes a linear element, the point cloud clustering unit is further configured to perform the following steps: respectively fit the first point cloud and the second point cloud to generate multiple center line vectors of the linear element; according to the spatial position relationship, perform curve fitting on the multiple center line vectors at the same position to obtain the road element vector.
[0143] In the above embodiments of the present application, the semantic segmentation module is further configured to perform semantic segmentation on the original image and the target image respectively through the semantic segmentation model to obtain the semantic segmentation result.
[0144] In the above embodiments of the present application, the device further includes: a point cloud segmentation module and an extraction module.
[0145] Among them, the point cloud segmentation module is configured to segment the point cloud data to obtain multiple point cloud blocks; the extraction module is configured to extract the point cloud blocks containing road elements from the multiple point cloud blocks to obtain the target point cloud blocks; the projection module is further configured to project the target point cloud blocks onto a two-dimensional plane to obtain the target image.
[0146] In the above embodiments of the present application, the device further includes: a map generation module.
[0147] Among them, the map generation module is configured to vectorize the road elements based on the point cloud data and the semantic segmentation result to obtain the road element vector, and then generate a target map based on the road element vector; the output module is further configured to output the target map.
[0148] In the above embodiments of the present application, when the road element includes a linear element, the map generation module includes: a determination unit and a generation unit.
[0149] Among them, the determination unit is configured to determine the physical parameter information of the road element vector; the generation unit is configured to generate a target map based on the road element vector and the physical parameter information.
[0150] It should be noted that the preferred implementation schemes involved in the above embodiments of the present application are the same as the schemes, application scenarios, and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.
[0151] Embodiment 5
[0152] According to an embodiment of the present invention, there is also provided a system for generating a road element vector, including:
[0153] a processor; and
[0154] a memory, connected to the processor, for providing instructions for the processor to process the method for generating a road element vector in the above embodiments.
[0155] It should be noted that the preferred implementation schemes involved in the above embodiments of the present application are the same as those provided in Embodiment 1, including the application scenarios and implementation processes, but are not limited to the scheme provided in Embodiment 1.
[0156] Embodiment 6
[0157] An embodiment of the present invention may provide a computer terminal, which may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the above computer terminal may also be replaced with a terminal device such as a mobile terminal.
[0158] Optionally, in this embodiment, the above computer terminal may be located in at least one of multiple network devices in a computer network.
[0159] In this embodiment, the above computer terminal may execute the program code of the following steps in the method for generating a road element vector: obtaining point cloud data and original images collected in the same area; projecting the point cloud data onto a two-dimensional plane to obtain a target image corresponding to the point cloud data; respectively performing semantic segmentation on the road elements in the original image and the target image to obtain a semantic segmentation result; and performing vectorization on the road elements based on the point cloud data and the semantic segmentation result to obtain a road element vector.
[0160] Optionally, Figure 10 is a structural block diagram of a computer terminal according to an embodiment of the present invention. As Figure 10 shown, the computer terminal A may include: one or more (only one is shown in the figure) processors 1002, and a memory 1004.
[0161] Among them, the memory may be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for generating a road element vector in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implements the above method for generating a road element vector. The memory 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 memories, or other non-volatile solid-state memories. In some instances, the memory may further include a memory remotely provided relative to the processor, and these remote memories may be connected to the terminal A through a network. Examples of the above network include, but are not limited to, the Internet, an enterprise internal network, a local area network, a mobile communication network, and combinations thereof.
[0162] The processor can call the information and application programs stored in the memory through the transmission device to execute the following steps: acquire the point cloud data and the original image collected in the same area; project the point cloud data onto a two-dimensional plane to obtain the target image corresponding to the point cloud data; perform semantic segmentation on the road elements in the original image and the target image respectively to obtain the semantic segmentation results; vectorize the road elements based on the point cloud data and the semantic segmentation results to obtain the road element vectors.
[0163] Optionally, the semantic segmentation results may include: the first result corresponding to the original image and the second result corresponding to the target image, and the processor may also execute the program code of the following steps: perform pixel clustering on the first result and the second result respectively to obtain the first pixel range and the second pixel range corresponding to the road elements; perform clustering on the point cloud data based on the first pixel range and the second pixel range respectively to obtain the first point cloud and the second point cloud corresponding to the road elements; fit the first point cloud and the second point cloud to generate the road element vector.
[0164] Optionally, the processor may also execute the program code of the following steps: project the point cloud data onto the first result and the second result respectively to obtain the first projection image and the second projection image; determine the first target pixel within the first pixel range in the first projection image and the second target pixel within the second pixel range in the second projection image; perform clustering on the point cloud corresponding to the first target pixel and the point cloud corresponding to the second target pixel respectively based on the spatial relationship to obtain the first point cloud and the second point cloud.
[0165] Optionally, the processor may also execute the program code of the following steps: in the case where the road elements include non-linear elements, fuse the first point cloud and the second point cloud based on the spatial relationship to obtain the target point cloud; fit the target point cloud to obtain the bounding box coordinates of the non-linear elements; generate the road element vector based on the bounding box coordinates.
[0166] Optionally, the processor may also execute the program code of the following steps: in the case where the road elements include linear elements, fit the first point cloud and the second point cloud respectively to generate multiple center line vectors of the linear elements; perform curve fitting on the multiple center line vectors at the same position according to the spatial position relationship to obtain the road element vector.
[0167] Optionally, the processor may also execute the program code of the following steps: perform semantic segmentation on the original image and the target image respectively through the semantic segmentation model to obtain the semantic segmentation results.
[0168] Optionally, the above-mentioned processor may also execute the program code of the following steps: segment the point cloud data to obtain multiple point cloud blocks; extract the point cloud blocks containing road elements from the multiple point cloud blocks to obtain target point cloud blocks; project the target point cloud blocks onto a two-dimensional plane to obtain a target image.
[0169] Optionally, the above-mentioned processor may also execute the program code of the following steps: after vectorizing road elements based on the point cloud data and the semantic segmentation result to obtain road element vectors, generate a target map based on the road element vectors.
[0170] Optionally, the above-mentioned processor may also execute the program code of the following steps: when the road elements include linear elements, determine the physical parameter information of the road element vectors; generate a target map based on the road element vectors and the physical parameter information.
[0171] By adopting the embodiment of the present invention, a scheme for generating road element vectors is provided. By projecting point cloud data into a two-dimensional plane image and then performing semantic segmentation to extract road elements, the road element vectors not only have three-dimensional information, but also can avoid the problem of missing road elements in the original image due to objective factors such as occlusion and observation limitations, meet the accuracy requirements of high-precision maps, achieve the technical effects of ensuring the integrity of road element vectors, increasing data redundancy, and improving the generation accuracy of road element vectors, and further solve the technical problem of large generation errors of road element vectors in the related art.
[0172] Those of ordinary skill in the art can understand that Figure 10 the structure shown is only schematic, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and terminal devices such as Mobile Internet Devices (MID), PAD, etc. Figure 10 It does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 may further include more or fewer components (such as a network interface, a display device, etc.) than those shown Figure 10 in the figure, or have a different configuration from that shown Figure 10 in the figure.
[0173] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the relevant hardware of the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disc, etc.
[0174] Embodiment 7
[0175] An embodiment of the present invention further provides a storage medium. Optionally, in this embodiment, the above storage medium may be used to store the program code executed by the method for generating a road element vector provided in the first embodiment above.
[0176] Optionally, in this embodiment, the above storage medium may be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.
[0177] Optionally, in this embodiment, the storage medium is set to store the program code for performing the following steps: obtaining the point cloud data and the original image collected in the same area; projecting the point cloud data onto a two-dimensional plane to obtain a target image corresponding to the point cloud data; respectively performing semantic segmentation on the road elements in the original image and the target image to obtain semantic segmentation results; vectorizing the road elements based on the point cloud data and the semantic segmentation results to obtain a road element vector.
[0178] Optionally, the semantic segmentation results may include: a first result corresponding to the original image and a second result corresponding to the target image. The above storage medium is further set to store the program code for performing the following steps: respectively performing pixel clustering on the first result and the second result to obtain a first pixel range and a second pixel range corresponding to the road element; respectively clustering the point cloud data based on the first pixel range and the second pixel range to obtain a first point cloud and a second point cloud corresponding to the road element; fitting the first point cloud and the second point cloud to generate a road element vector.
[0179] Optionally, the above storage medium is further set to store the program code for performing the following steps: projecting the point cloud data onto the first result and the second result respectively to obtain a first projection image and a second projection image; determining a first target pixel within the first pixel range in the first projection image and a second target pixel within the second pixel range in the second projection image; clustering the point cloud corresponding to the first target pixel and the point cloud corresponding to the second target pixel respectively based on the spatial relationship to obtain a first point cloud and a second point cloud.
[0180] Optionally, the above storage medium is further set to store the program code for performing the following steps: in the case where the road element includes a non-linear element, fusing the first point cloud and the second point cloud based on the spatial relationship to obtain a target point cloud; fitting the target point cloud to obtain the bounding box coordinates of the non-linear element; generating a road element vector based on the bounding box coordinates.
[0181] Optionally, the above storage medium is further configured to store program code for performing the following steps: when the road element includes a linear element, respectively fit the first point cloud and the second point cloud to generate multiple center line vectors of the linear element; according to the spatial position relationship, perform curve fitting on the multiple center line vectors at the same position to obtain the road element vector.
[0182] Optionally, the above storage medium is further configured to store program code for performing the following steps: perform semantic segmentation on the original image and the target image respectively through a semantic segmentation model to obtain semantic segmentation results.
[0183] Optionally, the above storage medium is further configured to store program code for performing the following steps: segment the point cloud data to obtain multiple point cloud blocks; extract the point cloud blocks containing road elements from the multiple point cloud blocks to obtain target point cloud blocks; project the target point cloud blocks onto a two-dimensional plane to obtain target images.
[0184] Optionally, the above storage medium is further configured to store program code for performing the following steps: after vectorizing the road elements based on the point cloud data and the semantic segmentation results to obtain road element vectors, generate a target map based on the road element vectors.
[0185] Optionally, the above storage medium is further configured to store program code for performing the following steps: when the road element includes a linear element, determine the physical parameter information of the road element vector; generate a target map based on the road element vector and the physical parameter information.
[0186] The serial numbers of the embodiments of the present invention above are only for description and do not represent the superiority or inferiority of the embodiments.
[0187] In the above embodiments of the present invention, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0188] In the several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the units or modules can be in an electrical or other form.
[0189] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or may be distributed over multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0190] In addition, each functional unit in various embodiments of the present invention may be integrated in a processing unit, may exist separately as individual physical units, or two or more units may be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0191] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), mobile hard disks, magnetic disks, or optical discs and other various media that can store program codes.
[0192] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A method for generating a vector of road elements, characterized in that, including: acquiring point cloud data and original images collected within the same area; projecting the point cloud data onto a two-dimensional plane to obtain a target image corresponding to the point cloud data; performing semantic segmentation on road elements in the original image and the target image respectively to obtain semantic segmentation results; vectorizing the road elements based on the point cloud data and the semantic segmentation results to obtain road element vectors; the semantic segmentation results include: a first result corresponding to the original image and a second result corresponding to the target image, wherein vectorizing the road elements based on the point cloud data and the semantic segmentation results to obtain road element vectors includes: performing pixel clustering on the first result and the second result respectively to obtain a first pixel range and a second pixel range corresponding to the road elements; performing clustering on the point cloud data based on the first pixel range and the second pixel range respectively to obtain a first point cloud and a second point cloud corresponding to the road elements; fitting the first point cloud and the second point cloud to generate the road element vector.
2. The method according to claim 1, characterized in that, performing clustering on the point cloud data based on the first pixel range and the second pixel range respectively to obtain a first point cloud and a second point cloud corresponding to the road elements, including: projecting the point cloud data onto the first result and the second result respectively to obtain a first projection image and a second projection image; determining a first target pixel within the first pixel range in the first projection image and a second target pixel within the second pixel range in the second projection image; performing clustering on the point cloud corresponding to the first target pixel and the point cloud corresponding to the second target pixel respectively based on spatial relationships to obtain the first point cloud and the second point cloud.
3. The method according to claim 1, wherein when the road elements include non-linear elements, fitting the first point cloud and the second point cloud to generate the road element vector, including: fusing the first point cloud and the second point cloud based on spatial relationships to obtain a target point cloud; fitting the target point cloud to obtain the bounding box coordinates of the non-linear element; generating the road element vector based on the bounding box coordinates.
4. The method according to claim 1, characterized in that, when the road elements include linear elements, fitting the first point cloud and the second point cloud to generate the road element vector, including: fitting the first point cloud and the second point cloud respectively to generate multiple center line vectors of the linear element; performing curve fitting on multiple center line vectors at the same position according to spatial position relationships to obtain the road element vector.
5. The method according to claim 1, wherein performing semantic segmentation on road elements in the original image and the target image respectively to obtain semantic segmentation results, including: performing semantic segmentation on the original image and the target image respectively through a semantic segmentation model to obtain the semantic segmentation results.
6. The method according to claim 1, wherein the method further includes: segmenting the point cloud data to obtain multiple point cloud blocks; extracting the point cloud blocks containing the road elements from the multiple point cloud blocks to obtain target point cloud blocks; projecting the target point cloud blocks onto the two-dimensional plane to obtain the target image.
7. The method according to any one of claims 1 to 6, characterized in that After vectorizing the road elements based on the point cloud data and the semantic segmentation result to obtain road element vectors, the method further includes: Generating a target map based on the road element vectors.
8. The method according to claim 7, wherein When the road elements include linear elements, generating a target map based on the road element vectors includes: Determining physical parameter information of the road element vectors; Generating the target map based on the road element vectors and the physical parameter information.
9. A method for generating a vector of road elements, characterized in that, Including: The cloud server receives point cloud data and original images collected in the same area; The cloud server projects the point cloud data onto a two-dimensional plane to obtain a target image corresponding to the point cloud data; The cloud server respectively performs semantic segmentation on the road elements in the original image and the target image to obtain semantic segmentation results; The cloud server vectorizes the road elements based on the point cloud data and the semantic segmentation results to obtain road element vectors; The cloud server outputs the road element vectors; The semantic segmentation results include: a first result corresponding to the original image and a second result corresponding to the target image, wherein vectorizing the road elements based on the point cloud data and the semantic segmentation results to obtain road element vectors includes: Performing pixel clustering on the first result and the second result respectively to obtain a first pixel range and a second pixel range corresponding to the road elements; Respectively clustering the point cloud data based on the first pixel range and the second pixel range to obtain a first point cloud and a second point cloud corresponding to the road elements; Fitting the first point cloud and the second point cloud to generate the road element vectors.
10. A storage medium, characterized in that, The storage medium includes a stored program, wherein when the program runs, it controls the device where the storage medium is located to execute the method for generating road element vectors according to any one of claims 1 to 9.
11. An electronic terminal, characterized in that, Including: A memory; A processor connected to the memory, the processor is used to run a program, wherein when the program runs, it executes the method for generating road element vectors according to any one of claims 1 to 9.
12. A generation system for road element vectors, characterized in that, Including: A processor; And A memory, connected to the processor, for providing instructions for the processor to process the method for generating road element vectors according to any one of claims 1 to 9.
Citation Information
Patent Citations
Automatic extraction method and device for road pedestrian crossing in high-precision map making
CN111881790A
Laser point cloud data-based road single component automatic modeling method, system and device, and storage medium
CN112528385A