A Duplicate Removal Method, Device and Medium for 3D Point Sets
By dividing space based on the tolerance based on the numerical comparison and obtaining index values, the three-dimensional point set is deduplicated, which solves the problems of low deduplication efficiency and calculation bottleneck in the existing technology, and realizes efficient three-dimensional point set deduplication.
Patent Information
- Application Number
- CN202510376818.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2045-03-28
AI Technical Summary
The existing three-dimensional point set deduplication method has low deduplication efficiency due to high time complexity, and it is prone to calculation bottlenecks when processing large-scale point sets, and is easily affected by global data, resulting in misjudgment or misjudgment.
By dividing the space of the three-dimensional point set based on the tolerance based on the numerical comparison, the corresponding spatial cells are obtained, and the three-dimensional point set is preprocessed to be deduplicated, the first index value is obtained, the second index value is traversed to the cell, and finally deduplicated based on the index value.
It significantly reduces the time complexity, improves the system's operating efficiency, reduces the calculation amount, and increases the deduplication speed, which is especially suitable for deduplication processing of large-scale point sets.
Smart Images

Figure CN119884401B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the technical field of data processing, and particularly to a method, device, and medium for removing duplicates from a three-dimensional point set. Background Art
[0002] In the fields of 3D modeling, reverse engineering, 3D scanning, and CAD / CAM, a three-dimensional point set is the core data carrier for describing the geometric features of an object's surface. With the popularization of high-precision 3D scanning devices and multi-source data fusion technologies, the amount of point set data has increased exponentially. However, due to factors such as the errors of acquisition devices, multi-view registration overlaps, and dynamic scanning redundancies, there are generally duplicate points with highly adjacent spatial positions in the point set. These duplicate points not only significantly increase the consumption of computing resources but also reduce the model accuracy, and may even cause downstream algorithms to fail due to abnormal local point densities. Therefore, removing duplicates from a three-dimensional point set is an important step in 3D projects.
[0003] Traditional methods usually compare each point in the point set pairwise to determine whether the distance between them is less than a specified numerical comparison tolerance. However, this method has a high time complexity and low duplicate removal efficiency because each point in the point set needs to be compared with all other points. In addition, when dealing with large-scale point sets, traditional duplicate removal methods need to compare each point with all other points, resulting in a complex data structure and prone to computational bottlenecks. Moreover, when detecting local duplicate points, it is easily affected by global data, leading to misjudgments or missed judgments. Summary of the Invention
[0004] To solve the above technical problems, one or more embodiments of this specification provide a method, device, and medium for removing duplicates from a three-dimensional point set.
[0005] One or more embodiments of this specification adopt the following technical solutions:
[0006] One or more embodiments of this specification provide a method for removing duplicates from a three-dimensional point set, the method including:
[0007] Matching a corresponding numerical comparison tolerance based on the required 3D model accuracy of the three-dimensional point set to be de-duplicated and the current computing resources;
[0008] Determining the number of one-dimensional space partitions corresponding to the three-dimensional point set to be de-duplicated according to the numerical comparison tolerance, so as to partition the space corresponding to the three-dimensional point set to be de-duplicated based on the number of one-dimensional space partitions, and obtaining corresponding spatial cells;
[0009] Preprocessing the current point in the three-dimensional point set to be de-duplicated to obtain a first index value corresponding to the coordinates of the current point in the three-dimensional point set to be de-duplicated;
[0010] Traverse the cell where the current point is located and its neighbor cells in the three-dimensional point set to be deduplicated, so as to calculate the second index value corresponding to the current point coordinates represented by each cell;
[0011] Deduplicate the three-dimensional point set to be deduplicated based on the first index value and the second index value.
[0012] Optionally, in one or more embodiments of this specification, determine the number of one-dimensional space partitions corresponding to the three-dimensional point set to be deduplicated according to the numerical comparison tolerance, so as to partition the space corresponding to the three-dimensional point set to be deduplicated based on the number of one-dimensional space partitions, and obtain corresponding space cells, specifically including:
[0013] Normalize the numerical comparison tolerance based on the maximum and minimum values of the three-dimensional point set to be deduplicated to obtain the normalized numerical comparison tolerance;
[0014] Take the reciprocal of the normalized numerical comparison tolerance to obtain the number of one-dimensional space partitions corresponding to the three-dimensional point set to be deduplicated;
[0015] Based on the number of one-dimensional space partitions, divide the space corresponding to the three-dimensional point set to be deduplicated in three-dimensional directions to obtain corresponding space cells;
[0016] Wherein, before normalizing the numerical comparison tolerance based on the maximum and minimum values of the three-dimensional point set to be deduplicated to obtain the normalized numerical comparison tolerance, the method further includes:
[0017] Initialize the variables involved in the deduplication process of the three-dimensional point set to be deduplicated.
[0018] Optionally, in one or more embodiments of this specification, preprocess the current point in the three-dimensional point set to be deduplicated to obtain the first index value corresponding to the current point coordinates in the three-dimensional point set to be deduplicated, specifically including:
[0019] Normalize the point coordinates corresponding to the current point in the three-dimensional point set to be deduplicated to obtain the processed current point coordinates;
[0020] Round the product of the processed current point coordinates and the number of one-dimensional space partitions to obtain the converted current point coordinates;
[0021] Process the converted current point coordinates based on a preset index formula to determine the first index value corresponding to the current point coordinates; wherein, the first index value is the unique index of each coordinate point and the three-dimensional point set to be deduplicated, and the preset index formula is: , represents the current point coordinates of the current point i ( The first index value corresponding to), where n represents the number of one-dimensional space partitions.
[0022] Optionally, in one or more embodiments of this specification, traverse the cell where the current point is located and its neighbor cells in the three-dimensional point set to be deduplicated to calculate the second index value corresponding to the current point coordinates represented by each cell. Specifically, it includes:
[0023] Traverse the cell where the current point is located and its neighbor cells in the three-dimensional point set to be deduplicated to map the current point coordinates to the cell and determine the point coordinates represented by each cell.
[0024] Calculate the current point coordinates represented by each cell based on a preset index formula to obtain the second index value corresponding to the current point coordinates represented by each cell.
[0025] Optionally, in one or more embodiments of this specification, based on the first index value and the second index value, deduplicate the three-dimensional point set to be deduplicated. Specifically, it includes:
[0026] If it is determined that the second index value is included in the first index value, it is determined that there is a coincident point for the current point;
[0027] Update the mapped value of the current point in the original point mapping structure based on the mapped value of the second index value of the current point in the three-dimensional point set to be deduplicated.
[0028] Update the index of the current point in the three-dimensional point set to be deduplicated to the mapped value of the second index value of the current point in the deduplicated three-dimensional point set to obtain the deduplicated three-dimensional point set.
[0029] Optionally, in one or more embodiments of this specification, based on the first index value and the second index value, deduplicate the three-dimensional point set to be deduplicated. Specifically, it includes:
[0030] If it is determined that the second index value is not included in the first index value, it is determined that there is no coincident point for the current point;
[0031] Update the mapped value of the current point in the original point mapping structure to the index of the current point, and add the current point coordinates to the deduplicated three-dimensional point set;
[0032] Update the first index value of the current point in the three-dimensional point set to be deduplicated to the label corresponding to the current point, and update the second index value of the current point in the deduplicated three-dimensional point set to the first index value of the current point in the three-dimensional point set to be deduplicated;
[0033] Increment the preset value of the index of the non-duplicate points to update the initialized variables, and iteratively process each point to obtain the deduplicated three-dimensional point set.
[0034] Optionally, in one or more embodiments of the present specification, based on the required 3D model accuracy of the 3D point set to be deduplicated and the current computing resources, a corresponding numerical comparison tolerance is matched, which specifically includes:
[0035] Obtain the scene label corresponding to the 3D point set to be deduplicated to query the initial historical modeling project corresponding to the scene label;
[0036] By comparing the point set features of the 3D point set to be deduplicated with the point set features of each of the initial historical modeling projects, the initial historical modeling projects are screened to obtain historical modeling projects, and based on the historical modeling projects, the ranges of each accuracy data corresponding to the 3D point set to be deduplicated are determined;
[0037] Compare the accuracy data of each of the historical modeling projects with the computing resource data corresponding to each accuracy data to determine the association relationship between the computing resource data and each accuracy data;
[0038] Based on the current computing resources, determine the bottleneck resource data corresponding to the 3D point set to be deduplicated, and based on the association relationship, determine the accuracy data value that matches the bottleneck resource data within the ranges of each accuracy data;
[0039] Select the maximum value of each accuracy data value, and based on the preset mapping relationship between the accuracy data and the numerical comparison tolerance, determine the numerical comparison tolerance corresponding to the maximum value of the accuracy data value.
[0040] Optionally, in one or more embodiments of the present specification, after deduplicating the 3D point set to be deduplicated based on the first index value and the second index value, the method further includes:
[0041] Traverse each point of the 3D point set to be deduplicated and iterate the deduplication process of each point to obtain the deduplicated 3D point set.
[0042] One or more embodiments of the present specification provide a deduplication device for a 3D point set, the device includes:
[0043] At least one processor; and,
[0044] A memory communicatively connected to the at least one processor; wherein,
[0045] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: execute any of the above methods.
[0046] A non-volatile computer storage medium provided by one or more embodiments of this specification stores computer-executable instructions, and the computer-executable instructions are configured to be capable of executing any of the above-mentioned methods.
[0047] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:
[0048] Based on the method of space division, the duplicate removal operation of the point set can be completed with the optimal time complexity of In this case, which significantly reduces the time complexity compared with the traditional duplicate removal method and improves the operating efficiency of the system. Preprocess the current point in the three-dimensional point set to be de-duplicated to obtain the first index value, and calculate the second index value by traversing the cells. The introduction of the index value converts the comparison operation of points into the comparison of index values, greatly reducing the amount of calculation and improving the speed of duplicate removal. Only traverse the cell where the current point is located and its neighboring cells, rather than comprehensively comparing the entire point set. This local traversal method narrows the comparison range to adjacent cells, reduces unnecessary comparison times, and improves the efficiency of the algorithm, especially suitable for the duplicate removal processing of large-scale point sets. In addition, by matching the numerical comparison tolerance according to the required three-dimensional model accuracy of the three-dimensional point set to be de-duplicated and the current computing resources, it is possible to fully utilize the existing computing resources while meeting the accuracy requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in this specification. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings. In the drawings:
[0050] Figure 1 is a schematic flowchart of a method for removing duplicates from a three-dimensional point set provided by an embodiment of this specification;
[0051] Figure 2 is a schematic diagram of the division of a space cell provided by an embodiment of this specification;
[0052] Figure 3 is a schematic diagram of determining point merging provided by an embodiment of this specification;
[0053] Figure 4 is a schematic flowchart of the duplicate removal logic of a three-dimensional point set provided by an embodiment of this specification;
[0054] Figure 5 is a schematic diagram of variable initialization provided by an embodiment of this specification;
[0055] Figure 6 Schematic diagram of conversion of a 3D point set to be deduplicated provided by an embodiment of this specification;
[0056] Figure 7 Schematic diagram of merging of the 0th point provided by an embodiment of this specification;
[0057] Figure 8 Schematic diagram of merging of the 1st point provided by an embodiment of this specification;
[0058] Figure 9 Schematic diagram of merging of the 2nd point provided by an embodiment of this specification;
[0059] Figure 10 Schematic diagram of merging of the 3rd point provided by an embodiment of this specification;
[0060] Figure 11 Schematic diagram of merging of the 4th point provided by an embodiment of this specification;
[0061] Figure 12 Schematic diagram of the structure of a deduplication device for a 3D point set provided by an embodiment of this specification;
[0062] Figure 13 Schematic diagram of the structure of a non - volatile storage medium provided by an embodiment of this specification. Detailed implementation manners
[0063] Embodiments of this specification provide a deduplication method, device and medium for a 3D point set.
[0064] In order to enable those skilled in the art to better understand the technical solutions in this specification, the following will clearly and completely describe the technical solutions in the embodiments of this specification with reference to the accompanying drawings in the embodiments of this specification. Obviously, the described embodiments are only a part of the embodiments of this specification, rather than all the embodiments. Based on the embodiments of this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this specification.
[0065] As Figure 1 shown, embodiments of this specification provide a flowchart of a deduplication method for a 3D point set. It can be Figure 1 seen that in one or more embodiments of this specification, a deduplication method for a 3D point set includes the following steps:
[0066] S101: Based on the required 3D model accuracy of the 3D point set to be deduplicated and the current computing resources, match the corresponding numerical comparison tolerance.
[0067] Due to different application scenarios and modeling stages, the accuracy requirements for 3D models vary greatly. In industrial design, the modeling of mechanical parts may require extremely high dimensional accuracy, with a tolerance range possibly in the micron level to ensure the precise fit and functionality of the parts. In virtual reality (VR) or augmented reality (AR) scenarios, more emphasis is placed on the overall visual effect and real-time interactivity. There are certain requirements for the shape and visual accuracy of the model, but the requirements for dimensional accuracy are relatively low. Therefore, in order to optimize the deduplication strategy according to the actual situation during runtime and ensure the efficient operation of the system. In the embodiments of this specification, the corresponding numerical comparison tolerance will be matched according to the 3D model accuracy required by the 3D point set to be deduplicated and the current computing resources. It can be understood that when the tolerance value is too large, it will affect the model accuracy, while when the tolerance value is too small, it will lead to an increase in the amount of calculation. Therefore, in the embodiments of this specification, by selecting a moderate tolerance value according to the model accuracy and computing resources, a balance can be achieved between accuracy and efficiency, improving the accuracy and efficiency of deduplication.
[0068] Specifically, in one or more embodiments of this specification, based on the 3D model accuracy required by the 3D point set to be deduplicated and the current computing resources, matching the corresponding numerical comparison tolerance specifically includes the following process:
[0069] First, obtain the scene label corresponding to the 3D point set to be de-duplicated, and query the initial historical modeling project corresponding to this scene label. It should be noted that the scene label is determined based on the application scenario, modeling stage, and requirement annotation corresponding to the current 3D point set to be de-duplicated. Then, by comparing the point set features of the 3D point set to be de-duplicated with the point set features of each initial historical modeling project, screen the initial historical modeling projects to obtain historical modeling projects. Among them, the point set features include: the number of points in the point set, point set density, and curvature change rate, etc. Then, based on the accuracy data values corresponding to each historical modeling project, the range of each accuracy data corresponding to the 3D point set to be de-duplicated can be determined through statistical analysis. It should be noted that the accuracy data includes: dimensional accuracy, shape accuracy, visual accuracy, etc. In this process, when each historical modeling project reaches the corresponding accuracy data, it will consume a certain amount of computing resources. These computing resource data include CPU usage rate, GPU load, memory occupancy, computing time, etc. Therefore, in order to consider the computing resources, compare the accuracy data of each historical modeling project with the computing resource data corresponding to each accuracy data, and determine the correlation relationship between the computing resource data and each accuracy data through methods such as correlation analysis or regression analysis. Then, determine the bottleneck resource data corresponding to the 3D point set to be de-duplicated according to the current computing resources, that is, the computing resource index that has the greatest impact on the de-duplication operation and is most likely to have insufficient resources. Thus, according to the correlation relationship, within the range of each accuracy data, determine the accuracy data value that matches the bottleneck resource data. Select the maximum value of each accuracy data value, and then determine the numerical comparison tolerance corresponding to the maximum value of the accuracy data value according to the preset mapping relationship between the accuracy data and the numerical comparison tolerance.
[0070] In this process, with the help of historical project data, the appropriate accuracy data range and numerical comparison tolerance can be quickly located, reducing the trial-and-error cost. By comparing the point set features of the 3D point set to be de-duplicated with the initial historical modeling projects for screening, the final reference historical modeling projects are highly compatible with the current task. This ensures that the subsequent determined accuracy data and numerical comparison tolerance can accurately meet the characteristic requirements of the current point set, avoiding mismatch problems caused by project differences. By comparing the accuracy data and computing resource data of the historical modeling projects, determining the correlation relationship between the two, and combining the bottleneck resource data of the current computing resources to match the accuracy data value, the optimal accuracy can be achieved under limited computing resources. Then, select the maximum value of each accuracy data value to determine the numerical comparison tolerance, setting a unified accuracy bottom line for the de-duplication operation and ensuring the quality stability of the model under the strictest accuracy requirements.
[0071] S102: Determine the number of one-dimensional space divisions corresponding to the 3D point set to be de-duplicated according to the numerical comparison tolerance, and divide the space corresponding to the 3D point set to be de-duplicated based on the number of one-dimensional space divisions to obtain corresponding spatial cells;
[0072] The implementation technology in the embodiments of this specification is based on the overall framework and basic modeling functions of the CAD design software CrownCAD with a B / S architecture. This technology is used for the duplicate point set removal operation involved in the point cloud or mesh processing, that is , to improve the efficiency of duplicate point set removal and reduce the running time. In this process, in order to decompose the problem of removing duplicates from a large-scale three-dimensional point set into local problems within multiple small cells and avoid the problem of excessive complexity when processing a large amount of three-dimensional point set data. As Figure 2 shown, in the embodiments of this specification, according to the numerical comparison tolerance, the number of one-dimensional space partitions corresponding to the three-dimensional point set to be de-duplicated is determined, and thus the space corresponding to the three-dimensional point set to be de-duplicated is partitioned according to the number of one-dimensional space partitions to obtain the corresponding space cells. Among them, before normalizing the numerical comparison tolerance based on the maximum and minimum values of the three-dimensional point set to be de-duplicated to obtain the normalized numerical comparison tolerance, the method further includes:
[0073] Initializing the variables involved in the process of removing duplicates from the three-dimensional point set to be de-duplicated, that is, initializing the following variables: the point set to be de-duplicated , the point set after de-duplication , the index of the non-duplicate points , the index mapping of the elements in when they first appear in , the index mapping of the elements in in , the numerical tolerance required for de-duplication , and normalize to obtain , and then calculate the space partition size , the unique index of each point and the mapping of the point index in the point set , the unique index of each point and the mapping of the point index in the point set in . .
[0074] After initializing the variables, in one or more embodiments of this specification, according to the numerical comparison tolerance, the number of one-dimensional space partitions corresponding to the three-dimensional point set to be de-duplicated is determined, and based on the number of one-dimensional space partitions, the space corresponding to the three-dimensional point set to be de-duplicated is partitioned to obtain the corresponding space cells, which specifically includes the following process:
[0075] First, normalize the numerical comparison tolerance based on the maximum and minimum values of the three-dimensional point set to be de-duplicated to obtain the normalized numerical comparison tolerance, that is , and then take the reciprocal of the normalized numerical comparison tolerance to obtain the number of one-dimensional space partitions corresponding to the three-dimensional point set to be de-duplicated, that is Then, based on the number of one-dimensional space partitions, the space corresponding to the three-dimensional point set to be de-duplicated is partitioned in three-dimensional directions to obtain corresponding spatial cells, that is, the space is partitioned according to the rules.
[0076] In this process, the numerical comparison tolerance is normalized according to the maximum and minimum values of the three-dimensional point set to be de-duplicated, which can make the space partition closely related to the actual range of the point set data. Different three-dimensional point sets may have different coordinate ranges. Through normalization, regardless of the numerical size of the point set, the appropriate number of space partitions can be determined based on a unified standard. For large-scale scene point sets with large coordinate values and microscopic model point sets with small coordinate values, the space can be partitioned with appropriate granularity to ensure that duplicate points are not missed due to overly coarse partitioning during the de-duplication process, nor will computational resources be wasted due to overly fine partitioning, thus ensuring the accuracy and effect of de-duplication. Based on the number of one-dimensional space partitions, uniform partitioning in three-dimensional directions is performed, and the resulting spatial cells have the same size. This uniform space partitioning method makes the distribution of points in space more orderly. During the de-duplication process, the comparison operations of each cell and its surrounding cells are consistent. It avoids the problems of incomplete de-duplication or excessive de-duplication in some regions due to uneven space partitioning, and improves the stability and reliability of the overall de-duplication effect. Moreover, subsequent point set de-duplication is performed based on the space partitioning method, which improves the efficiency of point set de-duplication.
[0077] S103: Preprocess the current point in the three-dimensional point set to be de-duplicated to obtain the first index value corresponding to the coordinate of the current point in the three-dimensional point set to be de-duplicated.
[0078] After the space partitioning of the three-dimensional point set is implemented based on the above step S102, the current point in the three-dimensional point set to be de-duplicated will be preprocessed to obtain the first index value corresponding to the coordinate of the current point in the three-dimensional point set to be de-duplicated. Specifically, in one or more embodiments of this specification, preprocessing the current point in the three-dimensional point set to be de-duplicated to obtain the first index value corresponding to the coordinate of the current point in the three-dimensional point set to be de-duplicated specifically includes the following process:
[0079] First, normalize the point coordinates corresponding to the current point in the three-dimensional point set to be de-duplicated to obtain the processed current point coordinates. Then, round the product of the processed current point coordinates and the number of one-dimensional space partitions to obtain the converted current point coordinates. Process the converted current point coordinates based on a preset index formula to determine the first index value corresponding to the current point coordinates. Among them, it should be noted that the first index value is the unique index of each coordinate point and the three-dimensional point set to be de-duplicated, and the preset index formula is: , represents the current point coordinates of the current point i ( The first index value corresponding to (), and n represents the number of one-dimensional space divisions. That is, in the embodiments of this specification, the three-dimensional point set to be deduplicated will be traversed , first normalize the coordinates of the traversed points, and then multiply Take the integer, and calculate the unique index of the current point .
[0080] S104: Traverse the current cell and neighbor cells of the current point in the three-dimensional point set to be deduplicated, so as to calculate the second index value corresponding to the coordinates of the current point represented by each cell.
[0081] In the embodiments of this specification, the current cell and neighbor cells of the current point in the three-dimensional point set to be deduplicated will also be traversed, so as to calculate the second index value corresponding to the coordinates of the current point represented by each cell .
[0082] Specifically, in one or more embodiments of this specification, traversing the current cell and neighbor cells of the current point in the three-dimensional point set to be deduplicated to calculate the second index value corresponding to the coordinates of the current point represented by each cell specifically includes: traversing the current cell and neighbor cells of the current point in the three-dimensional point set to be deduplicated to map the coordinates of the current point to the cell, and determining the coordinates of each point represented by each cell. Then, based on the preset index formula, calculate the coordinates of the current point represented by each cell, so as to obtain the second index value corresponding to the coordinates of the current point represented by each cell.
[0083] S105: Deduplicate the three-dimensional point set to be deduplicated based on the first index value and the second index value.
[0084] Then as Figure 4 shown, in order to determine whether there are duplicate points for the current point, it will be judged based on the first index value and the second index value, that is, by determining whether the second index value is included in the first index value, to determine whether there are duplicate points for the current point, so as to update and deduplicate the three-dimensional point set to be deduplicated in a corresponding manner.
[0085] Specifically, in one or more embodiments of this specification, deduplicating the three-dimensional point set to be deduplicated based on the first index value and the second index value specifically includes the following process:
[0086] If it is determined that the second index value is included in the first index value, it is determined that there is a coincidence point for the current point. At this time, based on the mapped value of the second index value of the current point in the three-dimensional point set to be deduplicated, update the mapped value of the current point in the original point mapping structure. That is, traverse the current cell and its surrounding 26 cells, and calculate the unique index of each cell , judge whether it is in exists. If it exists, it means that there are duplicate points at this point and they can be merged. Then, in update the value to in the corresponding value, that is, update the index of the current point in the current deduplication three-dimensional point set to the mapped value of the second index value of the current point in the deduplication three-dimensional point set, and obtain the deduplicated three-dimensional point set, that is, the value is updated to in the corresponding value, that is, , thus realizing the deduplication of the duplicate points corresponding to the current point.
[0087] In this process, by comparing the first index value and the second index value to determine whether the points coincide, the index structure can be used to quickly locate and judge the repeatability of points, avoiding full-scale comparison of each point and greatly reducing the computational amount. When processing a large-scale three-dimensional point set to be deduplicated, traverse the cell and its surrounding 26 cells, and judge the duplicate points through the index value. Compared with the method of comparing points one by one, it can significantly improve the deduplication speed and save computational time and resources. In addition, during the deduplication process, synchronously update the mapped value in the original point mapping structure and the index in the deduplicated three-dimensional point set to ensure that the index relationship between the point sets before and after deduplication is clear and accurate, and reduce the problems caused by data inconsistency.
[0088] Specifically, in one or more embodiments of this specification, based on the first index value and the second index value, deduplicate the three-dimensional point set to be deduplicated, which specifically includes:
[0089] As Figure 4 shown, if it is determined that the second index value is not included in the first index value, it is determined that there are no coincident points at the current point. At this time, it is necessary to update the mapped value of the current point in the original point mapping structure to the index of the current point, and add the current point coordinates to the deduplicated three-dimensional point set. Then, update the first index value of the current point in the three-dimensional point set to be deduplicated to the label corresponding to the current point, and update the second index value of the current point in the deduplicated three-dimensional point set to the first index value of the current point in the three-dimensional point set to be deduplicated. At the same time, increment the preset value of the index of the non-repeated points to realize the update of the initialization variables, and iteratively process each point to obtain the deduplicated three-dimensional point set. That is, in update the value to the index of the current point , that is, ; in update the value to the index ; the coordinates of the current point are added to in; the value of the corresponding point is updated to , that is ; the value of the current point is updated to , that is ; increment by 1.
[0090] During this process, when it is determined that the second index value is not included in the first index value, it is determined that there is no overlapping point at the current point, and it is added to the deduplicated three-dimensional point set. This operation can accurately retain all non-repeated points in the original point set, ensure that the deduplicated point set completely contains the valid information in the original point set, avoid missing key data, and maintain the accuracy and integrity of the data. During the processing, the original point mapping structure and the index of the deduplicated three-dimensional point set are updated synchronously, and is updated to the index of the current point and other update processes. This comprehensive index update mechanism ensures that the mapping relationship between the point sets before and after deduplication is accurate, enabling convenient tracing and association of the original points and the deduplicated points in subsequent operations, and ensuring the coherence and consistency of data processing. By incrementing the index of the non-repeated points, the update of the initialization variable is realized, providing the necessary conditions for iteratively processing the next point.
[0091] Furthermore, in one or more embodiments of the present specification, after deduplicating the three-dimensional point set to be deduplicated based on the first index value and the second index value, the method further includes:
[0092] Traverse each point of the three-dimensional point set to be deduplicated, and iterate the deduplication process of each point to obtain the deduplicated three-dimensional point set. As Figures 7 - 11 shown, taking a point set of 5 points as an example to illustrate the above three-dimensional point set deduplication process. First, initialize the variables as shown in Figure 5 , where the numerical comparison tolerance , the normalization tolerance is , and the spatial division size . Then, the results after normalizing and rounding each point in the point set are shown in Figure 6 . Taking the th point's coordinates as an example, . Then, traverse the 0th point as shown in Figure 7 , as shown by the dark square in the following figure. The yellow square represents the neighbor points of . It can be intuitively seen that there is no point that can be merged with , As shown Figure 8 in traversing the first point , as shown by the newly added marked square after the dark square in the following figure, where this square represents the neighbor points of . It can be visually seen that there is no point that can be merged with As shown Figure 9 in traversing the second point , as shown by the newly added prominent square in the following figure, where this square represents the neighbor points of Figure 7 . It can be visually seen that the dark square in , that is, point is included in the neighbors of . Therefore, can be merged with As shown Figure 10 in traversing the third point , as shown by the newly added dark square in the following figure, where Figure 9 the newly added dark square represents the neighbor points of . Combining the previous steps, it can be seen that and fall into the same square. Therefore, can be merged with As shown Figure 11 in traversing the fourth point , as shown by the newly added dark square in the following figure, where Figure 9 the newly added dark square represents the neighbor points of . It can be visually seen that there is no point that can be merged with . After the traversal is completed, the deduplicated point set and the corresponding relationship between are obtained and . Based on this process, it can be known that by using the method of spatial partitioning to compare the point coordinates, the deduplication operation of the point set can be completed under the optimal time complexity , and compared with the complexity corresponding to the traditional deduplication method , the time complexity is significantly reduced, thereby improving the operation efficiency of the system.
[0093] As shown Figure 12 in the following figure, the embodiment of the present specification provides a structural schematic diagram of a three-dimensional point set deduplication device. As can be seen from Figure 12 , in one or more embodiments of the present specification, a three-dimensional point set deduplication device includes:
[0094] At least one processor; and,
[0095] A memory communicatively connected to the at least one processor; wherein,
[0096] The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to: execute any one of the above-mentioned methods.
[0097] As Figure 13 shown, an embodiment of the present specification provides a schematic structural diagram of a non-volatile storage medium. As can be seen from Figure 13 this, in one or more embodiments of the present specification, a non-volatile storage medium stores computer-executable instructions 1301, and the computer-executable instructions 1301 can: execute any one of the above-mentioned methods.
[0098] The various embodiments in this specification are all described in a progressive manner. For the same or similar parts among the various embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the apparatus, device, and non-volatile computer storage medium, since they are basically similar to the method embodiments, the description is relatively simple, and for the relevant parts, reference can be made to the partial description of the method embodiments.
[0099] The above specifically describes certain embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain implementations, multitasking and parallel processing are also possible or may be advantageous.
[0100] The above is only one or more embodiments of the present specification and is not used to limit the present specification. For those skilled in the art, various changes and modifications can be made to one or more embodiments of the present specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of the present specification shall be included within the scope of the claims of the present specification.
Claims
1. A method for removing duplicate points from a three-dimensional point set, characterized in that: The method comprises: Based on the required 3D model accuracy of the 3D point set to be deduplicated and the current computing resources, matching the corresponding numerical comparison tolerance; wherein the required 3D model accuracy includes: dimensional accuracy, shape accuracy and visual accuracy, and the current computing resources include: CPU usage, GPU load, memory occupancy and computing time; Determine the number of one-dimensional space divisions corresponding to the three-dimensional point set to be deduplicated according to the numerical comparison tolerance, and divide the space corresponding to the three-dimensional point set to be deduplicated based on the number of one-dimensional space divisions to obtain corresponding space cells; Preprocessing the current point in the to-be-deduplicated three-dimensional point set to obtain a first index value corresponding to the coordinates of the current point in the to-be-deduplicated three-dimensional point set; Traversing the cell where the current point is located and the neighboring cells in the to-be-deduplicated three-dimensional point set to calculate the second index value corresponding to the coordinates of the current point represented by each cell; Deduplication of the to-be-deduplicated three-dimensional point set is performed based on the first index value and the second index value; The matching of the corresponding numerical comparison tolerance based on the 3D model accuracy required for the 3D point set to be deduplicated and the current computing resources specifically includes: Obtaining a scene label corresponding to the to-be-deduplicated three-dimensional point set to query an initial historical modeling project corresponding to the scene label; By comparing the point set features of the to-be-deduplicated three-dimensional point set with the point set features of each of the initial historical modeling projects, the initial historical modeling projects are screened to obtain historical modeling projects, so as to determine the range of each precision data corresponding to the to-be-deduplicated three-dimensional point set according to the historical modeling projects; Comparing the accuracy data of each of the historical modeling projects with the computing resource data corresponding to each of the accuracy data, and determining the correlation between the computing resource data and each of the accuracy data; Determine the bottleneck resource data corresponding to the three-dimensional point set to be deduplicated based on the current computing resources, and determine the precision data value matching the bottleneck resource data within the range of each precision data based on the association relationship; The maximum value of each of the precision data values is selected to determine the numerical comparison tolerance corresponding to the maximum value of the precision data values based on a preset mapping relationship between the precision data and the numerical comparison tolerance.
2. A method for deduplication of a three-dimensional point set according to claim 1, characterized in that: Determining the number of one-dimensional space divisions corresponding to the three-dimensional point set to be deduplicated according to the numerical comparison tolerance, and dividing the space corresponding to the three-dimensional point set to be deduplicated based on the number of one-dimensional space divisions to obtain corresponding space cells, specifically includes: Based on the maximum value of the to-be-deduplicated three-dimensional point set, normalizing the numerical comparison tolerance to obtain a normalized numerical comparison tolerance; Taking the inverse of the normalized value comparison tolerance, obtaining the number of one-dimensional space divisions corresponding to the three-dimensional point set to be deduplicated; Based on the number of one-dimensional space divisions, the space corresponding to the deduplicated three-dimensional point set is divided in three dimensions to obtain corresponding space cells; Wherein, before normalizing the numerical comparison tolerance based on the maximum value of the to-be-deduplicated three-dimensional point set and obtaining the normalized numerical comparison tolerance, the method further comprises: Initialize the variables involved in the deduplication process of the three-dimensional point set to be deduplicated.
3. A method for deduplication of a three-dimensional point set according to claim 1, characterized in that: Preprocessing the current point in the to-be-deduplicated three-dimensional point set to obtain a first index value corresponding to the coordinates of the current point in the to-be-deduplicated three-dimensional point set specifically includes: Normalizing the point coordinates corresponding to the current point in the three-dimensional point set to be deduplicated to obtain the processed coordinates of the current point; Rounding the product of the processed current point coordinates and the number of divisions of the one-dimensional space to obtain converted current point coordinates; The converted current point coordinates are processed based on a preset index formula to determine a first index value corresponding to the current point coordinates; wherein the first index value is a unique index of each coordinate point and the three-dimensional point set to be deduplicated, and the preset index formula is: , Represents the current point coordinates of the current point i ( ) corresponds to the first index value, and n represents the number of one-dimensional space divisions.
4. A method for deduplication of a three-dimensional point set according to claim 1, characterized in that: Traversing the cell where the current point is located and the neighboring cells in the to-be-deduplicated three-dimensional point set to calculate the second index value corresponding to the coordinates of the current point represented by each cell, specifically includes: Traversing the cell where the current point is located and the neighboring cells in the three-dimensional point set to be deduplicated, so as to map the coordinates of the current point to the cells, and determine the coordinates of each point represented by each cell; The current point coordinates represented by each cell are calculated based on a preset index formula to obtain a second index value corresponding to the current point coordinates represented by each cell.
5. A method for deduplication of a three-dimensional point set according to claim 1, characterized in that: Based on the first index value and the second index value, deduplication is performed on the to-be-deduplicated three-dimensional point set, specifically including: If it is determined that the second index value is included in the first index value, it is determined that there is an overlapping point at the current point; Based on the mapping value of the second index value of the current point in the three-dimensional point set to be deduplicated, the mapping value of the current point in the original point mapping structure is updated; Update the index of the current point in the deduplicated three-dimensional point set to be deduplicated to the mapping value of the second index value of the current point in the deduplicated three-dimensional point set to obtain the deduplicated three-dimensional point set.
6. A method for deduplication of a three-dimensional point set according to claim 2, characterized in that: Based on the first index value and the second index value, deduplication is performed on the to-be-deduplicated three-dimensional point set, specifically including: If it is determined that the second index value is not included in the first index value, it is determined that there is no overlapping point at the current point; Update the mapping value of the current point in the original point mapping structure to the index of the current point, and add the coordinates of the current point to the deduplicated 3D point set; Update the first index value of the current point in the to-be-deduplicated 3D point set to the label corresponding to the current point, and update the second index value of the current point in the to-be-deduplicated 3D point set to the first index value of the current point in the to-be-deduplicated 3D point set; The indexes of non-duplicate points are incremented by preset values to update the initialized variables, and each point is iteratively processed to obtain a three-dimensional point set after deduplication.
7. A method for deduplication of a three-dimensional point set according to claim 1, characterized in that: After deduplicating the to-be-deduplicated three-dimensional point set based on the first index value and the second index value, the method further includes: Each point of the to-be-deduplicated three-dimensional point set is traversed, and the deduplication process of each point is iterated to obtain a deduplicated three-dimensional point set.
8. A three-dimensional point set deduplication device, characterized in that: The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can: execute any of the methods described in claims 1-7.
9. A non-volatile storage medium storing computer executable instructions, characterized in that: The computer executable instructions can: execute the method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Improved local point cloud registration method for complex curved surface workpiece
CN117893586A
Point cloud data processing for scalable compression
US9530225B1