CN114283148A - Road element extraction method and device, storage medium and electronic equipment - Google Patents

Road element extraction method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114283148A
CN114283148A CN202111587927.6A CN202111587927A CN114283148A CN 114283148 A CN114283148 A CN 114283148A CN 202111587927 A CN202111587927 A CN 202111587927A CN 114283148 A CN114283148 A CN 114283148A
Authority
CN
China
Prior art keywords
point
skeleton
dimensional
road
points
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111587927.6A
Other languages
Chinese (zh)
Inventor
王裕康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202111587927.6A priority Critical patent/CN114283148A/en
Publication of CN114283148A publication Critical patent/CN114283148A/en
Pending legal-status Critical Current

Links

Images

Abstract

The specification discloses a road element extraction method, a device, a storage medium and electronic equipment, which can determine road elements to which three-dimensional points belong through a point cloud semantic segmentation model, and obtain skeleton points of the road elements by clustering the three-dimensional points corresponding to the road elements. And then, determining the connection relation of the skeleton points according to the three-dimensional point distribution among the skeleton points of each road element so as to construct a first connection diagram. And finally, determining a skeleton line connected with each skeleton point based on the minimum spanning tree of the first connected graph, and determining the vectorization result of the road element according to the skeleton line and the position information of each three-dimensional point in the normal direction of different positions on the skeleton line. The road elements are extracted from the point cloud data, and the skeleton points of the road elements are extracted and connected to form skeleton lines based on the three-dimensional points corresponding to the road elements, so that the vectorization expression of the road elements is determined, and the vectorization extraction of the three-dimensional road elements is realized.

Description

Road element extraction method and device, storage medium and electronic equipment
Technical Field
The present application relates to the field of map construction technologies, and in particular, to a method and an apparatus for extracting road elements, a storage medium, and an electronic device.
Background
Road elements (such as street lamps, road barriers and the like) are important basic elements in high-precision maps and can be used for positioning vehicle poses and planning driving paths. Therefore, when a high-precision map is produced, vectorization extraction of each road element is also required.
At present, when extracting road elements, an image-based extraction method is often adopted. Specifically, a large number of road images of the environment to be constructed can be collected, and road elements in each road image are extracted through a semantic segmentation model. And then, carrying out vectorization processing on the extracted road elements through a vectorization algorithm to obtain the vectorization expression of each road element.
However, due to the two-dimensional characteristics of road images, the method is only suitable for extracting objects with regular shapes such as lane lines and traffic lights, and has a poor effect of extracting road elements with irregular shapes such as barriers.
Disclosure of Invention
The embodiment of the specification provides a road element extraction method and a road element extraction device, which are used for partially solving the problems in the prior art.
The embodiment of the specification adopts the following technical scheme:
the road element extraction method provided by the specification comprises the following steps:
acquiring point cloud data of a road environment, inputting the acquired point cloud data into a pre-trained point cloud semantic segmentation model, and determining a road element to which each three-dimensional point in the point cloud data belongs;
for each road element in the road environment, clustering according to the position information of each three-dimensional point corresponding to the road element, and determining a plurality of skeleton points of the road element;
determining the connection relation of each framework point according to the three-dimensional point distribution among the framework points, and constructing a minimum spanning tree of each framework point according to the connection relation of each framework point;
according to the minimum spanning tree, determining a skeleton line of the road element by taking the maximized path length connected by the skeleton points as a target;
and determining the vectorization result of the road element according to the skeleton line and the position information of each three-dimensional point in the normal direction of different positions on the skeleton line.
Optionally, the method includes acquiring point cloud data of a road environment, and inputting the acquired point cloud data into a pre-trained point cloud semantic segmentation model, and specifically includes:
acquiring a plurality of frames of point cloud data of a continuously acquired road environment;
and splicing the plurality of frames of point cloud data, and inputting the spliced point cloud data into a pre-trained point cloud semantic segmentation model.
Optionally, before clustering according to the position information of each three-dimensional point corresponding to the road element, the method further includes:
dividing each three-dimensional point in the point cloud data into each voxel of the road environment;
aiming at each voxel in the road environment, determining a three-dimensional sampling point corresponding to the voxel according to the position information of each three-dimensional point in the voxel;
and updating the point cloud data according to the three-dimensional sampling points corresponding to the voxels.
Optionally, before clustering according to the position information of each three-dimensional point corresponding to the road element, the method further includes:
determining the average value of the distances between the three-dimensional point and other three-dimensional points corresponding to the road element as the average distance corresponding to the three-dimensional point aiming at each three-dimensional point corresponding to the road element;
determining a distance threshold according to the average distance corresponding to each three-dimensional point;
and screening out three-dimensional points with the average distance larger than the distance threshold value.
Optionally, determining a connection relationship of each skeleton point according to three-dimensional point distribution among the skeleton points, specifically including:
for every two skeleton points, determining the middle point of the two skeleton points;
judging whether a three-dimensional point of the road element exists in a preset range of the midpoint;
if so, determining that a connection relationship exists between the two skeleton points;
if not, determining that the connection relation does not exist between the two skeleton points.
Optionally, clustering according to the position information of each three-dimensional point corresponding to the road element, and determining a plurality of skeleton points of the road element specifically include:
constructing a second connected graph according to the position information of each three-dimensional point corresponding to the road element, wherein the distance between two vertexes connected into edges in the second connected graph is smaller than a first preset threshold value;
determining a plurality of sub-elements of the road element according to the connected components in the second connected graph;
and aiming at each sub-element of the road element, clustering according to the position information of each three-dimensional point corresponding to the sub-element, determining a plurality of skeleton points of the sub-element, and determining the vectorization result of the sub-element based on the plurality of skeleton points of the sub-element.
Optionally, determining the vectorization result of the road element according to the skeleton line and the position information of each three-dimensional point in the normal direction of different positions on the skeleton line, specifically including:
determining a plurality of position points on the skeleton line according to a preset unit length;
aiming at each determined position point, determining each three-dimensional point on the skeleton line corresponding to the normal direction of the position point and the distance between each three-dimensional point and the position point;
determining three-dimensional points with the maximum distance from the position point to the two sides of the skeleton line according to the distance between each three-dimensional point and the position point, and taking the three-dimensional points as target three-dimensional points;
determining the width of the position point on the skeleton line according to the distance between the target three-dimensional points;
and determining the external polygon of the road element according to the skeleton line and the widths of different positions on the skeleton line, and taking the external polygon of the road element as the vectorization result of the road element.
This specification provides a road element extraction device, includes:
the semantic segmentation module is configured to acquire point cloud data of a road environment, input the acquired point cloud data into a pre-trained point cloud semantic segmentation model and determine road elements to which each three-dimensional point in the point cloud data belongs;
the skeleton point determining module is configured to perform clustering on each road element in the road environment according to the position information of each three-dimensional point corresponding to the road element, and determine a plurality of skeleton points of the road element;
the building module is configured to determine the connection relation of each skeleton point according to the three-dimensional point distribution among the skeleton points, build a first connection diagram according to the connection relation of each skeleton point, and determine a minimum spanning tree of the first connection diagram;
the skeleton line determining module is configured to determine a skeleton line of the road element according to the minimum spanning tree by taking the maximum path length connected by the skeleton points as a target;
and the vector extraction module is configured to determine the vectorization result of the road element according to the skeleton line and the position information of each three-dimensional point in the normal direction of different positions on the skeleton line.
The present specification provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the above-described road element extraction method.
The electronic device provided by the specification comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the road element extraction method when executing the program.
The embodiment of the specification adopts at least one technical scheme which can achieve the following beneficial effects:
when the road elements are vectorized and extracted in the description, the road elements to which the three-dimensional points belong in the road environment can be determined through a point cloud semantic segmentation model. And then, aiming at each road element, clustering all three-dimensional points corresponding to the road element to determine skeleton points of the road element, and determining the connection relation of all skeleton points according to the three-dimensional point distribution among all skeleton points. Then, according to the connection relation of each skeleton point, a first connection diagram is constructed, and the minimum spanning tree of the first connection diagram is determined. And finally, determining a skeleton line connected with each skeleton point based on the minimum spanning tree, and determining the vectorization result of the road element according to the skeleton line and the position information of each three-dimensional point in the normal direction of different positions on the skeleton line. The road elements are extracted from the point cloud data, and the skeleton points of the road elements are extracted and connected to form skeleton lines based on the three-dimensional points corresponding to the road elements, so that the vectorization expression of the road elements is determined, and the vectorization extraction of the three-dimensional road elements is realized.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic flow chart of a road element extraction method provided in an embodiment of the present disclosure;
FIG. 2 is a schematic diagram illustrating a method for checking connection relationships of skeleton points according to an embodiment of the present disclosure;
FIG. 3 is a diagram illustrating a minimum spanning tree provided in an embodiment of the present specification;
fig. 4a is a schematic diagram of a three-dimensional distribution of points around a skeleton line according to an embodiment of the present disclosure;
FIG. 4b is a schematic diagram of a circumscribed polygon of a road element provided in an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a road element extraction device provided in an embodiment of the present disclosure;
fig. 6 is a schematic view of an electronic device implementing a road element extraction method according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present disclosure more apparent, the technical solutions of the present disclosure will be clearly and completely described below with reference to the specific embodiments of the present disclosure and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person skilled in the art without making any inventive step based on the embodiments in the description belong to the protection scope of the present application.
The present specification provides a method for extracting road elements, and the following describes technical solutions provided in various embodiments of the present application in detail with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a road element extraction method provided in an embodiment of the present specification, which may specifically include the following steps:
s100: the method comprises the steps of obtaining point cloud data of a road environment, inputting the obtained point cloud data into a pre-trained point cloud semantic segmentation model, and determining road elements to which three-dimensional points in the point cloud data belong.
The road element extraction method can be used for vectorization extraction of road elements such as lane barriers, traffic lights and lane lines in a road environment in the process of manufacturing a high-precision map.
Specifically, point cloud data of the road environment may be obtained first. The road environment is a road area of a map to be constructed, and the point cloud data of the road environment can be acquired when a vehicle history configured with laser radar equipment runs in the road environment. And then, inputting the point cloud data of the road environment into a pre-trained point cloud semantic segmentation model, and determining the type of the road element to which each three-dimensional point in the point cloud data belongs. The Point cloud semantic segmentation model can adopt common models such as a 3D Point cloud segmentation Network (Cylinder3D), a Sparse Point Voxel convolution Network (SPVCNN) and the like, and the Point cloud semantic model is not improved in the description, so that the training process of the Point cloud semantic segmentation model is not repeated, and the prior art can be referred to specifically.
Further, when the laser radar is used for collecting point cloud data, points far away from the laser radar device are generally sparse, and the resolution is low, so that in order to guarantee the stability of point cloud semantic segmentation model prediction, the obtained point cloud data needs to be preprocessed, and three-dimensional points with the distance larger than a second preset threshold value are filtered according to the distance between each three-dimensional point and the laser radar device. The second preset threshold may be set as needed, which is not limited in this specification.
Furthermore, three-dimensional points on an object in a single-frame laser point cloud are sparsely distributed, which is not beneficial to feature extraction of a point cloud semantic segmentation model, and therefore, the point cloud data needs to be densely processed. The method can acquire a plurality of frames of continuously acquired point cloud data of the road environment, and splice the acquired point cloud data of each frame to obtain densified point cloud data. And inputting the spliced and densified point cloud data into a point cloud semantic segmentation model.
S102: and aiming at each road element in the road environment, clustering according to the position information of each three-dimensional point corresponding to the road element, and determining a plurality of skeleton points of the road element.
After various road elements contained in the road environment are determined through the point cloud semantic segmentation model, the skeleton of the three-dimensional road elements can be determined firstly according to the three-dimensional road element types such as lane barriers, traffic lights and the like, and then the outlines of the three-dimensional road elements are obtained through the subsequent steps.
Wherein each three-dimensional point on the three-dimensional object surrounds its skeleton support structure, so that points on the support skeleton of each road element, i.e. skeleton points, can be determined on the basis of the three-dimensional points on the road element.
Specifically, for each road element in the road environment, clustering is performed by adopting a clustering algorithm according to the position information of each three-dimensional point corresponding to the road element to obtain a plurality of clusters. And then, aiming at each cluster, determining the centroid position of each three-dimensional point according to the position information of each three-dimensional point in the cluster, and using the centroid position as a skeleton point corresponding to the cluster. And finally, determining a plurality of skeleton points of the road element according to the skeleton points corresponding to the clusters. The clustering algorithm may be a k-means clustering algorithm (k-means), a Self-organizing mapping algorithm (Self-organizing Maps, SOM), and the like, which is not limited in this specification.
Because the pose information of each three-dimensional point acquired by the laser radar is relative to the laser radar coordinate system, coordinate conversion needs to be carried out on each three-dimensional point in the point cloud data and the three-dimensional points are converted into the world coordinate system, so that the actual position of each road element in the high-precision map can be positioned. During coordinate conversion, the position information of each three-dimensional point in the world coordinate system can be determined according to the position of the laser radar in the world coordinate system when the point cloud data is collected and the position of each three-dimensional point in the point cloud data relative to the laser radar.
Furthermore, because a large amount of redundant information exists in the dense point cloud after the multi-frame combination, in order to save storage space and reduce calculation time, downsampling processing can be performed on the point cloud data in the description. Specifically, the three-dimensional space of the road environment may be divided into a plurality of voxels, and each three-dimensional point in the point cloud data may be divided into each voxel. And then, for each voxel in the road environment, determining the centroid position of each three-dimensional point according to the position information of each three-dimensional point in the voxel, and using the centroid position three-dimensional sampling point as the three-dimensional sampling point corresponding to the voxel, and representing each three-dimensional point in the voxel by using the centroid position three-dimensional sampling point. And finally, updating the point cloud data according to the three-dimensional sampling points corresponding to the voxels. Wherein, the voxel is the minimum unit of three-dimensional space segmentation.
Alternatively, in another embodiment of the present specification, a three-dimensional point closest to the center of a voxel from among three-dimensional points in the voxel may be determined as a three-dimensional sampling point corresponding to the voxel.
Furthermore, in order to obtain a more accurate extraction result, the collected point cloud data can be subjected to denoising processing, and three-dimensional points deviating from a larger range are filtered. Specifically, for each three-dimensional point corresponding to the road element, the distance between the three-dimensional point and another three-dimensional point corresponding to the road element is determined according to the position information of each three-dimensional point, and the average value of the distances between the three-dimensional point and each other three-dimensional point is determined as the average distance corresponding to the three-dimensional point. Wherein, the other three-dimensional points can select a plurality of points adjacent to the three-dimensional point. And then, determining a distance threshold value for screening according to the average distance corresponding to each three-dimensional point. And finally, determining three-dimensional points with the average distance larger than the distance threshold value from the three-dimensional points corresponding to the road elements, namely three-dimensional points deviating farther, and screening.
In another embodiment of the present specification, when determining the distance threshold, a mean value of the average distances may be determined as the mean distance according to the average distance corresponding to each three-dimensional point. And calculating the distance standard deviation of each three-dimensional point according to the average distance corresponding to each three-dimensional point and the mean distance. And determining a distance threshold value according to the mean distance and the distance standard deviation of each three-dimensional point.
S104: determining the connection relation of each skeleton point according to the three-dimensional point distribution among the skeleton points, constructing a first connection diagram according to the connection relation of each skeleton point, and determining the minimum spanning tree of the first connection diagram.
S106: and determining the skeleton line of the road element by taking the maximized path length connected by the skeleton points as a target according to the minimum spanning tree.
After the skeleton points of the road element are determined, the skeleton points can be sequenced, so that skeleton lines of the road element are formed through connection based on a sequencing result, and further vectorization expression of the road element is obtained.
Specifically, firstly, for every two skeleton points, a midpoint of the two skeleton points is determined, and a preset range in which the midpoint is used as a circle center and a preset distance is used as a radius is determined. And then, judging whether the three-dimensional point of the road element exists in the preset range of the midpoint, if so, determining that a connection relation exists between the two skeleton points, otherwise, determining that the connection relation does not exist between the two skeleton points. The preset distance may be set as required, which is not limited in this specification.
As shown in fig. 2, black dots represent skeleton points, white dots represent three-dimensional points, and gray dots represent midpoints of skeleton points. The middle point of the skeleton point M and the skeleton point N is P, and is within a preset range taking the point P as the center of a circle, namely a range shown by a dotted line circle in the figure.
After the connection relationship between the skeleton points is determined, the connection sequence of the skeleton points needs to be determined, so that a first connection graph can be constructed according to the connection relationship between the skeleton points, namely, the skeleton points are used as vertexes, the vertexes with the connection relationship are connected into edges, and the minimum spanning tree of the first connection graph is determined. And the sum of paths connected by each skeleton point in the minimum spanning tree is shortest. And finally, with the aim of maximizing the connection path length of each skeleton point as a target, screening the longest path from the minimum spanning tree, and connecting each vertex on the longest path to obtain the skeleton line of the road element.
Fig. 3 is a schematic diagram of a minimum spanning tree provided in this specification, where black points shown by Q1-Q6 represent skeleton points, and the minimum spanning tree includes 3 paths, which are Q4-Q6-Q4-Q3-Q2-Q5, Q1-Q3-Q6-Q4, and Q1-Q3-Q2-Q5, respectively. The longest path can be screened out from the minimum spanning tree, namely, each side which contains the arrow pointing direction in the graph, and the longest path is sequentially connected with each vertex Q4-Q6-Q4-Q3-Q2-Q5 on the path to obtain the skeleton line of the road element.
Further, when the longest path is selected from the minimum spanning tree, a vertex with only one adjacent side may be determined from all vertices of the minimum spanning tree as an end point set. And then traversing paths taking any two points in the endpoint set as a starting point and an end point from the minimum spanning tree, and screening the longest path.
S108: and determining the vectorization result of the road element according to the skeleton line and the position information of each three-dimensional point in the normal direction of different positions on the skeleton line.
After obtaining the skeleton line of the road element, the width of each position on the skeleton line is also determined to locate the contour edge of the road element.
Specifically, sampling is performed along the direction of the skeleton line by a preset unit length from the starting point of the skeleton line, and a plurality of position points on the skeleton line are determined. Then, for each determined position point, according to the three-dimensional point distribution around the skeleton line, each three-dimensional point in the normal direction of the skeleton line corresponding to the position point and the distance between each three-dimensional point and the position point are determined. And then, according to the distance between each three-dimensional point and the position point, determining two three-dimensional points with the maximum distance from the position point to two sides of the skeleton line as target three-dimensional points, wherein the two target three-dimensional points are distributed on the two sides of the skeleton line respectively. Then, according to the distance between the target three-dimensional points, the width of the position point on the skeleton line is determined. And finally, determining the external polygon of the road element according to the skeleton line and the widths of different positions on the skeleton line, and taking the external polygon of the road element as the vectorization result of the road element. The preset unit length can be set as required, and the specification does not limit the preset unit length.
Furthermore, when determining the circumscribed polygon of the road element, a circle may be drawn for each position point on the skeleton line with the position point as a center of the circle and the width of the skeleton line at the position point as a diameter. And then, determining a circumscribed polygon of the road element according to the outline of the circle of each position point. When the preset unit length is smaller and the sampling position points are denser, the obtained side line of the circumscribed polygon also tends to be smooth.
As shown in fig. 4a, the curves in the figure represent skeleton lines, the black dots represent sampled position points on the skeleton lines, the white dots represent target three-dimensional points, and the dotted dots represent non-target three-dimensional points. The positions A to E are connected in sequence on the skeleton line. And determining the point with the maximum distance in the normal direction of each position point as a target three-dimensional point according to the three-dimensional point distribution around each position point. That is, in the figure, the target three-dimensional points of the position point a are a1 and a2, the target three-dimensional points of the position point B are B1 and B2, the target three-dimensional points of the position point C are C1 and C2, the target three-dimensional points of the position point D are D1 and D2, and the target three-dimensional points of the position point E are E1 and E2. And sequentially drawing a circle by taking the position point as the center of a circle and the distance between the two target three-dimensional points as the diameter for each position point to obtain the circle corresponding to each position point as shown in the figure. Finally, a union set is obtained for the circles at each position, the outline of the merged circle is used as a circumscribed polygon of the road element, and the merged contour line is shown in fig. 4 b.
In another embodiment of the present disclosure, when determining the circumscribed polygon of the road element, the target three-dimensional points on both sides of the skeleton line may be connected respectively, and the connection result may be used as the circumscribed polygon of the road element.
Based on the road element extraction method shown in fig. 1, the road elements to which the three-dimensional points in the road environment belong can be determined through a point cloud semantic segmentation model. And then, aiming at each road element, clustering all three-dimensional points corresponding to the road element to determine skeleton points of the road element, and determining the connection relation of all skeleton points according to the three-dimensional point distribution among all skeleton points. Then, according to the connection relation of each skeleton point, a first connection diagram is constructed, and the minimum spanning tree of the first connection diagram is determined. And finally, determining a skeleton line connected with each skeleton point based on the minimum spanning tree, and determining the vectorization result of the road element according to the skeleton line and the position information of each three-dimensional point in the normal direction of different positions on the skeleton line. The road elements are extracted from the point cloud data, and the skeleton points of the road elements are extracted and connected to form skeleton lines based on the three-dimensional points corresponding to the road elements, so that the vectorization expression of the road elements is determined, and the vectorization extraction of the three-dimensional road elements is realized.
In addition, by the method, automatic extraction of road elements in the high-precision map is achieved, and the mapping efficiency is improved.
In step S102 of the present specification, since there may be multiple instances of the same kind of road elements in the road environment, such as for each of the barriers on both sides of the lane, which are spaced far apart, they may be considered as different instances. Therefore, when a road element in the road environment is an example, the method described in the above steps S102 to S108 may be directly adopted to extract the skeleton point of the road element, and determine the vectorization result of the road element. When the road elements in the road environment have a plurality of instances, instance segmentation is further performed on the point cloud data, so that vectorization extraction is performed on each instance.
Specifically, a second connected graph is constructed according to the position information of each three-dimensional point corresponding to the road element. When the distance between the two three-dimensional points is smaller than a first preset threshold value, the two three-dimensional points are connected into an edge, otherwise, the two three-dimensional points are not connected. That is, the distance between two vertices connected to an edge in the second connected graph is smaller than the first preset threshold. Then, according to the connected components in the second connected graph, a plurality of sub-elements of the road element are determined. Finally, for each sub-element of the road element, the vectorization result of each sub-element of the road element is determined by the method described in the subsequent steps S104 to S108. And the distance between the sub-elements is greater than a first preset threshold value.
Further, when constructing the second connected graph, each three-dimensional point may be connected to each of the other three-dimensional points, and the reciprocal of the euclidean distance between each two vertices may be used as the weight of the edge connecting the two vertices. And then, removing a plurality of edges with weights smaller than a third preset threshold value from each edge in the second connected graph. Wherein, the third preset threshold value can be set according to the requirement.
In addition, since the high-precision map also includes the position information of each road element, when extracting each road element, the position of each road element needs to be located. In the prior art, a method for extracting road elements based on acquired two-dimensional images generally depends on parameters calibrated by a camera to convert road elements from an image coordinate system to a world coordinate system when the positions of the road elements are located, but the accuracy of the calibration of the camera is not accurate enough, so that the position accuracy of the road elements is low. And adopt laser radar to fix a position each road element in this application, can more accurate location each road element's position, positioning accuracy is higher.
It should be noted that, because the road elements in the current high-precision map are represented by two-dimensional vectors, the method described in the above steps S102 to S108 can project each three-dimensional point onto the two-dimensional plane xoy, and then sequentially execute the subsequent steps according to the two-dimensional position coordinates of each three-dimensional point after projection.
If the three-dimensional vectorization result of each road element, namely the three-dimensional external polygon, needs to be determined subsequently, the two-dimensional vectorization result of each road element and the height information of each three-dimensional point corresponding to each road element, which are obtained by the method, are constructed.
In the prior art, a method based on a laser reflectivity base map is used for extracting road elements, but the collected laser point cloud is directly projected onto a two-dimensional plane, so that a large amount of information loss is caused, and the three-dimensional road elements on the ground are difficult to distinguish. The description can more accurately identify the road elements above the road surface by extracting elements from the originally collected laser point cloud and obtaining the vectorization expression of each road element through a subsequent vectorization algorithm.
Based on the road element extraction method shown in fig. 1, an embodiment of the present specification further provides a schematic structural diagram of a road element extraction device, as shown in fig. 5.
Fig. 5 is a schematic structural diagram of a road element extraction device provided in an embodiment of the present specification, including:
the semantic segmentation module 200 is configured to acquire point cloud data of a road environment, input the acquired point cloud data into a pre-trained point cloud semantic segmentation model, and determine a road element to which each three-dimensional point in the point cloud data belongs;
a skeleton point determining module 202, configured to perform clustering on each road element in the road environment according to the position information of each three-dimensional point corresponding to the road element, and determine a plurality of skeleton points of the road element;
a building module 204 configured to determine a connection relationship of each skeleton point according to three-dimensional point distribution among the skeleton points, build a first connection diagram according to the connection relationship of each skeleton point, and determine a minimum spanning tree of the first connection diagram;
a skeleton line determining module 206, configured to determine, according to the minimum spanning tree, a skeleton line of the road element with a goal of maximizing a path length of the skeleton point connection;
and the vector extraction module 208 is configured to determine the vectorization result of the road element according to the skeleton line and the position information of each three-dimensional point in the normal direction of different positions on the skeleton line.
Optionally, the semantic segmentation module 200 is specifically configured to obtain a plurality of frames of point cloud data of a continuously acquired road environment, splice the plurality of frames of point cloud data, and input the spliced point cloud data into a pre-trained point cloud semantic segmentation model.
Optionally, the skeleton point determining module 202 is further configured to divide each three-dimensional point in the point cloud data into each voxel in the road environment, determine, for each voxel in the road environment, a three-dimensional sampling point corresponding to the voxel according to position information of each three-dimensional point in the voxel, and update the point cloud data according to the three-dimensional sampling point corresponding to each voxel.
Optionally, the skeleton point determining module 202 is further configured to, for each three-dimensional point corresponding to the road element, determine an average value of distances between the three-dimensional point and other three-dimensional points corresponding to the road element, as an average distance corresponding to the point cloud, determine a distance threshold according to the average distance corresponding to each point cloud, and screen out three-dimensional points whose average distances are greater than the distance threshold.
Optionally, the building module 204 is specifically configured to, for every two skeleton points, determine a midpoint of the two skeleton points, and determine whether a three-dimensional point of the road element exists within a preset range of the midpoint, if yes, determine that a connection relationship exists between the two skeleton points, and if not, determine that a connection relationship does not exist between the two skeleton points.
Optionally, the skeleton point determining module 202 is specifically configured to construct a second connected graph according to the position information of each three-dimensional point corresponding to the road element, where a distance between two vertices connected to form an edge in the second connected graph is smaller than a first preset threshold, determine a plurality of sub-elements of the road element according to a connected component in the second connected graph, perform clustering on each sub-element of the road element according to the position information of each three-dimensional point corresponding to the sub-element, determine a plurality of skeleton points of the sub-element, and determine a vectorization result of the sub-element based on the plurality of skeleton points of the sub-element.
Optionally, the vector extraction module 208 is specifically configured to determine, according to a preset unit length, a plurality of position points on the skeleton line, determine, for each determined position point, each three-dimensional point on the skeleton line in the normal direction corresponding to the position point and a distance between each three-dimensional point and the position point, determine, according to the distance between each three-dimensional point and the position point, a three-dimensional point on both sides of the skeleton line, which is the farthest from the position point, as a target three-dimensional point, determine, according to the distance between the target three-dimensional points, a width of the position point on the skeleton line, determine, according to the skeleton line and widths of different positions on the skeleton line, a circumscribed polygon of the road element, and use the circumscribed polygon of the road element as a vectorization result of the road element.
Embodiments of the present specification further provide a computer-readable storage medium, where the storage medium stores a computer program, and the computer program is operable to execute the road element extraction method provided in fig. 1.
According to the road element extraction method shown in fig. 1, an embodiment of the present specification further provides a schematic structural diagram of the electronic device shown in fig. 6. As shown in fig. 6, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, but may also include hardware required for other services. The processor reads a corresponding computer program from the non-volatile memory into the memory and then runs the computer program to implement the road element extraction method shown in fig. 1.
Of course, besides the software implementation, the present specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may be hardware or logic devices.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and create a dedicated integrated circuit chip. Furthermore, nowadays, instead of manually generating an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Language Description Language), traffic, pl (core unified Programming Language), HDCal, JHDL (Java Hardware Description Language), langue, Lola, HDL, laspam, hardbyscript Description Language (vhigh Description Language), and so on, which are currently used in the most popular languages. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.

Claims (10)

1. A road element extraction method is characterized by comprising the following steps:
acquiring point cloud data of a road environment, inputting the acquired point cloud data into a pre-trained point cloud semantic segmentation model, and determining a road element to which each three-dimensional point in the point cloud data belongs;
for each road element in the road environment, clustering according to the position information of each three-dimensional point corresponding to the road element, and determining a plurality of skeleton points of the road element;
determining the connection relation of each skeleton point according to the three-dimensional point distribution among the skeleton points, constructing a first connection diagram according to the connection relation of each skeleton point, and determining a minimum spanning tree of the first connection diagram;
according to the minimum spanning tree, determining a skeleton line of the road element by taking the maximized path length connected by the skeleton points as a target;
and determining the vectorization result of the road element according to the skeleton line and the position information of each three-dimensional point in the normal direction of different positions on the skeleton line.
2. The method of claim 1, wherein the step of obtaining point cloud data of a road environment and inputting the obtained point cloud data into a pre-trained point cloud semantic segmentation model comprises:
acquiring a plurality of frames of point cloud data of a continuously acquired road environment;
and splicing the plurality of frames of point cloud data, and inputting the spliced point cloud data into a pre-trained point cloud semantic segmentation model.
3. The method of claim 1, wherein before clustering based on the location information of the three-dimensional points corresponding to the road element, the method further comprises:
dividing each three-dimensional point in the point cloud data into each voxel of the road environment;
aiming at each voxel in the road environment, determining a three-dimensional sampling point corresponding to the voxel according to the position information of each three-dimensional point in the voxel;
and updating the point cloud data according to the three-dimensional sampling points corresponding to the voxels.
4. The method of claim 1, wherein before clustering based on the location information of the three-dimensional points corresponding to the road element, the method further comprises:
determining the average value of the distances between the three-dimensional point and other three-dimensional points corresponding to the road element as the average distance corresponding to the three-dimensional point aiming at each three-dimensional point corresponding to the road element;
determining a distance threshold according to the average distance corresponding to each three-dimensional point;
and screening out three-dimensional points with the average distance larger than the distance threshold value.
5. The method of claim 1, wherein determining the connection relationship of the skeleton points according to the three-dimensional point distribution among the skeleton points specifically comprises:
for every two skeleton points, determining the middle point of the two skeleton points;
judging whether a three-dimensional point of the road element exists in a preset range of the midpoint;
if so, determining that a connection relationship exists between the two skeleton points;
if not, determining that the connection relation does not exist between the two skeleton points.
6. The method of claim 1, wherein clustering according to the position information of the three-dimensional points corresponding to the road element to determine a plurality of skeleton points of the road element comprises:
constructing a second connected graph according to the position information of each three-dimensional point corresponding to the road element, wherein the distance between two vertexes connected into edges in the second connected graph is smaller than a first preset threshold value;
determining a plurality of sub-elements of the road element according to the connected components in the second connected graph;
and aiming at each sub-element of the road element, clustering according to the position information of each three-dimensional point corresponding to the sub-element, determining a plurality of skeleton points of the sub-element, and determining the vectorization result of the sub-element based on the plurality of skeleton points of the sub-element.
7. The method according to claim 1, wherein determining the vectorization result of the road element according to the skeleton line and position information of each three-dimensional point in the normal direction of different positions on the skeleton line specifically includes:
determining a plurality of position points on the skeleton line according to a preset unit length;
aiming at each determined position point, determining each three-dimensional point on the skeleton line corresponding to the normal direction of the position point and the distance between each three-dimensional point and the position point;
determining three-dimensional points with the maximum distance from the position point to the two sides of the skeleton line according to the distance between each three-dimensional point and the position point, and taking the three-dimensional points as target three-dimensional points;
determining the width of the position point on the skeleton line according to the distance between the target three-dimensional points;
and determining the external polygon of the road element according to the skeleton line and the widths of different positions on the skeleton line, and taking the external polygon of the road element as the vectorization result of the road element.
8. A road element extraction device, comprising:
the semantic segmentation module is configured to acquire point cloud data of a road environment, input the acquired point cloud data into a pre-trained point cloud semantic segmentation model and determine road elements to which each three-dimensional point in the point cloud data belongs;
the skeleton point determining module is configured to perform clustering on each road element in the road environment according to the position information of each three-dimensional point corresponding to the road element, and determine a plurality of skeleton points of the road element;
the building module is configured to determine the connection relation of each skeleton point according to the three-dimensional point distribution among the skeleton points, build a first connection diagram according to the connection relation of each skeleton point, and determine a minimum spanning tree of the first connection diagram;
the skeleton line determining module is configured to determine a skeleton line of the road element according to the minimum spanning tree by taking the maximum path length connected by the skeleton points as a target;
and the vector extraction module is configured to determine the vectorization result of the road element according to the skeleton line and the position information of each three-dimensional point in the normal direction of different positions on the skeleton line.
9. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method of any of the preceding claims 1 to 7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 7 when executing the program.
CN202111587927.6A 2021-12-23 2021-12-23 Road element extraction method and device, storage medium and electronic equipment Pending CN114283148A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111587927.6A CN114283148A (en) 2021-12-23 2021-12-23 Road element extraction method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111587927.6A CN114283148A (en) 2021-12-23 2021-12-23 Road element extraction method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114283148A true CN114283148A (en) 2022-04-05

Family

ID=80874375

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111587927.6A Pending CN114283148A (en) 2021-12-23 2021-12-23 Road element extraction method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114283148A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117033844A (en) * 2023-10-07 2023-11-10 之江实验室 Canvas element layout method and device, storage medium and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117033844A (en) * 2023-10-07 2023-11-10 之江实验室 Canvas element layout method and device, storage medium and electronic equipment
CN117033844B (en) * 2023-10-07 2024-01-16 之江实验室 Canvas element layout method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN109798903A (en) A kind of method and device obtaining road information from map datum
CN111524150B (en) Image processing method and device
CN111508258B (en) Positioning method and device
CN111639682A (en) Ground segmentation method and device based on point cloud data
CN112348836A (en) Method and device for automatically extracting building outline
CN111047682B (en) Three-dimensional lane model generation method and system
CN115408410A (en) Method, device and equipment for matching electronic map data and map acquisition data
CN111797711A (en) Model training method and device
CN110929664B (en) Image recognition method and device
CN114283148A (en) Road element extraction method and device, storage medium and electronic equipment
CN104090945B (en) Geographic space entity constructing method and system
CN115841558B (en) Urban road modeling method, device, electronic equipment and storage medium
CN112907745A (en) Method and device for generating digital orthophoto map
CN116385999A (en) Parking space identification method, device and equipment
CN116311114A (en) Method and device for generating drivable region, electronic equipment and storage medium
CN115797592A (en) Method and device for automatically generating building block based on oblique photography three-dimensional model
Namouchi et al. Piecewise horizontal 3d roof reconstruction from aerial lidar
CN114440903A (en) High-precision map construction method and device, storage medium and electronic equipment
CN112329547A (en) Data processing method and device
CN111967365A (en) Method and device for extracting image connection points
CN113888611B (en) Method and device for determining image depth and storage medium
CN115858519B (en) DEM leveling method and device
CN117197781B (en) Traffic sign recognition method and device, storage medium and electronic equipment
CN114322987B (en) Method and device for constructing high-precision map
Trhan The creation of space vector models of buildings from RPAS photogrammetry data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination