Disclosure of Invention
In view of the above, the embodiments of the present invention provide a map production method and apparatus based on laser point cloud, which at least can solve the disadvantages of low accuracy, weak robustness and single extracted element types of the three-dimensional high-precision map production in the prior art.
To achieve the above object, according to an aspect of the embodiments of the present invention, there is provided a map production method based on a laser point cloud, including:
collecting laser point clouds of a target area, and carrying out semantic analysis on the laser point clouds to determine category attributes of each point cloud point in the laser point clouds and numbers of the belonging examples;
combining point cloud points with the same category attribute under the same instance number to obtain a point cloud cluster, and determining the shape of the point cloud cluster according to the corresponding relation between the category attribute and the shape;
and determining a vectorization rule corresponding to the shape so as to vectorize the point cloud cluster to obtain a vectorized map of the target area.
Optionally, the collecting the laser point cloud of the target area includes:
in the running process of the vehicle, carrying out point cloud acquisition operation on the target area according to a preset frequency by utilizing a vehicle-mounted device to obtain single-frame laser point cloud;
And according to the coordinates of the single-frame laser point cloud under a preset coordinate system, splicing the acquired single-frame laser point cloud to obtain the laser point cloud of the target area.
Optionally, before performing semantic analysis on the laser point cloud, the method further includes: and determining the volume of the laser point cloud, and when the volume exceeds a preset volume threshold, dicing the laser point cloud according to a preset size to obtain a plurality of laser point cloud blocks.
Optionally, the semantic parsing includes scene parsing and instance segmentation;
the semantic analysis is performed on the laser point cloud to determine the category attribute of each point cloud point in the laser point cloud and the number of the belonging instance, including:
performing scene analysis on the laser point clouds to determine category attributes of each point cloud point in the laser point clouds; and
and carrying out instance segmentation on the laser point cloud to obtain the number of the instance to which each point cloud point belongs, and establishing a corresponding relation between the instance number and the category attribute by combining the determined category attribute of each point cloud point.
Optionally, before combining the point cloud points with the same category attribute under the same instance number to obtain the point cloud cluster, the method further includes:
Acquiring an area element, and determining point cloud points of which category attributes do not belong to the area element so as to eliminate the determined point cloud points; and
and filling the holes of the laser point cloud after the point cloud points are removed by using a hole repairing mode.
Optionally, the determining a vectorization rule corresponding to the shape to vectorize the point cloud cluster includes: projecting the point cloud cluster into a two-dimensional image space to obtain a two-dimensional front view; carrying out two-dimensional vectorization on the two-dimensional front view to obtain a two-dimensional vectorization result; and projecting the two-dimensional vectorization result to a three-dimensional space according to the corresponding relation between the two-dimensional image pixels and the three-dimensional space points to obtain a three-dimensional vectorization result.
Optionally, the shape of the point cloud cluster is linear;
the two-dimensional front view is subjected to two-dimensional vectorization to obtain a two-dimensional vectorization result, which comprises the following steps: performing mask region extraction on the point cloud projection point region in the two-dimensional front view by using a skeleton extraction mode to obtain a mask region skeleton; and sequentially connecting pixels of the images in adjacent areas in the mask area skeleton to obtain a skeleton vectorization fragment.
Optionally, the shape of the point cloud cluster is a plane shape;
The two-dimensional front view is subjected to two-dimensional vectorization to obtain a two-dimensional vectorization result, which comprises the following steps: extracting edge pixel points from the point cloud projection point area in the two-dimensional front view by utilizing a contour tracking mode; sequentially connecting the extracted edge pixel points to obtain a two-dimensional vectorization contour of the point cloud projection point area.
Optionally, the shape of the point cloud cluster is a body type;
the determining a vectorization rule corresponding to the shape to vectorize the point cloud cluster comprises the following steps: and determining the coordinates of each point cloud point in the body type point cloud cluster under a preset coordinate system, extracting the minimum coordinate value and the maximum coordinate value on each coordinate axis, and taking the extracted minimum coordinate value and maximum coordinate value as vectorization values of the body type point cloud cluster under a three-dimensional space.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a map production apparatus based on a laser point cloud, including:
the point cloud analysis module is used for collecting laser point clouds of a target area, and carrying out semantic analysis on the laser point clouds to determine the category attribute of each point cloud point in the laser point clouds and the number of an affiliated instance;
The point cloud combination module is used for combining the point cloud points with the same category attribute under the same instance number to obtain a point cloud cluster, and determining the shape of the point cloud cluster according to the corresponding relation between the category attribute and the shape;
and the map production module is used for determining a vectorization rule corresponding to the shape so as to vectorize the point cloud cluster to obtain the vectorized map of the target area.
Optionally, the point cloud analyzing module is configured to:
in the running process of the vehicle, carrying out point cloud acquisition operation on the target area according to a preset frequency by utilizing a vehicle-mounted device to obtain single-frame laser point cloud;
and according to the coordinates of the single-frame laser point cloud under a preset coordinate system, splicing the acquired single-frame laser point cloud to obtain the laser point cloud of the target area.
Optionally, the point cloud analyzing module is further configured to: and determining the volume of the laser point cloud, and when the volume exceeds a preset volume threshold, dicing the laser point cloud according to a preset size to obtain a plurality of laser point cloud blocks.
Optionally, the semantic parsing includes scene parsing and instance segmentation;
the point cloud analysis module is used for:
Performing scene analysis on the laser point clouds to determine category attributes of each point cloud point in the laser point clouds; and
and carrying out instance segmentation on the laser point cloud to obtain the number of the instance to which each point cloud point belongs, and establishing a corresponding relation between the instance number and the category attribute by combining the determined category attribute of each point cloud point.
Optionally, the system further comprises a point cloud patching module for:
acquiring an area element, and determining point cloud points of which category attributes do not belong to the area element so as to eliminate the determined point cloud points; and
and filling the holes of the laser point cloud after the point cloud points are removed by using a hole repairing mode.
Optionally, the map production module is configured to: projecting the point cloud cluster into a two-dimensional image space to obtain a two-dimensional front view; carrying out two-dimensional vectorization on the two-dimensional front view to obtain a two-dimensional vectorization result; and projecting the two-dimensional vectorization result to a three-dimensional space according to the corresponding relation between the two-dimensional image pixels and the three-dimensional space points to obtain a three-dimensional vectorization result.
Optionally, the shape of the point cloud cluster is linear;
the map production module is used for: performing mask region extraction on the point cloud projection point region in the two-dimensional front view by using a skeleton extraction mode to obtain a mask region skeleton; and sequentially connecting pixels of the images in adjacent areas in the mask area skeleton to obtain a skeleton vectorization fragment.
Optionally, the shape of the point cloud cluster is a plane shape;
the map production module is used for: extracting edge pixel points from the point cloud projection point area in the two-dimensional front view by utilizing a contour tracking mode; sequentially connecting the extracted edge pixel points to obtain a two-dimensional vectorization contour of the point cloud projection point area.
Optionally, the shape of the point cloud cluster is a body type;
the map production module is used for: and determining the coordinates of each point cloud point in the body type point cloud cluster under a preset coordinate system, extracting the minimum coordinate value and the maximum coordinate value on each coordinate axis, and taking the extracted minimum coordinate value and maximum coordinate value as vectorization values of the body type point cloud cluster under a three-dimensional space.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a map production electronic device based on a laser point cloud.
The electronic equipment of the embodiment of the invention comprises: one or more processors; and a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement any of the laser point cloud-based map production methods described above.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a computer-readable medium having stored thereon a computer program which, when executed by a processor, implements any one of the above-described laser point cloud-based map production methods.
According to the solution provided by the present invention, one embodiment of the above invention has the following advantages or beneficial effects: the collected laser point cloud has the advantages of multiple angles and multiple positions, can better maintain the integrity and consistency of objects compared with a perspective view, can fully automatically, accurately and robustly extract road elements with rich types, and can avoid the situation that tiny parts are blocked; sundries are removed and holes are repaired on the laser point cloud, and shielding of large-area vehicles, trees and the like can be reduced, so that the robustness of the method is improved; finally, three-dimensional vectorization is respectively carried out on the linear elements, the surface elements and the body type elements, so that the element types are enriched, and the generation of the three-dimensional high-precision map is completed.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that, the method provided by the embodiment of the invention is not only suitable for map production, but also suitable for indoor scene reconstruction, such as large-scale mall construction, etc. Elements in the corresponding semantic analysis are trees, vehicles, pedestrians and the like for map production, and tables, chairs and the like for indoor scene reconstruction.
However, one of the contribution points of the invention is the reconstruction of linear and planar elements, which is designed for the road kerbs, road routes, zebra crossings and the like, and the contribution points which are not invented may be reflected in the reconstruction of indoor scenes due to too few elements, so the invention is mainly described by taking map production as an example.
The words related to the present invention are explained as follows:
reconstructing a three-dimensional motion-free structure: tracking and positioning in an unknown environment to place mark points in the scene for which no human is possible, a natural scene image or other azimuth sensors must be fully utilized to acquire the three-dimensional structure of the target and the motion trail of the camera.
And (3) point cloud: is a massive point set expressing the target spatial distribution and the target surface characteristics under the same spatial reference system.
And (3) principal component analysis: often used to reduce the dimensionality of the data set while maintaining the features in the data set that contribute most to the variance. This is done by retaining the lower order principal components and ignoring the higher order principal components. Such low order components tend to preserve the most important aspects of the data.
Skeleton algorithm: the "skeleton" in an image refers to the central part of the image, one of the important features describing the geometric and topological properties of the image, and the process of finding the skeleton of the image is commonly referred to as the process of "thinning" the image.
Contour tracking: in identifying objects in an image, it is often necessary to perform a tracking process, also called contour tracking, on the edges of the object. As the name suggests, contour tracking tracks boundaries by sequentially finding edge points.
And (3) thinning: when vectorized data is processed, many repeated data often exist in the record, and many inconveniences are brought to subsequent data processing. The redundant data wastes more memory space on the one hand and causes the graphics to be expressed to be not smooth or to be out of compliance on the other hand. Therefore, the number of data points is reduced to the maximum extent under the condition of ensuring that the shape of the vector curve is unchanged through a certain rule, and the process is called thinning.
Referring to fig. 1, a main flowchart of a map production method based on laser point cloud according to an embodiment of the present invention is shown, including the following steps:
s101: collecting laser point clouds of a target area, and carrying out semantic analysis on the laser point clouds to determine category attributes of each point cloud point in the laser point clouds and numbers of the belonging examples;
S102: combining point cloud points with the same category attribute under the same instance number to obtain a point cloud cluster, and determining the shape of the point cloud cluster according to the corresponding relation between the category attribute and the shape;
s103: and determining a vectorization rule corresponding to the shape so as to vectorize the point cloud cluster to obtain a vectorized map of the target area.
In the above embodiment, the target area in the present invention may be a road, a hillside, a street view, or the like, and the present invention will be mainly described by taking the street view as an example in step S101. The laser point cloud of the target area is formed by continuously collecting and splicing the point cloud by a vehicle-mounted device.
Semantic analysis is carried out on the spliced laser point cloud to obtain the category of each point cloud point in the road point cloud, the point cloud clusters of vehicles, trees, pedestrians, road surfaces, hard shoulder, lane lines and the like are segmented, and a category label is assigned to the point cloud clusters to realize the semantic of the point cloud.
Specifically:
step one: performing scene analysis on the laser point clouds to determine category attributes of each point cloud point in the laser point clouds; and
step two: and carrying out instance segmentation on the laser point cloud to obtain the number of the instance to which each point cloud point belongs, and establishing a corresponding relation between the instance number and the category attribute by combining the determined category attribute of each point cloud point.
For step one, the category attribute of each point cloud point in the road point cloud is segmented by using the existing point cloud scene parsing algorithm, for example 2018Arxiv PointCNN, as shown in fig. 2.
This segmentation is point-level, as is the semantic Label for the same class. Taking trees, vehicles and pedestrians as examples, label=1 represents a tree, label=2 represents a vehicle, and Label=3 represents a pedestrian.
In the scene parsing algorithm, some will distinguish between foreground and background, translated from english objects and stuff. The foreground object is an object with a small enclosed bounding box such as a pedestrian, a tree, an isolation pier, a vehicle, a street lamp, a guideboard and the like, and the background scene stuff is a scene with a large range and an open area such as a road, a building, a sky and the like. In general, foreground objects are in front of the background scene, which may be occluded (Label=0 may be set to represent background).
For step two, in general, the foreground object should be separated, because some are obscurations, and the subsequent objects may need to be removed to improve vectorization accuracy.
Therefore, the point cloud instance segmentation algorithm can be reused to further classify different foreground objects under the same category so as to carry out instance number ID on the different foreground objects. For example, id=1 represents a first tree region in the point cloud, id=2 represents a second tree region in the point cloud, and there are multiple trees in the scene, which are of the same category but belong to different instances.
Further, instance numbering may also be performed on each point cloud point in the background scene, for example, id=4 represents a first building area in the point cloud, and id=5 represents a second building area in the point cloud, which are not removable. However, in general, the case segmentation of the background scene has the problem of low precision, and the background scene usually does not need to reject elements, so that only the foreground object is usually subjected to element rejection.
The main purpose of this stage is to parse out the background scene and the foreground object and to perform instance segmentation on the foreground object, which is two different tasks, whereas the prior art does not mention a method that can accomplish these two steps together.
In addition, as to how to perform scene parsing and instance segmentation, these can be obtained through machine deep learning training, and the present invention does not involve its specific training process, but only uses. Inputting the laser point cloud into the trained model, the category Label and/or instance ID of each point cloud point can be resolved.
For step S102, the subsequent vectorization of the point cloud is performed on the point cloud cluster, because one point cloud point may not recognize its specific shape.
For the point cloud clusters, the point cloud points with the same category attribute under the same instance number can be combined. For example, id=1 represents the first tree area in the point cloud, label=1 represents a tree, and assuming that a tree is composed of 20 point cloud points, there are 20 point cloud points whose attribute categories and instance numbers are the same, the 20 point cloud points are combined to obtain a point cloud cluster related to the tree.
Similarly, id=4 represents the first building area in the point cloud, label=1 represents a building, and assuming that a building is composed of 200 point cloud points, the attribute types and the instance numbers of the 200 point cloud points are the same, the 200 point cloud points are combined to obtain a point cloud cluster related to the building.
For step S103, in the stage of vectorization of road elements, it is first required to define which shape each point cloud cluster belongs to according to its category, which may be implemented by a predefined look-up table, for example, a look-up table lists { category, category belongs to line, face or volume, category is vectorized }.
If the shielding object removing and the hole repairing (see the description of the following fig. 2-4) are performed before, the point cloud cluster is the road point cloud after the shielding object removing and the hole filling. But if not, the point cloud cluster here is one containing the occlusion and road elements.
The method carries out vectorization on the point cloud clusters in a three-dimensional space, and divides the point cloud clusters into line types, surface types and body types according to the identification of semantic analysis. The linear elements comprise lane lines, deceleration strips and the like, the surface elements comprise zebra lines, blind roads, parking areas and the like, and the body type elements comprise road blocks, hard shoulder and the like. And aiming at three point cloud clusters with different shapes, three different strategies are adopted for vectorization.
For linear and planar point cloud clusters, the vectorization manner adopted is similar, and referring to the following description of fig. 5, only vectorization of body type point cloud clusters is described here:
carrying out body type point cloud vectorization in a three-dimensional space, and representing vectorization by using a bounding box of a current point cloud cluster:
constructing a three-dimensional space, and representing vectorization by using a bounding box of the current point cloud cluster, wherein the vectorization is specifically as follows: the method comprises the steps of establishing a coordinate system by taking longitude and latitude of a landmark GPS as X and Y coordinates in a three-dimensional space and taking the height as Z coordinates, and representing vectorization by using an external bounding box of a point cloud cluster, wherein leftmost and rightmost positions of point cloud points in the point cloud cluster falling in the X coordinate system are coordinates on the length of the bounding box, foremost and rearmost positions of the point cloud points falling in the Y coordinate system are coordinates on the width of the bounding box, and uppermost and lowermost positions of the point cloud points falling in the Z coordinate system are coordinates on the height of the bounding box.
In general, the shape of the body type point cloud cluster is variable, and in order to improve the vectorization accuracy, vectorization processing is generally performed by adopting the two types of body types and a surface type.
After the linear, surface and body type laser point clouds are independently vectorized, vectorization results are distributed in the same three-dimensional space, and fusion is not needed. But aiming at the point cloud clusters of the elements of different roads, after vectorization is carried out according to the mode, all vector elements are fused finally, and a three-dimensional vectorization map is obtained.
According to the method provided by the embodiment, the collected laser point cloud has the advantages of multiple angles and multiple positions, and compared with a perspective view, the method can better keep the integrity and consistency of an object, and meanwhile, the situation that a tiny part is blocked can be avoided; three-dimensional vectorization is respectively carried out on point clouds with different shapes, so that element types can be enriched, and generation of a three-dimensional high-precision map is completed.
Referring to fig. 2, a main flowchart of an alternative map production method based on laser point cloud according to an embodiment of the present invention is shown, including the following steps:
s201: in the running process of the vehicle, carrying out point cloud acquisition operation on a target area according to a preset frequency by utilizing a vehicle-mounted device to obtain single-frame laser point cloud;
S202: splicing the collected single-frame laser point clouds according to the coordinates of the single-frame laser point clouds under a preset coordinate system to obtain the laser point clouds of the target area;
s203: carrying out semantic analysis on the laser point cloud to determine the category attribute of each point cloud point in the laser point cloud and the serial number of the belonging instance;
s204: combining point cloud points with the same category attribute under the same instance number to obtain a point cloud cluster, and determining the shape of the point cloud cluster according to the corresponding relation between the category attribute and the shape;
s205: and determining a vectorization rule corresponding to the shape so as to vectorize the point cloud cluster to obtain a vectorized map of the target area.
In the above embodiment, for the steps S203 to S205, reference may be made to the descriptions of the steps S101 to S103 shown in fig. 1, respectively, and the descriptions are omitted here.
In the above embodiment, for the steps S201 and S202, the vehicle-mounted device used may be a point cloud and/or an image acquisition system built by a series of software and hardware, for example, an Apollo vehicle-mounted device, a four-dimensional image new vehicle-mounted device, or the like. Common hardware includes cameras (capturing video, images), lidar (capturing laser point cloud), GPS/IMU (capturing and locating trajectories); common software functions include triggering acquisition, storing data, synchronizing hardware devices, and the like.
In the travelling process, the vehicle-mounted device can acquire the point cloud according to a fixed frequency (for example, acquire the point cloud once every 10 meters) to obtain a single-frame laser point cloud.
In order to express the position relation of each point cloud conveniently, plane coordinates and Gaussian planes are adopted, the point cloud of a road (such as a street view) is projected on one plane, and the influence of a sphere curved surface on a small-range road (relative to the earth) can be ignored. Then, the coordinates used at this time are relative coordinates, and the relative coordinates are coordinates of the present coordinate point with respect to the previous coordinate point. Here the single frame laser point cloud coordinates are in a relative coordinate system.
Because each position has an absolute coordinate, a frame of point cloud can be projected under the absolute coordinate system according to the relative coordinates to finish point cloud splicing, and finally, a large-scale laser point cloud is obtained. The absolute coordinate system is characterized in that each positioning coordinate has no relation with the last positioning coordinate.
Finally, a frame of point cloud is spliced to form a complete point cloud, and the complete point cloud can be described as a spliced point cloud or a laser point cloud.
In addition, a single frame laser point cloud acquired by an in-vehicle device has the same characteristic of resolution, where resolution is a ratio of a unit distance between pointing clouds to a physical unit distance. The laser point cloud is obtained by projection calculation of the physical distance measured by the laser radar, and has the characteristic of high accuracy, and the resolution of other points except for the extreme individual noise points is the same.
The collected single-frame laser point cloud also has the characteristics of multiple angles and multiple positions. Because the laser point cloud is formed by splicing point clouds collected from multiple angles by a continuously-moving vehicle, considering that the point cloud collection is 360 degrees, if a background area is blocked by foreground trees, pedestrians and the like under a certain angle, the point cloud is not collected. When the vehicle advances to other positions and the area is collected from other angles, the original shielded area is visible, and finally the point cloud of the area is spliced, namely, the point cloud effect of the whole background is not affected by the fine objects. The laser point clouds are all 360 degrees and belong to multiple angles; the vehicle-mounted devices are continuously advanced and are in multiple positions.
According to the method provided by the embodiment, the laser point cloud collected by the traveling vehicle-mounted device has the advantages of multiple angles and multiple positions, the shielding of fine objects can be avoided, the resolution is consistent throughout, the road integrity and consistency can be better maintained compared with the perspective view, and the robustness of the collected point cloud can be improved.
Referring to fig. 3, a main flow chart of another alternative map production method based on laser point cloud according to an embodiment of the present invention is shown, including the following steps:
S301: collecting laser point clouds of a target area, determining the volume of the laser point clouds, and performing dicing processing on the laser point clouds according to a preset size when the volume exceeds a preset volume threshold value to obtain a plurality of laser point cloud blocks;
s302: carrying out semantic analysis on the plurality of laser point cloud blocks to determine the category attribute of each point cloud point in the plurality of laser point cloud blocks and the number of the belonging instance;
s303: combining point cloud points with the same category attribute under the same instance number to obtain a point cloud cluster, and determining the shape of the point cloud cluster according to the corresponding relation between the category attribute and the shape;
s304: and determining a vectorization rule corresponding to the shape so as to vectorize the point cloud cluster to obtain a vectorized map of the target area.
In the above embodiment, the steps S302 to S304 may be referred to the descriptions of the steps S101 to S103 shown in fig. 1, and are not repeated here.
In the above embodiment, for step S301, considering that the number of point clouds is huge, for example, one field collection may acquire a point cloud of several tens of kilometers. However, the existing point cloud analysis algorithm has limited processing capacity, so that the point cloud analysis algorithm can be firstly subjected to dicing processing before semantic analysis, and the diced point cloud is independently analyzed, and finally the analysis result is fused, so that the point cloud quantity processed each time can be greatly reduced.
The judgment of whether the point cloud needs to be diced can be performed according to the volume of the point cloud, if the volume exceeds the limit, the point cloud needs to be diced, otherwise, the point cloud can be subjected to subsequent analysis according to a whole.
The dicing method of the point cloud may be performed according to a forming track of the vehicle-mounted device, specifically: a segment Duan Dianyun (or a block point cloud) with an overlap region is truncated at a fixed travel distance. For example, a point cloud of a bounding box with the length of 20 meters and the width and the height of 100 meters is taken every 10 meters along the driving track, wherein the length direction of the bounding box is the tangential direction of the driving track point, and the height direction is the vertical ground direction.
The travel path may be a series of sequential path points, flexible. And the track points are corresponding to one frame of point cloud, and the block cutting is to extract one frame of point cloud corresponding to each track point as long as the block cutting is carried out according to the track points. For example, the vehicle-mounted device collects hundreds of thousands of single-frame point clouds, and only tens of laser point clouds are subjected to semantic analysis through splicing and dicing processing.
However, in different dicing methods, the obtained point clouds are different, and some point clouds may have overlapping areas, so after semantic analysis is performed on each diced point cloud, the point cloud numbers ID after the instance division in the overlapping areas need to be combined (which may also be understood as deduplication). The overlapping may be a horizontal overlapping or a vertical overlapping, and may be an overlapping of a pair of point clouds in a three-dimensional space.
The above only gives a dicing approach, and describes how the point cloud numbers are fused for this dicing approach, which is not optimal. And it should be noted that the point cloud dicing is not necessary. And if the point cloud is too large, memory and calculation of the dicing machine are not carried out. However, if the laser point cloud is diced, the subsequent semantic analysis and the like are performed on each diced, such as scene analysis and instance division.
According to the method provided by the embodiment, when the point cloud quantity is large, the laser point cloud can be diced in consideration of limited processing capacity of semantic analysis, so that the processing speed of the point cloud semantic analysis is improved.
Referring to fig. 4, a main flowchart of yet another alternative map production method based on laser point cloud according to an embodiment of the present invention is shown, including the following steps:
s401: collecting laser point clouds of a target area, and carrying out semantic analysis on the laser point clouds to determine category attributes of each point cloud point in the laser point clouds and numbers of the belonging examples;
s402: acquiring an area element, and determining point cloud points of which category attributes do not belong to the area element so as to eliminate the determined point cloud points;
S403: filling holes in the laser point cloud with the point cloud points removed by using a hole repairing mode;
s404: combining the point cloud points with the same category attribute under the same instance number for the laser point cloud filled with the cavity to obtain a point cloud cluster, and determining the shape of the point cloud cluster according to the corresponding relation between the category attribute and the shape;
s405: and determining a vectorization rule corresponding to the shape so as to vectorize the point cloud cluster to obtain a vectorized map of the target area.
In the above embodiment, the steps S401, S404, S405 may be respectively described with reference to fig. 1 to 3, and are not described herein.
In the above embodiment, for step S402, in general, road elements are often blocked by pedestrians, trees, and vehicles, so some non-road elements to be eliminated may be defined, and before vectorizing the road or combining the point cloud clusters, the point cloud clusters with semantics labeled as these non-road elements are eliminated.
Here, the basis for eliminating the point cloud point is Label instead of number ID. And checking Label of each point cloud, judging whether the point cloud point is deleted according to the Label, and if the Label is a pedestrian, eliminating the point cloud point.
For step S403, some voids may be generated in the road element point cloud clusters such as the road line, the isolation pile, the isolation pier, etc. by the laser point cloud after the sundries are removed.
In order to realize high-precision map production more completely later, the condition that the holes cause road breakage is avoided, and hole elimination (also can be understood as hole repair) can be further carried out on each road element.
For example, the shielding object is generally erected on the ground, and road teeth, lane lines and the like which are interested in the high-precision map making process are all on the ground, so that some holes can be left on the ground after the shielding object is removed, and clouds can be connected to the holes for repairing. If no repair is performed, some broken vectorized road elements may appear.
And (3) eliminating the holes, namely filling the point cloud in the holes by using a point cloud hole repairing method aiming at the point cloud clusters of the road elements. The point cloud hole repairing method is already existing, so the specific implementation process of the method is not repeated.
According to the method provided by the embodiment, the point cloud clusters of pedestrians, vehicles, trees and the like which can shade road elements (can be totally removed) are removed, and meanwhile, the hole repair is carried out on the point cloud clusters of the road surface, the isolation piers and the like which can be shaded, so that the follow-up realization of high-precision map production can be more completely facilitated, and the condition that the road is broken due to the hole is avoided.
Referring to fig. 5, a main flowchart of still another alternative map production method based on laser point cloud according to an embodiment of the present invention is shown, including the following steps:
s501: collecting laser point clouds of a target area, and carrying out semantic analysis on the laser point clouds to determine category attributes of each point cloud point in the laser point clouds and numbers of the belonging examples;
s502: combining point cloud points with the same category attribute under the same instance number to obtain a point cloud cluster, and determining the shape of the point cloud cluster according to the corresponding relation between the category attribute and the shape;
s503: projecting the point cloud cluster into a two-dimensional image space to obtain a two-dimensional front view;
s504: carrying out two-dimensional vectorization on the two-dimensional front view to obtain a two-dimensional vectorization result;
s505: and projecting the two-dimensional vectorization result to a three-dimensional space according to the corresponding relation between the two-dimensional image pixels and the three-dimensional space points to obtain a three-dimensional vectorization result.
In the above embodiment, for the steps S501 and S502, reference is made to the descriptions of fig. 1 to 4, respectively, and the descriptions are omitted here.
In the above embodiment, steps S503 to S505 are mainly applied to linear point cloud clusters and planar point cloud clusters.
A) Vectorization of linear point cloud clusters
Since the vectorization of the linear point cloud cluster under the front view can reduce noise influence, the linear point cloud cluster is firstly projected into the two-dimensional front view, the pixel value is white, and other areas are black, namely the two-dimensional black-and-white front view (other colors can be set, but are usually black-and-white because the color difference of the two is larger). And carrying out two-dimensional vectorization under a black-and-white front view, and then projecting the two-dimensional vectorization result into a three-dimensional space to obtain a three-dimensional vectorization result.
The specific implementation process is as follows:
1) Two-dimensional black-and-white front view synthesis
First, two orthogonal principal components are extracted using principal component analysis (Principal Component Analysis, PCA, a spatial dimension reduction algorithm), thereby projecting a three-dimensional point cloud cluster into a two-dimensional space with the two principal components as coordinates. Then, the point cloud points falling in the two-dimensional space are discretized into images.
For example, the point cloud is projected under the two-dimensional image space with granularity of 0.5 m/pixel, and the pixel in which the last point cloud point falls is marked as 255, otherwise, is 0.
The principal component analysis is mainly performed through the conversion of the point cloud in the three-dimensional space, so that the converted point cloud can also retain important information in the two-dimensional space.
In addition to principal component analysis, there may be other ways, for example, each point cloud point may be determined by GPS at the time of acquisition, and thus, the point cloud cluster generated by the combination may also have coordinates thereof. The purpose of projecting the point cloud cluster into the two-dimensional image space can be achieved by setting the heights of all the point cloud points to 0 (other dimensions are also possible).
2) Noise and hole rejection
First, small-scale noise points are filtered using a filtering algorithm (e.g., median filtering of 5 pixels in size);
then, the large-scale noise region is filtered with an image hole patching strategy (e.g., flipping the tile color with a connected region area of less than 2000 pixels). For the connected area, in the image, the depth-first search algorithm may be used to search for adjacent pixels according to 4 or 8 connections, which is a simple prior art and will not be described herein.
The hole repair is distinguished from the point cloud hole repair. The point cloud hole repair is repair with semantics aiming at point cloud; hole patching here is patching without semantics for an image. Even if the point cloud hole repair is performed, it is necessary to further implement the lower image hole repair, and mainly, in front view synthesis, there may be some noise, and it is necessary to smooth the image by noise removal and hole repair.
3) Two-dimensional element vectorization:
firstly, performing white mask region extraction on a projection point region of the point cloud cluster in the step 1) by using a skeleton extraction algorithm (such as a gradient shortest path skeleton extraction algorithm) to obtain a skeleton of a white mask region; then, the adjacent pixel points are sequentially connected, so that the skeleton can be locally and continuously connected, and a skeleton vectorization segment is obtained.
Points on the skeleton are discrete pixels, and skeleton vectorization is to continue the discrete pixels.
Further, a longest bone line can be searched.
Considering that there may be many branches in the framework vectorized segment, in order to extract a longest branch, the longest skeleton line may be searched by using an exhaustion method from the vertex with only one neighborhood point as the starting point, that is, sequentially searching with the end of the non-adjacent framework vectorized segment, and the ending point is the end of other non-adjacent framework segments.
Or each skeleton vectorization segment has a starting point and an ending point, and if the two skeleton line vectorization segments are connected end to end, the two vectorization segments are connected sequentially. And the like, the longest bone wire can be obtained.
Further, if there are a plurality of roads in one area, a plurality of skeleton lines may be finally obtained according to the above manner.
4) Three-dimensional element vectorization
According to the mapping relation between the two-dimensional image pixels and the three-dimensional space point cloud points established in the step 1), continuous pixel points on the two-dimensional element vector line are projected into the three-dimensional space, and a line which is sequentially and adjacently constructed by the continuous point cloud points in the three-dimensional space, namely a continuous three-dimensional point set, can be mapped, so that three-dimensional vectorization is completed.
And 3) for the skeleton vectorization segment obtained in the step 3), wherein the continuous pixel points on the two-dimensional element vectorization are the continuous pixel points on the skeleton vectorization segment.
If only the skeleton vectorized segment is projected into the three-dimensional space, the three-dimensional point set obtained by projection may be connected later; however, if the longest bone line is projected into three-dimensional space, then the point set connection step may not be required.
In addition, the point set under the three-dimensional space is subjected to thinning treatment by using a vertex thinning algorithm in consideration of overlarge point set after three-dimensional vectorization.
B) Vectorization of planar point cloud clusters
And similarly to the vectorization of the linear point cloud cluster, the planar point cloud cluster is projected to the two-dimensional front view, vectorization is performed in the two-dimensional front view, and then the two-dimensional vectorization result is projected to the three-dimensional space to obtain the three-dimensional vector result.
The steps 1), 2) and 4) are the same as the vectorization of the linear point cloud clusters, and are not described herein, and only the two-dimensional vectorization step of the planar point cloud clusters is described below:
3) Two-dimensional element vectorization: and extracting the two-dimensional vectorization outline of the white mask area by using an outline tracking algorithm.
The two-dimensional vectorization is to sequentially connect a series of pixel points, and the purpose of the contour tracking algorithm comprises two parts: (1) searching edge pixel points of the mask area; (2) the edge pixels are connected sequentially. Therefore, the contour tracking algorithm completes the two-dimensional element vectorization process.
In addition, considering that some area-type point cloud clusters are too large, such as a road middle isolation pile, the area-type point cloud clusters are optionally segmented, such as segmenting one cluster every 400 meters along a driving track, then area-type vectorizing is respectively carried out on each cluster, and adjacent area-type vector elements are fused, the fusion strategy comprises, but is not limited to, setting an adsorption threshold value, such as 10 centimeters, and adsorbing edge vertexes in the current area-type vector elements onto the area-type vector elements of the neighborhood point cloud clusters within the threshold value range.
According to the method provided by the embodiment, three-dimensional vectorization is respectively carried out on the linear elements and the surface elements, so that the element types can be enriched, and the generation of the three-dimensional high-precision map is completed.
According to the method provided by the embodiment of the invention, the collected laser point cloud has the advantages of multiple angles and multiple positions, compared with a perspective view, the method can better maintain the integrity and consistency of an object, can extract road elements with rich types in a full-automatic, accurate and robust way, and can avoid the situation that tiny parts are blocked; sundries are removed and holes are repaired on the laser point cloud, and shielding of large-area vehicles, trees and the like can be reduced, so that the robustness of the method is improved; finally, three-dimensional vectorization is respectively carried out on the linear elements, the surface elements and the body type elements, so that the element types are enriched, and the generation of the three-dimensional high-precision map is completed.
Referring to fig. 6, a schematic diagram of main modules of a map production device 600 based on a laser point cloud according to an embodiment of the present invention is shown, including:
the point cloud analysis module 601 is configured to collect a laser point cloud of a target area, and perform semantic analysis on the laser point cloud to determine a category attribute and a number of an instance of each point cloud point in the laser point cloud;
the point cloud combination module 602 is configured to combine point cloud points with the same category attribute under the same instance number to obtain a point cloud cluster, and determine a shape of the point cloud cluster according to a corresponding relationship between the category attribute and the shape;
And the map production module 603 is configured to determine a vectorization rule corresponding to the shape, so as to perform vectorization processing on the point cloud cluster, and obtain a vectorized map of the target area.
In the embodiment of the present invention, the point cloud analyzing module 601 is configured to: in the running process of the vehicle, carrying out point cloud acquisition operation on the target area according to a preset frequency by utilizing a vehicle-mounted device to obtain single-frame laser point cloud; and according to the coordinates of the single-frame laser point cloud under a preset coordinate system, splicing the acquired single-frame laser point cloud to obtain the laser point cloud of the target area.
In the embodiment of the present invention, the point cloud analyzing module 601 is further configured to: and determining the volume of the laser point cloud, and when the volume exceeds a preset volume threshold, dicing the laser point cloud according to a preset size to obtain a plurality of laser point cloud blocks.
In the implementation device of the invention, the semantic analysis comprises scene analysis and instance segmentation;
the point cloud parsing module 601 is configured to:
performing scene analysis on the laser point clouds to determine category attributes of each point cloud point in the laser point clouds; and
and carrying out instance segmentation on the laser point cloud to obtain the number of the instance to which each point cloud point belongs, and establishing a corresponding relation between the instance number and the category attribute by combining the determined category attribute of each point cloud point.
The implementation device of the present invention further includes a point cloud patching module 604 (not shown in the figure) for:
acquiring an area element, and determining point cloud points of which category attributes do not belong to the area element so as to eliminate the determined point cloud points; and
and filling the holes of the laser point cloud after the point cloud points are removed by using a hole repairing mode.
In the embodiment of the present invention, the map production module 603 is configured to:
projecting the point cloud cluster into a two-dimensional image space to obtain a two-dimensional front view; carrying out two-dimensional vectorization on the two-dimensional front view to obtain a two-dimensional vectorization result; and projecting the two-dimensional vectorization result to a three-dimensional space according to the corresponding relation between the two-dimensional image pixels and the three-dimensional space points to obtain a three-dimensional vectorization result.
In the implementation device of the invention, the shape of the point cloud cluster is a line type;
the map production module 603 is configured to: performing mask region extraction on the point cloud projection point region in the two-dimensional front view by using a skeleton extraction mode to obtain a mask region skeleton; and sequentially connecting pixels of the images in adjacent areas in the mask area skeleton to obtain a skeleton vectorization fragment.
In the implementation device of the invention, the shape of the point cloud cluster is a plane shape;
The map production module 603 is configured to: extracting edge pixel points from the point cloud projection point area in the two-dimensional front view by utilizing a contour tracking mode; sequentially connecting the extracted edge pixel points to obtain a two-dimensional vectorization contour of the point cloud projection point area.
In the implementation device of the invention, the shape of the point cloud cluster is a body type;
the map production module 603 is configured to:
and determining the coordinates of each point cloud point in the body type point cloud cluster under a preset coordinate system, extracting the minimum coordinate value and the maximum coordinate value on each coordinate axis, and taking the extracted minimum coordinate value and maximum coordinate value as vectorization values of the body type point cloud cluster under a three-dimensional space.
In addition, the implementation of the apparatus in the embodiments of the present invention has been described in detail in the above method, so that the description is not repeated here.
The device provided by the embodiment of the invention has the advantages of multiple angles and multiple positions of the collected laser point cloud, can better maintain the integrity and consistency of objects compared with a perspective view, can extract road elements with rich types in a full-automatic, more accurate and robust way, and can avoid the situation that tiny parts are blocked; sundries are removed and holes are repaired on the laser point cloud, and shielding of large-area vehicles, trees and the like can be reduced, so that the robustness of the method is improved; finally, three-dimensional vectorization is respectively carried out on the linear elements, the surface elements and the body type elements, so that the element types are enriched, and the generation of the three-dimensional high-precision map is completed.
Fig. 7 shows an exemplary system architecture 700 of a laser point cloud based map production method or a laser point cloud based map production apparatus to which embodiments of the present invention may be applied.
As shown in fig. 7, a system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705 (by way of example only). The network 704 is the medium used to provide communication links between the terminal devices 701, 702, 703 and the server 705. The network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 705 via the network 704 using the terminal devices 701, 702, 703 to receive or send messages or the like. Various communication client applications can be installed on the terminal devices 701, 702, 703.
The terminal devices 701, 702, 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 705 may be a server providing various services, such as a background management server (by way of example only) providing support for shopping-type websites browsed by users using the terminal devices 701, 702, 703. The background management server can analyze and other data of the received information inquiry request and feed back the processing result to the terminal equipment.
It should be noted that, the map production method based on the laser point cloud provided by the embodiment of the present invention is generally executed by the server 705, and accordingly, the map production device based on the laser point cloud is generally disposed in the server 705.
It should be understood that the number of terminal devices, networks and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, there is illustrated a schematic diagram of a computer system 800 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 8 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU) 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, mouse, etc.; an output portion 807 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 808 including a hard disk or the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. The drive 810 is also connected to the I/O interface 805 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as needed so that a computer program read out therefrom is mounted into the storage section 808 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 809, and/or installed from the removable media 811. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 801.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: the processor comprises a point cloud analysis module, a point cloud combination module and a map production module. The names of these modules do not in some cases limit the module itself, and for example, the point cloud analysis module may also be described as a "module that collects a point cloud and analyzes it".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include:
collecting laser point clouds of a target area, and carrying out semantic analysis on the laser point clouds to determine category attributes of each point cloud point in the laser point clouds and numbers of the belonging examples;
combining point cloud points with the same category attribute under the same instance number to obtain a point cloud cluster, and determining the shape of the point cloud cluster according to the corresponding relation between the category attribute and the shape;
and determining a vectorization rule corresponding to the shape so as to vectorize the point cloud cluster to obtain a vectorized map of the target area.
According to the technical scheme provided by the embodiment of the invention, the collected laser point cloud has the advantages of multiple angles and multiple positions, compared with a perspective view, the object integrity and consistency can be better maintained, road elements with rich types can be extracted fully automatically, accurately and robustly, and the situation that tiny parts are blocked can be avoided; sundries are removed and holes are repaired on the laser point cloud, and shielding of large-area vehicles, trees and the like can be reduced, so that the robustness of the method is improved; finally, three-dimensional vectorization is respectively carried out on the linear elements, the surface elements and the body type elements, so that the element types are enriched, and the generation of the three-dimensional high-precision map is completed.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.