Point cloud data labeling method and device and storage medium
By automatically matching and adjusting point cloud data and map data, the problem of low efficiency of point cloud data annotation in the existing technology is solved, and efficient and low-cost electronic map updates are achieved.
Patent Information
- Application Number
- CN202310343193.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-10-01
AI Technical Summary
Annotation of point cloud data in the existing technology requires a lot of manual participation, which results in high cost and inefficiency, making it difficult to meet the real-time requirements of electronic map updates.
By obtaining the collection trajectories corresponding to the existing map data and point cloud data, matching road elements based on the trajectories, performing rough matching, fine matching and attribute adjustment, realizing automatic alignment of point cloud data and map data, and fully automatically completing the annotation process.
It improves the annotation efficiency of point cloud data, saves labor costs, and achieves rapid updating of electronic maps.
Smart Images

Figure CN118736247A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of high-precision maps, and in particular to a method, device and storage medium for annotating point cloud data. Background Art
[0002] Electronic maps, especially high-precision electronic maps (referred to as high-precision maps), are the data basis for many upper-layer applications to realize their corresponding functions or services. Therefore, the accuracy and freshness of electronic maps are crucial. Since the real world is changing every day, in order to ensure the accuracy and freshness of electronic maps, it is usually necessary to update electronic maps regularly. The update of existing electronic maps often relies on point cloud data collected from the real world, such as point cloud data collected by laser radar, and / or point cloud data obtained by visual reconstruction of images collected from the real world. The collected point cloud data can be annotated, and the map generation model can be trained using the point cloud data and the annotated data, so that the newly collected point cloud data can be directly identified by the trained map generation model in the future, and then the electronic map can be updated based on the identification results. However, the annotation of traditional point cloud data requires a lot of manual participation. It often takes more than several months from standard design to manual annotation. Such a model is difficult to meet the real-time requirements of electronic map updates. At present, although many point cloud data annotation tools have been launched in the industry, these point cloud data annotation tools still require a lot of manual participation, resulting in high costs and low annotation efficiency.
[0003] Therefore, a solution needs to be proposed to achieve the annotation of point cloud data efficiently and at low cost. Summary of the invention
[0004] The embodiments of the present disclosure provide a method, device and storage medium for annotating point cloud data.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for labeling point cloud data, which includes:
[0006] Obtaining existing map data, point cloud data to be annotated, and collection trajectories corresponding to the point cloud data;
[0007] Acquire a first matching road element matching the point cloud data from the existing map data based on the acquisition trajectory;
[0008] Based on the distance relationship between the point cloud data and the first matching road element, acquiring a second matching road element matching the point cloud data from the first matching road element;
[0009] Based on the position offset relationship between the point cloud data and the second matching road element, the attribute information of the second matching road element is adjusted, and the adjusted attribute information of the second matching road element is determined as the annotation data of the point cloud data.
[0010] Furthermore, before acquiring a first matching road element matching the point cloud data from the existing map data based on the acquisition trajectory, the method further includes:
[0011] Clustering the point cloud data to obtain at least one point cloud cluster to be labeled;
[0012] Acquiring a first matching road element matching the point cloud data from the existing map data based on the acquisition trajectory includes:
[0013] A first matching road element matching the point cloud cluster is acquired from the existing map data based on the acquisition trajectory.
[0014] Further, obtaining a first matching road element matching the point cloud data from the existing map data based on the acquisition trajectory includes:
[0015] Based on the collected trajectory, searching the existing map data for candidate matching road elements within a first preset range of the collected trajectory;
[0016] Based on the distance relationship between the point cloud cluster and the candidate matching road elements, a first matching road element matching the point cloud cluster is acquired from the candidate matching road elements.
[0017] Further, when the first matching road element matching the point cloud data is a linear road element, acquiring a second matching road element matching the point cloud data from the first matching road element based on a distance relationship between the point cloud data and the first matching road element includes:
[0018] determining a first distance between the point cloud cluster and the first matching road element;
[0019] retaining the first matching road element whose first distance satisfies the distance restriction condition;
[0020] When at least two first matching road elements matching the point cloud cluster are retained, determining a second distance between two adjacent first matching road elements among the at least two first matching road elements;
[0021] When the second distance is less than a first preset distance threshold, merging the two adjacent first matching road elements into a second matching road element that matches the point cloud cluster;
[0022] When the second distance is greater than a second preset distance threshold, splitting the point cloud cluster into two point cloud clusters corresponding one-to-one to each first matching road element of the two adjacent first matching road elements;
[0023] When the second distance is greater than or equal to the first preset distance threshold and less than or equal to the second preset distance threshold, point cloud data on the point cloud cluster respectively associated with each of the two adjacent first matching road elements is determined, and based on the intersection and union relationship between the point cloud data on the point cloud cluster respectively associated with each of the two adjacent first matching road elements, the two adjacent first matching road elements are merged into a second matching road element matching the point cloud cluster, or the point cloud cluster is split into two point cloud clusters corresponding one-to-one to each of the two adjacent first matching road elements.
[0024] Further, based on the intersection and union relationship between the point cloud data on the point cloud clusters respectively associated with each of the two adjacent first matching road elements, the two adjacent first matching road elements are merged into a second matching road element matching the point cloud cluster, or the point cloud cluster is split into two point cloud clusters corresponding one-to-one to each of the two adjacent first matching road elements, including:
[0025] determining a first ratio of an intersection to a union between point cloud data on the point cloud clusters respectively associated with each of the two adjacent first matching road elements, and a second ratio of an intersection between point cloud data on the point cloud clusters respectively associated with each of the two adjacent first matching road elements and point cloud data on the point cloud cluster associated with a third matching road element, the point cloud data on the point cloud cluster associated with the third matching road element being less than the point cloud data on the point cloud cluster associated with a fourth matching road element, the third matching road element and the fourth matching road element being the two adjacent first matching road elements;
[0026] When the first ratio is greater than a first ratio threshold, or when the first ratio is less than or equal to the first ratio threshold and the second ratio is greater than a second ratio threshold, merging the two adjacent first matching road elements into a second matching road element that matches the point cloud cluster;
[0027] When the first ratio is less than or equal to the first ratio threshold and the second ratio is less than or equal to the second ratio threshold, the point cloud cluster is split into two point cloud clusters corresponding one-to-one to each first matching road element of the two adjacent first matching road elements.
[0028] Furthermore, splitting the point cloud cluster into two point cloud clusters corresponding one-to-one to each first matching road element of the two adjacent first matching road elements comprises:
[0029] According to the distances from the point cloud data in the point cloud cluster to each first matching road element in the two adjacent first matching road elements, the point cloud cluster is split into two point cloud clusters corresponding one-to-one to each first matching road element in the two adjacent first matching road elements.
[0030] Further, when the first matching road element matching the point cloud data is a planar road element, acquiring a second matching road element matching the point cloud data from the first matching road element based on a distance relationship between the point cloud data and the first matching road element includes:
[0031] Selecting a target first matching road element within a second preset range of the point cloud cluster from the first matching road elements;
[0032] determining a third distance between the point cloud cluster and the target first matching road element that matches the point cloud data in the point cloud cluster;
[0033] A second matching road element that has a one-to-one matching relationship with the point cloud cluster is determined from the target first matching road element based on the third distance.
[0034] Further, when the second matching road element matched with the point cloud data is a linear road element, adjusting the attribute information of the second matching road element based on the position offset relationship between the point cloud data and the second matching road element matched, and determining the adjusted attribute information of the second matching road element as the annotation data of the point cloud data, includes:
[0035] When the length of the second matching road element is greater than or equal to a preset length threshold, dividing the second matching road element into a plurality of sub-road elements;
[0036] Determining point cloud data in the point cloud cluster that respectively match the plurality of sub-road elements, and a spatial offset between the sub-road elements and the matching point cloud data;
[0037] When there is matching point cloud data for the sub-road element and the spatial offset is less than a preset offset threshold, the geographic coordinates of the sub-road element are adjusted to reduce the spatial offset between the adjusted sub-road element and the matching point cloud data;
[0038] The plurality of sub-road elements are merged, and the attribute information of the merged second matching road element is determined as the annotation data of the point cloud cluster.
[0039] Further, when the second matching road element matched with the point cloud data is a planar road element, adjusting the attribute information of the second matching road element based on the position offset relationship between the point cloud data and the second matching road element matched, and determining the adjusted attribute information of the second matching road element as the annotation data of the point cloud data, includes:
[0040] Determine an intersection-and-union relationship between a minimum circumscribed convex hull of the point cloud cluster and the second matching road element that matches the point cloud data in the point cloud cluster;
[0041] retaining the second matching road element whose intersection relationship meets the threshold condition;
[0042] When the road type of the retained second matching road element is the first preset type, adjusting the geographic coordinates of the second matching road element to increase the overlap between the second matching road element and the minimum circumscribed convex hull of the matching point cloud cluster;
[0043] When the road type of the retained second matching road element is a second preset type, adjusting the geographic coordinates of the second matching road element based on the minimum circumscribed convex hull of the point cloud cluster to increase the overlap between the second matching road element and the minimum circumscribed convex hull of the matching point cloud cluster;
[0044] The adjusted attribute information of the second matching road element is determined as the annotation data of the point cloud cluster.
[0045] In a second aspect, an embodiment of the present invention provides a method for training a map generation model, which includes:
[0046] Acquire sample data, the sample data comprising point cloud data and annotation data corresponding to the point cloud data; the annotation data is determined based on the method described in the first aspect;
[0047] The map generation model is trained using the sample data.
[0048] In a third aspect, an embodiment of the present invention provides a point cloud data annotation device, which includes:
[0049] An acquisition module is configured to acquire existing map data, point cloud data to be annotated, and a collection trajectory corresponding to the point cloud data;
[0050] A first matching module is configured to obtain a first matching road element matching the point cloud data from the existing map data based on the acquisition trajectory;
[0051] A second matching module is configured to obtain a second matching road element matching the point cloud data from the first matching road element based on a distance relationship between the point cloud data and the first matching road element;
[0052] The adjustment module is configured to adjust the attribute information of the second matching road element based on the position offset relationship between the point cloud data and the matching second matching road element, and determine the adjusted attribute information of the second matching road element as the annotation data of the point cloud data.
[0053] The functions can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions.
[0054] In one possible design, the structure of the above-mentioned device includes a memory and a processor, the memory is used to store one or more computer instructions that support the above-mentioned device to execute the above-mentioned corresponding method, and the processor is configured to execute the computer instructions stored in the memory. The above-mentioned device may also include a communication interface for the above-mentioned device to communicate with other devices or communication networks.
[0055] In a fourth aspect, an embodiment of the present disclosure provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method described in any one of the above aspects.
[0056] In a fifth aspect, an embodiment of the present disclosure provides a computer-readable storage medium for storing computer instructions used by any of the above-mentioned devices, and when the computer instructions are executed by a processor, they are used to implement the method described in any of the above-mentioned aspects.
[0057] In a sixth aspect, an embodiment of the present disclosure provides a computer program product, which includes computer instructions, and when the computer instructions are executed by a processor, they are used to implement the method described in any of the above aspects.
[0058] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0059] The disclosed embodiment proposes a method for labeling point cloud data. The method obtains existing map data, point cloud data to be labeled, and acquisition tracks corresponding to the point cloud data, obtains a first matching road element matching the point cloud data from the existing map data based on the acquisition track, and obtains a second matching road element matching the point cloud data from the first matching road element based on the distance relationship between the point cloud data and the matching first matching road element. Afterwards, based on the position offset relationship between the point cloud data and the matching second matching road element, the attribute information of the second matching road element is adjusted, and the adjusted attribute information of the second matching road element is determined as the point cloud data labeling data. Since the disclosed method makes full use of the existing map data, the existing map data and the point cloud data to be labeled are matched and aligned with the existing map data through the first rough matching, the second fine matching, and the adjustment operation. No manual participation is required throughout the process, and the labeling of the point cloud data is achieved in a fully automatic manner, which improves the labeling efficiency of the point cloud data and saves labor costs.
[0060] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Other features, objectives and advantages of the present disclosure will become more apparent through the following detailed description of non-limiting embodiments in conjunction with the accompanying drawings. In the accompanying drawings:
[0062] Figure 1 A flowchart showing a method for labeling point cloud data according to an embodiment of the present disclosure is shown;
[0063] Figures 2 to 5 A schematic diagram showing a flow chart of a method for labeling point cloud data according to an embodiment of the present disclosure;
[0064] Figure 6 A structural block diagram of a point cloud data annotation device according to an embodiment of the present disclosure is shown;
[0065] Figure 7 It is a structural schematic diagram of an electronic device suitable for implementing a method for labeling point cloud data and / or a method for training a map generation model according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0066] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for the sake of clarity, parts not related to the description of the exemplary embodiments are omitted in the accompanying drawings.
[0067] In the present disclosure, it should be understood that terms such as "include" or "have" are intended to indicate the presence of features, numbers, steps, behaviors, components, parts, or a combination thereof disclosed in the specification, and do not exclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or a combination thereof exist or are added.
[0068] It should also be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0069] The user information (including but not limited to user device information such as location information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0070] The details of the embodiments of the present disclosure are described in detail below through specific examples.
[0071] Figure 1 FIG. 1 is a flow chart showing a method for labeling point cloud data according to an embodiment of the present disclosure. Figure 1 As shown, the method for labeling point cloud data includes the following steps:
[0072] In step S101, existing map data, point cloud data to be annotated, and a collection trajectory corresponding to the point cloud data are obtained;
[0073] In step S102, a first matching road element matching the point cloud data is obtained from the existing map data based on the acquisition trajectory;
[0074] In step S103, based on the distance relationship between the point cloud data and the first matching road element, a second matching road element matching the point cloud data is acquired from the first matching road element;
[0075] In step S104, based on the position offset relationship between the point cloud data and the second matching road element, the attribute information of the second matching road element is adjusted, and the adjusted attribute information of the second matching road element is determined as the annotation data of the point cloud data.
[0076] The method for labeling point cloud data provided by the embodiment of the present disclosure can be executed on a server, or by a physical device that can provide server functions, or by a component (such as a chip, etc.) configured in a physical device, or by a module that can implement part or all of the server functions, etc., and the present disclosure does not limit this. For ease of understanding, the present disclosure uses a server as an example in the following introduction to describe the method provided by the present disclosure.
[0077] In the disclosed embodiment, the existing map data may be map data of an existing high-precision map. The existing map data may include vector data corresponding to various roads and road elements in the real world, and the vector data may include geographic coordinates of the road elements, and the geographic coordinates may be vector coordinates.
[0078] In some embodiments, road elements may include linear road elements and planar road elements. Linear road elements may include but are not limited to lane lines, guardrails, etc. Planar road elements may include but are not limited to ground signs, and ground signs may include: zebra crossings, stop lines, left / right turn arrows, and text signs (such as "Speed limit 30km / h") and other types of road elements.
[0079] In the embodiments of the present disclosure, point cloud data may be understood as data including a plurality of point clouds, wherein the point cloud data includes a plurality of three-dimensional points, each of which has corresponding geographic coordinates. The point cloud data may be image data collected by a camera mounted on a road collection vehicle, and a 3D point cloud obtained by visual reconstruction. The collection trajectory corresponding to the point cloud data may be the road trajectory that the road collection vehicle passes through when collecting the point cloud data to be annotated. It should be noted that in the following description, the point cloud data indicated in the present disclosure may be understood as point cloud data that needs to be annotated.
[0080] In some embodiments, the point cloud data and the collection trajectory of the point cloud data may be transmitted to the server by the road collection vehicle.
[0081] After obtaining the acquisition track corresponding to the point cloud data, the server can filter out the road elements located near the acquisition track from the existing map data. During the screening process, the geographical coordinates of each point in the point cloud data can be matched with the geographical coordinates of the road elements in the existing map data to determine the road elements that match each point, that is, to determine the road elements located near each point, and determine the road elements located near each point as the first matching road elements that match the point. It can be understood that since the matching process is to determine the road elements near each point, this process is also a rough matching process.
[0082] In some embodiments, the number of first matching road elements matching each point is at least one, and multiple points may be matched to the same first matching road element.
[0083] After determining the first matching road element that matches each point in the point cloud data, the server can further determine the second matching road element that matches each point. For each point, if the number of first matching road elements that match the point is one, the first matching road element can be used as the second matching road element that has a one-to-one matching relationship with the point; if the number of first matching road elements that match the point is at least two, the distance between the point and each first matching road element that matches the point can be determined based on the geographic coordinates corresponding to the point and the geographic coordinates of each first matching road element that matches the point, and then based on the distance, the first matching road element closest to the point is determined as the second matching road element that matches the point. In this way, the second matching road element that has a one-to-one matching relationship with each point can be determined. It can be understood that since this process determines the first matching road element closest to each point, this process is also a fine matching process.
[0084] In some embodiments, the number of second matching road elements matching each point is one, and multiple points can be matched to the same second matching road element.
[0085] In the disclosed embodiment, the position offset relationship between the point cloud data and the matched second matching road element can be understood as: the offset between the point in the point cloud data and the matched second matching road element in the geographic coordinates. In some embodiments, considering that the second matching road element is a linear or planar element, rather than a point element, the offset relationship between all points matched to the same second matching road element and the second matching road element can be determined as the offset relationship between each point and the second matching road element. In other words, all points matched to the same second matching road element are regarded as a whole, and their offset relationship with the second matching road element is determined. Among them, the offset can characterize the degree of overlap between the multiple points as a whole and the matched second matching road element in the geographic coordinates. The larger the offset, the smaller the degree of overlap between the two in the geographic coordinates, and the lower the probability of complete matching. Conversely, the smaller the offset, the greater the degree of overlap between the two in the geographic coordinates, and the greater the probability of complete matching.
[0086] In some embodiments, the attribute information of the road element may include, but is not limited to, relevant information such as the geographical coordinates of the road element, the shape of the road element, the type of the road element, and the color of the road element.
[0087] In the embodiment of the present disclosure, adjusting the attribute information of the second matching road element at least includes adjusting the geographic coordinates of the second matching road element, the shape of the road element, and the like.
[0088] Due to the influence of positioning errors and the like, the multiple points as a whole in the point cloud data and the matching second matching road elements may not strictly correspond in geographic coordinates. Therefore, for the multiple points as a whole, the server can adjust the attribute information of the second matching road element according to the offset relationship between the multiple points as a whole and the matching second matching road element, so that the offset of the multiple points as a whole and the matching second matching road element in geographic coordinates is reduced, that is, the overlap degree of the multiple points as a whole and the matching second matching road element in geographic coordinates is increased to achieve basic correspondence. Then, the attribute information of the matching second matching road element can be used as the annotation data of the multiple points as a whole.
[0089] It can be understood that, since the multiple points in the acquired point cloud data as a whole can correspond to different road elements in the actual road, when the present disclosure annotates the points in the point cloud data in the above manner, each point can be corresponded to a set of annotation data, and the set of annotation data can correspond to multiple points. And the set of annotation data can include but is not limited to other attribute information such as the geographic coordinates corresponding to the point, the type of road element, the identification of the road element in the existing electronic map, etc.
[0090] The disclosed embodiment proposes a method for labeling point cloud data. The method obtains existing map data, point cloud data to be labeled, and acquisition tracks corresponding to the point cloud data, obtains a first matching road element matching the point cloud data from the existing map data based on the acquisition track, and obtains a second matching road element matching the point cloud data from the first matching road element based on the distance relationship between the point cloud data and the matching first matching road element. Afterwards, based on the position offset relationship between the point cloud data and the matching second matching road element, the attribute information of the second matching road element is adjusted, and the adjusted attribute information of the second matching road element is determined as the point cloud data labeling data. Since the disclosed method makes full use of the existing map data, the existing map data and the point cloud data to be labeled are matched and aligned with the existing map data through the first rough matching, the second fine matching, and the adjustment operation. No manual participation is required throughout the process, and the labeling of the point cloud data is achieved in a fully automatic manner, which improves the labeling efficiency of the point cloud data and saves labor costs.
[0091] In an optional implementation of this embodiment, before step S102, i.e., obtaining a first matching road element matching the point cloud data from the existing map data based on the acquisition trajectory, the following steps may also be included:
[0092] Clustering the point cloud data to obtain at least one point cloud cluster to be labeled;
[0093] Acquiring a first matching road element matching the point cloud data from the existing map data based on the acquisition trajectory includes:
[0094] A first matching road element matching the point cloud cluster is acquired from the existing map data based on the acquisition trajectory.
[0095] In this optional implementation, after acquiring the point cloud data collected by the road collection vehicle, the server may cluster the acquired point cloud data based on a preset algorithm. In some embodiments, the preset algorithm may be a clustering algorithm based on density clustering (spatial clustering of applications with noise, SCAN). Clustering the point cloud data may obtain point cloud clusters. The number of point cloud clusters obtained by clustering is at least one.
[0096] In some embodiments, when clustering point cloud data, the clustering may be performed based on a close distance clustering principle, wherein the close distance clustering principle may be understood as: clustering points with a relatively close distance into a point cloud cluster.
[0097] In some embodiments, the geographic coordinates of the point cloud cluster may be the central geographic coordinates of the point cloud cluster, which are the geographic coordinates corresponding to the point located at the center of the point cloud cluster. The geographic coordinates of the first matching road element are the geographic coordinates in the corresponding existing map data, which can be understood as the geographic coordinates of the corresponding road element in the real world. The geographic coordinates of the point cloud cluster obtained by clustering the point cloud data also correspond to the geographic coordinates of the road element in the real world.
[0098] After the server obtains at least one point cloud cluster by clustering the point cloud data, for each point cloud cluster, the server can determine the existing map data located near the point cloud cluster based on the geographic coordinates of the point cloud cluster and the geographic coordinates of the existing map data, and use the existing map data as the first matching road element that matches the point cloud cluster.
[0099] It can be understood that after the point cloud data is clustered to obtain point cloud clusters, the aforementioned steps S102 to S104 are also executed for each point cloud cluster accordingly. When the labeled data for each point cloud cluster is completed, the labeling of each point in the point cloud cluster is also completed accordingly. Since this method is based on the point cloud cluster as the granularity for labeling, multiple points in the point cloud cluster can be labeled at the same time, which improves the efficiency of the point cloud data labeling.
[0100] In an optional implementation of this embodiment, step S102, i.e., the step of acquiring a first matching road element matching the point cloud data from the existing map data based on the acquisition trajectory, further includes the following steps:
[0101] Based on the collected trajectory, searching the existing map data for candidate matching road elements within a first preset range of the collected trajectory;
[0102] Based on the distance relationship between the point cloud cluster and the candidate matching road elements, a first matching road element matching the point cloud cluster is acquired from the candidate matching road elements.
[0103] In the disclosed embodiment, the candidate matching road element may be a road element located within a first preset range of the collection track of the road collection vehicle in the existing map data acquired by the server. The first preset range may be a preset range around the collection track when the road collection vehicle collects point cloud data. For example, the first preset range may be set to a spatial range within N meters around the collection track, and a road element whose entire or partial geographic coordinates are within the first preset range may be determined as a candidate matching road element matching the collection track.
[0104] Since the amount of existing map data in the electronic map is huge, in order to improve the matching efficiency between point cloud data and existing map data, after obtaining the existing map data from the electronic map, the server can perform a preliminary screening of the acquired existing map data based on the collection trajectory of the point cloud data collected by the road collection vehicle, and search for road elements within a first preset range around the collection trajectory, and use the searched road elements as candidate matching road elements.
[0105] In some embodiments, the number of candidate matching road elements is at least one.
[0106] In some embodiments, when searching for candidate matching road elements, for the acquired existing map data, the relationship between the distance between each road element in the existing map data and the collection trajectory and the first preset range can be used to determine whether the current road element is a candidate matching road element. In some embodiments, the distance between each road element in the existing map data and the collection trajectory can be determined. If the distance is greater than or equal to the maximum value of the range corresponding to the first preset range, the existing map data is not within the first preset range of the collection trajectory, and the existing map data is discarded; if the distance is less than the maximum value of the range corresponding to the first preset range, the existing map data is within the first preset range of the collection trajectory, and the existing map data is used as a candidate matching road element.
[0107] In some embodiments, the distance from each road element in the existing map data to the collection track can be determined by: determining the foot of the projection of each point on each road element in the existing map data to the collection track, and obtaining the geographic coordinates corresponding to the foot of the projection; based on the geographic coordinates of each point on each road element in the existing map data and the geographic coordinates of the foot of the projection, determine the distance from the road element to the collection track. For example, assuming that the geographic coordinates of a point on a road element are (x1, y1, z1), and the geographic coordinates corresponding to the foot of the projection of the point to the collection track are (x2, y2, z2), then the distance between the point and the collection track d = √(x1-x2) 2 +(y1-y2) 2 +(z1-z2) 2 The distance from the road element to the collection trajectory may be determined based on the distance from each point on the road element to the collection trajectory. For example, the distance from the road element to the collection trajectory may be an average value, a minimum value, etc. of the distances from each point on the road element to the collection trajectory.
[0108] Since the server can cluster the point cloud data based on the SCAN algorithm to obtain at least one point cloud cluster, each point cloud cluster can be considered as a candidate for a road element. After clustering to obtain at least one point cloud cluster and searching for candidate matching road elements within the first preset range of the acquisition trajectory, the server can determine the first matching road element that matches each point cloud cluster through the first rough matching. In some embodiments, for each point cloud cluster, candidate matching road elements within the third preset range of the point cloud cluster can be screened out from the candidate matching road elements based on the geographic coordinates of the point cloud cluster, and the screened candidate matching road elements are used as the first matching road elements that match the point cloud cluster. For example, the third preset range can be set to a spatial range within M meters around the point cloud cluster.
[0109] The geographic coordinates of the point cloud cluster may include the geographic coordinates of each point in the point cloud cluster. In some embodiments, when matching with candidate matching road elements, the central geographic coordinates of the point cloud cluster may be used. The central geographic coordinates may be the geographic coordinates corresponding to the center point of the point cloud cluster.
[0110] In some embodiments, the step of selecting candidate matching road elements within a third preset range of the point cloud cluster from the candidate matching road elements using the central geographic coordinates of the point cloud cluster can be implemented as follows:
[0111] Determine a distance between the point cloud cluster and each candidate matching road element matching the point cloud cluster based on the central geographic coordinates of the point cloud cluster, the radius of the point cloud cluster, and the geographic coordinates of each candidate matching road element matching the point cloud cluster;
[0112] For any candidate matching road element that matches the point cloud cluster, if the distance between the determined point cloud cluster and the candidate matching road element is greater than or equal to the maximum value of the range corresponding to the preset third preset range, the candidate matching road element is not within the third preset range of the point cloud cluster, and the candidate matching road element is discarded;
[0113] If the distance between the determined point cloud cluster and the candidate matching road element is less than the maximum value of the range corresponding to the preset third preset range, the candidate matching road element is within the third preset range of the point cloud cluster, and the candidate matching road element is used as the first matching road element matching the point cloud cluster.
[0114] In some embodiments, based on the central geographic coordinates of the point cloud cluster, the radius of the point cloud cluster, and the geographic coordinates of each candidate matching road element matching the point cloud cluster, the distance between the point cloud cluster and each candidate matching road element matching the point cloud cluster is determined, which can be determined in the following manner:
[0115] Determine the distance between the center point of the point cloud cluster and each candidate matching road element matching the point cloud cluster based on the central geographic coordinates of the point cloud cluster and the geographic coordinates of each candidate matching road element matching the point cloud cluster;
[0116] The distance between the point cloud cluster and each candidate matching road element matching the point cloud cluster is determined according to the difference between the distance between the center point of the point cloud cluster and each candidate matching road element matching the point cloud cluster, and the radius of the point cloud cluster. The radius of the point cloud cluster can be understood as the distance between the point farthest from the center point of the point cloud cluster and the center point, or it can be understood as the average distance between all points in the point cloud cluster and the center point.
[0117] It should be noted that the geographic coordinates of the candidate matching road element may be the average coordinate value of each point in the candidate matching road element, or the center coordinate value. In other embodiments, the geographic coordinates of the candidate matching road element have been generated as a geographic coordinate value in the existing map data, and the geographic coordinate value in the existing map data can be directly used in the embodiments of the present disclosure.
[0118] In some embodiments, in order to improve the matching efficiency of subsequent point cloud data and existing map data, the server may also include the following process before obtaining the point cloud data uploaded by the road collection vehicle and clustering the point cloud data: preprocessing the point cloud data to remove noise points. The preprocessing may include: bilateral filtering, curvature flow denoising, density-based mean shift clustering denoising, or high-density point cloud denoising based on curvature feature hybrid classification.
[0119] In this optional implementation, the server can perform a preliminary screening from the existing map data based on the collection trajectory of the point cloud data collected by the road collection vehicle, search for road elements located within the first preset range around the collection trajectory, and use them as candidate matching road elements. In addition, based on the geographic coordinates of the point cloud cluster obtained by clustering and the geographic coordinates of the candidate matching road elements, the point cloud cluster and the candidate matching road elements are roughly matched to screen out the first matching road element that matches the point cloud cluster and is located within the third preset range around the point cloud cluster from the candidate matching road elements. Since this implementation screens the existing map data once through the collection trajectory and screens the candidate matching road elements twice through rough matching, it has the effect of filtering noise and improving matching efficiency.
[0120] In an optional implementation of this embodiment, when the first matching road element matching the point cloud data is a linear road element, step S103, i.e., the step of acquiring a second matching road element matching the point cloud data from the first matching road element based on the distance relationship between the point cloud data and the first matching road element, further includes the following steps:
[0121] determining a first distance between the point cloud cluster and the first matching road element;
[0122] retaining the first matching road element whose first distance satisfies the distance restriction condition;
[0123] When at least two first matching road elements matching the point cloud cluster are retained, determining a second distance between two adjacent first matching road elements among the at least two first matching road elements;
[0124] When the second distance is less than a first preset distance threshold, merging the two adjacent first matching road elements into a second matching road element that matches the point cloud cluster;
[0125] When the second distance is greater than a second preset distance threshold, splitting the point cloud cluster into two point cloud clusters corresponding one-to-one to each first matching road element of the two adjacent first matching road elements;
[0126] When the second distance is greater than or equal to the first preset distance threshold and less than or equal to the second preset distance threshold, point cloud data on the point cloud cluster respectively associated with each of the two adjacent first matching road elements is determined, and based on the intersection and union relationship between the point cloud data on the point cloud cluster respectively associated with each of the two adjacent first matching road elements, the two adjacent first matching road elements are merged into a second matching road element matching the point cloud cluster, or the point cloud cluster is split into two point cloud clusters corresponding one-to-one to each of the two adjacent first matching road elements.
[0127] In the disclosed embodiment, when the server determines at least one first matching road element that matches the point cloud cluster, and the road element type of the at least one first matching road element is a linear road element, the server may further determine a first matching road element that has a one-to-one matching relationship with the point cloud cluster from the at least one first matching road element through a first fine matching strategy, and use the determined first matching road element as a second matching road element that matches the point cloud cluster.
[0128] For ease of understanding, the following takes any point cloud cluster as an example to introduce a process of determining a second matching road element that has a one-to-one matching relationship with the point cloud cluster by using a first fine matching strategy.
[0129] In the first step, based on the geographic coordinates of each point in the point cloud cluster and the geographic coordinates of each first matching road element matching the point cloud cluster, a first distance between the point cloud cluster and each first matching road element matching the point cloud cluster is determined.
[0130] The server may determine the distance between each point in the point cloud cluster and a first matching road element matching the point cloud cluster based on the geographic coordinates of each point in the point cloud cluster and the geographic coordinates of the first matching road element matching the point cloud cluster. Afterwards, the server may add the determined distances and then calculate the average value to obtain the first distance between the point cloud cluster and the first matching road element. By repeating this method, the server can determine the first distance between the point cloud cluster and each first matching road element matching the point cloud cluster. It can be understood that when there is at least one first matching road element matching the point cloud cluster, the determined first distance is also at least one.
[0131] In some embodiments, the distance between a point in a point cloud cluster and a first matching road element can be determined by: determining the foot of the projection of the geographic coordinates of the point onto the first matching road element, and obtaining the geographic coordinates corresponding to the foot of the projection; and determining the distance between the point and the first matching road element based on the geographic coordinates of the point and the geographic coordinates of the foot of the projection. It should be noted that since the first matching road element is a linear road element, the foot of the projection of the point in the point cloud cluster to the first matching road element can be understood as the foot of the projection of the point to the line.
[0132] In the second step, first matching road elements corresponding to the first distances satisfying the distance condition are selected from the at least one determined first distance, and the selected first matching road elements are retained, that is, the first matching road elements that are relatively close to the point cloud cluster are retained.
[0133] In some embodiments, the distance condition restriction may be that the determined first distance is less than or equal to a set distance threshold.
[0134] For example, assuming that there are three first matching road elements matching point cloud cluster a, namely, first matching road element A1, first matching road element B1 and first matching road element C1, it is determined that the first distance between point cloud cluster a and the first matching road element A1 is 2 meters, the first distance between point cloud cluster a and the first matching road element B1 is 1.4 meters, and the first distance between point cloud cluster a and the first matching road element C1 is 0.8 meters. If the distance restriction condition is that the first distance is less than or equal to the set distance threshold of 1.5 meters, the first matching road element B1 and the first matching road element C1 matching point cloud cluster a are retained.
[0135] In some embodiments, if the first distances between the point cloud cluster and each first matching road element do not satisfy the distance condition restriction, indicating that each first matching road element matching the point cloud cluster is far from the point cloud cluster, the point cloud cluster is discarded.
[0136] In the third step, based on the number of retained first matching road elements that meet the distance condition restriction, different processing methods are adopted to determine the second matching road elements that have a one-to-one matching relationship with the point cloud cluster.
[0137] In one case, when the number of the first matching road elements matching the point cloud cluster is one, the first matching road element is used as the second matching road element having a one-to-one matching relationship with the point cloud cluster.
[0138] In another case, when the number of retained first matching road elements matching the point cloud cluster is at least two, the distance between each two adjacent first matching road elements among the retained at least two first matching road elements may be determined first, and the distance is the second distance.
[0139] In some embodiments, the second distance may be the shortest distance between two adjacent first matching road elements. For example, if the two adjacent matching road elements are two lane lines, the second distance may be the distance between two adjacent endpoints of the two lane lines.
[0140] In some embodiments, two adjacent first matching road elements may be understood as two adjacent first matching road elements in geographical coordinates, and there is no other first matching road element matching the point cloud cluster between the two first matching road elements.
[0141] After determining the second distance between each two adjacent first matching road elements among the at least two retained first matching road elements, the server may further determine whether to split the point cloud cluster or merge the two adjacent first matching road elements in combination with a preset distance threshold.
[0142] For ease of understanding, any two adjacent first matching road elements that match the point cloud cluster are taken as an example to illustrate different situations of the determined second distance.
[0143] In case 1, when the determined second distance is less than the first preset distance threshold, it means that the distance between the two adjacent rough first matching road elements is relatively close, and the two adjacent first matching road elements can be merged into a second matching road element that matches the point cloud cluster. For example, two adjacent short lane lines can be merged into a long lane line.
[0144] In some embodiments, the first preset distance threshold can be set according to actual needs, for example, it can be set within 0.5 meters.
[0145] Case 2: When the determined second distance is greater than the second preset distance threshold, it means that the distance between the two adjacent rough first matching road elements is far, then the point cloud cluster can be split into two point cloud clusters, each point cloud cluster corresponds to one of the two adjacent first matching road elements, and one first matching road element corresponding to each point cloud cluster can be used as the second matching road element matching the point cloud cluster.
[0146] In some embodiments, the second preset distance threshold can be set according to actual needs, for example, it can be set within 1.3 meters.
[0147] It should be noted that the specific method of splitting the point cloud cluster can be found in the following introduction and will not be explained in detail for the time being.
[0148] Case 3: When the determined second distance is greater than or equal to the first preset distance threshold, and less than or equal to the second preset distance threshold, it means that the distance between the two adjacent first matching road elements is not suitable for direct merging, nor is it suitable for splitting the point cloud cluster. At this time, the point cloud data on the point cloud clusters respectively associated with each of the two adjacent first matching road elements can be determined, and then according to the intersection relationship between the point cloud data on the point cloud clusters respectively associated with each first matching road element, it is decided whether to merge the two first matching road elements or split the point cloud clusters.
[0149] In some embodiments, the point cloud data on the point cloud cluster associated with each first matching road element in two adjacent first matching road elements can be determined in the following manner: based on the closest distances from the geographic coordinates of each point in the point cloud cluster to each first matching road element in two adjacent first matching road elements, the point cloud data on the point cloud cluster associated with each first matching road element in two adjacent first matching road elements is determined. The first matching road element corresponding to the closer closest distance is determined as the element associated with the point on the point cloud cluster, that is, the first matching road element corresponding to the smaller distance value in the closest distance from the point on the point cloud cluster to the two adjacent first matching road elements is the first matching road element associated with the point. In this way, each point on the point cloud cluster can be associated with the two adjacent first matching road elements, so that the point cloud data in the point cloud cluster associated with each first matching road element can be obtained. It should be noted that the closest distance from a point on the point cloud cluster to the first matching road element can be understood as the minimum value of the distance from the point to any point on the first matching road element.
[0150] It can be understood that each of the two adjacent first matching road elements may be associated with a portion of points in the point cloud cluster, which is equivalent to virtually dividing the point cloud cluster into two point cloud clusters.
[0151] In some embodiments, the intersection-union relationship between the point cloud data on the point cloud clusters respectively associated with each of the two adjacent first matching road elements may include: a ratio relationship between the intersection and union of the point cloud data on the point cloud clusters respectively associated with each of the first matching road elements.
[0152] In some embodiments, when a plurality of point cloud clusters correspond to the same first matching road element, the first matching road element may serve as a second matching road element having a one-to-one matching relationship with each point cloud cluster in the plurality of point cloud clusters.
[0153] In some embodiments, since the amount of point cloud data acquired is very large, in order to improve processing efficiency, the server may also include the following process before determining the first distance between the point cloud cluster and the matching first matching road element in geographic coordinates: re-clustering the acquired point cloud data, and performing a thinning operation on the points in each point cloud cluster in at least one re-clustered point cloud cluster.
[0154] The thinning operation can be understood as thinning multiple points within each preset spatial range in the point cloud cluster into one point. For example, in the preset spatial range of 0.1m 3 When the preset shape is within the range, each point cloud cluster with an area of 0.1m 3 Multiple points within the preset shape range are sparsely reduced to one point, for example, only the most central point within the preset shape range is retained, and other points are deleted.
[0155] In some embodiments, in order to ensure that the deleted points in the point cloud cluster can be successfully restored, that is, to achieve anti-sparseness, the connectivity relationship between a point retained in each preset shape range and other deleted points can also be recorded. The connectivity relationship may include distance relationship and relative position relationship, etc.
[0156] In this optional implementation, when it is determined that the road element type of at least one first matching road element matching the point cloud cluster is a linear road element, the first distance between the point cloud cluster and each matching first matching road element can be determined, and the first matching road elements that meet the distance restriction condition can be retained. Then, by judging the number of retained first matching road elements matching the point cloud cluster and the second distance between each two adjacent first matching road elements retained, it is decided whether to merge the first matching road elements or split the point cloud cluster, thereby determining the second matching road elements that have a one-to-one matching relationship with each point cloud cluster, thereby achieving fine matching of the point cloud data with the existing map data.
[0157] In an optional implementation of this embodiment, based on the intersection and union relationship between the point cloud data on the point cloud clusters respectively associated with each of the two adjacent first matching road elements, the step of merging the two adjacent first matching road elements into a second matching road element matching the point cloud cluster, or splitting the point cloud cluster into two point cloud clusters corresponding one-to-one to each of the two adjacent first matching road elements, further includes the following steps:
[0158] determining a first ratio of an intersection to a union between point cloud data on the point cloud clusters respectively associated with each of the two adjacent first matching road elements, and a second ratio of an intersection between point cloud data on the point cloud clusters respectively associated with each of the two adjacent first matching road elements and point cloud data on the point cloud cluster associated with a third matching road element, the point cloud data on the point cloud cluster associated with the third matching road element being less than the point cloud data on the point cloud cluster associated with a fourth matching road element, the third matching road element and the fourth matching road element being the two adjacent first matching road elements;
[0159] When the first ratio is greater than a first ratio threshold, or when the first ratio is less than or equal to the first ratio threshold and the second ratio is greater than a second ratio threshold, merging the two adjacent first matching road elements into a second matching road element that matches the point cloud cluster;
[0160] When the first ratio is less than or equal to the first ratio threshold and the second ratio is less than or equal to the second ratio threshold, the point cloud cluster is split into two point cloud clusters corresponding one-to-one to each first matching road element of the two adjacent first matching road elements.
[0161] In the embodiment of the present disclosure, as described above, when the server determines that the second distance between any two adjacent first matching road elements matching the point cloud cluster is greater than or equal to the first preset distance threshold and less than or equal to the second preset distance threshold, it is necessary to further determine whether to merge the two adjacent first matching road elements or split the point cloud cluster through the intersection relationship between the point cloud data on the point cloud clusters respectively associated with the two adjacent first matching road elements.
[0162] For ease of understanding, the following exemplary method for determining whether to split or merge is given.
[0163] Assume that the second distance between the adjacent first matching road element B2 and the first matching road element C2 matching the point cloud cluster b (including point 1, point 2, point 3, point 4 and point 5) is greater than or equal to the first preset distance threshold, and less than or equal to the second preset distance threshold. Then,
[0164] In the first step, the server may determine the point cloud data on the point cloud clusters associated with each first matching road element in the two adjacent first matching road elements based on the distance from each point in the point cloud cluster to each first matching road element in the two adjacent first matching road elements.
[0165] For example, assuming that it is determined that point 1 and point 2 are closer to the first matching road element B2, and point 2, point 4, and point 5 are closer to the first matching road element C2, then the point cloud data associated with the first matching road element B2 are point 1 and point 2, and the point cloud data associated with the first matching road element C2 are point 2, point 4, and point 5.
[0166] In the second step, the server may determine the ratio of the intersection and the union of the point cloud data on the point cloud clusters respectively associated with the two first matching road elements, which may be recorded as the first ratio, and determine the ratio of the intersection of the point cloud data on the point cloud clusters respectively associated with the two first matching road elements and the point cloud data on the point cloud cluster associated with the third matching road element, which may be recorded as the second ratio. The point cloud data on the point cloud cluster associated with the third matching road element is less than the point cloud data on the point cloud cluster associated with the fourth matching road element, and the third matching road element and the fourth matching road element are the two adjacent first matching road elements.
[0167] Exemplarily, since the point cloud data (point 1, point 2) of the point cloud cluster b associated with the first matching road element B2 is less than the point cloud data (point 2, point 4, point 5) of the point cloud cluster b associated with the first matching road element C2, the first matching road element B2 is also the third matching road element, and the first matching road element C2 is also the fourth matching road element. The server may further determine a first ratio of the intersection and union between (point 1, point 2) and (point 2, point 4, point 5), and determine a second ratio between the intersection of (point 1, point 2) and (point 2, point 4, point 5) and (point 1, point 2).
[0168] In the third step, the server may determine the size relationship between the first ratio and the first ratio threshold, and the size relationship between the second ratio and the second ratio threshold, and determine whether to split the point cloud cluster or merge the two adjacent first matching road elements according to the size relationship between the ratio and the ratio threshold.
[0169] When the first ratio is greater than a first ratio threshold, or when the first ratio is less than or equal to the first ratio threshold and the second ratio is greater than the second ratio threshold, two adjacent first matching road elements are merged into a second matching road element that matches the point cloud cluster; when the first ratio is less than or equal to the first ratio threshold and the second ratio is less than or equal to the second ratio threshold, the point cloud cluster is split into two point cloud clusters corresponding one-to-one to each first matching road element in the two adjacent first matching road elements.
[0170] In some embodiments, the first ratio threshold and the second ratio threshold can be set according to actual needs, and the first ratio threshold is smaller than the second ratio threshold.
[0171] Exemplarily, assuming that a first ratio of the intersection and union between (point 1, point 2) and (point 2, point 4, point 5) is greater than a first ratio threshold, or the first ratio is less than or equal to the first ratio threshold, and a second ratio between the intersection of (point 1, point 2) and (point 2, point 4, point 5) and (point 1, point 2) is greater than a second ratio threshold, the first matching road element B2 and the first matching road element C2 are merged into a second matching road element BC2 that matches the point cloud cluster b.
[0172] Assuming that the first ratio of the intersection and union between (point 1, point 2) and (point 2, point 4, point 5) is less than or equal to the first ratio threshold, and the second ratio between the intersection of (point 1, point 2) and (point 2, point 4, point 5) and (point 1, point 2) is less than or equal to the second ratio threshold, the point cloud cluster b is split into point cloud cluster b1 and point cloud cluster b2 corresponding to the first matching road element B2 and the first matching road element C2.
[0173] In some embodiments, after determining the first ratio of the intersection and the union of the point cloud data on the point cloud clusters respectively associated with each of the two adjacent first matching road elements, the server may first determine the magnitude relationship between the first ratio and the first ratio threshold. When the first ratio is greater than the first ratio threshold, the two adjacent first matching road elements are merged into a second matching road element that matches the point cloud cluster; when the first ratio is less than or equal to the first ratio threshold, the second ratio of the intersection of the point cloud data on the point cloud clusters respectively associated with each of the two adjacent first matching road elements and the point cloud data on the point cloud cluster associated with the third matching road element is further determined, and then the magnitude relationship between the second ratio and the second ratio threshold is determined. When the second ratio is greater than the second ratio threshold, the two adjacent first matching road elements are merged into a second matching road element that matches the point cloud cluster; when the second ratio is less than or equal to the second ratio threshold, the point cloud cluster is split into two point cloud clusters that correspond one to one to each of the two adjacent first matching road elements.
[0174] In this optional implementation, when it is determined that the second distance between any two adjacent first matching road elements that match the point cloud cluster is greater than or equal to the first preset distance threshold and less than or equal to the second preset distance threshold, by judging the relationship between the first ratio of the intersection and the union of the point cloud data on the point cloud clusters respectively associated with each of the two adjacent first matching road elements and the first ratio threshold, and the relationship between the second ratio of the intersection of the point cloud data on the point cloud clusters respectively associated with each of the two adjacent first matching road elements and the point cloud data on the point cloud cluster associated with the third matching road element and the second ratio threshold, it is determined whether merging or splitting is required, thereby ensuring accurate matching of the point cloud data with the existing map data.
[0175] In an optional implementation of this embodiment, the step of splitting the point cloud cluster into two point cloud clusters corresponding one-to-one to each first matching road element of the two adjacent first matching road elements further includes the following steps:
[0176] According to the distances from the point cloud data in the point cloud cluster to each first matching road element in the two adjacent first matching road elements, the point cloud cluster is split into two point cloud clusters corresponding one-to-one to each first matching road element in the two adjacent first matching road elements.
[0177] In this optional implementation, for the aforementioned situation that the second distance between two adjacent first matching road elements among the at least two first matching road elements matched with the point cloud cluster is greater than the second preset distance threshold. Or, for the aforementioned situation that the second distance between two adjacent first matching road elements among the at least two first matching road elements matched with the point cloud cluster is between the first preset threshold and the second preset threshold, the first ratio of the intersection and the union of the point cloud data on the point cloud clusters respectively associated with each of the two adjacent first matching road elements is less than or equal to the first ratio threshold, and the second ratio of the intersection between the point cloud data on the point cloud clusters respectively associated with each of the two adjacent first matching road elements and the point cloud data on the point cloud cluster associated with the third matching road element is less than or equal to the second ratio threshold, the point cloud cluster can be split into two point cloud clusters corresponding to each of the two adjacent first matching road elements.
[0178] When splitting the point cloud cluster, the distance between a point in the point cloud cluster and each of the two adjacent first matching road elements can be determined based on the geographic coordinates of the point in the point cloud cluster and the geographic coordinates of each of the two adjacent first matching road elements, and the point can be assigned to the first matching road element that is closer. The same operation is performed on each point in the point cloud cluster, and each point in the point cloud cluster can be assigned to a first matching road element that is closer to it. At this time, each of the two adjacent first matching road elements corresponds to a part of the points in the point cloud cluster, which can be regarded as a new point cloud cluster. In this way, each of the two adjacent first matching road elements is matched to a point cloud cluster with a one-to-one correspondence, and the two first matching road elements can be regarded as the second matching road elements of the two new point cloud clusters.
[0179] In an optional implementation of this embodiment, when the first matching road element matching the point cloud data is a planar road element, step S103, i.e., the step of acquiring a second matching road element matching the point cloud data from the first matching road element based on the distance relationship between the point cloud data and the first matching road element, further includes the following steps:
[0180] Selecting a target first matching road element within a second preset range of the point cloud cluster from the first matching road elements;
[0181] Determining a third distance between the point cloud cluster and the matched target first matching road element;
[0182] A second matching road element that has a one-to-one matching relationship with the point cloud cluster is determined from the target first matching road element based on the third distance.
[0183] In the disclosed embodiment, when the server determines at least one first matching road element that matches the point cloud cluster, and the road element type of the at least one first matching road element is a planar road element, the server can determine a first matching road element that has a one-to-one matching relationship with the point cloud cluster from the at least one matching first matching road element through a second fine matching strategy, and use the determined first matching road element as the second matching road element that matches the point cloud cluster.
[0184] The following is a detailed introduction:
[0185] For ease of understanding, the following takes any point cloud cluster as an example to introduce a process of determining a second matching road element that has a one-to-one matching relationship with the point cloud cluster by using the second fine matching strategy.
[0186] It should be understood that, since the road element type of the first matching road elements matching the point cloud cluster is a planar road element, each first matching road element has a corresponding closed boundary contour of a certain shape.
[0187] In the first step, based on a second preset range of the point cloud cluster, a first matching road element located within the second preset range is screened out from at least one first matching road element matching the point cloud cluster, and the screened out first matching road element is used as a target first matching road element.
[0188] In some embodiments, the second preset range can be a certain range around the point cloud cluster, for example, it can be the range of a circle with the center point of the point cloud cluster as the center and a set length as the radius. The set length can be greater than the distance between the boundary point farthest from the center point and the center point.
[0189] In some embodiments, the number of the filtered target first matching road elements is at least one, and the number of the filtered target first matching road elements is less than or equal to the number of the first matching road elements before filtering.
[0190] In some embodiments, if the first matching road element located within the second preset range is not screened out from the at least one first matching road element matching the point cloud cluster, the matching fails.
[0191] In the second step, the third distance between the point cloud cluster and each target first matched road element is determined.
[0192] In some embodiments, the distance between the point cloud cluster and a matching target first matching road element may be determined by: determining the distance between each point in the point cloud cluster and a matching target rough matching element; summing and averaging at least one of the determined distances to obtain a third distance between the point cloud cluster and the target first matching road element. Thus, in this way, the third distance between the point cloud cluster and each matching target first matching road element may be obtained.
[0193] In some embodiments, the distance between a point in a point cloud cluster and a matching target first matching road element may be determined in the following manner: when the point is located inside or on the boundary contour of the point cloud cluster, the distance between the point and the matching target first matching road element is 0; when the point is located outside the boundary contour of the point cloud cluster, the distance between the point and the matching target first matching road element is the shortest distance from the point to the boundary contour of the target first matching road element.
[0194] In some embodiments, the shortest distance from a point in a point cloud cluster to a boundary contour of a matching target first matching road element may be determined in the following manner: determining the foot of the projection perpendicular from the point to each edge of the boundary contour of the target first matching road element, and obtaining the geographic coordinates corresponding to the foot of the projection perpendicular on each edge; determining the distance from the point to each edge of the boundary contour of the target first matching road element based on the geographic coordinates of the point and the geographic coordinates of the foot of the projection perpendicular on each edge; determining the distance with the smallest value from multiple distances, and using the distance as the shortest distance from the point to the boundary contour of the target first matching road element.
[0195] In the third step, a third distance with a minimum value is determined from the at least one third distance determined, and a target first matching road element corresponding to the minimum third distance is used as a second matching road element having a one-to-one matching relationship with the point cloud cluster.
[0196] In some embodiments, when it is determined that the number of target first matching road elements that match the point cloud cluster is at least two, and at least two of the at least two third distances determined have equal values, the target first matching road element corresponding to any one of the at least two third distances with equal values can be taken as the second matching road element that has a one-to-one matching relationship with the point cloud cluster.
[0197] In some embodiments, in order to ensure the continuity and compactness of the same point cloud cluster to a greater extent, the server may further include the following process before screening the target first matching road elements within the second preset range of the point cloud cluster from the first matching road elements: re-clustering the acquired point cloud data based on the clustering condition. The clustering condition may be: when the number of points within a certain spatial range is greater than or equal to a preset number threshold, clustering the points within the certain spatial range into a point cloud cluster. That is, when re-clustering the point cloud data, a certain number of points within a certain spatial range must be reached to cluster. For example, every 0.1m 3 The number of points in the cluster must reach 40 to be clustered into a new point cloud cluster, otherwise clustering cannot be performed.
[0198] In some embodiments, the number of point cloud clusters obtained by re-clustering the point cloud data is at least one. The point cloud cluster obtained by re-clustering may be referred to as a first point cloud cluster.
[0199] It should be noted that, although the point cloud data is re-clustered, for any first point cloud cluster, the difference between the first point cloud cluster and the corresponding point cloud cluster obtained by the previous clustering is not very large. Therefore, the first matching road element determined to match the point cloud cluster can also be used as the first matching road element matching the first point cloud cluster after re-clustering. Obviously, the number of first matching road elements matching the first point cloud cluster is also at least one, and the road element type of the first matching road element matching the first point cloud cluster is also a planar road element. Afterwards, for each first point cloud cluster, a second matching road element that has a one-to-one matching relationship with each first point cloud cluster can be determined.
[0200] In this optional implementation, when it is determined that the road element type of at least one first matching road element matching the point cloud cluster is a planar road element, the point cloud data can be re-clustered, and the target first matching road elements within the second preset range of the point cloud cluster obtained by clustering are screened from the at least one first matching road element. Then, based on the third distance between the point cloud cluster and each target matching road element, the target first matching road element closest to the point cloud cluster is determined, and the target first matching road element is used as the second matching road element that has a one-to-one matching correspondence with the point cloud cluster, thereby achieving fine matching of the point cloud data with the existing map data.
[0201] In an optional implementation of this embodiment, when the second matching road element matched with the point cloud data is a linear road element, step S104, i.e., adjusting the attribute information of the second matching road element based on the position offset relationship between the point cloud data and the second matching road element matched, and determining the adjusted attribute information of the second matching road element as the annotation data of the point cloud data, further includes the following steps:
[0202] When the length of the second matching road element is greater than or equal to a preset length threshold, dividing the second matching road element into a plurality of sub-road elements;
[0203] Determining point cloud data in the point cloud cluster that respectively match the plurality of sub-road elements, and a spatial offset between the sub-road elements and the matching point cloud data;
[0204] When there is matching point cloud data for the sub-road element and the spatial offset is less than a preset offset threshold, the geographic coordinates of the sub-road element are adjusted to reduce the spatial offset between the adjusted sub-road element and the matching point cloud data in the geographic coordinates;
[0205] The plurality of sub-road elements are merged, and the attribute information of the merged second matching road element is determined as the annotation data of the point cloud cluster.
[0206] In the disclosed embodiment, when the server determines that a second matching road element has a one-to-one matching relationship with the point cloud cluster, and the road element type of the second matching road element is a linear road element, there may be a positioning error, which may cause an offset between the geographic coordinates of the point cloud cluster and the geographic coordinates of the second matching road element that matches it. Therefore, the server may further adjust the attribute information of the second matching road element through the first offset adjustment strategy, and annotate the point cloud cluster based on the adjusted second matching road element to ensure that the point cloud cluster and the second matching road element that matches it strictly correspond.
[0207] For ease of understanding, the following takes any point cloud cluster as an example to introduce the adjustment of the attribute information of the geographic coordinates of the second matching road element that has a one-to-one matching relationship with the point cloud cluster through the first offset adjustment strategy, and the process of labeling the point cloud cluster.
[0208] In the first step, for linear road elements, the length of the second matching road element that has a one-to-one matching relationship with the point cloud cluster can be obtained, and the size relationship between the second matching road element and the preset length threshold can be determined, and different processing methods can be adopted according to different size relationships.
[0209] In one case, when the length of the second matching road element is greater than or equal to a preset length threshold, it indicates that the length of the linear second matching road element is too long. In order to achieve subsequent refined deviation correction, the second matching road element may be segmented into multiple sub-road elements according to a preset segmentation length.
[0210] In another case, when the length of the second matching road element is less than a preset length threshold, it means that the length of the linear second matching road element is short, and there is no need to segment the second matching road element.
[0211] It should be understood that those skilled in the art may set a preset length threshold (eg, 400 meters) and a preset segmentation length (eg, 20 meters) according to actual needs, and the present disclosure does not impose any limitation on this, and all are within the scope of protection.
[0212] The second step is to determine the spatial offset.
[0213] In one case, after the second matching road element is divided into multiple sub-road elements, the point cloud data matching each sub-road element in the point cloud cluster and the spatial offset between each sub-road element and the matching point cloud data in geographic coordinates can be determined.
[0214] In some embodiments, the point cloud cluster and the point cloud data matching each sub-road element can be determined in the following manner: according to the geographic coordinates of each point in the point cloud cluster and the geographic coordinates of each sub-road element in the multiple sub-road elements, the closest distance from each point to each sub-road element is determined, and each point is matched to the sub-road element with the closest distance. It can be understood that each point can be matched to a sub-road element, and a sub-road element does not necessarily match a point in the point cloud cluster.
[0215] In some embodiments, for any sub-road element, the spatial offset between the sub-road element and the matching point cloud data in geographic coordinates can be determined in the following manner: determine the foot of the projection of each point matching the sub-road element to the sub-road element, and obtain the geographic coordinates of the projection foot corresponding to each point; based on the geographic coordinates of each point and the corresponding geographic coordinates of the projection foot, determine the distance from each point matching the sub-road element to the sub-road element, that is, the closest distance from the point to the sub-road element; sum and average at least one of the determined distances to obtain the spatial offset between the sub-road element and the matching point cloud data.
[0216] In another case, when the second matching road element is not segmented, the spatial offset between the second matching road element and the point cloud cluster having a one-to-one matching relationship therewith is determined.
[0217] It should be understood that the method for determining the spatial offset in this case is similar to the method for determining the spatial offset between any section of sub-road element and the matching point cloud data, and will not be described in detail here.
[0218] The third step is to adjust the attribute information based on the size relationship between the spatial offset and the preset offset threshold.
[0219] In one case, the second matching road element is divided into multiple sub-road elements, which can be further divided into the following different cases.
[0220] Case 1: If there is no matching point cloud data for a certain road element, the road element will be discarded.
[0221] Case 2: If a certain road element has matching point cloud data, and the spatial offset between the road element and the matching point cloud data is greater than or equal to the preset offset threshold, it means that the error of the geographic coordinates between the road element and the matching point cloud data is too large, and the road element is discarded.
[0222] Case 3: If a sub-road element has matching point cloud data, and the spatial offset between the sub-road element and the matching point cloud data is less than the preset offset threshold, it means that the error in the geographic coordinates between the sub-road element and the matching point cloud data is small, and the attribute information of the sub-road element can be adjusted.
[0223] In some embodiments, adjusting the attribute information of the sub-road element may include but is not limited to adjusting the geographic coordinates of the sub-road element. For example, the geographic coordinates of the sub-road element may be adjusted to reduce the spatial offset of the matching point cloud data in the geographic coordinates, for example, the sub-road element may be made to overlap with the matching point cloud data as much as possible. In some embodiments, the geographic coordinates of the sub-road element may be adjusted so that the geographic coordinates of one end of the sub-road element overlap with the geographic coordinates of a point at one end of the matching point cloud data, or so that the sub-road element overlaps with the geographic coordinates of the largest number of points in the point cloud data.
[0224] After the server determines the point cloud data matching each sub-road element in the point cloud cluster, and the spatial offset between each sub-road element and the matching point cloud data in the geographic coordinates, each sub-road element can correspond to any of the above cases 1 to 3, that is, each sub-road element is processed in a corresponding manner. In this way, new multi-segment sub-road elements can be obtained, and the number of new multi-segment sub-road elements is less than or equal to the number of multi-segment sub-road elements obtained by the original segmentation.
[0225] Another case, in which the second matching road element is not segmented, can be further divided into the following two cases.
[0226] Case 1: If the spatial offset between the second matching road element and the point cloud cluster with which it has a one-to-one matching relationship is greater than or equal to the preset offset threshold, it means that the error of the geographic coordinates between the two is too large, and the matching is considered to have failed.
[0227] Case 2: If the spatial offset between the second matching road element and the point cloud cluster with which it has a one-to-one matching relationship is less than the preset offset threshold, it means that the error of the geographic coordinates between the two is small. In this case, the geographic coordinates of the second matching road element can be adjusted, and the geographic coordinates of the point cloud cluster can be used as the new geographic coordinates of the second matching road element to reduce the spatial offset between the two.
[0228] It should be understood that those skilled in the art may set the preset offset threshold according to actual needs, and the present disclosure does not limit this, and all of them are within the scope of protection.
[0229] The fourth step is to label the point cloud data matching the second matching road element after adjusting the attribute information.
[0230] In one case, when the second matching road element is divided into multiple sub-road elements, since new multiple sub-road elements can be obtained through the third step, the server can merge the new multiple sub-road elements to obtain a merged new second matching road element, and then annotate the matching point cloud cluster based on the attribute information of the new second matching road element, that is, the annotated data of the point cloud cluster is the attribute information of the new second matching road element.
[0231] In some embodiments, when merging new multi-segment road elements, it is ensured that there is no cross-talk between the multi-terminal road elements before and after segmentation and merging, and the order of geographic coordinates corresponds correctly.
[0232] In some embodiments, the attribute information may include: geographic coordinates, shape, type of road element, color of road element, etc. of the road element.
[0233] In another case, when the second matching road element is not segmented, the server can directly determine the annotation data of the point cloud cluster having a one-to-one matching relationship with the second matching road element based on the adjusted attribute information of the second matching road element.
[0234] In this optional implementation, when a second matching road element that has a one-to-one matching relationship with the point cloud cluster is determined, and the road element type of the second matching road element is a linear road element, the spatial offset between the point cloud cluster and the second matching road element that has a one-to-one matching relationship with the point cloud cluster in geographic coordinates is determined, and the attribute information of the second matching road element is adjusted according to the size relationship between the spatial offset and a preset spatial offset threshold, and the point cloud cluster is annotated with the adjusted second matching road element, so that the point cloud cluster and the second matching road element after correction strictly correspond to each other, thereby ensuring the accuracy of the point cloud data annotation.
[0235] In an optional implementation of this embodiment, when the second matching road element matched with the point cloud data is a planar road element, step S104, i.e., adjusting the attribute information of the second matching road element based on the position offset relationship between the point cloud data and the second matching road element matched, and determining the adjusted attribute information of the second matching road element as the annotation data of the point cloud data, further includes the following steps:
[0236] Determine an intersection-and-union relationship between a minimum circumscribed convex hull of the point cloud cluster and the second matching road element matching the point cloud cluster;
[0237] retaining the second matching road element whose intersection relationship meets the threshold condition;
[0238] When the road type of the retained second matching road element is the first preset type, adjusting the geographic coordinates of the second matching road element to increase the overlap between the second matching road element and the minimum circumscribed convex hull of the matching point cloud cluster;
[0239] When the road type of the retained second matching road element is a second preset type, adjusting the geographic coordinates of the second matching road element based on the minimum circumscribed convex hull of the point cloud cluster to increase the overlap between the second matching road element and the minimum circumscribed convex hull of the matching point cloud cluster;
[0240] The adjusted attribute information of the second matching road element is determined as the annotation data of the point cloud cluster.
[0241] In the disclosed embodiment, when the server determines that a second matching road element has a one-to-one matching relationship with the point cloud cluster, and the road element type of the second matching road element is a planar road element, there may be a positioning error, which may cause an offset between the geographic coordinates of the point cloud cluster and the geographic coordinates of the second matching road element that matches it. Therefore, the server can further adjust the attribute information of the second matching road element through a second offset adjustment strategy, and annotate the point cloud cluster based on the adjusted second matching road element to ensure that the point cloud cluster and the second matching road element that matches it strictly correspond.
[0242] For ease of understanding, the following takes any point cloud cluster as an example to introduce how to correct the geographic coordinates of the second matching road element that has a one-to-one matching relationship with the point cloud cluster through the second offset adjustment strategy, and how to label the point cloud cluster.
[0243] In the first step, for the planar road element, the minimum circumscribed convex hull of the point cloud cluster can be determined, and the ratio of the intersection and union between the minimum circumscribed convex hull and the second matching road element that has a one-to-one matching relationship with the point cloud cluster can be determined. The ratio can be recorded as a third ratio, which is used to indicate the degree of overlap between the minimum circumscribed convex hull and the second matching road element. The value range of the third ratio is [0, 1].
[0244] In some embodiments, the minimum circumscribed convex hull can be understood as a polygon formed by connecting the outermost points of the point cloud cluster, and the polygon includes all the points in the point cloud cluster.
[0245] In the second step, based on a preset threshold condition, the second matching road element matching the point cloud cluster is retained, or the second matching road element matching the point cloud cluster is discarded.
[0246] In some embodiments, the preset threshold condition is: when the third ratio is greater than or equal to a certain set threshold, the second matching road element matching the point cloud cluster is retained.
[0247] In other words, when the third ratio is greater than or equal to the set threshold, it means that the third ratio meets the preset threshold condition, and the degree of overlap between the minimum circumscribed convex hull of the point cloud cluster and the second matching road element matching the point cloud cluster is high, and the second matching road element matching the point cloud cluster is retained. When the third ratio is less than the set threshold, it means that the third ratio does not meet the preset threshold condition, and the degree of overlap between the circumscribed convex hull of the point cloud cluster and the second matching road element matching the point cloud cluster is low, and it is considered that the match fails.
[0248] It should be understood that those skilled in the art may set different threshold conditions according to actual needs, and the present disclosure does not limit this, and all of them are within the scope of protection.
[0249] In the third step, in the case where the second matching road element is retained, the attribute information of the second matching road element is adjusted in different ways according to the road type of the retained second matching road element, and the adjusted attribute information of the second matching road element is determined as the annotation data of the point cloud cluster.
[0250] In one case, when the road type of the retained second matching road element is the first preset type, the geographic coordinates of the second matching road element are adjusted, and the geographic coordinates of the point cloud cluster matched therewith are used as the new geographic coordinates of the second matching road element. In other words, the second matching road element is moved so that the center point of the boundary contour of the second matching road element coincides with the center point of the minimum circumscribed convex hull of the point cloud cluster, so as to increase the overlap between the second matching road element and the minimum circumscribed convex hull of the matching point cloud cluster.
[0251] In some embodiments, the first preset type includes small ground signs such as arrows, numbers, and text.
[0252] In another case, when the road type of the retained second matching road element is the second preset type, the geographic coordinates of the second matching road element are adjusted based on the minimum circumscribed convex hull of the point cloud cluster, that is, the second matching road element matched with the point cloud cluster is the minimum circumscribed convex hull, and the geographic coordinates of the adjusted second matching road element are also the geographic coordinates of the minimum circumscribed convex hull. At this time, the adjusted second matching road element and the minimum circumscribed convex hull of the point cloud cluster completely overlap.
[0253] In some embodiments, the second preset type includes: large ground signs such as zebra crossings and grid lines.
[0254] Finally, the point cloud cluster is labeled according to the adjusted attribute information of the second matching road element, and the labeled data of the point cloud cluster is the adjusted attribute information of the second matching road element.
[0255] In this optional implementation, when a second matching road element that has a one-to-one matching relationship with the point cloud cluster is determined, and the road element type of the second matching road element is a planar road element, it is determined whether to retain the second matching road element by judging whether the ratio of the intersection and union between the minimum circumscribed convex hull of the point cloud cluster and the second matching road element that has a one-to-one matching relationship with the point cloud cluster meets a threshold condition. When retaining the second matching road element, the attribute information of the second matching road element is further adjusted according to the road type of the retained second matching road element, and the point cloud cluster is annotated based on the adjusted attribute information of the second matching road element, so that the point cloud cluster strictly corresponds to the second matching road element after correction, thereby ensuring the accuracy of the point cloud data annotation.
[0256] Figures 2 to 5 A schematic flow chart of a method for labeling point cloud data according to an embodiment of the present disclosure is shown.
[0257] It is assumed that the server obtains the existing map data and the point cloud data collected by the road collection vehicle according to a certain collection trajectory.
[0258] like Figure 2 As shown, it is assumed that the server determines from the existing map data that there are seven road elements located near the collection track based on the collection track of the point cloud data collected by the road collection vehicle, namely road element 1, road element 2, road element 3, road element 4, road element 5, road element 6 and road element 7. And, after the server clusters the acquired point cloud data, a point cloud cluster e can be obtained. After that, the server can further determine that the road elements located near the point cloud cluster e are road element 1, road element 2 and road element 3 from road elements 1 to road element 7. Then, these three road elements can be used as the first matching road elements that match the point cloud cluster e.
[0259] It should be understood that Figure 2 The point cloud cluster e and road elements 1 to 7 shown are only exemplary. In practical applications, more point cloud clusters may be included near the collection trajectory, more or fewer road elements may be included near the collection trajectory, and more or fewer road elements may be included near the point cloud cluster e, and the present disclosure does not limit this.
[0260] like Figure 3After determining the first matching road element 1, the first matching road element 2 and the first matching road element 3 that match the point cloud cluster e, the server can further determine that the distance between the point cloud cluster e and the first matching road element 1 is d1, the distance between the point cloud cluster e and the first matching road element 2 is d2, and the distance between the point cloud cluster e and the first matching road element 3 is d3. It can be seen that the point cloud cluster e and the first matching road element 1 are the closest, so the first matching road element 1 can be used as the second matching road element that has a one-to-one matching relationship with the point cloud cluster, that is, the first matching road element 1 becomes the second matching road element 1 at this time.
[0261] like Figure 4 As shown, after determining the second matching road element 1 that matches the point cloud cluster, the server can further determine that the spatial offset between the point cloud cluster e and the second matching road element 1 is C, and the spatial offset C is less than a preset offset threshold, then the second matching road element 1 is moved to the central axis of the point cloud cluster e.
[0262] like Figure 5 As shown, it can be seen that the moved second matching road element 1 completely matches and corresponds to the point cloud cluster e. At this time, the server can determine the attribute information of the moved second matching road element 1 as the annotation data of the point cloud cluster e. For example, the type of the road element of the point cloud cluster e can be annotated as a yellow line, the geographical coordinates of the road element are the geographical coordinates corresponding to the moved second matching road element 1, and the color of the road element is yellow.
[0263] According to an embodiment of the present disclosure, a method for training a map generation model is also proposed, the method comprising:
[0264] Acquire sample data, the sample data including point cloud data and annotation data corresponding to the point cloud data; the annotation data is determined based on the annotation method of the point cloud data;
[0265] The map generation model is trained using the sample data.
[0266] In this embodiment, the server passes Figure 1After the point cloud data annotation method shown in the figure annotates the currently collected point cloud data, it is equivalent to annotating each point in the point cloud data. Each point belongs to a point cloud cluster, which can correspond to a road element, and the annotation data of the point cloud cluster corresponds to the attribute information of the matched road element. Each point in the point cloud data and its annotation data can be used as sample data of the map generation model to train the map generation model. After the map generation model is trained with a large amount of sample data and the model parameters of the map generation model are stabilized, the newly collected point cloud data can be sent to the trained map generation model, so as to automatically update the electronic map. Since the annotated sample data is produced fully automatically, the iteration cycle of the map production model is shortened accordingly, and the update of the electronic map can be realized more quickly and conveniently.
[0267] The following are embodiments of the apparatus of the present disclosure, which can be used to execute embodiments of the method of the present disclosure.
[0268] Figure 6 FIG. 1 is a block diagram showing a structure of a point cloud data annotation device according to an embodiment of the present disclosure. The device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 6 As shown, the point cloud data annotation device includes:
[0269] The acquisition module 601 is configured to acquire existing map data, point cloud data to be annotated, and a collection trajectory corresponding to the point cloud data;
[0270] A first matching module 602 is configured to obtain a first matching road element matching the point cloud data from the existing map data based on the acquisition trajectory;
[0271] A second matching module 603 is configured to obtain a second matching road element matching the point cloud data from the first matching road element based on a distance relationship between the point cloud data and the first matching road element;
[0272] The adjustment module 604 is configured to adjust the attribute information of the second matching road element based on the position offset relationship between the point cloud data and the second matching road element, and determine the adjusted attribute information of the second matching road element as the annotation data of the point cloud data.
[0273] In an optional implementation of this embodiment, it further includes: a clustering module, clustering the point cloud data to obtain at least one point cloud cluster to be labeled; then the first matching module 602 is configured to obtain a first matching road element matching the point cloud cluster from the existing map data based on the acquisition trajectory.
[0274] In an optional implementation of this embodiment, the first matching module 602 includes:
[0275] A search module configured to search, based on the collection trajectory, from the existing map data for candidate matching road elements within a first preset range of the collection trajectory;
[0276] The first matching submodule is configured to obtain a first matching road element that matches the point cloud cluster from the candidate matching road elements based on a distance relationship between the point cloud cluster and the candidate matching road elements.
[0277] In an optional implementation of this embodiment, when the first matching road element matched with the point cloud data is a linear road element, the second matching module 603 includes:
[0278] A first determination module is configured to determine a first distance between the point cloud cluster and the first matching road element;
[0279] A first retaining module is configured to retain the first matching road element whose first distance satisfies a distance restriction condition;
[0280] A second determining module is configured to determine a second distance between two adjacent first matching road elements among the at least two first matching road elements when at least two first matching road elements matching the point cloud cluster are retained;
[0281] A first merging module is configured to merge the two adjacent first matching road elements into a second matching road element matching the point cloud cluster when the second distance is less than a first preset distance threshold;
[0282] A first splitting module is configured to split the point cloud cluster into two point cloud clusters corresponding to each first matching road element of the two adjacent first matching road elements when the second distance is greater than a second preset distance threshold;
[0283] The processing module is configured to determine the point cloud data on the point cloud cluster respectively associated with each of the two adjacent first matching road elements when the second distance is greater than or equal to the first preset distance threshold and less than or equal to the second preset distance threshold, and based on the intersection and union relationship between the point cloud data on the point cloud cluster respectively associated with each of the two adjacent first matching road elements, merge the two adjacent first matching road elements into a second matching road element matching the point cloud cluster, or split the point cloud cluster into two point cloud clusters corresponding one-to-one to each of the two adjacent first matching road elements.
[0284] In an optional implementation of this embodiment, the processing module includes:
[0285] a third determining module, configured to determine a first ratio of an intersection to a union of point cloud data on the point cloud clusters respectively associated with each of the two adjacent first matching road elements, and a second ratio of an intersection between point cloud data on the point cloud clusters respectively associated with each of the two adjacent first matching road elements and point cloud data on the point cloud cluster associated with a third matching road element, the point cloud data on the point cloud cluster associated with the third matching road element being less than the point cloud data on the point cloud cluster associated with a fourth matching road element, the third matching road element and the fourth matching road element being the two adjacent first matching road elements;
[0286] a second merging module, configured to merge the two adjacent first matching road elements into a second matching road element matching the point cloud cluster when the first ratio is greater than a first ratio threshold, or when the first ratio is less than or equal to the first ratio threshold and the second ratio is greater than a second ratio threshold;
[0287] The second splitting module is configured to split the point cloud cluster into two point cloud clusters corresponding one-to-one to each first matching road element of the two adjacent first matching road elements when the first ratio is less than or equal to the first ratio threshold and the second ratio is less than or equal to the second ratio threshold.
[0288] In an optional implementation of this embodiment, the first splitting module or the second splitting module is configured to split the point cloud cluster into two point cloud clusters corresponding one-to-one to each first matching road element in the two adjacent first matching road elements based on the distance from the point cloud data in the point cloud cluster to each first matching road element in the two adjacent first matching road elements.
[0289] In an optional implementation of this embodiment, when the first matching road element matched with the point cloud data is a planar road element, the second matching module 603 includes:
[0290] A screening module, configured to screen target first matching road elements within a second preset range of the point cloud cluster from the first matching road elements;
[0291] a fourth determination module, configured to determine a third distance between the point cloud cluster and the target first matching road element that matches the point cloud data in the point cloud cluster;
[0292] The fifth determination module is configured to determine, based on the third distance, a second matching road element from the target first matching road element that has a one-to-one matching relationship with the point cloud cluster.
[0293] In an optional implementation of this embodiment, when the second matching road element matching the point cloud data is a linear road element, the adjustment module 604 includes:
[0294] a segmentation module, configured to segment the second matching road element into a plurality of sub-road elements when the length of the second matching road element is greater than or equal to a preset length threshold;
[0295] a sixth determination module, configured to determine point cloud data in the point cloud cluster that respectively match the plurality of sub-road elements, and a spatial offset between the sub-road elements and the matching point cloud data;
[0296] A first adjustment submodule is configured to adjust the geographic coordinates of the sub-road element when there is matching point cloud data for the sub-road element and the spatial offset is less than a preset offset threshold, so as to reduce the spatial offset between the adjusted sub-road element and the matching point cloud data;
[0297] The third merging module is configured to merge multiple segments of the sub-road elements, and determine the attribute information of the merged second matching road elements as the annotation data of the point cloud cluster.
[0298] In an optional implementation of this embodiment, when the second matching road element matching the point cloud data is a planar road element, the adjustment module 604 includes:
[0299] a seventh determination module, configured to determine an intersection-and-union relationship between a minimum circumscribed convex hull of the point cloud cluster and the second matching road element that matches the point cloud data in the point cloud cluster;
[0300] A second retaining module is configured to retain the second matching road element whose intersection relationship meets the threshold condition;
[0301] a second adjustment submodule, configured to adjust the geographic coordinates of the second matching road element when the road type of the retained second matching road element is the first preset type, so as to increase the overlap between the second matching road element and the minimum circumscribed convex hull of the matching point cloud cluster, and determine the adjusted attribute information of the second matching road element as the annotation data of the point cloud cluster;
[0302] The third adjustment submodule is configured to adjust the geographic coordinates of the second matching road element based on the minimum circumscribed convex hull of the point cloud cluster when the road type of the retained second matching road element is a second preset type, so as to increase the overlap between the second matching road element and the minimum circumscribed convex hull of the matching point cloud cluster, and determine the attribute information of the adjusted second matching road element as the annotation data of the point cloud cluster.
[0303] The point cloud data annotation device in this embodiment corresponds to the point cloud data annotation method described above. For specific details, please refer to the description of the point cloud data annotation method described above, which will not be repeated here.
[0304] According to an embodiment of the present disclosure, a training device for a map generation model is also proposed, the device comprising:
[0305] A sample acquisition module is configured to acquire sample data, wherein the sample data includes point cloud data and annotation data corresponding to the point cloud data; the annotation data is determined based on the annotation method of the point cloud data;
[0306] The training module is configured to train the map generation model using the sample data.
[0307] The training device for the map generation model in this embodiment corresponds to the training method for the map generation model in the above text. For specific details, please refer to the description of the training method for the map generation model in the above text, which will not be repeated here.
[0308] Figure 7 It is a structural schematic diagram of an electronic device suitable for implementing a method for labeling point cloud data and / or a method for training a map generation model according to an embodiment of the present disclosure.
[0309] like Figure 7 As shown, the electronic device 700 includes a processing unit 701, which can be implemented as a processing unit such as a CPU, a GPU, an FPGA, and an NPU. The processing unit 701 can perform various processes in the embodiments of any of the above methods of the present disclosure according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0310] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.
[0311] In particular, according to an embodiment of the present disclosure, any method in the above referenced embodiment of the present disclosure may be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly contained on a machine-readable medium, and the computer program includes a program code for executing any method in the embodiment of the present disclosure. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 709, and / or installed from a removable medium 711.
[0312] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0313] The units or modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The units or modules described may also be set in a processor, and the names of these units or modules do not constitute limitations on the units or modules themselves in some cases.
[0314] As another aspect, the present disclosure further provides a computer-readable storage medium, which may be a computer-readable storage medium included in the device described in the above embodiment; or a computer-readable storage medium that exists independently and is not assembled into the device. The computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the method described in the present disclosure.
[0315] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.
Claims
1. A method for labeling point cloud data, wherein: include: Obtaining existing map data, point cloud data to be annotated, and collection trajectories corresponding to the point cloud data; Acquire a first matching road element matching the point cloud data from the existing map data based on the acquisition trajectory; Based on the distance relationship between the point cloud data and the first matching road element, acquiring a second matching road element matching the point cloud data from the first matching road element; Based on the position offset relationship between the point cloud data and the second matching road element, the attribute information of the second matching road element is adjusted, and the adjusted attribute information of the second matching road element is determined as the annotation data of the point cloud data.
2. The method according to claim 1, wherein: Before acquiring a first matching road element matching the point cloud data from the existing map data based on the acquisition trajectory, the method further includes: Clustering the point cloud data to obtain at least one point cloud cluster to be labeled; Acquiring a first matching road element matching the point cloud data from the existing map data based on the acquisition trajectory includes: A first matching road element matching the point cloud cluster is acquired from the existing map data based on the acquisition trajectory.
3. The method according to claim 2, wherein: Acquiring a first matching road element matching the point cloud data from the existing map data based on the acquisition trajectory includes: Based on the collected trajectory, searching the existing map data for candidate matching road elements within a first preset range of the collected trajectory; Based on the distance relationship between the point cloud cluster and the candidate matching road elements, a first matching road element matching the point cloud cluster is acquired from the candidate matching road elements.
4. The method according to claim 2, wherein: When the first matching road element matching the point cloud data is a linear road element, acquiring a second matching road element matching the point cloud data from the first matching road element based on a distance relationship between the point cloud data and the first matching road element includes: determining a first distance between the point cloud cluster and the first matching road element; retaining the first matching road element whose first distance satisfies the distance restriction condition; When at least two first matching road elements matching the point cloud cluster are retained, determining a second distance between two adjacent first matching road elements among the at least two first matching road elements; When the second distance is less than a first preset distance threshold, merging the two adjacent first matching road elements into a second matching road element that matches the point cloud cluster; When the second distance is greater than a second preset distance threshold, splitting the point cloud cluster into two point cloud clusters corresponding one-to-one to each first matching road element of the two adjacent first matching road elements; When the second distance is greater than or equal to the first preset distance threshold and less than or equal to the second preset distance threshold, point cloud data on the point cloud cluster respectively associated with each of the two adjacent first matching road elements is determined, and based on the intersection and union relationship between the point cloud data on the point cloud cluster respectively associated with each of the two adjacent first matching road elements, the two adjacent first matching road elements are merged into a second matching road element matching the point cloud cluster, or the point cloud cluster is split into two point cloud clusters corresponding one-to-one to each of the two adjacent first matching road elements.
5. The method according to claim 4, wherein: Based on the intersection and union relationship between the point cloud data on the point cloud clusters respectively associated with each of the two adjacent first matching road elements, the two adjacent first matching road elements are merged into a second matching road element matching the point cloud cluster, or the point cloud cluster is split into two point cloud clusters corresponding to each of the two adjacent first matching road elements in a one-to-one manner, including: determining a first ratio of an intersection to a union between point cloud data on the point cloud clusters respectively associated with each of the two adjacent first matching road elements, and a second ratio of an intersection between point cloud data on the point cloud clusters respectively associated with each of the two adjacent first matching road elements and point cloud data on the point cloud cluster associated with a third matching road element, the point cloud data on the point cloud cluster associated with the third matching road element being less than the point cloud data on the point cloud cluster associated with a fourth matching road element, the third matching road element and the fourth matching road element being the two adjacent first matching road elements; When the first ratio is greater than a first ratio threshold, or when the first ratio is less than or equal to the first ratio threshold and the second ratio is greater than a second ratio threshold, merging the two adjacent first matching road elements into a second matching road element that matches the point cloud cluster; When the first ratio is less than or equal to the first ratio threshold and the second ratio is less than or equal to the second ratio threshold, the point cloud cluster is split into two point cloud clusters corresponding one-to-one to each first matching road element of the two adjacent first matching road elements.
6. The method according to claim 4, wherein: Splitting the point cloud cluster into two point cloud clusters corresponding one to each first matching road element of the two adjacent first matching road elements comprises: According to the distances from the point cloud data in the point cloud cluster to each first matching road element in the two adjacent first matching road elements, the point cloud cluster is split into two point cloud clusters corresponding one-to-one to each first matching road element in the two adjacent first matching road elements.
7. The method according to claim 2, wherein: When the first matching road element matching the point cloud data is a planar road element, acquiring a second matching road element matching the point cloud data from the first matching road element based on a distance relationship between the point cloud data and the first matching road element includes: Selecting a target first matching road element within a second preset range of the point cloud cluster from the first matching road elements; determining a third distance between the point cloud cluster and the target first matching road element that matches the point cloud data in the point cloud cluster; A second matching road element that has a one-to-one matching relationship with the point cloud cluster is determined from the target first matching road element based on the third distance.
8. The method according to any one of claims 2 to 6, wherein: When the second matching road element matched with the point cloud data is a linear road element, adjusting the attribute information of the second matching road element based on the position offset relationship between the point cloud data and the second matching road element matched, and determining the adjusted attribute information of the second matching road element as the annotation data of the point cloud data, comprises: When the length of the second matching road element is greater than or equal to a preset length threshold, dividing the second matching road element into a plurality of sub-road elements; Determining point cloud data in the point cloud cluster that respectively match the plurality of sub-road elements, and a spatial offset between the sub-road elements and the matching point cloud data; When there is matching point cloud data for the sub-road element and the spatial offset is less than a preset offset threshold, the geographic coordinates of the sub-road element are adjusted to reduce the spatial offset between the adjusted sub-road element and the matching point cloud data; Merge the multiple segments of the sub-road elements, and determine the attribute information of the merged second matching road elements as the annotation data of the point cloud cluster.
9. The method according to any one of claims 2-3 and 7, wherein: When the second matching road element matched with the point cloud data is a planar road element, adjusting the attribute information of the second matching road element based on the position offset relationship between the point cloud data and the second matching road element matched, and determining the adjusted attribute information of the second matching road element as the annotation data of the point cloud data, comprises: Determine an intersection-and-union relationship between a minimum circumscribed convex hull of the point cloud cluster and the second matching road element that matches the point cloud data in the point cloud cluster; retaining the second matching road element whose intersection relationship meets the threshold condition; When the road type of the retained second matching road element is the first preset type, adjusting the geographic coordinates of the second matching road element to increase the overlap between the second matching road element and the minimum circumscribed convex hull of the matching point cloud cluster; When the road type of the retained second matching road element is a second preset type, adjusting the geographic coordinates of the second matching road element based on the minimum circumscribed convex hull of the point cloud cluster to increase the overlap between the second matching road element and the minimum circumscribed convex hull of the matching point cloud cluster; The adjusted attribute information of the second matching road element is determined as the annotation data of the point cloud cluster.
10. A method for training a map generation model, wherein: include: Acquire sample data, where the sample data includes point cloud data and annotation data corresponding to the point cloud data; The annotation data is determined based on the method described in any one of claims 1 to 9; The map generation model is trained using the sample data.
11. A point cloud data annotation device, wherein: include: An acquisition module is configured to acquire existing map data, point cloud data to be annotated, and a collection trajectory corresponding to the point cloud data; A first matching module is configured to obtain a first matching road element matching the point cloud data from the existing map data based on the acquisition trajectory; A second matching module is configured to obtain a second matching road element matching the point cloud data from the first matching road element based on a distance relationship between the point cloud data and the first matching road element; The adjustment module is configured to adjust the attribute information of the second matching road element based on the position offset relationship between the point cloud data and the matching second matching road element, and determine the adjusted attribute information of the second matching road element as the annotation data of the point cloud data.
12. A computer-readable storage medium having computer instructions stored thereon, wherein: When the computer instructions are executed by a processor, the method according to any one of claims 1 to 10 is implemented.
