Automatic trimming method, device, equipment and storage medium for 3D model data

By establishing the mapping relationship between 3D point clouds and 2D images, and using segmentation model and registration processing technology to extract and delete redundant data, the problem of low automatic pruning accuracy of 3D model data is solved, and higher data accuracy and integrity are achieved.

CN119762719APending Publication Date: 2025-04-04SHENZHEN FUSEN IMAGING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411984641.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the automatic pruning process of 3D model data, the accuracy is low, which can easily lead to incomplete deletion of redundant data or the error of deletion of normal data.

Method used

By acquiring 3D point clouds and 2D images, the mapping relationship between the two is established, and the 2D images are segmented and identified using a pre-trained segmentation model, the classification label of 3D point clouds is generated, and the coarse registration and precise registration processing is performed, and redundant data is extracted and deleted.

Benefits of technology

The pruning accuracy of 3D model data is improved, ensuring the spatial accuracy and integrity of the final 3D model data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119762719A_ABST
    Figure CN119762719A_ABST
Patent Text Reader

Abstract

The present invention relates to artificial intelligence technology, and proposes a method, device, equipment and storage medium for automatic trimming of 3D model data, including: collecting a 3D point cloud and a 2D image of a scanned object, and establishing a mapping relationship between the 3D point cloud and the 2D image; using a pre-trained segmentation model to segment and identify the 2D image; generating a classification label of the 3D point cloud according to the segmented and identified 2D image and the mapping relationship; performing a coarse registration process on the 3D point cloud, and performing a fine registration process on the 3D point cloud after the coarse registration process to obtain an overall point cloud of the 3D point cloud; extracting redundant data in the overall point cloud according to the classification label; and deleting the redundant data to obtain the target data of the scanned object. The present invention can improve the accuracy of trimming of 3D model data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, device, equipment and storage medium for automatic trimming of 3D model data. Background Art

[0002] With the increasing popularity of intraoral scanners and the lowering of the threshold for use, invalid data such as noise and soft tissue that appear during the scanning process appear more and more on dental models. The redundant data that appears not only reduces the efficiency of doctor-patient communication, but also affects the model design.

[0003] The manual cleaning method is simple and direct, but it increases the user's workload, so it is not very popular in clinical use. The semi-automatic method presets data of specific colors as redundant data, which is automatically deleted during the scanning process, but there may be problems with incomplete cleaning. The fully automatic method is a standard function of most intraoral scanners, which cleans data through methods such as light collision or island deletion to improve scanning fluency.

[0004] At the same time, the method based on light collision depends on the scanner's viewing angle and light density, which may lead to incomplete deletion or poor timeliness; the method based on island deletion requires users to adjust the threshold, which may cause normal data to be deleted by mistake or incomplete cleaning. Therefore, how to improve the trimming accuracy of 3D model data has become an urgent problem to be solved. Summary of the invention

[0005] The present invention provides a method, device and computer-readable storage medium for automatic pruning of 3D model data, the main purpose of which is to solve the problem of low accuracy in automatic pruning of 3D model data.

[0006] To achieve the above object, the present invention provides a method for automatically trimming 3D model data, comprising:

[0007] Collecting a 3D point cloud and a 2D image of a scanned object, and establishing a mapping relationship between the 3D point cloud and the 2D image;

[0008] Using a pre-trained segmentation model to segment and recognize the 2D image;

[0009] Generating a classification label of the 3D point cloud according to the segmented and recognized 2D image and the mapping relationship;

[0010] Performing a coarse registration process on the 3D point cloud, and performing a fine registration process on the 3D point cloud after the coarse registration process, to obtain an overall point cloud of the 3D point cloud;

[0011] Extracting redundant data in the overall point cloud according to the classification label;

[0012] The redundant data is deleted to obtain the target data of the scanned object.

[0013] Optionally, the establishing a mapping relationship between the 3D point cloud and the 2D image includes:

[0014] Determine an intrinsic parameter matrix of a device for acquiring the 2D image;

[0015] Using the internal parameter matrix to transform the coordinates of the 3D point cloud to obtain the transformed coordinates of the 3D point cloud;

[0016] A mapping relationship between the 3D point cloud and the 2D image is established according to the corresponding relationship between the transformed coordinates and the pixel coordinates of the 2D image.

[0017] Optionally, the segmentation and recognition of the 2D image using a pre-trained segmentation model further includes:

[0018] Inputting the 2D image into a pre-trained segmentation model, and using the pre-trained segmentation model to classify pixels in the 2D image pixel by pixel;

[0019] The 2D image is segmented and recognized according to the classification result of the pixel-by-pixel classification.

[0020] Optionally, generating a classification label of the 3D point cloud according to the segmented and recognized 2D image and the mapping relationship includes:

[0021] Generate a classification result for each pixel in the segmented and identified 2D image;

[0022] Determine the spatial position of the pixel point in the 3D point cloud according to the mapping relationship;

[0023] The 3D point cloud is labeled according to the spatial position and the classification result to obtain a classification label for the 3D point cloud.

[0024] Optionally, the performing coarse registration processing on the 3D point cloud includes:

[0025] Extracting local features of the 3D point cloud one by one, performing feature point pair matching on the point cloud features, and obtaining feature point pairs of the 3D point cloud;

[0026] Generating a coarse registration transformation matrix of the feature point pairs;

[0027] The coarse registration transformation matrix is ​​used to generate a coarse registration matrix of the 3D point cloud, and the coarse registration matrix is ​​used to perform coarse registration processing on the 3D point cloud.

[0028] Optionally, performing fine registration processing on the 3D point cloud after the coarse registration processing to obtain an overall point cloud of the 3D point cloud includes:

[0029] S21, selecting any point cloud in the 3D point cloud after the coarse registration process as the target point cloud;

[0030] S22, determining the adjacent point clouds of the target point cloud, and calculating the transformation matrix between the target point cloud and the adjacent point clouds;

[0031] S23, performing point cloud splicing on the target point cloud and the adjacent point cloud according to the transformation matrix to obtain a spliced ​​point cloud of the target point cloud and the adjacent point cloud;

[0032] S24, traversing the 3D point cloud after the coarse registration processing, and repeating steps S21-S23 until the fine registration processing has been completed in the 3D point cloud after the coarse registration processing.

[0033] Optionally, extracting redundant data in the overall point cloud according to the classification label includes:

[0034] Performing region division on the entire point cloud according to the classification labels to obtain a region division result of the entire point cloud;

[0035] Performing region selection on the region division result according to the label definition in the classification label, and determining that the point cloud data corresponding to the selected region is redundant data.

[0036] In order to solve the above problem, the present invention also provides an automatic trimming device for 3D model data, the device comprising:

[0037] A mapping relationship establishment module, used to collect the 3D point cloud and the 2D image of the scanned object, and establish a mapping relationship between the 3D point cloud and the 2D image;

[0038] A segmentation and recognition module, used to perform segmentation and recognition on the 2D image using a pre-trained segmentation model;

[0039] A label generation module, used to generate a classification label of the 3D point cloud according to the segmented and recognized 2D image and the mapping relationship;

[0040] A point cloud registration module is used to perform a coarse registration process on the 3D point cloud, and perform a fine registration process on the 3D point cloud after the coarse registration process to obtain an overall point cloud of the 3D point cloud;

[0041] A data extraction module, used to extract redundant data in the overall point cloud according to the classification label;

[0042] The data deletion module is used to delete the redundant data to obtain the target data of the scanned object.

[0043] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0044] at least one processor; and,

[0045] a memory communicatively connected to the at least one processor; wherein,

[0046] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the above-mentioned method for automatically trimming 3D model data.

[0047] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned automatic trimming method of 3D model data.

[0048] The embodiment of the present invention establishes a mapping relationship between the 3D point cloud and the 2D image, so that each 3D point can find the corresponding pixel point on the 2D image. This mapping relationship enables the segmentation result obtained from the 2D image to be directly mapped to the 3D point cloud, thereby achieving accurate conversion from high-quality 2D segmentation results to 3D data. Trained deep learning models are used. These models are very mature in the field of 2D image segmentation and can obtain efficient and accurate segmentation results in different scenarios. After obtaining the segmentation result of the 2D image, the 3D point cloud is subjected to coarse and fine registration processing, which further improves the overall data quality and accuracy. This processing ensures the spatial accuracy and integrity of the final 3D model data. Therefore, the automatic pruning method, device, equipment and storage medium of 3D model data proposed in the present invention can solve the problem of low accuracy when automatically pruning 3D model data. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 A schematic diagram of a flow chart of a method for automatically trimming 3D model data provided by an embodiment of the present invention;

[0050] Figure 2 A functional module diagram of an automatic trimming device for 3D model data provided by an embodiment of the present invention;

[0051] Figure 3 A schematic diagram of the structure of an electronic device for implementing the automatic trimming method of 3D model data provided by an embodiment of the present invention.

[0052] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0053] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0054] The embodiment of the present application provides a method for automatic pruning of 3D model data. The execution subject of the automatic pruning method of 3D model data includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the automatic pruning method of 3D model data can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.

[0055] Reference Figure 1 FIG. 1 is a flow chart of an automatic trimming method for 3D model data provided by an embodiment of the present invention. In this embodiment, the automatic trimming method for 3D model data includes:

[0056] S1. Collect a 3D point cloud and a 2D image of a scanned object, and establish a mapping relationship between the 3D point cloud and the 2D image.

[0057] In an embodiment of the present invention, the acquisition of 3D point cloud and 2D image of the scanned object includes: continuous scanning using an intraoral scanner based on the structured light principle, wherein during each scanning process, the scanner projects structured light and records reflection data of the object surface, and after each structured light projection, the reflection data is acquired by the scanner, wherein these data include a set of coordinate points of the object surface in three-dimensional space, forming 3D point cloud data; the scanner records 2D images of each projection, and these images reflect the two-dimensional projection of the object surface during scanning.

[0058] In an embodiment of the present invention, establishing a mapping relationship between the 3D point cloud and the 2D image includes:

[0059] Determine an intrinsic parameter matrix of a device for acquiring the 2D image;

[0060] Using the internal parameter matrix to transform the coordinates of the 3D point cloud to obtain the transformed coordinates of the 3D point cloud;

[0061] A mapping relationship between the 3D point cloud and the 2D image is established according to the corresponding relationship between the transformed coordinates and the pixel coordinates of the 2D image.

[0062] In an embodiment of the present invention, an intrinsic parameter matrix of a 2D image acquisition device is determined, wherein the intrinsic parameter matrix describes internal parameters of the camera, including focal length, pixel coordinates of the principal point (optical center), and distortion parameters of the image (if applicable), which are usually provided by the camera manufacturer or obtained through calibration technology.

[0063] In detail, each point in the 3D point cloud has its coordinates in the world coordinate system. Using the camera's intrinsic matrix, the 3D point cloud coordinates in the world coordinate system can be converted to the coordinates in the camera coordinate system (or camera coordinates). Through the intrinsic matrix, the coordinates of each 3D point cloud in the world coordinate system are converted to the coordinates in the camera coordinate system. These coordinates are now the coordinates under the camera's observation angle.

[0064] In detail, the converted 3D point cloud coordinates are mapped to the corresponding 2D image pixel coordinates. This mapping relationship is usually achieved by multiplying the camera coordinates by the camera's projection matrix, which consists of an intrinsic matrix and an extrinsic matrix (describing the position and orientation of the camera in the world coordinate system).

[0065] Specifically, the coordinates of the 3D point cloud in the world coordinate system are converted into the coordinates in the camera coordinate system using the intrinsic parameter matrix, and the camera coordinates are projected into the pixel coordinate system of the 2D image to obtain the corresponding pixel coordinates.

[0066] In detail, a mapping relationship between 3D point cloud and 2D image pixel coordinates is established to ensure that each 3D point cloud has a corresponding projection position on the image.

[0067] Through the above steps, the data of 3D point cloud and 2D image can be effectively matched to achieve accurate description and visualization of the spatial relationship between the two.

[0068] S2. Use a pre-trained segmentation model to perform segmentation and recognition on the 2D image.

[0069] In the embodiment of the present invention, the segmentation and recognition of the 2D image using the pre-trained segmentation model further includes:

[0070] Inputting the 2D image into a pre-trained segmentation model, and using the pre-trained segmentation model to classify pixels in the 2D image pixel by pixel;

[0071] The 2D image is segmented and recognized according to the classification result of the pixel-by-pixel classification.

[0072] In the embodiment of the present invention, a series of 2D images are first acquired by an intraoral scanning device, and each frame contains image data of areas such as teeth, gums, tongue and mucosa.

[0073] Furthermore, in order to train the segmentation model, these 2D images need to be annotated at the pixel level, for example, teeth are marked as category 1, gums are marked as category 2, and tongue and mucosa are marked as category 3. These annotations can be done manually by professionals or with the help of semi-automatic tools.

[0074] In detail, a suitable deep learning segmentation model is selected according to the application requirements, such as U-Net, Mask R-CNN, DeepLab, etc., and the selected segmentation model is trained using a labeled intraoral scan image dataset. During the training process, the model will learn how to accurately segment the teeth, gums, tongue, and mucosal areas from the image.

[0075] In the embodiment of the present invention, the 2D images to be segmented are used as the input of the model. These images are preprocessed to ensure that they meet the input requirements of the model, such as size adjustment, pixel normalization, etc.

[0076] Furthermore, the model processes the input 2D image and classifies it pixel by pixel. This means that the model will predict the category or segmentation label for each pixel, and each pixel may be assigned to different categories, reflecting the boundaries or segmentation lines of different objects or regions in the image.

[0077] In detail, the segmentation model outputs the processed segmentation results, which are usually represented by pixel-level masks or category labels, indicating the category or segmentation area to which each pixel belongs in the image.

[0078] S3. Generate a classification label for the 3D point cloud according to the segmented and recognized 2D image and the mapping relationship.

[0079] In an embodiment of the present invention, generating a classification label of the 3D point cloud according to the segmented and recognized 2D image and the mapping relationship includes:

[0080] Generate a classification result for each pixel in the segmented and identified 2D image;

[0081] Determine the spatial position of the pixel point in the 3D point cloud according to the mapping relationship;

[0082] The 3D point cloud is labeled according to the spatial position and the classification result to obtain a classification label for the 3D point cloud.

[0083] In the embodiment of the present invention, after being processed by the segmentation model, each pixel in the 2D image is classified as a part of an oral structure such as a tooth, gum, tongue or mucosa, and these classification results can be regarded as a label for each pixel.

[0084] In detail, first, the classification labels of different parts or objects in the point cloud are defined, which can be based on different attributes, shapes, locations or any other relevant features of the point cloud.

[0085] In detail, the mapping relationship ensures that each 2D image pixel corresponds to the correct position in 3D space.

[0086] In detail, based on the classification results of each pixel point output by the segmentation model and its position in the 3D space (through the mapping relationship), each 3D point cloud point can be assigned a corresponding classification label. For example, if a 3D point belongs to the tooth area, its classification label is tooth; if it belongs to the tongue area, the label is tongue, and so on.

[0087] S4, performing a coarse registration process on the 3D point cloud, and performing a fine registration process on the 3D point cloud after the coarse registration process to obtain an overall point cloud of the 3D point cloud.

[0088] In an embodiment of the present invention, the coarse registration processing of the 3D point cloud includes:

[0089] Extracting local features of the 3D point cloud one by one, performing feature point pair matching on the point cloud features, and obtaining feature point pairs of the 3D point cloud;

[0090] Generating a coarse registration transformation matrix of the feature point pairs;

[0091] The coarse registration transformation matrix is ​​used to generate a coarse registration matrix of the 3D point cloud, and the coarse registration matrix is ​​used to perform coarse registration processing on the 3D point cloud.

[0092] In detail, local features are extracted from each point cloud, which can describe the local shape and structural information of the point cloud. Local features are used to search and match feature point pairs, which can establish connections between different point clouds as the basis for alignment.

[0093] In detail, generating the coarse registration transformation matrix of the feature point pair is to estimate the optimal coarse registration transformation matrix from the matched feature point pairs, which can effectively remove wrong matches and find the transformation model that best fits the data.

[0094] Furthermore, a coarse registration matrix is ​​calculated by SVD (Singular Value Decomposition) or other mathematical methods, and the coarse registration matrix describes how to convert one point cloud to the approximate position and direction of another point cloud.

[0095] Furthermore, the obtained coarse registration results are evaluated to check their alignment and quality in space.

[0096] Through the above steps, a rough alignment of 3D point cloud data collected at different times or with different devices can be achieved, providing a good foundation for subsequent detailed registration and further analysis. This method is suitable for application scenarios in stomatology that require comparison and analysis of multiple time points or oral structures of different patients.

[0097] In detail, the coarse registration transformation matrix for generating the feature point pairs is mainly used to estimate the optimal model parameters from the data set to adapt to the data that may contain noise or outliers.

[0098] Furthermore, the transformation model is estimated by first randomly selecting the minimum number of samples from the feature point pairs (eg, for 2D correspondence, 3 points are usually required, and for 3D correspondence, at least 4 points are usually required).

[0099] Next, the selected samples are used to calculate possible transformation model parameters, which can be parameters of translation, rotation, scaling, affine transformation, or perspective transformation.

[0100] Then, the errors or residuals between all feature point pairs and the current model estimate are calculated, and those points whose errors are within a predefined threshold are marked as inliers. If the number of inliers in the current model exceeds the preset threshold and is greater than the number of inliers in the current optimal model, the current model is set as the optimal model, and the above steps are repeated until the predetermined number of iterations is reached or the number of inliers reaches a certain desired minimum value.

[0101] Finally, the output coarse registration transformation matrix is ​​re-estimated on the set of inliers, which is applied to achieve a rough alignment between the two sets of feature points.

[0102] These steps ensure robust registration of feature point pairs that may contain mismatches or noise, thereby improving the accuracy and robustness of the overall registration.

[0103] In an embodiment of the present invention, the step of performing fine registration processing on the 3D point cloud after the rough registration processing to obtain the overall point cloud of the 3D point cloud includes:

[0104] S21, selecting any point cloud in the 3D point cloud after the coarse registration process as the target point cloud;

[0105] S22, determining the adjacent point clouds of the target point cloud, and calculating the transformation matrix between the target point cloud and the adjacent point clouds;

[0106] S23, performing point cloud splicing on the target point cloud and the adjacent point cloud according to the transformation matrix to obtain a spliced ​​point cloud of the target point cloud and the adjacent point cloud;

[0107] S24, traversing the 3D point cloud after the coarse registration processing, and repeating steps S21-S23 until the fine registration processing has been completed in the 3D point cloud after the coarse registration processing.

[0108] In detail, first, the two point clouds to be registered are preliminarily aligned after a coarse registration process, and then, the alignment quality of the point clouds is improved through a fine registration process.

[0109] In detail, for each point in the reference point cloud, find the closest point in the target point cloud. Based on the corresponding points found, calculate the best transformation matrix, usually a rigid body transformation (translation, rotation), and select the point-to-point or point-to-surface distance as the error metric. The point-to-point distance is suitable for cases with high point density, while the point-to-surface distance is suitable for cases where the point cloud represents a surface.

[0110] Furthermore, the transformation is optimized by minimizing the error metric to minimize the distance between the two point clouds. The above steps are repeated until the set stop condition is reached, such as the error is less than a threshold or the maximum number of iterations is reached. Finally, it converges to an optimal transformation that minimizes the alignment error of the two point clouds. This transformation can accurately map the target point cloud to the coordinate system of the reference point cloud, thereby achieving accurate point cloud registration.

[0111] S5. Extracting redundant data in the overall point cloud according to the classification labels.

[0112] In an embodiment of the present invention, extracting redundant data in the overall point cloud according to the classification label includes:

[0113] Performing region division on the entire point cloud according to the classification labels to obtain a region division result of the entire point cloud;

[0114] Performing region selection on the region division result according to the label definition in the classification label, and determining that the point cloud data corresponding to the selected region is redundant data.

[0115] In an embodiment of the present invention, the overall point cloud is divided into different regions according to predefined classification labels, for example, the point cloud can be divided into tooth data (category 1), gum data (category 2), and tongue and mucosa data (category 3).

[0116] Further, each region is classified into a corresponding category according to the definition in the classification label. Here, category 3 is defined as redundant data, i.e., data such as tongue and mucosa. According to the label definition in the classification label, those regions marked as category 3 (redundant data) are selected, which contain unnecessary data such as tongue and mucosa.

[0117] Further, it is determined which selected regions contain point cloud data belonging to category 3, namely, data such as tongue and mucosa. These data can be considered redundant and can be directly deleted or otherwise processed to optimize subsequent data processing.

[0118] S6. Deleting the redundant data to obtain target data of the scanned object.

[0119] In an embodiment of the present invention, the redundant data is deleted to obtain the target data of the scanned object, including: directly deleting the point cloud data in the area marked as redundant data, which can be achieved by removing the corresponding points in the point cloud data set or marking these points as invalid data; after deleting the redundant data, the remaining point cloud data are the target data of the scanned object, which include parts such as teeth and gums that need to be analyzed and processed.

[0120] like Figure 2 , which is a functional module diagram of an automatic trimming device for 3D model data provided by an embodiment of the present invention.

[0121] The automatic trimming device 100 of 3D model data of the present invention can be installed in an electronic device. According to the functions to be implemented, the automatic trimming device 100 of 3D model data can include a mapping relationship establishment module 101, a segmentation recognition module 102, a label generation module 103, a point cloud registration module 104, a data extraction module 105 and a data deletion module 106. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, which are stored in the memory of the electronic device.

[0122] In this embodiment, the functions of each module / unit are as follows:

[0123] The mapping relationship establishing module 101 is used to collect the 3D point cloud and the 2D image of the scanned object and establish the mapping relationship between the 3D point cloud and the 2D image;

[0124] The segmentation and recognition module 102 is used to perform segmentation and recognition on the 2D image using a pre-trained segmentation model;

[0125] The label generation module 103 is used to generate a classification label of the 3D point cloud according to the segmented and recognized 2D image and the mapping relationship;

[0126] The point cloud registration module 104 is used to perform a coarse registration process on the 3D point cloud, and perform a fine registration process on the 3D point cloud after the coarse registration process to obtain an overall point cloud of the 3D point cloud;

[0127] The data extraction module 105 is used to extract redundant data in the overall point cloud according to the classification label;

[0128] The data deletion module 106 is used to delete the redundant data to obtain the target data of the scanned object.

[0129] In detail, each module described in the automatic trimming device 100 of 3D model data in the embodiment of the present invention is used in the same manner as described above. Figure 1 The automatic trimming method of 3D model data described in the invention has the same technical means and can produce the same technical effect, so it will not be repeated here.

[0130] like Figure 3 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing an automatic trimming method for 3D model data provided by an embodiment of the present invention.

[0131] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as an automatic trimming program for 3D model data.

[0132] In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes various functions and processes data of the electronic device by running or executing programs or modules stored in the memory 11 (for example, executing an automatic trimming program for 3D model data, etc.), and calling data stored in the memory 11.

[0133] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device, such as the code of the automatic trimming program of 3D model data, but also can be used to temporarily store data that has been output or is to be output.

[0134] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0135] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0136] The figure only shows an electronic device with components. Those skilled in the art will understand that the structure shown in the figure does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0137] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0138] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0139] The automatic trimming program of the 3D model data stored in the memory 11 of the electronic device 1 is a combination of multiple instructions, and when running in the processor 10, it can achieve:

[0140] Collecting a 3D point cloud and a 2D image of a scanned object, and establishing a mapping relationship between the 3D point cloud and the 2D image;

[0141] Using a pre-trained segmentation model to segment and recognize the 2D image;

[0142] Generating a classification label of the 3D point cloud according to the segmented and recognized 2D image and the mapping relationship;

[0143] Performing a coarse registration process on the 3D point cloud, and performing a fine registration process on the 3D point cloud after the coarse registration process, to obtain an overall point cloud of the 3D point cloud;

[0144] Extracting redundant data in the overall point cloud according to the classification label;

[0145] The redundant data is deleted to obtain the target data of the scanned object.

[0146] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.

[0147] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0148] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:

[0149] Collecting a 3D point cloud and a 2D image of a scanned object, and establishing a mapping relationship between the 3D point cloud and the 2D image;

[0150] Using a pre-trained segmentation model to segment and recognize the 2D image;

[0151] Generating a classification label of the 3D point cloud according to the segmented and recognized 2D image and the mapping relationship;

[0152] Performing a coarse registration process on the 3D point cloud, and performing a fine registration process on the 3D point cloud after the coarse registration process, to obtain an overall point cloud of the 3D point cloud;

[0153] Extracting redundant data in the overall point cloud according to the classification label;

[0154] The redundant data is deleted to obtain the target data of the scanned object.

[0155] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0156] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0157] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0158] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0159] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0160] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0161] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A method for automatic pruning of 3D model data, characterized in that: The method comprises: Collecting a 3D point cloud and a 2D image of a scanned object, and establishing a mapping relationship between the 3D point cloud and the 2D image; Using a pre-trained segmentation model to segment and recognize the 2D image; Generating a classification label of the 3D point cloud according to the segmented and recognized 2D image and the mapping relationship; Performing a coarse registration process on the 3D point cloud, and performing a fine registration process on the 3D point cloud after the coarse registration process, to obtain an overall point cloud of the 3D point cloud; Extracting redundant data in the overall point cloud according to the classification label; The redundant data is deleted to obtain the target data of the scanned object.

2. The automatic pruning method for 3D model data according to claim 1, characterized in that: The establishing of a mapping relationship between the 3D point cloud and the 2D image includes: Determine an intrinsic parameter matrix of a device for acquiring the 2D image; Using the internal parameter matrix to transform the coordinates of the 3D point cloud to obtain the transformed coordinates of the 3D point cloud; A mapping relationship between the 3D point cloud and the 2D image is established according to the corresponding relationship between the transformed coordinates and the pixel coordinates of the 2D image.

3. The automatic pruning method for 3D model data according to claim 1, characterized in that: The segmentation and recognition of the 2D image using the pre-trained segmentation model further includes: Inputting the 2D image into a pre-trained segmentation model, and using the pre-trained segmentation model to classify pixels in the 2D image pixel by pixel; The 2D image is segmented and recognized according to the classification result of the pixel-by-pixel classification.

4. The automatic pruning method for 3D model data according to claim 1, characterized in that: The generating the classification label of the 3D point cloud according to the segmented and recognized 2D image and the mapping relationship comprises: Generate a classification result for each pixel in the segmented and identified 2D image; Determine the spatial position of the pixel point in the 3D point cloud according to the mapping relationship; The 3D point cloud is labeled according to the spatial position and the classification result to obtain a classification label for the 3D point cloud.

5. The automatic pruning method for 3D model data according to claim 1, characterized in that: The coarse registration processing of the 3D point cloud comprises: Extracting local features of the 3D point cloud one by one, performing feature point pair matching on the point cloud features, and obtaining feature point pairs of the 3D point cloud; Generating a coarse registration transformation matrix of the feature point pairs; The coarse registration transformation matrix is ​​used to generate a coarse registration matrix of the 3D point cloud, and the coarse registration matrix is ​​used to perform coarse registration processing on the 3D point cloud.

6. The automatic pruning method for 3D model data according to claim 1, characterized in that: The step of performing fine registration processing on the 3D point cloud after the rough registration processing to obtain the overall point cloud of the 3D point cloud includes: S21, selecting any point cloud in the 3D point cloud after the coarse registration process as the target point cloud; S22, determining the adjacent point clouds of the target point cloud, and calculating the transformation matrix between the target point cloud and the adjacent point clouds; S23, performing point cloud splicing on the target point cloud and the adjacent point cloud according to the transformation matrix to obtain a spliced ​​point cloud of the target point cloud and the adjacent point cloud; S24, traversing the 3D point cloud after the coarse registration processing, and repeating steps S21-S23 until the fine registration processing has been completed in the 3D point cloud after the coarse registration processing.

7. The automatic trimming method for 3D model data according to any one of claims 1 to 6, characterized in that: The step of extracting redundant data from the overall point cloud according to the classification label comprises: Performing region division on the entire point cloud according to the classification labels to obtain a region division result of the entire point cloud; Performing region selection on the region division result according to the label definition in the classification label, and determining that the point cloud data corresponding to the selected region is redundant data.

8. An automatic trimming device for 3D model data, characterized in that: The device comprises: A mapping relationship establishment module, used to collect the 3D point cloud and the 2D image of the scanned object, and establish a mapping relationship between the 3D point cloud and the 2D image; A segmentation and recognition module, used to perform segmentation and recognition on the 2D image using a pre-trained segmentation model; A label generation module, used to generate a classification label of the 3D point cloud according to the segmented and recognized 2D image and the mapping relationship; A point cloud registration module is used to perform a coarse registration process on the 3D point cloud, and perform a fine registration process on the 3D point cloud after the coarse registration process to obtain an overall point cloud of the 3D point cloud; A data extraction module, used to extract redundant data in the overall point cloud according to the classification label; The data deletion module is used to delete the redundant data to obtain the target data of the scanned object.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the automatic trimming method for 3D model data according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for automatically trimming 3D model data according to any one of claims 1 to 7 is implemented.