Data processing method and device applied to three-dimensional scanning equipment
By performing connected component detection and timestamp calculation on the adjacency list data of 3D scanning equipment, noise data is automatically removed, solving the problems of low efficiency and low reliability in noise processing in 3D scanning, and achieving more efficient and reliable noise removal.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-02
- Publication Date
- 2026-03-13
AI Technical Summary
Existing 3D scanning technologies suffer from low efficiency and unreliability in noise processing, which can easily lead to a vicious cycle and increase the risk of data loss.
Connectivity detection is performed by obtaining the current adjacency list data, the maximum timestamp of the connected components is calculated, and noise reduction processing is performed based on the timestamp to automatically remove noisy data.
It improves the efficiency of noise processing, reduces the risk of data loss due to scanning operation errors, and enhances the reliability of noise processing.
Smart Images

Figure CN121661247A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of 3D scanning technology, specifically relating to a data processing method and apparatus for use in 3D scanning equipment. Background Technology
[0002] 3D scanning technology has been widely used in industrial design, mechanical manufacturing, and medical imaging. It obtains high-precision 3D data by scanning actual objects, thereby reconstructing the object's shape and providing visualization support for product development, surgical simulation, and other scenarios. However, during the 3D scanning imaging process, factors such as lens contamination, mechanical vibration, and system errors can easily introduce noise into the scanned data, affecting the accuracy of the reconstructed object shape. Currently, the main method to correct abnormal noise data is to repeatedly scan the object areas that generate noisy data.
[0003] However, in practice, it has been found that correcting noise by repeated scanning usually requires manually locating the noise area multiple times. New noise may be generated during repeated scanning, forming a vicious cycle of "noise-repeated scanning-noise". The noise processing efficiency is low and the risk of data loss due to scanning operation errors is increased, resulting in low reliability of noise processing.
[0004] Therefore, improving the efficiency and reliability of noise processing for 3D scanning data is a pressing technical problem that needs to be solved. Summary of the Invention
[0005] The purpose of this invention is to provide a data processing method and apparatus for use in 3D scanning equipment, which aims to improve the efficiency and reliability of noise processing of 3D scanning data.
[0006] To address the aforementioned technical problems, the first aspect of this invention discloses a data processing method applied to a three-dimensional scanning device, the method comprising: Obtain the current adjacency list data; the current adjacency list data is generated based on the 3D scan data corresponding to the target object, and the current adjacency list data is used to characterize the connection information between multiple spatial points corresponding to the target object; The current adjacency list data is subjected to connectivity detection processing to obtain a set of connected components; the set of connected components includes at least one target connected component, and each target connected component includes at least one spatial point corresponding to the target object; Calculate the timestamp for each target connected component to obtain the maximum timestamp corresponding to each target connected component; The current adjacency list data is denoised based on the maximum timestamp corresponding to all the target connected components to obtain the target adjacency list data.
[0007] As an optional implementation, in the first aspect of the present invention, the step of performing connectivity detection processing on the current adjacency list data to obtain a set of connected components includes: Based on the current adjacency list data, the connectivity information of all spatial points corresponding to the target object is initialized to obtain a connectivity information set; Based on the connectivity information set and the current adjacency list data, a connected component traversal and detection process is performed on all spatial points corresponding to the target object to obtain a connected component set.
[0008] As an optional implementation, in the first aspect of the present invention, the step of initializing the connectivity information of all spatial points corresponding to the target object based on the current adjacency list data to obtain a connectivity information set includes: For each spatial point corresponding to the target object, the current adjacency list data is parsed to obtain the historical connected component identifier corresponding to the spatial point. The identifier information of the historical connected component identifier is replaced with the identifier information of the node identity identifier corresponding to the spatial point to obtain the current connected component identifier corresponding to the spatial point. The node identity identifier is the unique identification identifier of the spatial point. The historical connected component identifier is used to represent the connected component in which the spatial point was located at a previous time. The current connected component identifier is used to represent the connected component in which the spatial point is located at the current time. By integrating the current connected component identifiers of all spatial points corresponding to the target object, a set of connectivity information is obtained.
[0009] As an optional implementation, in the first aspect of the present invention, the step of performing connected component traversal and detection processing on all spatial points corresponding to the target object based on the connected information set and the current adjacency list data to obtain a connected component set includes: For each spatial point corresponding to the target object, the current adjacency list data is parsed to obtain the adjacent node group corresponding to the spatial point. For each adjacent node in the adjacent node group, the connectivity information set is parsed to obtain the adjacent connected component identifier of the adjacent node. A one-way detection judgment is performed based on the node identity identifier corresponding to the spatial point and the adjacent node identifier to obtain the one-way detection judgment result. If the one-way detection judgment result indicates that no connected component traversal detection has been performed between the spatial point and the adjacent node, it is determined whether the current connected component identifier of the spatial point is the same as the adjacent connected component identifier. If not, the number of nodes in the first domain corresponding to the connected component of the spatial point and the number of nodes in the second domain corresponding to the connected component of the adjacent node are obtained. If the number of nodes in the first domain is less than or equal to the number of nodes in the second domain, then the identifier information of the current connected component identifier of the spatial point is replaced with the identifier information of the adjacent connected component identifier to obtain the updated current connected component identifier of the spatial point. If the number of nodes in the first domain is greater than the number of nodes in the second domain, then the identifier information of the adjacent connected component identifier is replaced with the identifier information of the current connected component identifier of the spatial point to obtain the updated adjacent connected component identifier of the adjacent node. The adjacent node group includes at least one adjacent node, the adjacent node is another spatial point adjacent to the spatial point, the adjacent node identifier is the unique identification identifier of the adjacent node, and the adjacent connected component identifier is the current connected component identifier of the adjacent node. Integrate the current connected component identifiers of all spatial points corresponding to the target object to obtain a set of connected components.
[0010] As an optional implementation, in the first aspect of the present invention, the step of calculating a timestamp for each of the target connected components to obtain the maximum timestamp corresponding to each target connected component includes: For each target connected component in the set of connected components, calculate the timestamp corresponding to each spatial point in the target connected component, and filter the timestamps corresponding to each spatial point in the target connected component by the maximum value to obtain the maximum timestamp corresponding to the target connected component.
[0011] As an optional implementation, in the first aspect of the present invention, the step of performing noise reduction processing on the current adjacency list data based on the maximum timestamp corresponding to all the target connected components to obtain the target adjacency list data includes: For each target connected component in the set of connected components, the difference between the current timestamp and the maximum timestamp corresponding to the target connected component is calculated to obtain a time difference value. If the time difference value is greater than or equal to a preset time threshold, the data in the current adjacency list that matches the target connected component is identified as noise data, and the target noise data corresponding to the target connected component is obtained. If the time difference value is less than the preset time threshold, the target noise data corresponding to the target connected component is identified as empty. The current timestamp is the timestamp corresponding to the current moment. Remove all target noise data corresponding to the target connected components in the current adjacency list data to obtain the target adjacency list data.
[0012] As an optional implementation, in the first aspect of the invention, before obtaining the current adjacency list data, the method further includes: A preset target object is scanned in three dimensions to obtain three-dimensional scan data; the three-dimensional scan data includes image frame data corresponding to multiple consecutive image frames. A global point cloud is generated based on the image frame data corresponding to all the image frames to obtain the target global point cloud. A global mesh is generated based on the target global point cloud to obtain the target global mesh; The pre-stored historical adjacency list data is updated based on the target global grid to obtain the current adjacency list data.
[0013] As an optional implementation, in the first aspect of the present invention, the step of generating a global point cloud based on the image frame data corresponding to all the image frames to obtain a target global point cloud includes: For each image frame, a point cloud is generated based on the image frame data corresponding to that image frame to obtain an initial point cloud. The adjacent frame data of that image frame are obtained, and the initial point cloud is registered based on the adjacent frame data to obtain the global position information of that image frame. The initial point cloud includes multiple spatial points corresponding to the target object, the adjacent frame data are the image frame data of other image frames adjacent to that image frame, and the global position information is used to characterize the spatial position of all spatial points in the initial point cloud. For each image frame, if the image frame is the starting frame, then the initial point cloud corresponding to the image frame is determined to be the current global point cloud corresponding to the image frame; the starting frame is the first frame of multiple consecutive image frames corresponding to the three-dimensional scan data; For each image frame, if the image frame is not the starting frame, the current global point cloud corresponding to the preceding adjacent frame is obtained. The node coordinate value of each spatial point in the initial point cloud corresponding to the image frame is determined according to the global position information corresponding to the image frame. The current global point cloud corresponding to the preceding adjacent frame is updated according to the node coordinate values of all spatial points in the initial point cloud corresponding to the image frame to obtain the current global point cloud corresponding to the image frame. The preceding adjacent frame is another image frame that is adjacent to the image frame and whose imaging time is earlier than the imaging time of the image frame. Integrate the current global point clouds corresponding to all the image frames to obtain the target global point cloud.
[0014] As an optional implementation, in the first aspect of the present invention, the step of generating a global mesh based on the target global point cloud to obtain a target global mesh includes: For each image frame, if the image frame is the starting frame, the current global point cloud corresponding to the image frame is determined according to the target global point cloud, and a triangular mesh is generated for the current global point cloud corresponding to the image frame to obtain the current global mesh corresponding to the image frame. For each image frame, if the image frame is not the starting frame, the current global grid corresponding to the preceding adjacent frame of the image frame is obtained, the current global point cloud corresponding to the image frame is determined according to the target global point cloud, and the current global grid corresponding to the preceding adjacent frame is updated according to the current global point cloud corresponding to the image frame to obtain the current global grid corresponding to the image frame. Integrate the current global grids corresponding to all the aforementioned image frames to obtain the target global grid.
[0015] A second aspect of the present invention discloses a data processing apparatus for use in a three-dimensional scanning device, the apparatus comprising: The data acquisition module is used to acquire the current adjacency list data; the current adjacency list data is generated based on the three-dimensional scan data corresponding to the target object, and the current adjacency list data is used to represent the connection information between multiple spatial points corresponding to the target object; The connectivity detection module is used to perform connectivity detection processing on the current adjacency list data to obtain a set of connected components; the set of connected components includes at least one target connected component, and each target connected component includes at least one spatial point corresponding to the target object; The time calculation module is used to calculate the timestamp for each of the target connected components to obtain the maximum timestamp corresponding to each target connected component. The noise reduction module is used to perform noise reduction processing on the current adjacency list data based on the maximum timestamp corresponding to all the target connected components, so as to obtain the target adjacency list data.
[0016] As an optional implementation, in a second aspect of the present invention, the connectivity detection module performs connectivity detection processing on the current adjacency list data to obtain a set of connected components in the following specific ways: Based on the current adjacency list data, the connectivity information of all spatial points corresponding to the target object is initialized to obtain a connectivity information set; Based on the connectivity information set and the current adjacency list data, a connected component traversal and detection process is performed on all spatial points corresponding to the target object to obtain a connected component set.
[0017] As an optional implementation, in a second aspect of the present invention, the connectivity detection module initializes the connectivity information of all spatial points corresponding to the target object based on the current adjacency list data to obtain a connectivity information set. The specific methods include: For each spatial point corresponding to the target object, the current adjacency list data is parsed to obtain the historical connected component identifier corresponding to the spatial point. The identifier information of the historical connected component identifier is replaced with the identifier information of the node identity identifier corresponding to the spatial point to obtain the current connected component identifier corresponding to the spatial point. The node identity identifier is the unique identification identifier of the spatial point. The historical connected component identifier is used to represent the connected component in which the spatial point was located at a previous time. The current connected component identifier is used to represent the connected component in which the spatial point is located at the current time. By integrating the current connected component identifiers of all spatial points corresponding to the target object, a set of connectivity information is obtained.
[0018] As an optional implementation, in a second aspect of the present invention, the connectivity detection module performs connected component traversal detection processing on all spatial points corresponding to the target object based on the connectivity information set and the current adjacency list data, and obtains the connected component set in the following specific ways: For each spatial point corresponding to the target object, the current adjacency list data is parsed to obtain the adjacent node group corresponding to the spatial point. For each adjacent node in the adjacent node group, the connectivity information set is parsed to obtain the adjacent connected component identifier of the adjacent node. A one-way detection judgment is performed based on the node identity identifier corresponding to the spatial point and the adjacent node identifier to obtain the one-way detection judgment result. If the one-way detection judgment result indicates that no connected component traversal detection has been performed between the spatial point and the adjacent node, it is determined whether the current connected component identifier of the spatial point is the same as the adjacent connected component identifier. If not, the number of nodes in the first domain corresponding to the connected component of the spatial point and the number of nodes in the second domain corresponding to the connected component of the adjacent node are obtained. If the number of nodes in the first domain is less than or equal to the number of nodes in the second domain, then the identifier information of the current connected component identifier of the spatial point is replaced with the identifier information of the adjacent connected component identifier to obtain the updated current connected component identifier of the spatial point. If the number of nodes in the first domain is greater than the number of nodes in the second domain, then the identifier information of the adjacent connected component identifier is replaced with the identifier information of the current connected component identifier of the spatial point to obtain the updated adjacent connected component identifier of the adjacent node. The adjacent node group includes at least one adjacent node, the adjacent node is another spatial point adjacent to the spatial point, the adjacent node identifier is the unique identification identifier of the adjacent node, and the adjacent connected component identifier is the current connected component identifier of the adjacent node. Integrate the current connected component identifiers of all spatial points corresponding to the target object to obtain a set of connected components.
[0019] As an optional implementation, in the second aspect of the present invention, the time calculation module performs timestamp calculation on each of the target connected components to obtain the maximum timestamp corresponding to each target connected component in the following specific manner: For each target connected component in the set of connected components, calculate the timestamp corresponding to each spatial point in the target connected component, and filter the timestamps corresponding to each spatial point in the target connected component by the maximum value to obtain the maximum timestamp corresponding to the target connected component.
[0020] As an optional implementation, in a second aspect of the present invention, the noise reduction processing module performs noise reduction processing on the current adjacency list data based on the maximum timestamp corresponding to all the target connected components to obtain the target adjacency list data. The specific method for this is as follows: For each target connected component in the set of connected components, the difference between the current timestamp and the maximum timestamp corresponding to the target connected component is calculated to obtain a time difference value. If the time difference value is greater than or equal to a preset time threshold, the data in the current adjacency list that matches the target connected component is identified as noise data, and the target noise data corresponding to the target connected component is obtained. If the time difference value is less than the preset time threshold, the target noise data corresponding to the target connected component is identified as empty. The current timestamp is the timestamp corresponding to the current moment. Remove all target noise data corresponding to the target connected components in the current adjacency list data to obtain the target adjacency list data.
[0021] As an optional implementation, in a second aspect of the invention, the apparatus further includes: The 3D scanning module is used to perform 3D scanning on a preset target object to obtain 3D scanning data; the 3D scanning data includes image frame data corresponding to multiple consecutive image frames. The point cloud generation module is used to generate a global point cloud based on the image frame data corresponding to all the image frames, and obtain the target global point cloud. The mesh generation module is used to generate a global mesh based on the target global point cloud to obtain the target global mesh; The adjacency list update module is used to update the pre-stored historical adjacency list data according to the target global grid to obtain the current adjacency list data.
[0022] As an optional implementation, in the second aspect of the present invention, the point cloud generation module generates a global point cloud based on the image frame data corresponding to all the image frames, and the specific method for obtaining the target global point cloud includes: For each image frame, a point cloud is generated based on the image frame data corresponding to that image frame to obtain an initial point cloud. The adjacent frame data of that image frame are obtained, and the initial point cloud is registered based on the adjacent frame data to obtain the global position information of that image frame. The initial point cloud includes multiple spatial points corresponding to the target object, the adjacent frame data are the image frame data of other image frames adjacent to that image frame, and the global position information is used to characterize the spatial position of all spatial points in the initial point cloud. For each image frame, if the image frame is the starting frame, then the initial point cloud corresponding to the image frame is determined to be the current global point cloud corresponding to the image frame; the starting frame is the first frame of multiple consecutive image frames corresponding to the three-dimensional scan data; For each image frame, if the image frame is not the starting frame, the current global point cloud corresponding to the preceding adjacent frame is obtained. The node coordinate value of each spatial point in the initial point cloud corresponding to the image frame is determined according to the global position information corresponding to the image frame. The current global point cloud corresponding to the preceding adjacent frame is updated according to the node coordinate values of all spatial points in the initial point cloud corresponding to the image frame to obtain the current global point cloud corresponding to the image frame. The preceding adjacent frame is another image frame that is adjacent to the image frame and whose imaging time is earlier than the imaging time of the image frame. Integrate the current global point clouds corresponding to all the image frames to obtain the target global point cloud.
[0023] As an optional implementation, in a second aspect of the present invention, the mesh generation module generates a global mesh based on the target global point cloud, and the specific method for obtaining the target global mesh includes: For each image frame, if the image frame is the starting frame, the current global point cloud corresponding to the image frame is determined according to the target global point cloud, and a triangular mesh is generated for the current global point cloud corresponding to the image frame to obtain the current global mesh corresponding to the image frame. For each image frame, if the image frame is not the starting frame, the current global grid corresponding to the preceding adjacent frame of the image frame is obtained, the current global point cloud corresponding to the image frame is determined according to the target global point cloud, and the current global grid corresponding to the preceding adjacent frame is updated according to the current global point cloud corresponding to the image frame to obtain the current global grid corresponding to the image frame. Integrate the current global grids corresponding to all the aforementioned image frames to obtain the target global grid.
[0024] A third aspect of the present invention discloses another data processing apparatus for use in a three-dimensional scanning device, the apparatus comprising: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute a data processing method for a three-dimensional scanning device disclosed in the first aspect of the present invention.
[0025] The fourth aspect of the present invention discloses a computer storage medium storing computer instructions, which, when invoked by a processor, are used to execute a data processing method for a three-dimensional scanning device disclosed in the first aspect of the present invention.
[0026] Compared with the prior art, the beneficial effects of the present invention are as follows: During the 3D scanning of an object, the adjacency list data at the current moment is first acquired. Connected component detection is then performed based on this data to obtain a set of connected components. Next, the maximum timestamp of each target connected component in the set is calculated. Finally, noise reduction processing is applied to the current adjacency list data based on the maximum timestamps of all target connected components to obtain the target adjacency list data. Automated noise reduction based on the timestamps of the scanned data eliminates the need for repeated manual positioning and scanning, improving noise processing efficiency and reducing the risk of data loss due to scanning errors, thus enhancing the reliability of noise processing. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0028] Figure 1 This is a schematic flowchart of a data processing method for a three-dimensional scanning device disclosed in an embodiment of the present invention; Figure 2 This is a schematic diagram of a three-dimensional scanning model obtained from an oral cavity scan as disclosed in an embodiment of the present invention; Figure 3 Yes Figure 2 The schematic diagram of the model obtained after noise reduction processing of the 3D scan model shown; Figure 4 This is a schematic diagram of the structure of a data processing device applied to a three-dimensional scanning equipment, as disclosed in an embodiment of the present invention; Figure 5 This is a schematic diagram of another data processing device applied to a three-dimensional scanning device disclosed in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of another data processing device for a three-dimensional scanning device disclosed in an embodiment of the present invention. Detailed Implementation
[0029] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0030] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, or product may include a series of steps or units, or may not be limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or processes.
[0031] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0032] 3D scanning technology has been widely used in industrial design, mechanical manufacturing, and medical imaging. It obtains high-precision 3D data by scanning actual objects, thereby reconstructing the object's shape and providing visualization support for product development, surgical simulation, and other scenarios. However, during the 3D scanning imaging process, factors such as lens contamination, mechanical vibration, and system errors can easily introduce noise into the scanned data, affecting the accuracy of the reconstructed object shape. Currently, the main method to correct abnormal noise data is to repeatedly scan the object areas that generate noisy data.
[0033] However, in practice, it has been found that correcting noise by repeated scanning usually requires manually locating the noise area multiple times. New noise may be generated during repeated scanning, forming a vicious cycle of "noise-repeated scanning-noise". The noise processing efficiency is low and the risk of data loss due to scanning operation errors is increased, resulting in low reliability of noise processing.
[0034] Therefore, improving the efficiency and reliability of noise processing for 3D scanning data is a pressing technical problem that needs to be solved.
[0035] To address the aforementioned technical problems, this invention discloses a data processing method and apparatus for 3D scanning equipment, aiming to improve the efficiency and reliability of noise processing for 3D scanning data. Detailed descriptions follow.
[0036] Example 1 Please see Figure 1 , Figure 1 This is a flowchart illustrating a data processing method for a 3D scanning device disclosed in an embodiment of the present invention. Figure 1The method shown can be applied to a data processing device that improves the efficiency and reliability of noise processing for 3D scan data. Furthermore, this device can be integrated into a 3D scanning device. Figure 1 As shown, the data processing method for a 3D scanning device disclosed in this embodiment of the invention includes, but is not limited to, the following operations: 101. Obtain the current adjacency list data; The current adjacency list data is generated based on the 3D scan data corresponding to the target object. The current adjacency list data is used to represent the connection information between multiple spatial points corresponding to the target object. 102. Perform connectivity checks on the current adjacency list data to obtain a set of connected components; the set of connected components includes at least one target connected component, and each target connected component includes at least one spatial point corresponding to the target object; 103. Calculate the timestamp for each target connected component to obtain the maximum timestamp corresponding to each target connected component; 104. Perform noise reduction on the current adjacency list data based on the maximum timestamp corresponding to all target connected components to obtain the target adjacency list data.
[0037] In this embodiment of the invention, the adjacency list data at the current moment is first obtained, and connected component detection is performed based on the current adjacency list data to obtain a set of connected components. Then, the maximum timestamp of each target connected component in the set of connected components is calculated. Finally, noise reduction processing is performed on the current adjacency list data based on the maximum timestamps of all target connected components to obtain the target adjacency list data. During the scanning process, automatic noise reduction is performed based on the timestamps corresponding to the scanned data, eliminating the need for multiple manual positioning and repeated scanning, thus improving the efficiency of noise processing and reducing the risk of data loss due to scanning operation errors, thereby improving the reliability of noise processing.
[0038] It should be noted that during the 3D scanning of an object, after generating the current adjacency list data based on the 3D scan data corresponding to the target object, there will be a certain delay before triggering the acquisition of the current adjacency list data and performing operations such as connectivity detection on the current adjacency list data to avoid the accidental deletion of new scan data. Understandably, as the scanning process progresses, the amount of adjacency list data increases, and the time required for noise processing gradually increases accordingly. However, for scanning scenarios with small target objects, such as medical images, the time required for noise processing is always much less than 5 seconds. Therefore, the noise processing time and the delay time can be set to a total of 5 seconds, and the actual value of the delay time can be dynamically adjusted according to the time required for noise processing to ensure the synchronization of the scanning and noise reduction processes. For scanning scenarios with large target objects, such as building scans, the time required for noise processing may exceed 5 seconds. In this case, two adjacency lists can be constructed. One adjacency list stores the denoised data, and the other adjacency list temporarily stores the data to be denoised. An additional spatial relationship mapping table is constructed to store the spatial relationships between spatial points in the two adjacency lists. During noise reduction, only the adjacency list storing the data to be denoised is processed, thereby reducing the time required for noise reduction.
[0039] In an optional embodiment, connectivity testing is performed on the current adjacency list data to obtain a set of connected components, including: Based on the current adjacency list data, the connectivity information of all spatial points corresponding to the target object is initialized to obtain a connectivity information set; Based on the connectivity information set and the current adjacency list data, a connected component traversal and detection process is performed on all spatial points corresponding to the target object to obtain a connected component set.
[0040] In another optional embodiment, connectivity information initialization processing is performed on all spatial points corresponding to the target object based on the current adjacency list data to obtain a connectivity information set, including: For each spatial point corresponding to the target object, the current adjacency list data is parsed to obtain the historical connected component identifier corresponding to the spatial point. The identifier information of the historical connected component identifier is replaced with the identifier information of the node identity identifier corresponding to the spatial point to obtain the current connected component identifier corresponding to the spatial point. The node identity identifier is the unique identification identifier of the spatial point. The historical connected component identifier is used to represent the connected component in which the spatial point was located at a previous time. The current connected component identifier is used to represent the connected component in which the spatial point is located at the current time. Integrate the current connected component identifiers of all spatial points corresponding to the target object to obtain a set of connectivity information.
[0041] In this optional embodiment, each spatial point is initialized, and a connected component is assigned to each spatial point. The identifier of the connected component is the identifier of the spatial point itself, and there is only one spatial point in the component.
[0042] In another optional embodiment, based on the connectivity information set and the current adjacency list data, a connected component traversal detection process is performed on all spatial points corresponding to the target object to obtain a connected component set, including: For each spatial point corresponding to the target object, the current adjacency list data is parsed to obtain the adjacent node group corresponding to the spatial point. For each adjacent node in the adjacent node group, the connectivity information set is parsed to obtain the adjacent connected component identifier of the adjacent node. A one-way detection judgment is performed based on the node identity identifier corresponding to the spatial point and the adjacent node identifier to obtain the one-way detection judgment result. If the one-way detection judgment result indicates that no connected component traversal detection has been performed between the spatial point and the adjacent node, it is determined whether the current connected component identifier of the spatial point is the same as the adjacent connected component identifier. If not, the number of nodes in the first domain corresponding to the connected component of the spatial point and the number of nodes in the second domain corresponding to the connected component of the adjacent node are obtained. The number of nodes in the first domain is less than or equal to the number of nodes in the second domain. If the number of nodes in the first domain is less than or equal to the number of nodes in the second domain, the identifier information of the current connected component identifier of the spatial point is replaced with the identifier information of the adjacent connected component identifier to obtain the updated current connected component identifier of the spatial point. If the number of nodes in the first domain is greater than the number of nodes in the second domain, the identifier information of the adjacent connected component identifier is replaced with the identifier information of the current connected component identifier of the spatial point to obtain the updated adjacent connected component identifier of the adjacent node. The adjacent node group includes at least one adjacent node. An adjacent node is another spatial point adjacent to the spatial point. The adjacent node identifier is the unique identification identifier of the adjacent node, and the adjacent connected component identifier is the current connected component identifier of the adjacent node. Integrate the current connected component identifiers of all spatial points corresponding to the target object to obtain a set of connected components.
[0043] In this optional embodiment, for any spatial point, a neighboring node of that spatial point is obtained. If no traversal detection has been performed between the two points, the connected component identifiers of the spatial point and its neighboring node are searched respectively. If the two points are not in the same connected component, the points belonging to the smaller connected component (fewer nodes) are reassigned to the larger connected component (more nodes). After the traversal is completed, all spatial points are integrated and assigned to multiple target connected components.
[0044] It's important to note that one-way detection is used to avoid repeatedly traversing two spatial points. For example, if the current spatial point being processed is node A, and one of its adjacent nodes is identified as node B, after traversing and detecting both, without one-way detection, when the current spatial point is node B and one of its adjacent nodes is identified as node A, traversal and detection will be performed again. Furthermore, since nodes A and B are necessarily in the same connected component, performing another traversal and detection is meaningless and only wastes computing resources and time. Further, if the node identification identifier can reflect the order of the spatial points, one-way detection can be performed based on the node identification identifier. For example, if nodes A1 and A2 are adjacent nodes, and the node number of A1 is less than the node number of A2, when the current spatial point is node A1 and one of its adjacent nodes is identified as node A2, traversal and detection of nodes A1 and A2 will proceed normally; when the current spatial point is node A2 and one of its adjacent nodes is identified as node A1, traversal and detection of both will not be performed, thus saving computing resources and time.
[0045] In another optional embodiment, a timestamp is calculated for each target connected component to obtain the maximum timestamp corresponding to each target connected component, including: For each target connected component in the set of connected components, calculate the timestamp corresponding to each spatial point in the target connected component, and filter the timestamps corresponding to each spatial point in the target connected component by the maximum value to obtain the maximum timestamp corresponding to the target connected component.
[0046] In this optional embodiment, during the process of generating spatial points corresponding to the target object based on the 3D scanning information, the generation time of the spatial points is recorded, and the corresponding timestamp is calculated based on the recorded generation time of the spatial points.
[0047] In another optional embodiment, the current adjacency list data is denoised based on the maximum timestamp corresponding to all target connected components to obtain target adjacency list data, including: For each target connected component in the connected component set, calculate the difference between the current timestamp and the maximum timestamp corresponding to the target connected component to obtain the time difference. If the time difference is greater than or equal to a preset time threshold, then the data in the current adjacency list that matches the target connected component is identified as noise data, and the target noise data corresponding to the target connected component is obtained. If the time difference is less than the preset time threshold, then the target noise data corresponding to the target connected component is identified as empty. The current timestamp is the timestamp corresponding to the current moment. Remove the target noise data corresponding to all target connected components in the current adjacency list data to obtain the target adjacency list data.
[0048] In this optional embodiment, the preset time threshold is determined based on the lag time of the noise reduction process. If the difference between the timestamp corresponding to the current moment and the maximum timestamp of a certain target connected component is greater than or equal to the time threshold, it indicates that the target connected component is disconnected from the main model corresponding to the target object, and can be identified as noise.
[0049] For an example, please refer to 2. Figure 2 This is a schematic diagram of a three-dimensional scanning model obtained from an oral cavity scan, as disclosed in an embodiment of the present invention. Figure 2 As shown, besides the main model obtained from the oral cavity scan, there are also some discrete floating blocks next to the main model. These floating blocks represent the noise generated during the scanning process. During the scan, the maximum timestamp corresponding to the connected component containing these discrete floating blocks will remain at the timestamp of its generation. After exceeding a preset time threshold (e.g., 5 seconds), this noise can be identified and removed during the noise reduction process. Figure 3 As shown, Figure 3 Yes Figure 2 The diagram shows the model obtained after noise reduction processing of the 3D scan model.
[0050] In yet another optional embodiment, the data processing method for a 3D scanning device disclosed in this invention further includes: A 3D scan is performed on a preset target object to obtain 3D scan data; the 3D scan data includes image frame data corresponding to multiple consecutive image frames. The target global point cloud is obtained by generating a global point cloud based on the image frame data corresponding to all image frames. A global mesh is generated based on the target global point cloud to obtain the target global mesh; The current adjacency list data is obtained by updating the pre-stored historical adjacency list data based on the target global grid.
[0051] In this optional embodiment, the image frame data corresponding to each image frame includes image planar coordinate data and image depth data. It should be noted that if a new target object is being scanned at the current moment, the historical adjacency list data is a pre-constructed empty adjacency list; if scanning of an object that has already begun at the current moment is continued, the historical adjacency list data is the adjacency list data that has already undergone noise reduction processing at a previous moment. New data is added to the historical adjacency list data according to the target global grid to obtain the current adjacency list data.
[0052] In another optional embodiment, a global point cloud is generated based on the image frame data corresponding to all image frames to obtain the target global point cloud, including: For each image frame, a point cloud is generated based on the image frame data corresponding to that image frame to obtain an initial point cloud. The adjacent frame data of that image frame are obtained, and the initial point cloud is registered based on the adjacent frame data to obtain the global position information of that image frame. The initial point cloud includes multiple spatial points corresponding to the target object. The adjacent frame data are the image frame data of other image frames adjacent to that image frame. The global position information is used to characterize the spatial position of all spatial points in the initial point cloud. For each image frame, if the image frame is the starting frame, then the initial point cloud corresponding to the image frame is determined to be the current global point cloud corresponding to the image frame; the starting frame is the first frame of multiple consecutive image frames corresponding to the 3D scan data; For each image frame, if the image frame is not the starting frame, the current global point cloud corresponding to the preceding adjacent frame is obtained. The node coordinate value of each spatial point in the initial point cloud corresponding to the image frame is determined according to the global position information corresponding to the image frame. The current global point cloud corresponding to the preceding adjacent frame is updated according to the node coordinate values of all spatial points in the initial point cloud corresponding to the image frame to obtain the current global point cloud corresponding to the image frame. The preceding adjacent frame is other image frames that are adjacent to the image frame and whose imaging time is earlier than that of the image frame. Integrate the current global point clouds corresponding to all image frames to obtain the target global point cloud.
[0053] In this optional embodiment, point clouds are generated based on the scanning camera parameters and image frame data of the 3D scanning device to obtain an initial point cloud for each image frame. The point coordinates in the initial point cloud are calculated as follows:
[0054] Where x, y, and z are the coordinates of a point in the initial point cloud, u and v are the coordinates of the image plane, and d is the image depth. , , , These are all parameters of the scanning camera of a 3D scanning device.
[0055] Using the point cloud of the first frame as the initial position, point cloud registration is performed between adjacent frames to obtain the global position information of the point cloud in each frame. The global point cloud is generated by adding points frame by frame: for the first frame, the default global point cloud is empty, and all points from the first frame are added to the global point cloud. For the second frame, the overlapping and non-overlapping portions of the second frame's point cloud are calculated with the existing global point cloud. Two points in different point clouds are considered overlapping if the spatial distance between them is less than a preset threshold. For points in the overlapping portion, the average of the two points is taken as the new coordinates of the point in the global point cloud. For non-overlapping portions, they are directly added to the global point cloud, and this process is repeated for subsequent image frames.
[0056] In yet another optional embodiment, a global mesh is generated based on the target global point cloud to obtain the target global mesh, including: For each image frame, if the image frame is the starting frame, the current global point cloud corresponding to the image frame is determined based on the target global point cloud, and a triangular mesh is generated for the current global point cloud corresponding to the image frame to obtain the current global mesh corresponding to the image frame. For each image frame, if the image frame is not the starting frame, the current global grid corresponding to the preceding adjacent frame of the image frame is obtained, the current global point cloud corresponding to the image frame is determined according to the target global point cloud, and the current global grid corresponding to the preceding adjacent frame is updated according to the current global point cloud corresponding to the image frame to obtain the current global grid corresponding to the image frame. Integrate the current global grid corresponding to all image frames to obtain the target global grid.
[0057] In this optional embodiment, for the first frame, all spatial points in the first frame are triangulated. Three points that meet a preset distance condition will generate edges to form a triangular patch. If all edges of a point are shared by multiple faces, the point is marked as complete; if some edges of a point are single-faceted edges, the point is marked as an edge; if the point has no edges, it is marked as free. For the second frame, points in the overlapping area only update their coordinate information, not their topology. New points in the non-overlapping area only participate in triangulation with existing edge points and free points to form new triangular patches. Subsequent image frames follow the same principle.
[0058] During global mesh generation, the adjacency list data is updated. First, containers equal to the number of mesh vertices are generated synchronously to store the adjacency list information. Then, when a new triangle is generated, the corresponding connectivity information is added to the adjacency list. For example, if the current mesh has 10 vertices, 10 containers need to be generated synchronously. When vertices A, B, and C form a triangle, we need to add vertices B and C to the container corresponding to vertex A, add vertices A and C to the container corresponding to vertex B, and add vertices A and B to the container corresponding to vertex C. This method of updating the adjacency list is highly efficient, but the same set of vertices on adjacent faces will be added to the containers twice, consuming additional computing and storage resources and affecting the efficiency of calculating connected components during noise reduction processing.
[0059] In another optional embodiment, adjacency list data is stored by constructing a general container that supports random access and a hash map that supports element uniqueness checks. When adding a vertex map, it is first checked whether the element exists in the hash map. If it does, the addition fails; otherwise, the element is added to both the hash map and the general container. This optional embodiment allows direct access to the general container during random access, improving the efficiency of calculating connected components during noise reduction processing.
[0060] Example 2 Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of a data processing device applied to a three-dimensional scanning equipment, as disclosed in an embodiment of the present invention. Figure 4 The apparatus shown can be used to perform the method described in Embodiment 1. This apparatus can improve the efficiency and reliability of noise processing for 3D scan data. Furthermore, this apparatus can be integrated into a 3D scanning device. Figure 4 As shown, an embodiment of the present invention discloses a data processing device for use in a 3D scanning device, including but not limited to: The data acquisition module 201 is used to acquire the current adjacency list data. The current adjacency list data is generated based on the three-dimensional scan data corresponding to the target object. The current adjacency list data is used to represent the connection information between multiple spatial points corresponding to the target object. The connectivity detection module 202 is used to perform connectivity detection processing on the current adjacency list data to obtain a set of connected components; the set of connected components includes at least one target connected component, and each target connected component includes at least one spatial point corresponding to the target object; The time calculation module 203 is used to calculate the timestamp for each target connected component and obtain the maximum timestamp corresponding to each target connected component. The noise reduction processing module 204 is used to perform noise reduction processing on the current adjacency list data based on the maximum timestamp corresponding to all target connected components to obtain the target adjacency list data.
[0061] In this embodiment of the invention, the adjacency list data at the current moment is first obtained, and connected component detection is performed based on the current adjacency list data to obtain a set of connected components. Then, the maximum timestamp of each target connected component in the set of connected components is calculated. Finally, noise reduction processing is performed on the current adjacency list data based on the maximum timestamps of all target connected components to obtain the target adjacency list data. During the scanning process, automatic noise reduction is performed based on the timestamps corresponding to the scanned data, eliminating the need for multiple manual positioning and repeated scanning, thus improving the efficiency of noise processing and reducing the risk of data loss due to scanning operation errors, thereby improving the reliability of noise processing.
[0062] It should be noted that during the 3D scanning of an object, after generating the current adjacency list data based on the 3D scan data corresponding to the target object, there will be a certain delay before triggering the acquisition of the current adjacency list data and performing operations such as connectivity detection on the current adjacency list data to avoid the accidental deletion of new scan data. Understandably, as the scanning process progresses, the amount of adjacency list data increases, and the time required for noise processing gradually increases accordingly. However, for scanning scenarios with small target objects, such as medical images, the time required for noise processing is always much less than 5 seconds. Therefore, the noise processing time and the delay time can be set to a total of 5 seconds, and the actual value of the delay time can be dynamically adjusted according to the time required for noise processing to ensure the synchronization of the scanning and noise reduction processes. For scanning scenarios with large target objects, such as building scans, the time required for noise processing may exceed 5 seconds. In this case, two adjacency lists can be constructed. One adjacency list stores the denoised data, and the other adjacency list temporarily stores the data to be denoised. An additional spatial relationship mapping table is constructed to store the spatial relationships between spatial points in the two adjacency lists. During noise reduction, only the adjacency list storing the data to be denoised is processed, thereby reducing the time required for noise reduction.
[0063] In an optional embodiment, the connectivity detection module 202 performs connectivity detection processing on the current adjacency list data to obtain the set of connected components in the following specific ways: Based on the current adjacency list data, the connectivity information of all spatial points corresponding to the target object is initialized to obtain a connectivity information set; Based on the connectivity information set and the current adjacency list data, a connected component traversal and detection process is performed on all spatial points corresponding to the target object to obtain a connected component set.
[0064] In another optional embodiment, the connectivity detection module 202 initializes the connectivity information of all spatial points corresponding to the target object based on the current adjacency list data, and the specific method for obtaining the connectivity information set includes: For each spatial point corresponding to the target object, the current adjacency list data is parsed to obtain the historical connected component identifier corresponding to the spatial point. The identifier information of the historical connected component identifier is replaced with the identifier information of the node identity identifier corresponding to the spatial point to obtain the current connected component identifier corresponding to the spatial point. The node identity identifier is the unique identification identifier of the spatial point. The historical connected component identifier is used to represent the connected component in which the spatial point was located at a previous time. The current connected component identifier is used to represent the connected component in which the spatial point is located at the current time. Integrate the current connected component identifiers of all spatial points corresponding to the target object to obtain a set of connectivity information.
[0065] In this optional embodiment, each spatial point is initialized, and a connected component is assigned to each spatial point. The identifier of the connected component is the identifier of the spatial point itself, and there is only one spatial point in the component.
[0066] In another optional embodiment, the connectivity detection module 202 performs connected component traversal detection on all spatial points corresponding to the target object based on the connectivity information set and the current adjacency list data. The specific method for obtaining the connected component set includes: For each spatial point corresponding to the target object, the current adjacency list data is parsed to obtain the adjacent node group corresponding to the spatial point. For each adjacent node in the adjacent node group, the connectivity information set is parsed to obtain the adjacent connected component identifier of the adjacent node. A one-way detection judgment is performed based on the node identity identifier corresponding to the spatial point and the adjacent node identifier to obtain the one-way detection judgment result. If the one-way detection judgment result indicates that no connected component traversal detection has been performed between the spatial point and the adjacent node, it is determined whether the current connected component identifier of the spatial point is the same as the adjacent connected component identifier. If not, the number of nodes in the first domain corresponding to the connected component of the spatial point and the number of nodes in the second domain corresponding to the connected component of the adjacent node are obtained. The number of nodes in the first domain is less than or equal to the number of nodes in the second domain. If the number of nodes in the first domain is less than or equal to the number of nodes in the second domain, the identifier information of the current connected component identifier of the spatial point is replaced with the identifier information of the adjacent connected component identifier to obtain the updated current connected component identifier of the spatial point. If the number of nodes in the first domain is greater than the number of nodes in the second domain, the identifier information of the adjacent connected component identifier is replaced with the identifier information of the current connected component identifier of the spatial point to obtain the updated adjacent connected component identifier of the adjacent node. The adjacent node group includes at least one adjacent node. An adjacent node is another spatial point adjacent to the spatial point. The adjacent node identifier is the unique identification identifier of the adjacent node, and the adjacent connected component identifier is the current connected component identifier of the adjacent node. Integrate the current connected component identifiers of all spatial points corresponding to the target object to obtain a set of connected components.
[0067] In this optional embodiment, for any spatial point, a neighboring node of that spatial point is obtained. If no traversal detection has been performed between the two points, the connected component identifiers of the spatial point and its neighboring node are searched respectively. If the two points are not in the same connected component, the points belonging to the smaller connected component (fewer nodes) are reassigned to the larger connected component (more nodes). After the traversal is completed, all spatial points are integrated and assigned to multiple target connected components.
[0068] It's important to note that one-way detection is used to avoid repeatedly traversing two spatial points. For example, if the current spatial point being processed is node A, and one of its adjacent nodes is identified as node B, after traversing and detecting both, without one-way detection, when the current spatial point is node B and one of its adjacent nodes is identified as node A, traversal and detection will be performed again. Furthermore, since nodes A and B are necessarily in the same connected component, performing another traversal and detection is meaningless and only wastes computing resources and time. Further, if the node identification identifier can reflect the order of the spatial points, one-way detection can be performed based on the node identification identifier. For example, if nodes A1 and A2 are adjacent nodes, and the node number of A1 is less than the node number of A2, when the current spatial point is node A1 and one of its adjacent nodes is identified as node A2, traversal and detection of nodes A1 and A2 will proceed normally; when the current spatial point is node A2 and one of its adjacent nodes is identified as node A1, traversal and detection of both will not be performed, thus saving computing resources and time.
[0069] In another optional embodiment, the time calculation module 203 calculates a timestamp for each target connected component, and the specific method for obtaining the maximum timestamp corresponding to each target connected component includes: For each target connected component in the set of connected components, calculate the timestamp corresponding to each spatial point in the target connected component, and filter the timestamps corresponding to each spatial point in the target connected component by the maximum value to obtain the maximum timestamp corresponding to the target connected component.
[0070] In this optional embodiment, during the process of generating spatial points corresponding to the target object based on the 3D scanning information, the generation time of the spatial points is recorded, and the corresponding timestamp is calculated based on the recorded generation time of the spatial points.
[0071] In another optional embodiment, the noise reduction module 204 performs noise reduction processing on the current adjacency list data based on the maximum timestamp corresponding to all target connected components, and the specific method for obtaining the target adjacency list data includes: For each target connected component in the connected component set, calculate the difference between the current timestamp and the maximum timestamp corresponding to the target connected component to obtain the time difference. If the time difference is greater than or equal to a preset time threshold, then the data in the current adjacency list that matches the target connected component is identified as noise data, and the target noise data corresponding to the target connected component is obtained. If the time difference is less than the preset time threshold, then the target noise data corresponding to the target connected component is identified as empty. The current timestamp is the timestamp corresponding to the current moment. Remove the target noise data corresponding to all target connected components in the current adjacency list data to obtain the target adjacency list data.
[0072] In this optional embodiment, the preset time threshold is determined based on the lag time of the noise reduction process. If the difference between the timestamp corresponding to the current moment and the maximum timestamp of a certain target connected component is greater than or equal to the time threshold, it indicates that the target connected component is disconnected from the main model corresponding to the target object, and can be identified as noise.
[0073] For an example, please refer to 2. Figure 2 This is a schematic diagram of a three-dimensional scanning model obtained from an oral cavity scan, as disclosed in an embodiment of the present invention. Figure 2 As shown, besides the main model obtained from the oral cavity scan, there are also some discrete floating blocks next to the main model. These floating blocks represent the noise generated during the scanning process. During the scan, the maximum timestamp corresponding to the connected component containing these discrete floating blocks will remain at the timestamp of its generation. After exceeding a preset time threshold (e.g., 5 seconds), this noise can be identified and removed during the noise reduction process. Figure 3 As shown, Figure 3 Yes Figure 2 The diagram shows the model obtained after noise reduction processing of the 3D scan model.
[0074] In yet another alternative embodiment, please refer to Figure 5 , Figure 5 This is a schematic diagram of another data processing device for a 3D scanning device disclosed in an embodiment of the present invention. The data processing device for a 3D scanning device disclosed in an embodiment of the present invention further includes: The 3D scanning module 205 is used to perform 3D scanning on a preset target object to obtain 3D scanning data; the 3D scanning data includes image frame data corresponding to multiple consecutive image frames. Point cloud generation module 206 is used to generate a global point cloud based on the image frame data corresponding to all image frames, and obtain the target global point cloud; Mesh generation module 207 is used to generate a global mesh based on the target global point cloud to obtain the target global mesh; The adjacency list update module 208 is used to update the pre-stored historical adjacency list data according to the target global grid to obtain the current adjacency list data.
[0075] In this optional embodiment, the image frame data corresponding to each image frame includes image planar coordinate data and image depth data. It should be noted that if a new target object is being scanned at the current moment, the historical adjacency list data is a pre-constructed empty adjacency list; if scanning of an object that has already begun at the current moment is continued, the historical adjacency list data is the adjacency list data that has already undergone noise reduction processing at a previous moment. New data is added to the historical adjacency list data according to the target global grid to obtain the current adjacency list data.
[0076] In another optional embodiment, the point cloud generation module 206 generates a global point cloud based on the image frame data corresponding to all image frames, and the specific method for obtaining the target global point cloud includes: For each image frame, a point cloud is generated based on the image frame data corresponding to that image frame to obtain an initial point cloud. The adjacent frame data of that image frame are obtained, and the initial point cloud is registered based on the adjacent frame data to obtain the global position information of that image frame. The initial point cloud includes multiple spatial points corresponding to the target object. The adjacent frame data are the image frame data of other image frames adjacent to that image frame. The global position information is used to characterize the spatial position of all spatial points in the initial point cloud. For each image frame, if the image frame is the starting frame, then the initial point cloud corresponding to the image frame is determined to be the current global point cloud corresponding to the image frame; the starting frame is the first frame of multiple consecutive image frames corresponding to the 3D scan data; For each image frame, if the image frame is not the starting frame, the current global point cloud corresponding to the preceding adjacent frame is obtained. The node coordinate value of each spatial point in the initial point cloud corresponding to the image frame is determined according to the global position information corresponding to the image frame. The current global point cloud corresponding to the preceding adjacent frame is updated according to the node coordinate values of all spatial points in the initial point cloud corresponding to the image frame to obtain the current global point cloud corresponding to the image frame. The preceding adjacent frame is other image frames that are adjacent to the image frame and whose imaging time is earlier than that of the image frame. Integrate the current global point clouds corresponding to all image frames to obtain the target global point cloud.
[0077] In this optional embodiment, point clouds are generated based on the scanning camera parameters and image frame data of the 3D scanning device to obtain an initial point cloud for each image frame. The point coordinates in the initial point cloud are calculated as follows:
[0078] Where x, y, and z are the coordinates of a point in the initial point cloud, u and v are the coordinates of the image plane, and d is the image depth. , , , These are all parameters of the scanning camera of a 3D scanning device.
[0079] Using the point cloud of the first frame as the initial position, point cloud registration is performed between adjacent frames to obtain the global position information of the point cloud in each frame. The global point cloud is generated by adding points frame by frame: for the first frame, the default global point cloud is empty, and all points from the first frame are added to the global point cloud. For the second frame, the overlapping and non-overlapping portions of the second frame's point cloud are calculated with the existing global point cloud. Two points in different point clouds are considered overlapping if the spatial distance between them is less than a preset threshold. For points in the overlapping portion, the average of the two points is taken as the new coordinates of the point in the global point cloud. For non-overlapping portions, they are directly added to the global point cloud, and this process is repeated for subsequent image frames.
[0080] In another optional embodiment, the mesh generation module 207 generates a global mesh based on the target global point cloud, and the specific methods for obtaining the target global mesh include: For each image frame, if the image frame is the starting frame, the current global point cloud corresponding to the image frame is determined based on the target global point cloud, and a triangular mesh is generated for the current global point cloud corresponding to the image frame to obtain the current global mesh corresponding to the image frame. For each image frame, if the image frame is not the starting frame, the current global grid corresponding to the preceding adjacent frame of the image frame is obtained, the current global point cloud corresponding to the image frame is determined according to the target global point cloud, and the current global grid corresponding to the preceding adjacent frame is updated according to the current global point cloud corresponding to the image frame to obtain the current global grid corresponding to the image frame. Integrate the current global grid corresponding to all image frames to obtain the target global grid.
[0081] In this optional embodiment, for the first frame, all spatial points in the first frame are triangulated. Three points that meet a preset distance condition will generate edges to form a triangular patch. If all edges of a point are shared by multiple faces, the point is marked as complete; if some edges of a point are single-faceted edges, the point is marked as an edge; if the point has no edges, it is marked as free. For the second frame, points in the overlapping area only update their coordinate information, not their topology. New points in the non-overlapping area only participate in triangulation with existing edge points and free points to form new triangular patches. Subsequent image frames follow the same principle.
[0082] During global mesh generation, the adjacency list data is updated. First, containers equal to the number of mesh vertices are generated synchronously to store the adjacency list information. Then, when a new triangle is generated, the corresponding connectivity information is added to the adjacency list. For example, if the current mesh has 10 vertices, 10 containers need to be generated synchronously. When vertices A, B, and C form a triangle, we need to add vertices B and C to the container corresponding to vertex A, add vertices A and C to the container corresponding to vertex B, and add vertices A and B to the container corresponding to vertex C. This method of updating the adjacency list is highly efficient, but the same set of vertices on adjacent faces will be added to the containers twice, consuming additional computing and storage resources and affecting the efficiency of calculating connected components during noise reduction processing.
[0083] In another optional embodiment, adjacency list data is stored by constructing a general container that supports random access and a hash map that supports element uniqueness checks. When adding a vertex map, it is first checked whether the element exists in the hash map. If it does, the addition fails; otherwise, the element is added to both the hash map and the general container. This optional embodiment allows direct access to the general container during random access, improving the efficiency of calculating connected components during noise reduction processing.
[0084] Example 3 Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of another data processing device for a three-dimensional scanning device disclosed in an embodiment of the present invention. Figure 6 The apparatus shown can be used to perform the method described in Embodiment 1. This apparatus can improve the efficiency and reliability of noise processing for 3D scan data. Furthermore, this apparatus can be integrated into a 3D scanning device. Figure 6 As shown, an embodiment of the present invention discloses a data processing device for use in a 3D scanning device, including but not limited to: Memory 301 storing executable program code; Processor 302 coupled to memory 301; The processor 302 calls the executable program code stored in the memory 301 to execute some or all of the steps in the data processing method for a three-dimensional scanning device described in Embodiment 1 of the present invention.
[0085] Example 4 This invention discloses a computer storage medium storing computer instructions. When the computer instructions are invoked by a processor, they are used to execute some or all of the steps in the data processing method for a 3D scanning device described in Embodiment 1 of this invention.
[0086] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules. They may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0087] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0088] Finally, it should be noted that the technical content disclosed in the embodiments of the present invention is only a preferred embodiment of the present invention and is only used to illustrate the technical solutions of the present invention, and not to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data processing method applied to a 3D scanning device, characterized in that, The method includes: Obtain the current adjacency list data; the current adjacency list data is generated based on the 3D scan data corresponding to the target object, and the current adjacency list data is used to characterize the connection information between multiple spatial points corresponding to the target object; The current adjacency list data is subjected to connectivity detection processing to obtain a set of connected components; the set of connected components includes at least one target connected component, and each target connected component includes at least one spatial point corresponding to the target object; Calculate the timestamp for each target connected component to obtain the maximum timestamp corresponding to each target connected component; The current adjacency list data is denoised based on the maximum timestamp corresponding to all the target connected components to obtain the target adjacency list data.
2. The data processing method for a three-dimensional scanning device according to claim 1, characterized in that, The connectivity detection process performed on the current adjacency list data to obtain a set of connected components includes: Based on the current adjacency list data, the connectivity information of all spatial points corresponding to the target object is initialized to obtain a connectivity information set; Based on the connectivity information set and the current adjacency list data, a connected component traversal and detection process is performed on all spatial points corresponding to the target object to obtain a connected component set.
3. The data processing method for a three-dimensional scanning device according to claim 2, characterized in that, The process of initializing connectivity information for all spatial points corresponding to the target object based on the current adjacency list data to obtain a connectivity information set includes: For each spatial point corresponding to the target object, the current adjacency list data is parsed to obtain the historical connected component identifier corresponding to the spatial point. The identifier information of the historical connected component identifier is replaced with the identifier information of the node identity identifier corresponding to the spatial point to obtain the current connected component identifier corresponding to the spatial point. The node identity identifier is the unique identification identifier of the spatial point. The historical connected component identifier is used to represent the connected component in which the spatial point was located at a previous time. The current connected component identifier is used to represent the connected component in which the spatial point is located at the current time. By integrating the current connected component identifiers of all spatial points corresponding to the target object, a set of connectivity information is obtained.
4. The data processing method for a three-dimensional scanning device according to claim 3, characterized in that, The process of performing connected component traversal and detection on all spatial points corresponding to the target object based on the connected information set and the current adjacency list data to obtain a connected component set includes: For each spatial point corresponding to the target object, the current adjacency list data is parsed to obtain the adjacent node group corresponding to the spatial point. For each adjacent node in the adjacent node group, the connectivity information set is parsed to obtain the adjacent connected component identifier of the adjacent node. A one-way detection judgment is performed based on the node identity identifier corresponding to the spatial point and the adjacent node identifier to obtain the one-way detection judgment result. If the one-way detection judgment result indicates that no connected component traversal detection has been performed between the spatial point and the adjacent node, it is determined whether the current connected component identifier of the spatial point is the same as the adjacent connected component identifier. If not, the number of nodes in the first domain corresponding to the connected component of the spatial point and the number of nodes in the second domain corresponding to the connected component of the adjacent node are obtained. If the number of nodes in the first domain is less than or equal to the number of nodes in the second domain, then the identifier information of the current connected component identifier of the spatial point is replaced with the identifier information of the adjacent connected component identifier to obtain the updated current connected component identifier of the spatial point. If the number of nodes in the first domain is greater than the number of nodes in the second domain, then the identifier information of the adjacent connected component identifier is replaced with the identifier information of the current connected component identifier of the spatial point to obtain the updated adjacent connected component identifier of the adjacent node. The adjacent node group includes at least one adjacent node, the adjacent node is another spatial point adjacent to the spatial point, the adjacent node identifier is the unique identification identifier of the adjacent node, and the adjacent connected component identifier is the current connected component identifier of the adjacent node. Integrate the current connected component identifiers of all spatial points corresponding to the target object to obtain a set of connected components.
5. The data processing method for a three-dimensional scanning device according to claim 1, characterized in that, The step of calculating the timestamp for each target connected component to obtain the maximum timestamp corresponding to each target connected component includes: For each target connected component in the set of connected components, calculate the timestamp corresponding to each spatial point in the target connected component, and filter the timestamps corresponding to each spatial point in the target connected component by the maximum value to obtain the maximum timestamp corresponding to the target connected component.
6. The data processing method for a three-dimensional scanning device according to claim 1, characterized in that, The step of performing noise reduction processing on the current adjacency list data based on the maximum timestamp corresponding to all the target connected components to obtain the target adjacency list data includes: For each target connected component in the set of connected components, the difference between the current timestamp and the maximum timestamp corresponding to the target connected component is calculated to obtain a time difference value. If the time difference value is greater than or equal to a preset time threshold, the data in the current adjacency list that matches the target connected component is identified as noise data, and the target noise data corresponding to the target connected component is obtained. If the time difference value is less than the preset time threshold, the target noise data corresponding to the target connected component is identified as empty. The current timestamp is the timestamp corresponding to the current moment. Remove all target noise data corresponding to the target connected components in the current adjacency list data to obtain the target adjacency list data.
7. A data processing method for a three-dimensional scanning device according to any one of claims 1 to 6, characterized in that, Before obtaining the current adjacency list data, the method further includes: A preset target object is scanned in three dimensions to obtain three-dimensional scan data; the three-dimensional scan data includes image frame data corresponding to multiple consecutive image frames. A global point cloud is generated based on the image frame data corresponding to all the image frames to obtain the target global point cloud. A global mesh is generated based on the target global point cloud to obtain the target global mesh; The pre-stored historical adjacency list data is updated based on the target global grid to obtain the current adjacency list data.
8. A data processing method for a three-dimensional scanning device according to claim 7, characterized in that, The step of generating a global point cloud based on the image frame data corresponding to all the image frames to obtain the target global point cloud includes: For each image frame, a point cloud is generated based on the image frame data corresponding to that image frame to obtain an initial point cloud. The adjacent frame data of that image frame are obtained, and the initial point cloud is registered based on the adjacent frame data to obtain the global position information of that image frame. The initial point cloud includes multiple spatial points corresponding to the target object, the adjacent frame data are the image frame data of other image frames adjacent to that image frame, and the global position information is used to characterize the spatial position of all spatial points in the initial point cloud. For each image frame, if the image frame is the starting frame, then the initial point cloud corresponding to the image frame is determined to be the current global point cloud corresponding to the image frame; the starting frame is the first frame of multiple consecutive image frames corresponding to the three-dimensional scan data; For each image frame, if the image frame is not the starting frame, the current global point cloud corresponding to the preceding adjacent frame is obtained. The node coordinate value of each spatial point in the initial point cloud corresponding to the image frame is determined according to the global position information corresponding to the image frame. The current global point cloud corresponding to the preceding adjacent frame is updated according to the node coordinate values of all spatial points in the initial point cloud corresponding to the image frame to obtain the current global point cloud corresponding to the image frame. The preceding adjacent frame is another image frame that is adjacent to the image frame and whose imaging time is earlier than the imaging time of the image frame. Integrate the current global point clouds corresponding to all the image frames to obtain the target global point cloud.
9. A data processing method for a three-dimensional scanning device according to claim 8, characterized in that, The step of generating a global mesh based on the target global point cloud to obtain the target global mesh includes: For each image frame, if the image frame is the starting frame, the current global point cloud corresponding to the image frame is determined according to the target global point cloud, and a triangular mesh is generated for the current global point cloud corresponding to the image frame to obtain the current global mesh corresponding to the image frame. For each image frame, if the image frame is not the starting frame, the current global grid corresponding to the preceding adjacent frame of the image frame is obtained, the current global point cloud corresponding to the image frame is determined according to the target global point cloud, and the current global grid corresponding to the preceding adjacent frame is updated according to the current global point cloud corresponding to the image frame to obtain the current global grid corresponding to the image frame. Integrate the current global grids corresponding to all the aforementioned image frames to obtain the target global grid.
10. A data processing device for use in a three-dimensional scanning equipment, characterized in that, The device includes: The data acquisition module is used to acquire the current adjacency list data; the current adjacency list data is generated based on the three-dimensional scan data corresponding to the target object, and the current adjacency list data is used to represent the connection information between multiple spatial points corresponding to the target object; The connectivity detection module is used to perform connectivity detection processing on the current adjacency list data to obtain a set of connected components; the set of connected components includes at least one target connected component, and each target connected component includes at least one spatial point corresponding to the target object; The time calculation module is used to calculate the timestamp for each of the target connected components to obtain the maximum timestamp corresponding to each target connected component. The noise reduction module is used to perform noise reduction processing on the current adjacency list data based on the maximum timestamp corresponding to all the target connected components, so as to obtain the target adjacency list data.