Defect identification and extraction method and device

By using vertex color features and method curvature fitting in the three-dimensional model and combining with the rendering pipeline, the problem of insufficient defect recognition accuracy in traditional methods is solved, and efficient and accurate defect recognition and extraction effects are achieved.

CN119152221APending Publication Date: 2024-12-17SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411274951.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

Traditional defect recognition methods based on two-dimensional images are difficult to distinguish between illumination shadows and target defect contour features. The structural information of the three-dimensional model is huge, resulting in insufficient defect recognition accuracy and low data processing efficiency.

Method used

By loading a three-dimensional model, defect recognition and extraction is used to use the features of vertex color, fitting with the nearest neighbor range of curvature and curvature threshold, real-time rendering and defect recognition are achieved with the rendering pipeline, and reading and modifying vertices using custom mesh components Color to extract apparent defects of the object.

Benefits of technology

It realizes high-precision and high-efficiency defect recognition and extraction, reduces light shadow interference, and improves the continuity and response speed of recognition and extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119152221A_ABST
    Figure CN119152221A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of big data and artificial intelligence, and particularly provides a defect identification and extraction method and device, based on a three-dimensional model, the method comprises the following steps: S1, loading the three-dimensional model; s2, defect identification is carried out; and S3, on the basis of defect identification, extraction is carried out based on characteristics of vertex colors. Compared with the prior art, the method has the advantages that three-dimensional model data can be loaded during operation, defect extraction of various precisions is controlled by setting a normal curvature neighbor range, and defects are more continuous by setting a curvature threshold value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of big data and artificial intelligence, and specifically provides a defect recognition and extraction method and device. Background Art

[0002] Traditional defect recognition methods based on two-dimensional images have difficulty distinguishing between illumination and shadow and target defect contour features, resulting in insufficient defect recognition accuracy; defect recognition methods based on three-dimensional models can incorporate the three-dimensional structure and surface information of objects into the defect recognition process, effectively distinguish between illumination and shadow and target defect contour features, and reduce interference with defect recognition. However, the structural information of three-dimensional models is huge, and how to efficiently and accurately extract the three-dimensional features of defects from huge amounts of data is a technical problem that needs to be solved urgently. Summary of the invention

[0003] The present invention aims at solving the above-mentioned deficiencies of the prior art and provides a defect identification and extraction method with strong practicability.

[0004] A further technical task of the present invention is to provide a defect identification and extraction device that is rationally designed, safe and applicable.

[0005] The technical solution adopted by the present invention to solve its technical problem is:

[0006] A defect identification and extraction method, based on a three-dimensional model, has the following steps:

[0007] S1, loading the 3D model;

[0008] S2. Perform defect identification;

[0009] S3. Based on defect recognition, features based on vertex colors are extracted.

[0010] Furthermore, in step S1, when loading a three-dimensional model, the three-dimensional model file is read by loading a mesh component, and vertex positions, normals, triangle sequences, UV maps, vertex colors, and material arrays are created. Vectors, normals, triangle sequences, UV maps, and vertex color arrays are received through a custom mesh component to create a three-dimensional model at runtime, and the ambient light and the color of the three-dimensional model material are optimized through the rendering pipeline.

[0011] Furthermore, in step S2, the normals of all vertices within a vertex area stored in the custom mesh component are read, local fitting is performed, and the normal curvature of the point is estimated.

[0012] Furthermore, the specific method for obtaining the normal curvature of a certain point is as follows:

[0013] Assume that there are m neighboring points near point p, q iis the i-th neighbor of point p, q i The normal vector is M i , let the orthogonal coordinate system P, X, Y, Z be the local coordinate system L of point p, N represents the normal vector of point p, X and Y are orthogonal unit vectors, in L, p,q i ,M i The coordinates of are (0, 0, 0), q i is (x i ,y i ,z i ), M i for (n i,x , n y,i , n i,z ), then use an osculating circle passing through point p to estimate the normal curvature of point p

[0014] Furthermore, p is relative to q i The normal curvature of is estimated as follows:

[0015]

[0016] Where α is the vector -N and pq i The angle between N and M. i The angle between.

[0017] Its approximate value can be expressed as:

[0018]

[0019] In the formula n z =n i,z .

[0020] Furthermore, the normal curvature of the point is defined as the average value of the normal curvature of the point relative to all neighboring points. By setting the curvature threshold and modifying the vertex color of the model, the defect fitting is achieved. At the same time, the vertex color stored in the custom mesh component is changed and rendered to the three-dimensional model in real time through the rendering pipeline to realize the identification of surface defects of the object.

[0021] Furthermore, in step S3, feature extraction based on vertex color is performed by reading the vertex colors of the three-dimensional model in the custom mesh component and setting the three-dimensional color vector, extracting the target vertex whose vertex color meets the color range, modifying the color of the target vertex, and changing it to the vertex color stored in the custom mesh component. Finally, through the rendering pipeline, it is rendered to the three-dimensional model in real time to achieve the extraction of surface defects of the object.

[0022] A defect identification and extraction device, comprising: at least one memory and at least one processor;

[0023] The at least one memory is used to store a machine-readable program;

[0024] The at least one processor is used to call the machine-readable program to execute a defect identification and extraction method.

[0025] Compared with the prior art, the defect identification and extraction method and device of the present invention have the following outstanding beneficial effects:

[0026] The present invention can realize the loading of three-dimensional model data at runtime, and control the extraction of defects with various precisions by setting the normal curvature neighbor range, and make the defects more continuous by setting the curvature threshold. In addition, the present invention also provides a defect recognition and extraction method based on the vertex color of the three-dimensional model, which recognizes and extracts the target features on the three-dimensional model of the object by setting the three-dimensional color vector. The present invention has high recognition accuracy and response speed for defect features such as flatness and disease of the object. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0028] Attached Figure 1 It is a flow chart of a defect identification and extraction method;

[0029] Attached Figure 2 It is a three-dimensional model visualization diagram of the defect identification and extraction method;

[0030] Attached Figure 3 It is a schematic diagram of defect recognition and extraction results of a three-dimensional model of a defect recognition and extraction method;

[0031] Attached Figure 4 It is a schematic diagram of a triangle defined by osculating circles, neighboring points and normal vectors in a defect recognition and extraction method;

[0032] Attached Figure 5 It is a schematic diagram of the local coordinate system in the defect recognition and extraction method. DETAILED DESCRIPTION

[0033] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0034] A best embodiment is given below:

[0035] like Figure 1 As shown, a defect recognition and extraction method in this embodiment, based on a three-dimensional model, has the following steps:

[0036] S1, loading the 3D model;

[0037] like Figure 2 As shown, the 3D model is loaded at runtime, the 3D model file is read by loading the mesh component, and vertex positions, normals, triangle sequences, UV maps, vertex colors and material arrays are created. The vectors, normals, triangle sequences, UV maps and vertex color arrays are received through the custom mesh component to create the 3D model at runtime, and the ambient light and 3D model material color are optimized through the rendering pipeline to achieve a highly realistic rendering effect.

[0038] S2. Perform defect identification;

[0039] like Figure 3 As shown, the surface of the 3D model of the real object is extremely complex, and simple methods based on vertex color or normals are difficult to accurately identify and extract defects.

[0040] The present invention estimates the normal curvature of a point by reading the normal lines of all vertices within a vertex area stored in a custom grid component and performing local fitting. The specific method for obtaining the normal curvature of a point is as follows:

[0041] like Figure 4 and 5 As shown, assuming that there are m neighboring points near point p, q i is the i-th neighbor of point p, q i The normal vector is M i , let the orthogonal coordinate system P, X, Y, Z be the local coordinate system L of point p, N represents the normal vector of point p. X and Y are orthogonal unit vectors. In L, p,q i ,M i The coordinates of can be (0, 0, 0), q i is (x i ,y i ,z i ), M i for (n i,x, n y,i , n i,z ). Then we can use an osculating circle passing through point p to estimate the normal curvature of point p

[0042] Then p is relative to q i The normal curvature of is estimated as follows:

[0043]

[0044] Where α is the vector -N and pq i The angle between N and M. i The angle between.

[0045] Its approximate value can be expressed as:

[0046]

[0047] In the formula,

[0048] The normal curvature of the point is defined as the average value of the normal curvature of the point relative to all neighboring points. By setting the curvature threshold and modifying the vertex color of the model, the defect fitting is achieved. At the same time, the vertex color stored in the custom mesh component is changed and rendered to the 3D model in real time through the rendering pipeline, thereby realizing the identification of surface defects of the object.

[0049] S3, based on defect recognition, extract features based on vertex color;

[0050] In order to realize defect extraction, a feature extraction method based on vertex color is designed on the basis of defect recognition. By reading the vertex colors of the three-dimensional model in the custom mesh component and setting the three-dimensional color vector, the target vertices whose vertex colors meet the color range are extracted, the colors of the target vertices are modified and changed to the vertex colors stored in the custom mesh component. Finally, it is rendered to the three-dimensional model in real time through the rendering pipeline, thereby realizing the extraction of apparent defects of the object.

[0051] Based on the above method, a defect identification and extraction device in this embodiment includes: at least one memory and at least one processor;

[0052] at least one memory for storing a machine-readable program;

[0053] At least one processor is used to call the machine-readable program to execute a defect identification and extraction method.

[0054] The above-mentioned specific implementations are only specific cases of the present invention. The patent protection scope of the present invention includes but is not limited to the above-mentioned specific implementations. Any technical solutions that conform to the above-mentioned specific implementations of the present invention and any appropriate changes or substitutions made by ordinary technicians in the relevant technical field shall fall within the patent protection scope of the present invention.

[0055] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A defect recognition and extraction method based on a three-dimensional model, It is characterized in that The steps are as follows: S1, loading the 3D model; S2. Perform defect identification; S3. Based on defect recognition, features based on vertex colors are extracted.

2. A defect identification and extraction method according to claim 1, It is characterized in that In step S1, when loading a three-dimensional model, the three-dimensional model file is read by loading a mesh component, and vertex positions, normals, triangle sequences, UV maps, vertex colors, and material arrays are created. Vectors, normals, triangle sequences, UV maps, and vertex color arrays are received through a custom mesh component to create a three-dimensional model at runtime, and the ambient light and the color of the three-dimensional model material are optimized through the rendering pipeline.

3. A defect identification and extraction method according to claim 2, It is characterized in that In step S2, the normals of all vertices within a vertex area stored in the custom mesh component are read, local fitting is performed, and the normal curvature of the point is estimated.

4. A defect identification and extraction method according to claim 3, It is characterized in that The specific method for calculating the normal curvature of a point is as follows: Assume that there are m neighboring points near point p, q i is the i-th neighbor of point p, q i The normal vector is M i , let the orthogonal coordinate system P, X, Y, Z be the local coordinate system L of point p, N represents the normal vector of point p, X and Y are orthogonal unit vectors, in L, p,q i ,M i The coordinates of are (0, 0, 0), q i is (x i ,y i ,z i ), M i for (n i,x , n y,i , n i,z ), then use an osculating circle passing through point p to estimate the normal curvature of point p 5. A defect identification and extraction method according to claim 4, It is characterized in that Then p is relative to q i The normal curvature of is estimated as follows: Where α is the vector -N and pq i The angle between N and M. i The angle between. Its approximate value can be expressed as: In the formula n z =n i,z .

6. A defect identification and extraction method according to claim 5, It is characterized in that The normal curvature of the point is defined as the average value of the normal curvature of the point relative to all neighboring points. By setting the curvature threshold and modifying the vertex color of the model, the defect fitting is achieved. At the same time, the vertex color stored in the custom mesh component is changed and rendered to the 3D model in real time through the rendering pipeline to realize the identification of the apparent defects of the object.

7. A defect identification and extraction method according to claim 6, It is characterized in that In step S3, feature extraction based on vertex color is performed by reading the vertex colors of the three-dimensional model in the custom mesh component and setting the three-dimensional color vector, extracting the target vertex whose vertex color meets the color range, modifying the color of the target vertex, and changing it to the vertex color stored in the custom mesh component. Finally, through the rendering pipeline, it is rendered to the three-dimensional model in real time to realize the extraction of surface defects of the object.

8. A defect identification and extraction device, It is characterized in that include: at least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to call the machine-readable program to execute the method according to any one of claims 1 to 8.