Three-dimensional point set deduplication method and device and medium
Through the spatial division and index value comparison based on numerical comparison tolerance, the calculation resource consumption and model accuracy reduction caused by repeated points in three-dimensional points are solved, and efficient and accurate point set deduplication operation is achieved.
Patent Information
- Application Number
- CN202510376818.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-28
AI Technical Summary
There are a large number of repetitive points in the three-dimensional point concentration, which leads to increased computing resource consumption, reduced model accuracy, and may lead to failure of downstream algorithms. Traditional deduplication methods have high time complexity, low efficiency, and are easily affected by global data, resulting in misjudgment or misjudgment.
Through spatial division based on numerical comparison tolerance, the three-dimensional point set is divided into spatial cells, and the point deduplication operation is performed using the index value. The specific steps include: preprocessing the point coordinates to obtain the first index value, traversing the cell and its neighbors to calculate the second index value, and deduplication based on the index value.
It significantly reduces the time complexity of deduplication operation, improves system operation efficiency, reduces calculation amount, and ensures the accuracy and efficiency of deduplication, which is especially suitable for deduplication processing of large-scale point sets.
Smart Images

Figure CN119884401A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, device and medium for deduplicating a three-dimensional point set. Background Art
[0002] In the fields of 3D modeling, reverse engineering, 3D scanning and CAD / CAM, 3D point sets are the core data carriers for describing the geometric features of object surfaces. With the popularization of high-precision 3D scanning equipment and multi-source data fusion technology, the amount of point set data is growing exponentially. However, due to factors such as acquisition equipment errors, multi-view registration overlap, and dynamic scanning redundancy, point sets generally contain duplicate points with highly adjacent spatial positions. These duplicate points will not only significantly increase computing resource consumption, but also reduce model accuracy, and even cause downstream algorithms to fail due to abnormal local point density. Therefore, deduplication of 3D point sets is an important part of 3D projects.
[0003] Traditional methods usually compare each point in the point set one by one to determine whether the distance between them is less than a specified numerical comparison tolerance. However, since each point in the point set needs to be compared with all other points, this method has a high time complexity and low deduplication efficiency. In addition, when processing large-scale point sets, traditional deduplication methods need to compare each point with all other points, which makes the data structure complex and easily leads to computational bottlenecks. And when detecting local duplicate points, it is easily affected by global data, resulting in misjudgment or missed judgment. Summary of the invention
[0004] In order to solve the above technical problems, one or more embodiments of this specification provide a method, device and medium for deduplication of a three-dimensional point set.
[0005] One or more embodiments of this specification adopt the following technical solutions: One or more embodiments of the present specification provide a method for deduplicating a three-dimensional point set, the method comprising: Based on the 3D model accuracy required by the 3D point set to be deduplicated and the current computing resources, the corresponding numerical comparison tolerance is matched; 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; Based on the first index value and the second index value, the to-be-deduplicated three-dimensional point set is deduplicated.
[0006] Optionally, in one or more embodiments of the present specification, 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.
[0007] Optionally, in one or more embodiments of the present specification, 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.
[0008] Optionally, in one or more embodiments of the present specification, 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.
[0009] Optionally, in one or more embodiments of the present specification, deduplicating the to-be-deduplicated three-dimensional point set based on the first index value and the second index value specifically includes: 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.
[0010] Optionally, in one or more embodiments of the present specification, deduplicating the to-be-deduplicated three-dimensional point set based on the first index value and the second index value specifically includes: 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.
[0011] Optionally, in one or more embodiments of the present 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: 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.
[0012] Optionally, in one or more embodiments of the present specification, 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.
[0013] One or more embodiments of the present specification provide a device for deduplicating a three-dimensional point set, the device comprising: 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 to enable the at least one processor to: execute any of the above-mentioned methods. One or more embodiments of the present specification provide a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute any of the above-described methods.
[0014] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects: The space partitioning method can achieve the optimal time complexity of The deduplication operation of the point set can be completed under the condition of , which significantly reduces the time complexity and improves the operation efficiency of the system compared with the traditional deduplication method. The current point in the three-dimensional point set to be deduplicated is preprocessed to obtain the first index value, and the second index value is calculated by traversing the cells. The introduction of the index value converts the point comparison operation into the comparison of the index value, which greatly reduces the amount of calculation and improves the speed of deduplication. Only the cell where the current point is located and its neighboring cells are traversed, instead of making a comprehensive comparison of the entire point set. This local traversal method narrows the comparison range to adjacent cells, reduces the number of unnecessary comparisons, and improves the efficiency of the algorithm. It is especially suitable for deduplication of large-scale point sets. In addition, the numerical comparison tolerance is matched according to the three-dimensional model accuracy required by the three-dimensional point set to be deduplicated and the current computing resources, which can make full use of the existing computing resources while meeting the accuracy requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. In the drawings: Figure 1 A flowchart of a method for deduplicating a three-dimensional point set provided in an embodiment of this specification; Figure 2 A schematic diagram of the division of a space cell provided in an embodiment of this specification; Figure 3 A schematic diagram of merging judgment points provided in an embodiment of this specification; Figure 4 A flowchart of deduplication logic of a three-dimensional point set provided in an embodiment of this specification; Figure 5 A schematic diagram of variable initialization provided in an embodiment of this specification; Figure 6 A schematic diagram of a conversion of a three-dimensional point set to be deduplicated provided in an embodiment of this specification; Figure 7 A schematic diagram of point 0 merging provided in an embodiment of this specification; Figure 8 A schematic diagram of the first point merging provided in the embodiment of this specification; Fig. 9 A schematic diagram of a second point merging provided in an embodiment of this specification; Fig.10 A schematic diagram of a third point merging provided in an embodiment of this specification; Fig.11 A schematic diagram of a fourth point merging provided in an embodiment of this specification; Fig.12 A schematic diagram of the structure of a three-dimensional point set deduplication device provided in an embodiment of this specification; Fig.13 A schematic diagram of the structure of a non-volatile storage medium provided in an embodiment of this specification. DETAILED DESCRIPTION
[0016] The embodiments of this specification provide a method, device and medium for deduplicating a three-dimensional point set.
[0017] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0018] like Figure 1 As shown, the present specification provides a flowchart of a method for deduplication of a three-dimensional point set. Figure 1 It can be seen that in one or more embodiments of this specification, a method for removing duplicate points from a three-dimensional point set includes the following steps: S101: Based on the 3D model accuracy required by the 3D point set to be deduplicated and the current computing resources, matching corresponding numerical comparison tolerances.
[0019] Due to different application scenarios and modeling stages, the accuracy requirements for three-dimensional models vary greatly. In industrial design, the modeling of mechanical parts may require extremely high dimensional accuracy, and the tolerance range may be at the micron level to ensure the precise fit and functional realization 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, and 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 be able to optimize the deduplication strategy according to actual conditions at runtime and ensure the efficient operation of the system. In the embodiment of this specification, the corresponding numerical comparison tolerance will be matched according to the required three-dimensional model accuracy of the three-dimensional point set to be deduplicated and the current computing resources. Among them, it can be understood that when the tolerance value is too large, it will affect the model accuracy, and when the tolerance value is too small, it will lead to an increase in the amount of calculation. Therefore, in the embodiment 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, and the accuracy and efficiency of deduplication can be improved.
[0020] Specifically, in one or more embodiments of the present specification, based on the 3D model accuracy required by the 3D point set to be deduplicated and the current computing resources, the corresponding numerical comparison tolerance is matched, specifically including the following process: First, the scene label corresponding to the 3D point set to be deduplicated is obtained to query the initial historical modeling project corresponding to the scene label; It should be noted that the scene label is determined based on the application scenario, modeling stage and demand annotation corresponding to the current 3D point set to be deduplicated. Then, by comparing the point set features of the 3D point set to be deduplicated with the point set features of each initial historical modeling project, the initial historical modeling project is screened to obtain the historical modeling project. The point set features include: point set number, point set density and curvature change rate. 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 deduplicated can be determined through statistical analysis. It should be noted that the accuracy data includes: size accuracy, shape accuracy, visual accuracy, etc. In this process, each historical modeling project will consume a certain amount of computing resources when reaching the corresponding accuracy data. These computing resource data include CPU usage, GPU load, memory usage, computing time, etc. Therefore, in order to take into account the computing resources, the accuracy data of each historical modeling project will be compared with the computing resource data corresponding to each accuracy data, and the correlation between the computing resource data and each accuracy data will be determined through correlation analysis or regression analysis. Then, the bottleneck resource data corresponding to the three-dimensional point set to be deduplicated is determined based on the current computing resources, that is, the computing resource indicators that have the greatest impact on the deduplication operation and are most likely to have insufficient resources. Therefore, according to the correlation relationship, the accuracy data value that matches the bottleneck resource data is determined within the range of each accuracy data. The maximum value of each accuracy data value is selected, and then the numerical comparison tolerance corresponding to the maximum value of the accuracy data value is determined according to the preset mapping relationship between the accuracy data and the numerical comparison tolerance.
[0021] In this process, with the help of historical project data, the appropriate precision data range and numerical comparison tolerance can be quickly located, reducing the cost of trial and error. The three-dimensional point set to be deduplicated is compared with the point set features of the initial historical modeling project to be screened, so that the final reference historical modeling project is highly consistent with the current task. This ensures that the precision data and numerical comparison tolerance determined subsequently can accurately meet the characteristic requirements of the current point set and avoid mismatch problems caused by project differences. Compare the precision data and computing resource data of the historical modeling project, determine the correlation between the two, and match the precision data values in combination with the bottleneck resource data of the current computing resources, so as to achieve the best accuracy under limited computing resources. Then select the maximum value of each precision data value to determine the numerical comparison tolerance, set a unified accuracy bottom line for the deduplication operation, and ensure the quality stability of the model under the most stringent accuracy requirements.
[0022] S102: 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; 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 B / S architecture. This technology is used for point set deduplication operations involved in point cloud or mesh processing, that is, , improve the efficiency of point set deduplication and reduce running time. In this process, in order to decompose the large-scale 3D point set deduplication problem into local problems in multiple small cells, the problem of excessive complexity in processing massive 3D point set data can be avoided. Figure 2 As shown, in the embodiment of this specification, the number of one-dimensional space divisions corresponding to the three-dimensional point set to be deduplicated is determined according to the numerical comparison tolerance, so as to divide the space corresponding to the three-dimensional point set to be deduplicated according to the number of one-dimensional space divisions to obtain corresponding space cells. Wherein, based on the maximum value of the three-dimensional point set to be deduplicated, the numerical comparison tolerance is normalized, and before obtaining the normalized numerical comparison tolerance, the method further includes: Initialize the variables involved in the deduplication process of the 3D point set to be deduplicated, that is, initialize the following variables: , the point set after deduplication , index of non-repeated points , The elements in The first occurrence of the index mapping , The elements in Index mapping in , the numerical tolerance required for deduplication , and normalized to get , and then calculate the size of the space division , a unique index for each point With point set Mapping of midpoint indices , a unique index for each point With point set Mapping of midpoint indices .
[0023] After the variables are initialized, in one or more embodiments of the present specification, the number of one-dimensional space divisions corresponding to the three-dimensional point set to be deduplicated is determined according to the numerical comparison tolerance, so as to 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, specifically including the following process: First, the numerical comparison tolerance is normalized according to the maximum value of the 3D point set to be deduplicated, and the normalized numerical comparison tolerance is obtained, that is, , and then take the inverse of the normalized value comparison tolerance to obtain the number of one-dimensional space divisions corresponding to the three-dimensional point set to be deduplicated, that is, Then, based on the number of one-dimensional space divisions, the space corresponding to the three-dimensional point set is divided in three directions to obtain the corresponding space cells. In other words, according to The rules for dividing space.
[0024] In this process, the numerical comparison tolerance is normalized according to the maximum value of the three-dimensional point set to be deduplicated, which can make the spatial division closely related to the actual range of the point set data. Different three-dimensional point sets may have different coordinate ranges. Through normalization, no matter how large the value of the point set is, the appropriate number of spatial divisions can be determined based on a unified standard. For large scene point sets with large coordinate values and microscopic model point sets with small coordinate values, the space can be divided with appropriate granularity to ensure that in the deduplication process, neither duplicate points will be missed due to too coarse divisions nor computing resources will be wasted due to too fine divisions, thereby ensuring the accuracy and effect of deduplication. Uniform division in the three-dimensional direction is performed based on the number of one-dimensional space divisions, and the resulting spatial cells are of the same size. This uniform spatial division method makes the distribution of points in space more orderly. In the deduplication process, the comparison operations of each cell and its surrounding cells are consistent. It avoids the problem of incomplete or excessive deduplication in some areas due to uneven spatial division, and improves the stability and reliability of the overall deduplication effect. And the subsequent point set deduplication is performed based on the spatial division method, which improves the efficiency of point set deduplication.
[0025] S103: Preprocess 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.
[0026] After the spatial division 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 deduplicated is preprocessed to obtain the first index value corresponding to the coordinates of the current point in the three-dimensional point set to be deduplicated. Specifically, in one or more embodiments of the present specification, the current point in the three-dimensional point set to be deduplicated is preprocessed to obtain the first index value corresponding to the coordinates of the current point in the three-dimensional point set to be deduplicated, which specifically includes the following process: First, the point coordinates corresponding to the current point in the three-dimensional point set to be deduplicated are normalized to obtain the processed current point coordinates. Then, the product of the processed current point coordinates and the number of one-dimensional space divisions is rounded to obtain the converted current point coordinates. The converted current point coordinates are processed based on the preset index formula to determine the first index value corresponding to the current point coordinates. 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 deduplicated, and the preset index formula is: , Represents the current point coordinates of the current point i ( ), and n represents the number of one-dimensional space divisions. That is, in the embodiment of this specification, the three-dimensional point set to be deduplicated will be traversed. , normalize the coordinates of the traversed points first, and then multiply Round and calculate the unique index of the current point .
[0027] S104: traverse 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.
[0028] The embodiment of this specification will also traverse the cell where the current point is located and the neighboring cells 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. .
[0029] Specifically, in one or more embodiments of the present specification, traversing the cell where the current point is located and the neighboring cells 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 cell where the current point is located and the neighboring cells in the three-dimensional point set to be deduplicated to map the coordinates of the current point to the cells, and determining the coordinates of each point represented by each cell. Then, the coordinates of the current point represented by each cell are calculated based on a preset index formula, so as to obtain the second index value corresponding to the coordinates of the current point represented by each cell.
[0030] S105: Deduplication of the to-be-deduplicated three-dimensional point set is performed based on the first index value and the second index value.
[0031] Then as Figure 4 As shown, in order to determine whether there is a duplicate point at the current point, a judgment is made 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, it is determined whether there is a duplicate point at the current point, so that the three-dimensional point set to be deduplicated can be updated and deduplicated in a corresponding manner.
[0032] Specifically, in one or more embodiments of the present specification, based on the first index value and the second index value, the three-dimensional point set to be deduplicated is deduplicated, which specifically includes the following process: If it is determined that the second index value is included in the first index value, it is determined that there is an overlap point at the current point. At this time, the mapping value of the current point in the original point mapping structure will be updated based on the mapping value of the second index value of the current point in the 3D point set to be deduplicated. That is, traverse the cell where the current point is located and the 26 cells around it, and calculate the unique index of each cell. ,judge Is it in If it exists, it means that there are duplicate points at this point and they can be merged. exist The value in is updated to exist The corresponding value is 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, that is, the current point Update the value to exist The corresponding value in , thereby achieving deduplication of duplicate points corresponding to the current point.
[0033] In this process, the first index value is compared with the second index value to determine whether the points overlap. The index structure can be used to quickly locate and determine the repeatability of the points, avoiding a full comparison of each point and greatly reducing the amount of calculation. When processing large-scale 3D point sets to be deduplicated, the method of traversing the cell and the 26 cells around it and determining duplicate points by index value can significantly increase the speed of deduplication and save computing time and resources compared to the point-by-point comparison method. In addition, during the deduplication process, the mapping values in the original point mapping structure and the indexes in the deduplicated 3D point set are updated synchronously, ensuring that the index relationship between the point sets before and after deduplication is clear and accurate, reducing problems caused by data inconsistency.
[0034] Specifically, in one or more embodiments of the present specification, deduplication of the to-be-deduplicated three-dimensional point set is performed based on the first index value and the second index value, specifically including: like Figure 4 As shown, 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 for the current point. At this time, it is necessary to 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 three-dimensional point set. Then, the first index value of the current point in the three-dimensional point set to be deduplicated is updated to the number corresponding to the current point, and the second index value of the current point in the deduplicated three-dimensional point set is updated to the first index value of the current point in the three-dimensional point set to be deduplicated. At the same time, the index of the non-duplicate point is incremented by a preset value to realize the update of the initialized variable, and each point is iteratively processed to obtain the deduplicated three-dimensional point set. exist The value in is updated to the index of the current point ,Right now ; exist Update the value in index ; Current point Add the coordinates of middle; Corresponding point Update the value to ,Right now ; Current point Update the value to ,Right now ; Increment by 1.
[0035] In 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 overlap with the current point and it is added to the deduplicated 3D point set. This operation can accurately retain all non-duplicate points in the original point set, ensuring that the deduplicated point set completely contains the valid information in the original point set, avoiding the omission of key data and maintaining the accuracy and integrity of the data. During the processing, the original point mapping structure and the index of the deduplicated 3D point set are synchronously updated, and Update to the index of the current point This comprehensive index update mechanism ensures that the mapping relationship between the point sets before and after deduplication is accurate, making it easy to trace and associate the original points with the deduplicated points in subsequent operations, ensuring the coherence and consistency of data processing. The self-increment operation is performed to update the initialized variables, which provides the necessary conditions for iterative processing of the next point.
[0036] Further, 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: 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. Figure 7-11 As shown, a set of 5 points Take the above three-dimensional point set deduplication process as an example to illustrate. First, Figure 5 The initialization variables are shown as follows, where the numerical comparison tolerance , the normalized tolerance is , space partition size Then for the point set The result after normalization and rounding of each point in is as follows Figure 6 As shown, Points Coordinate example: . Then if Figure 7 The traversal of point 0 is shown , as shown in the dark squares in the figure below, where the yellow squares represent The neighbor points of merge, .like Figure 8 The first point is traversed as shown , as shown in the newly added marked square after the dark square in the figure below, where the square represents The neighbor points of merge, .like Fig. 9 The second point is traversed as shown , as shown in the following figure, where the new significant square represents The neighbor points of can be seen intuitively. Figure 7 Medium dark squares Included in Among the neighbors, therefore Can be used with merge, .like Fig.10 As shown, traverse the third point , as shown in the following figure with a new dark square, where Fig. 9 Added dark squares to indicate Neighbor points of , combined with the previous steps, we can see that and fell into the same square, so Can be used with merge, .like Fig.11 The traversal of the fourth point is shown , as shown in the following figure with a new dark square, where Fig. 9 Added dark squares to indicate The neighbor points of merge, After the traversal is completed, the point set after duplication is obtained. as well as and The corresponding relationship between and Based on this process, we can see that using space division to compare point coordinates has the optimal time complexity The point set deduplication operation can be completed in one step, which is much more complicated than the traditional deduplication method. , significantly reducing the time complexity and thus improving the operating efficiency of the system.
[0037] like Fig.12 As shown, the present specification embodiment provides a schematic diagram of a structure of a three-dimensional point set deduplication device, which comprises Fig.12 It can be seen that in one or more embodiments of this specification, a device for deduplicating a three-dimensional point set includes: 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 to enable the at least one processor to: execute any of the above-mentioned methods.
[0038] like Fig.13 As shown, the present specification embodiment provides a structural schematic diagram of a non-volatile storage medium, which is composed of Fig.13 It can be seen that in one or more embodiments of this specification, a non-volatile storage medium stores computer executable instructions 1301, and the computer executable instructions 1301 can: execute any of the methods described above.
[0039] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0040] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0041] The above description is only one or more embodiments of this specification and is not intended to limit this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of this specification.
Claims
1. A method for removing duplicate points from a three-dimensional point set, characterized in that: The method comprises: Based on the 3D model accuracy required by the 3D point set to be deduplicated and the current computing resources, the corresponding numerical comparison tolerance is matched; 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; Based on the first index value and the second index value, the to-be-deduplicated three-dimensional point set is deduplicated.
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: 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.
8. A method for deduplicating 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.
9. 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-8.
10. 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 8.
Citation Information
Patent Citations
Efficient neighborhood searching method for large-scale three-dimensional point cloud data
CN108920574A
Laser point cloud rasterization method
CN113137919A
Steel scrap pile three-dimensional modeling method based on point cloud data
CN114820918A
Improved local point cloud registration method for complex curved surface workpiece
CN117893586A
Three-dimensional point cloud simplification method based on boundary point dimension reduction extraction
CN117953232A