Model segmentation method and device based on grid object

Through the model segmentation method based on mesh objects, problems such as lack of topological structure and large data scale in industrial quality inspection of point cloud objects are solved, efficient and accurate workpiece inspection and multi-platform compatibility are achieved, hardware resource requirements are reduced, and the efficiency and accuracy of the quality inspection process are improved.

CN120339549AInactive Publication Date: 2025-07-18CHANGZHOU MICROINTELLIGENCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510588720.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-08
Publication Date
2025-07-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing model segmentation method based on point cloud objects lacks topological structure information, the data scale is large, the compatibility and scalability are limited, which affects the accuracy and efficiency of quality inspection.

Method used

The model segmentation method based on grid objects is adopted, and through preprocessing, patch identification and classification, and clustering operations, the geometric and topological information of the model are retained, the patch segmentation process is optimized, and high-quality photo spots are generated.

Benefits of technology

It improves the accuracy and efficiency of workpiece inspection, reduces data processing volume, supports the compatibility and scalability of multiple industrial quality inspection systems, reduces hardware resource requirements, and realizes full-process visual simulation monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120339549A_ABST
    Figure CN120339549A_ABST
Patent Text Reader

Abstract

The invention provides a model segmentation method and device based on a grid object, and the method comprises the steps: model processing and reconstruction, surface patch recognition and surface classification, region generation and processing, and output formatting, and can accurately recognize the surface information of a complex workpiece through an efficient surface patch recognition and classification algorithm, thereby improving the recognition efficiency. And high-quality input data is provided for subsequent industrial quality inspection. According to the recognition method, generation of the photographing points is optimized, the quality inspection process is more efficient, and the workpiece detection accuracy is improved. According to the grid object, through reasonable patch segmentation and simplification processing, the data volume is greatly reduced, and the processing efficiency and the calculation performance are improved. The grid object supports a plurality of general formats, is suitable for a plurality of industrial quality inspection systems, and has stronger compatibility and expansion capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a model segmentation method and device based on grid objects. Background Art

[0002] In the field of industrial quality inspection, the model segmentation method based on point cloud objects is a relatively common technical means at present. The point cloud objects have the following main disadvantages: 1) Lack of topological structure information The point cloud objects only contain discrete point position information and do not contain the topological relationship of the model. During the simulation and visualization process, the point cloud needs to be first reconstructed into a grid. However, due to the lack of topological structure, this reconstruction often leads to obvious differences between the grid and the original model. For example, specific detail structures may be lost or holes may be generated, thus affecting the accuracy of subsequent quality inspection.

[0003] 2) Large data scale The number of point information contained in the point cloud objects is usually several times that of the grid objects, which puts higher requirements on the data processing ability. Especially in the segmentation and recognition tasks of complex workpieces, it may lead to a significant decrease in processing speed or excessive resource consumption.

[0004] 3) Limited compatibility and scalability The point cloud objects are mostly used as the original data of 3D scanning devices, and their file formats are relatively single, and the expansion ability is also limited. This causes compatibility problems when applying across platforms or combining with other data types. Summary of the Invention

[0005] The purpose of the present invention is to provide a model segmentation method and device based on grid objects.

[0006] To solve the above problems, the present invention provides a model segmentation method based on grid objects, including: Reading a preprocessed workpiece model file and loading it as a grid object; obtaining the retained model geometry and topological information based on the grid object; reconstructing an optimized model based on the retained model geometry and topological information; Classifying the patches in the optimized model to obtain the patches of each classification group; Performing a clustering operation based on the patches of each classification group to obtain a second clustering region that meets the requirements; Extracting the patch and vertex data of the second clustering region, and remapping them into a new grid model file based on the patch and vertex data of the second clustering region.

[0007] Further, in the above method, obtaining the retained model geometry and topological information based on the grid object includes: Performing a preprocessing operation on the grid object to obtain a grid object after the preprocessing operation; According to the preset task requirements, further optimize the meshed object after the preprocessing operation to obtain the retained model geometry and topology information.

[0008] Further, in the above method, according to the preset task requirements, further optimize the meshed object after the preprocessing operation to obtain the retained model geometry and topology information, including: Perform smoothing processing and simplification operations based on normal vectors and surface curvatures on the meshed object after the preprocessing operation to obtain the meshed object after the simplification operation; Automatically identify and separate the internal and external surfaces of the meshed object after the simplification operation to obtain the retained model geometry and topology information.

[0009] Further, in the above method, classify the patches in the optimized model to obtain the patches of each classification group, including: Step S21: Taking the patches in the optimized model as the minimum units, calculate the area of each patch; Step S22: Sort all the patches in descending order of area, select the current largest unclassified patch, and determine whether it meets the preset patch area threshold. If it meets, take the normal vector and curvature of the current largest unclassified patch as the reference normal vector and reference curvature of the current classification group and record them; Step S23: Search for other unclassified patches whose differences from the current reference normal vector and reference curvature are within the preset threshold range and classify them into the current classification group; among them, after adding a new patch to the current classification group each time, calculate the mean value of the reference normal vector and curvature of all the current patches in the current classification group as the updated reference normal vector and reference curvature of the current classification group in real time; Repeat the above steps S22 to S23 until all the patches are classified into the corresponding classification groups.

[0010] Further, in the above method, perform a clustering operation based on the patches of each classification group to obtain the second clustering region that meets the requirements, including: Determine the surface region to which each patch belongs according to the adjacency relationship of the vertices of each patch; Perform clustering and screening operations on each surface region to obtain the second clustering region that meets the requirements.

[0011] Further, in the above method, determine the surface region to which each patch belongs according to the adjacency relationship of the vertices of each patch, including: Calculate the adjacent patches of each patch according to the adjacency relationship of the vertices of each patch; For each patch in each classification group, search for all adjacent patches in the classification group to which it belongs, form a surface area with the adjacent patches, and record the patch set, vertex set, and average normal of each surface area; traverse each patch in all classification groups to ensure that each patch belongs to a certain surface area.

[0012] Further, in the above method, perform clustering and screening operations on each surface area to obtain a second clustering area that meets the requirements, including: For surface areas in different classification groups with an average normal difference less than a preset normal threshold, perform a clustering operation based on the normal projection information of the vertices of the surface area to determine the clustering category of each surface area; Merge the surface areas belonging to the same cluster to generate a clustering area, and screen the clustering area through a preset screening rule to obtain a second clustering area that meets the requirements.

[0013] Further, in the above method, screen the clustering area through a preset screening rule to obtain a second clustering area that meets the requirements, including: Set a screening rule where the number of patches and the area of the region meet the preset requirements, and screen the second clustering area that meets the requirements from the clustering area.

[0014] According to another aspect of the present invention, there is also provided a computer-readable storage medium on which computer-executable instructions are stored, wherein when the computer-executable instructions are executed by a processor, the processor is caused to: execute the method described in any one of the above.

[0015] According to another aspect of the present invention, there is also provided a calculator device, which includes: A processor; and A memory arranged to store computer-executable instructions, the executable instructions when executed causing the processor to: execute the method described in any one of the above.

[0016] Compared with the prior art, the present invention includes model processing and reconstruction, patch recognition and surface classification, region generation and processing, and output formatting. Through an efficient patch recognition and classification algorithm, it can accurately identify the surface information of complex workpieces, providing high-quality input data for subsequent industrial quality inspection. This recognition method optimizes the generation of photographing points, making the quality inspection process more efficient and improving the accuracy of workpiece detection. The mesh object of the present invention significantly reduces the data volume through reasonable patch segmentation and simplification processing, improving the processing efficiency and computing performance. The mesh object supports multiple common formats, is applicable to various industrial quality inspection systems, and has stronger compatibility and expansion capabilities. Compared with the patch segmentation method based on point cloud objects, the present invention can make full use of the geometric information and topological structure of the mesh type object, reduce the data processing scale, improve the output quality, realize the full-process visual simulation monitoring of the segmentation process, and significantly improve the accuracy and efficiency of the patch segmentation task.

[0017] In the surface recognition and segmentation process, the present invention adds preprocessing steps such as model simplification and inner and outer surface recognition, significantly reducing the number of vertices and patches to be processed. After surface recognition is completed, the number of final output surface regions is further reduced through surface merging. These improvements significantly reduce the data processing volume and improve the overall segmentation speed and efficiency. By improving the model segmentation quality, the present invention helps to generate high-quality photographing points. This helps to improve the accuracy and reasonable distribution of the photographing points, thereby accelerating the quality inspection photographing process of the workpiece and improving the reliability of the detection results. By introducing multi-step optimization processing, the present invention reduces the hardware resource requirements, enabling the system to operate efficiently in a common computer environment and saving the operation cost of enterprises.

[0018] The present invention uses a mesh object for model processing, retains the topological structure of the model, and can provide real-time visualization results at each step of the segmentation process. The mesh object itself retains the complete topological structure information and does not require additional reconstruction, enabling direct high-precision simulation and visualization. Users can view the status and output of the current model in a virtual environment, promptly discover problems and adjust parameters, improving the segmentation accuracy and efficiency. Due to the full-process visualization, users can evaluate and adjust the model status during the segmentation and classification processes. This interactive operation mode not only improves the user experience but also improves the accuracy and quality of task completion. Brief Description of the Drawings

[0019] Figure 1 is a flowchart of a model segmentation method based on a mesh object according to an embodiment of the present invention. Detailed Description of the Embodiment

[0020] The present invention will be further described in detail below with reference to the accompanying drawings.

[0021] In a typical configuration of the present application, the terminal, the device of the service network, and the trusted party all include one or more processors (CPUs), input / output interfaces, network interfaces, and memories.

[0022] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM), and / or non-volatile memory such as read-only memory (ROM) or flash RAM. The memory is an example of computer-readable media.

[0023] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can store information by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or other memory technologies, CD-ROM (compact disc read-only memory), digital versatile disc (DVD), or other optical storage, magnetic cassette tapes, magnetic disk storage, or other magnetic storage devices, or any other non-transitory medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0024] The present invention provides a model segmentation method based on grid objects, and the method includes four steps: model processing and reconstruction, patch recognition and surface classification, surface area generation and processing, and result formatting. Among them, Step S1, model processing and reconstruction: obtaining a grid object based on the workpiece model file; obtaining the retained model geometry and topology information based on the grid object; reconstructing an optimized model based on the retained model geometry and topology information; Step S11, reading the preprocessed workpiece model file and loading it as a grid object; Here, the format of the workpiece model file can be, for example, .ply, .stl, etc.; the grid object can be, for example, Mesh or TriangleMesh; Step S12, performing a preprocessing operation on the grid object to obtain a preprocessed grid object; Here, the preprocessing operation includes normal calculation and normalization of the grid object, vertex and patch deduplication, isolated vertex removal, and degenerate patch deletion, etc.; Step S13: Further optimize the meshed object after the preprocessing operation according to the preset task requirements to obtain the retained model geometry and topology information. Here, the preset task requirements may include preset requirements such as the curvature, normal vector, and included angle threshold of the workpiece. Preferably, the further optimization process includes: Step S131: Smooth the meshed object after the preprocessing operation and perform a simplification operation based on the normal vector and surface curvature to obtain the meshed object after the simplification operation. Step S132: Automatically identify and separate the internal and external surfaces of the meshed object after the simplification operation to obtain the retained model geometry and topology information. Step S14: Reconstruct the optimized model based on the retained model geometry and topology information.

[0025] Step S2: Patch recognition and surface classification: Classify the patches in the optimized model to obtain the patches in each classification group. Step S21: Use the patches in the optimized model as the minimum units and calculate the area of each patch. Step S22: Sort all the patches in descending order of area, select the current largest unclassified patch, and determine whether it meets the preset patch area threshold. If it meets the threshold, record the normal vector and curvature of the current largest unclassified patch as the reference normal vector and reference curvature of the current classification group. Step S23: Search for other unclassified patches whose differences from the current reference normal vector and reference curvature are within the preset threshold range and classify them into the current classification group. Wherein, after each new patch is added to the current classification group, calculate the mean value of the reference normal vector and curvature of all the current patches in the current classification group as the updated reference normal vector and reference curvature of the current classification group in real time. Repeat the above steps S22 to S23 until all the patches are classified into the corresponding classification groups.

[0026] Here, the preset threshold range can be set based on the task requirements.

[0027] Step S3: Region generation and processing: Perform a clustering operation based on the patches in each classification group to obtain the second clustering regions that meet the requirements. Step S31: Calculate the adjacent patches of each patch according to the adjacency relationship of the vertices of each patch. Step S32: For each patch in each classification group, search for all adjacent patches in the classification group to which it belongs, form a surface region with the adjacent patches, and record the patch set, vertex set, and average normal vector of each surface region. Traverse each patch in all classification groups to ensure that each patch belongs to a certain surface region. Step S33: For each surface area within different classification groups with an average normal difference less than a preset normal threshold, perform a clustering operation based on the normal projection information of the vertices of the surface area to determine the clustering category of each surface area; Step S34: Merge the surface areas belonging to the same cluster to generate a cluster area, and filter the cluster area through a preset filtering rule to obtain a second cluster area that meets the requirements; Here, step S34 is to perform a merging operation on the surface areas of the same clustering category after step S33 determines the clustering category of each surface area. It may traverse the clustering categories of each surface area obtained in step S33, and then merge all the surface areas belonging to the same clustering category to form a cluster area.

[0028] Preferably, it can be set through a heuristic algorithm. For example, set a filtering rule where the number of patches and the area of the region within the second cluster area meet the preset requirements, and filter to obtain a second cluster area that meets the requirements.

[0029] After the merging is completed, the area and the number of patches of the merged cluster area can be calculated, and it can be checked whether they meet the preset requirements for the number of patches and the area of the region. If a certain cluster area meets the requirements, it is used as the second cluster area; otherwise, the cluster area will be filtered out and not put into the second cluster area.

[0030] Step S4: Output formatting: Remap the second cluster area into a new mesh model file.

[0031] Step S41: Extract the patch and vertex data of the second cluster area; Step S42: Based on the patch and vertex data of the second cluster area, remap it into a new mesh model file.

[0032] Here, the mesh model file can be, for example, in the PRY format, which can save the model file and output relevant information (such as the number of regions, area distribution, etc.). Subsequently, corresponding photographing points can be obtained based on the mesh model file, and photographing control information for the robotic arm can be generated based on the photographing points.

[0033] According to another aspect of the present invention, there is also provided a computer-readable storage medium, on which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the processor is caused to: execute the method described in any one of the above.

[0034] According to another aspect of the present invention, there is also provided a calculator device, which includes: A processor; and A memory arranged to store computer-executable instructions that, when executed, cause the processor to: execute the method according to any one of the above.

[0035] The present invention includes: model processing and reconstruction, patch recognition and surface classification, region generation and processing, and output formatting. Through an efficient patch recognition and classification algorithm, it can accurately identify the surface information of complex workpieces, providing high-quality input data for subsequent industrial quality inspection. This recognition method optimizes the generation of photographing points, making the quality inspection process more efficient and improving the accuracy of workpiece detection. The mesh object of the present invention significantly reduces the data volume through reasonable patch segmentation and simplification processing, improving the processing efficiency and computing performance. The mesh object supports multiple common formats, is applicable to various industrial quality inspection systems, and has stronger compatibility and expansion capabilities. Compared with the patch segmentation method based on point cloud objects, this patent can make full use of the geometric information and topological structure of the mesh type object, reduce the data processing scale, improve the output quality, realize the full-process visual simulation monitoring of the segmentation process, and significantly improve the accuracy and efficiency of the patch segmentation task.

[0036] In the surface recognition and segmentation process, the present invention adds preprocessing steps such as model simplification and internal and external surface recognition, significantly reducing the number of vertices and patches to be processed. After completing the surface recognition, the number of final output surface regions is further reduced through surface merging. These improvements significantly reduce the data processing volume, improving the overall segmentation speed and efficiency. By improving the model segmentation quality, the present invention helps to generate high-quality photographing points. This helps to improve the accuracy and distribution rationality of the photographing points, thus accelerating the quality inspection photographing process of the workpiece and improving the reliability of the detection results. By introducing multi-step optimization processing, the present invention reduces the hardware resource requirements, enabling the system to operate efficiently in a common computer environment and saving the operating costs of enterprises.

[0037] The present invention uses a mesh object for model processing, retains the topological structure of the model, and can provide real-time visualization results in each step of the segmentation process. The mesh object itself retains the complete topological structure information and does not require additional reconstruction, and can directly perform high-precision simulation and visualization. Users can view the status and output of the current model in a virtual environment, discover problems in a timely manner and adjust parameters, improving the segmentation accuracy and efficiency. Due to the full-process visualization, users can evaluate and adjust the model status during the segmentation and classification processes. This interactive operation method not only improves the user experience but also improves the accuracy and quality of task completion.

[0038] For the detailed content of the device embodiments of the present invention, reference may be specifically made to the corresponding parts of the method embodiments, which will not be elaborated here.

[0039] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to include these modifications and variations.

[0040] It should be noted that the present invention can be implemented in software and / or a combination of software and hardware. For example, it can be implemented using an application-specific integrated circuit (ASIC), a general-purpose computer, or any other similar hardware device. In one embodiment, the software program of the present invention can be executed by a processor to implement the steps or functions described above. Similarly, the software program of the present invention (including related data structures) can be stored in a computer-readable recording medium, such as a RAM memory, a magnetic or optical drive, or a floppy disk and similar devices. Additionally, some steps or functions of the present invention can be implemented using hardware, for example, as a circuit that cooperates with the processor to execute each step or function.

[0041] In addition, a part of the present invention can be applied as a computer program product. For example, computer program instructions, when executed by a computer, can, through the operation of the computer, call or provide the methods and / or technical solutions according to the present invention. The program instructions for calling the methods of the present invention may be stored in a fixed or removable recording medium, and / or transmitted through a data stream in a broadcast or other signal-bearing medium, and / or stored in the working memory of a computer device that runs according to the program instructions. Here, an embodiment according to the present invention includes a device that includes a memory for storing computer program instructions and a processor for executing the program instructions. When the computer program instructions are executed by the processor, the device is triggered to run based on the methods and / or technical solutions according to the foregoing multiple embodiments of the present invention.

[0042] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above-described exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention. Therefore, in any regard, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, it is intended to encompass all changes that fall within the meaning and scope of the equivalent elements of the claims in the present invention. Any reference signs in the claims should not be construed as limiting the claimed rights. In addition, obviously, the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or devices stated in the apparatus claims can also be implemented by one unit or device through software or hardware. First, second, etc. are used to denote names and do not denote any particular order.

Claims

1. A model segmentation method based on grid objects, characterized in that Including: Read the preprocessed workpiece model file and load it as a mesh object; Obtain the retained model geometry and topology information based on the mesh object; Reconstruct the optimized model based on the retained model geometry and topology information; Classify the patches in the optimized model to obtain the patches of each classification group; Perform a clustering operation based on the patches of each classification group to obtain the second clustering region that meets the requirements; Extract the patch and vertex data of the second clustering region, and remap them into a new mesh model file based on the patch and vertex data of the second clustering region.

2. The method for model segmentation based on grid objects according to claim 1, wherein Obtain the retained model geometry and topology information based on the mesh object, including: Perform a preprocessing operation on the mesh object to obtain the mesh object after the preprocessing operation; According to the preset task requirements, further optimize the mesh object after the preprocessing operation to obtain the retained model geometry and topology information.

3. The model segmentation method based on grid objects according to claim 2, characterized in that, According to the preset task requirements, further optimize the mesh object after the preprocessing operation to obtain the retained model geometry and topology information, including: Smooth the mesh object after the preprocessing operation and perform a simplification operation based on the normal and surface curvature to obtain the mesh object after the simplification operation; Automatically identify and separate the internal and external surfaces of the mesh object after the simplification operation to obtain the retained model geometry and topology information.

4. The model segmentation method based on grid objects according to claim 1, wherein Classify the patches in the optimized model to obtain the patches of each classification group, including: Step S21: Take the patches in the optimized model as the minimum unit and calculate the area of each patch; Step S22: Sort all the patches in descending order of area, select the current largest unclassified patch, and determine whether it meets the preset patch area threshold. If it meets, use the normal and curvature of the current largest unclassified patch as the reference normal and reference curvature of the current classification group and record them; Step S23: Search for other unclassified patches whose differences from the current reference normal and reference curvature are within the preset threshold range and classify them into the current classification group; among them, each time a new patch is added to the current classification group, calculate the mean of the reference normal and curvature of all the current patches in the current classification group as the reference normal and reference curvature of the current classification group after real-time update; Repeat the above steps S22 to S23 until all the patches are classified into the corresponding classification groups.

5. The method for model segmentation based on grid objects according to claim 1, wherein Perform a clustering operation based on the patches of each classification group to obtain the second clustering region that meets the requirements, including: Determine the surface region to which each patch belongs according to the adjacency relationship of the vertices of each patch; Perform clustering and screening operations on each surface region to obtain the second clustering region that meets the requirements.

6. The method for model segmentation based on grid objects according to claim 5, wherein Determine the surface region to which each patch belongs according to the adjacency relationship of the vertices of each patch, including: Calculate the adjacent patches of each patch according to the adjacency relationship of the vertices of each patch; For each patch in each classification group, search for all adjacent patches in the classification group to which it belongs, form a surface region with the patch and its adjacent patches, and record the patch set, vertex set, and average normal of each surface region; traverse each patch in all classification groups to ensure that each patch belongs to a certain surface region.

7. The method for model segmentation based on grid objects according to claim 5, wherein Perform clustering and screening operations on each surface area to obtain a second clustering area that meets the requirements, including: For each surface area within different classification groups with an average normal difference less than a preset normal threshold, perform a clustering operation based on the normal projection information of the vertices of the surface area to determine the clustering category of each surface area; Merge the surface areas belonging to the same cluster to generate a cluster area, and screen the cluster area through a preset screening rule to obtain a second cluster area that meets the requirements.

8. The method for model segmentation based on grid objects according to claim 7, wherein Screen the cluster area through a preset screening rule to obtain a second cluster area that meets the requirements, including: Set a screening rule where the number of patches and the area of the region meet the preset requirements, and screen from the cluster areas to obtain a second cluster area that meets the requirements.

9. A computer-readable storage medium having computer-executable instructions stored thereon, wherein, When the computer-executable instructions are executed by a processor, the processor is caused to: perform the method according to any one of claims 1 to 8.

10. A calculator device, wherein, Including: A processor; And A memory arranged to store computer-executable instructions, the executable instructions when executed causing the processor to: perform the method according to any one of claims 1 to 8.