CN112669460B - Workpiece defect detection method, system and computer readable storage medium - Google Patents
Workpiece defect detection method, system and computer readable storage medium Download PDFInfo
- Publication number
- CN112669460B CN112669460B CN202011639478.0A CN202011639478A CN112669460B CN 112669460 B CN112669460 B CN 112669460B CN 202011639478 A CN202011639478 A CN 202011639478A CN 112669460 B CN112669460 B CN 112669460B
- Authority
- CN
- China
- Prior art keywords
- grid
- image
- reconstructed
- dimensional
- workpiece
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 230000007547 defect Effects 0.000 title claims abstract description 40
- 238000001514 detection method Methods 0.000 title claims abstract description 17
- 238000000034 method Methods 0.000 claims abstract description 26
- 239000011159 matrix material Substances 0.000 claims description 16
- 238000013519 translation Methods 0.000 claims description 11
- 238000012937 correction Methods 0.000 claims description 6
- 238000012545 processing Methods 0.000 claims description 6
- 230000009467 reduction Effects 0.000 claims description 6
- 230000009466 transformation Effects 0.000 claims description 6
- 238000004422 calculation algorithm Methods 0.000 claims description 5
- 238000001914 filtration Methods 0.000 claims description 5
- 238000004364 calculation method Methods 0.000 claims description 3
- 238000004590 computer program Methods 0.000 claims description 3
- 230000001131 transforming effect Effects 0.000 claims description 3
- 238000007689 inspection Methods 0.000 claims 2
- 238000005259 measurement Methods 0.000 abstract description 7
- 230000001360 synchronised effect Effects 0.000 description 9
- 238000001746 injection moulding Methods 0.000 description 5
- 238000004519 manufacturing process Methods 0.000 description 4
- 230000003068 static effect Effects 0.000 description 4
- 230000005291 magnetic effect Effects 0.000 description 3
- 239000000463 material Substances 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 239000013598 vector Substances 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000002591 computed tomography Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000005294 ferromagnetic effect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012633 nuclear imaging Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000000275 quality assurance Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000003325 tomography Methods 0.000 description 1
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Analysing Materials By The Use Of Radiation (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a workpiece defect detection method, a system and a computer readable storage medium, wherein the workpiece defect detection method comprises the following steps: s1: carrying out three-dimensional surface reconstruction on the processed CT image data of the workpiece to be detected to obtain a reconstructed three-dimensional grid image; s2: triangulation of the CAD model of the workpiece to be measured is carried out to obtain a CAD triangular grid image; s3: registering the reconstructed three-dimensional grid image and the CAD triangular grid image; s4: calculating the deviation between the reconstructed three-dimensional grid image and the CAD triangular grid image; s5: judging the defect type of the workpiece to be detected according to the deviation; the method reduces the measurement error and improves the efficiency.
Description
Technical Field
The invention belongs to the field of industrial CT measurement and quality detection, and particularly relates to a workpiece defect detection method, a workpiece defect detection system and a computer readable storage medium.
Background
Industrial CT (industrial computerized tomography) is to apply an electronic computer nuclear imaging technique to an industry, and detect the internal structure, composition, material and defect condition of an object by X-rays, gamma rays or the like under the condition that the detected object is not damaged. The industrial CT detects defects such as internal air holes, inclusions and the like of materials such as injection molding parts and the like, and brings quality assurance to production enterprises.
In the current industrial measurement field, two main methods are used for measuring workpieces such as injection molding parts: one is to use the method of contact measurement, carry on the size measurement directly, but because the elastic modulus of the injection molding is low, easy to take place deformation, easy to be damaged in the measuring process, the detection precision is very bad; the other non-contact type measuring method is that a three-dimensional grid model is generated based on industrial CT image data, the three-dimensional grid model is measured, the confidence of the measuring result directly influences the overall judgment of the size precision of the injection molding piece, and the existing non-contact type measuring method based on industrial CT has the defects of larger error, lower efficiency and the like.
Disclosure of Invention
In order to remedy the above-mentioned shortcomings of the prior art, the present invention proposes a workpiece defect detection method, system and computer-readable storage medium.
The technical problems of the invention are solved by the following technical scheme:
a workpiece defect detection method comprises the following steps: s1: carrying out three-dimensional surface reconstruction on the processed CT image data of the workpiece to be detected to obtain a reconstructed three-dimensional grid image; s2: triangulation of the CAD model of the workpiece to be measured is carried out to obtain a CAD triangular grid image; s3: registering the reconstructed three-dimensional grid image and the CAD triangular grid image; s4: calculating the deviation between the reconstructed three-dimensional grid image and the CAD triangular grid image; s5: and judging the defect type of the workpiece to be detected according to the deviation.
Preferably, the step S4 comprises the following sub-steps: s4.1: traversing each vertex of the CAD triangular mesh image, and establishing an AABB tree of the triangular reconstruction mesh image; s4.2: for the vertex, searching a triangle nearest to the vertex in the AABB tree; s4.3: calculating the distance from the vertex to one of the triangles closest to the vertex as a deviation value of the vertex; s4.4: repeating the steps S4.1-S4.3, and calculating the deviation value of each vertex in the three-dimensional reconstruction grid and the corresponding point of the CAD triangular grid image to obtain the deviation of the reconstruction three-dimensional grid image and the CAD triangular grid image.
Preferably, the step S3 comprises the following sub-steps: s3.1: randomly selecting three non-coplanar grid points from the reconstructed three-dimensional grid image, and marking the three non-coplanar grid points as { x1, x2, x3}; respectively finding out the corresponding point of each grid point from the points of the CAD triangular grid image, marking the points as { y1, y2 and y3}, and taking { x1, x2, x3} and { y1, y2 and y3} as samples; s3.2: estimating parameters R, T of the reconstructed three-dimensional grid image from the samples, wherein R represents a rotation matrix and T represents a translation matrix; s3.3: transforming the rest grid points except for the three non-coplanar grid points in the reconstructed three-dimensional grid image by using the parameters R, T, calculating the distance error between the rest grid points in the transformed reconstructed three-dimensional grid image and the corresponding points in the CAD triangular grid image, and adding the grid points into an inner point set Q if the distance error of a certain grid point is smaller than a first preset threshold; s3.4: repeating the substeps S3.1-S3.3 until the number of grid points in the inner point set Q reaches a second preset threshold value or the iteration number is greater than a first preset maximum iteration number, and stopping iterative calculation; s3.5: taking parameters of an image formed by all grid points in the internal point set Q as optimal parameters R ', T ', carrying out rotation transformation on the internal point set Q through a rotation matrix R ' and carrying out translation transformation through a translation matrix T ', obtaining a grid point set Q ', and realizing coarse registration of the reconstructed three-dimensional grid image and the CAD triangular grid image; s3.6: forming a corresponding point set U by points corresponding to grid points in the grid point set Q 'in the CAD triangular grid image, and calculating the average distance d between the grid point set Q' and the corresponding point set U by adopting the following formula:
wherein n is the number of nearest point pairs; s3.7: and stopping iterative computation after the average distance d is smaller than a third preset threshold value or the iteration number is larger than a second preset maximum iteration number, and finishing fine registration.
Preferably, the processing in the step S1 means that a filtering method is adopted to perform noise reduction correction on a CT image of the workpiece to be measured.
Preferably, the step S1 includes: and reading the three-dimensional points of the workpiece to be measured according to the CT image data of the workpiece to be measured after noise reduction according to a moving cube algorithm so as to reconstruct the three-dimensional surface, and obtaining a reconstructed three-dimensional grid image.
Preferably, the workpiece is a plastic part.
Preferably, the plastic part is a plastic part with a density of less than 1.5g/cm 3 Is a plastic part of a low density material.
Preferably, the first preset threshold in the step S3.3 is 1.5 times of a distance between any two adjacent grid points in the reconstructed three-dimensional grid image; the second preset threshold in the step S3.4 is two-thirds of the number of grid points in the reconstructed three-dimensional grid image; the third preset threshold in the step S3.7 is 1.2 times of the distance between any two adjacent grid points in the reconstructed three-dimensional grid image; the first preset iteration number in the step S3.4 is 40 ten thousand times; the second preset iteration number in the step S3.7 is 40 ten thousand times.
A workpiece defect detection system, comprising: the first unit is used for reconstructing the three-dimensional surface of the processed CT image data of the workpiece to be detected to obtain a reconstructed three-dimensional grid image; the second unit is used for triangulating the CAD model of the workpiece to be measured into a CAD triangular grid image; a third unit for registering the reconstructed three-dimensional grid image and the CAD triangular grid image; a fourth unit for calculating a deviation of the reconstructed three-dimensional mesh image and the CAD triangle mesh image; and a fifth unit, configured to determine a defect type of the workpiece to be tested according to the deviation.
A computer readable storage medium storing a computer program which when executed by a processor implements any of the methods described above.
Compared with the prior art, the invention has the beneficial effects that: the method carries out three-dimensional reconstruction on the CT image of the workpiece after pretreatment, registers the three-dimensional grid image and the CAD triangular grid image constructed by the CAD model of the workpiece, and calculates the deviation of the three-dimensional grid image and the CAD triangular grid image, thereby analyzing the defect of the workpiece to be detected.
Drawings
FIG. 1 is a flow chart of a method for detecting workpiece defects according to an embodiment of the invention;
FIG. 2 is a two-dimensional tomographic image of a CT image of a scanned plastic part in one example of the invention;
FIG. 3 is a reconstructed three-dimensional grid image of a plastic part in one example of the invention;
FIG. 4 is a schematic representation of the registered image in one example of the invention;
FIG. 5 is a workpiece defect detection system in accordance with an embodiment of the invention.
Detailed Description
The invention will be further described with reference to the following drawings in conjunction with the preferred embodiments. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other.
As shown in fig. 1, a workpiece defect detection method includes the following steps:
s1: carrying out three-dimensional surface reconstruction on the processed CT image data of the workpiece to be detected to obtain a reconstructed three-dimensional grid image;
s2: triangulation of the CAD model of the workpiece to be measured is carried out to obtain a CAD triangular grid image;
s3: registering the reconstructed three-dimensional grid image and the CAD triangular grid image;
s4: calculating the deviation between the reconstructed three-dimensional grid image and the CAD triangular grid image;
s5: and judging the defect type of the workpiece to be detected according to the deviation.
Hereinafter, the workpiece to be measured is of low density (herein, low density means a density of less than 1.5g/cm 3 ) The defect detection of the workpiece is described in detail by taking a plastic part as an example.
The workpiece defect detection method comprises the following steps:
(1) CT data acquisition: CT data of the workpiece to be detected is acquired, and CT image data of the workpiece to be detected is obtained.
During acquisition, parameters such as the layer spacing, the scanning power, the image resolution and the like of scanning are determined according to the density and the size of the plastic piece, and a CT image of the plastic piece is obtained through scanning. As shown in fig. 2, a two-dimensional tomographic image is obtained from a CT image of a plastic part obtained by scanning.
(2) CT data processing: and (3) correcting and checking the CT image data in the step (1). The image noise reduction correction may be performed by a filtering method, including but not limited to median filtering, gaussian filtering, and the like, and the artifact correction may be performed by a correction algorithm, including but not limited to a beam hardening correction algorithm, and the like.
The purpose of step (1) and step (2) is to acquire CT image data required for measurement, in some examples, if there is already acquired CT image data of the workpiece to be measured, the CT image data may be directly imported into the data processing module, and the CT image data is processed in step (2); in other examples, if there is already processed CT image data, the already processed CT image data may be directly imported into a three-dimensional reconstruction module (i.e. the "first unit" mentioned later) for three-dimensional surface reconstruction in step (3).
(3) Reconstructing a three-dimensional grid: and carrying out three-dimensional surface reconstruction on the processed CT image data of the workpiece to be detected to obtain a reconstructed three-dimensional grid image.
In some preferred examples, the method specifically includes the following substeps of reading three-dimensional points of a workpiece to be measured according to a moving Cube (marking Cube) algorithm from CT image data of the workpiece to be measured after noise reduction to reconstruct a three-dimensional surface, and obtaining a reconstructed three-dimensional grid image:
(3.1) sequentially reading two-dimensional tomographic images of the workpiece to be detected obtained by industrial CT scanning into a memory and forming a three-dimensional data field;
(3.2) scanning two adjacent layers of data in the three-dimensional data field in sequence, and constructing cubes one by one;
(3.3) comparing the gray scale of each vertex of the cube with a given isosurface threshold value, and calculating an index value;
(3.4) calculating the gradient of each vertex of the cube by gray level difference for the cube containing the isosurface;
(3.5) searching an edge index table according to the index value to obtain an intersecting edge of the current cube with the intersection point with the isosurface;
(3.6) calculating coordinates and normal vectors of the equivalent points by using a difference value (median) according to the coordinates and normal vectors of the two vertexes of the intersecting edge;
(3.7) searching a triangular plate index table according to the index value, and determining a combination mode of equivalent points forming the triangular plate in the current cube;
(3.8) constructing the isosurface from the triangular patches within each cube to obtain a reconstructed three-dimensional grid image, which is shown in FIG. 3 as an example plastic piece.
(4) Triangularization of CAD models: triangulation of the CAD model of the workpiece to be measured (i.e., the process of converting a continuous CAD model into a discrete triangular mesh model) is performed as a triangular mesh image.
(5) Registering: and carrying out registration processing on the reconstructed three-dimensional grid image and the CAD triangular grid image.
In some examples, the registration includes a coarse registration (steps (5.1) - (5.4)) and a fine registration (steps (5.6) - (5.7)), preferably including the sub-steps of:
(5.1) randomly selecting three non-coplanar grid points from the reconstructed three-dimensional grid image, denoted as { x1, x2, x3}; and respectively finding out the point corresponding to each grid point from the points of the CAD triangular grid image, and marking { y1, y2 and y3} as samples, wherein { x1, x2 and x3} and { y1, y2 and y3} are taken as samples.
(5.2) reconstructing parameters R, T of the three-dimensional grid image from the sample estimates, wherein R represents a rotation matrix and T represents a translation matrix.
(5.3) transforming the residual grid points except for the three non-coplanar grid points randomly selected in the step (5.1) in the reconstructed three-dimensional grid image by using a parameter R, T, calculating the distance errors between the residual grid points in the transformed reconstructed three-dimensional grid image and corresponding points in the CAD triangular grid image, and adding the grid points into an inner point set Q if the distance error of a certain grid point is smaller than a first preset threshold; wherein the distance between any two adjacent grid points in the reconstructed three-dimensional grid image is equal, the first preset threshold value can be determined according to the distance between the grid points in the reconstructed three-dimensional grid image, and in one example, the threshold value is preferably 1.5 times the distance between any two adjacent grid points in the reconstructed three-dimensional grid image.
(5.4) repeating the substeps (5.1) - (5.3) until the number of grid points in the inner point set Q reaches a second preset threshold value, or the iteration number is greater than the first preset maximum iteration number, and stopping the iterative computation; wherein the second preset threshold is preferably two-thirds of the number of grid points in the reconstructed three-dimensional grid image; the first preset maximum number of iterations is preferably 40 ten thousand.
(5.5) taking parameters of an image formed by all grid points in the internal point set Q as optimal parameters R ', T', R 'to represent a rotation matrix and T' to represent a translation matrix, and realizing coarse registration of a reconstructed three-dimensional grid image and a CAD triangular grid image by using the optimal parameters R ', T', wherein the specific realization process is as follows: the inner point set Q carries out rotation transformation through a rotation matrix R ' and translation transformation through a translation matrix T ', so as to obtain a grid point set Q ', namely Q ' =R ' Q+T ', wherein the number of grid points in the grid point set Q ' is equal to the number of grid points in the inner point set Q;
(5.6) forming a corresponding point set U by points corresponding to grid points in the grid point set Q 'in the CAD triangular grid image, and calculating the average distance d between the grid point set Q' and the corresponding point set U by adopting the following formula:
wherein n is the number of nearest point pairs; specifically, after the above coarse registration, some grid points are registered, the registered grid points are coincident and have no distance, some grid points are not registered yet, then there is a distance between the unregistered grid points, the purpose of fine registration is to register the unregistered grid points, in the substep, the calculated average distance d refers to the calculated distance between each unregistered grid point in the grid point set Q 'and the corresponding point in the corresponding point set U (generally, for an unregistered grid point a in the grid point set Q', the point closest to the grid point a in the corresponding point set U is the corresponding point a 'of the grid point a, the grid point a and the corresponding point a' form a nearest point pair), and then the average value is calculated.
And (5.7) stopping iterative calculation when the average distance d is smaller than a third preset threshold value or the iteration number is larger than a second preset maximum iteration number, and finishing fine registration (namely, completely overlapping the reconstructed three-dimensional grid image and the CAD grid image). The third preset threshold value is preferably 1.2 times of the distance between any two adjacent grid points in the reconstructed three-dimensional grid image; the second preset maximum number of iterations is preferably 40 ten thousand.
(6) And (3) calculating deviation: and calculating the deviation of the reconstructed three-dimensional grid image and the CAD triangular grid image in the registered image.
In some examples, step (6) includes the sub-steps of:
(6.1) traversing each vertex of the CAD triangle mesh image, and building an AABB (Axis Aligned Bounding Box, axis parallel bounding box) tree of the triangulated mesh image to narrow down the search range of each vertex in the AABB tree for finding the nearest triangle to that vertex;
(6.2) for a vertex, looking up triangle M0 in the AABB tree that is nearest to the vertex;
(6.3) calculating a distance from the vertex to a vertex closest to the vertex in the triangle as a deviation value of the vertex;
(6.4) repeating the substeps (6.1) - (6.2), and calculating the deviation value of each vertex in the three-dimensional reconstruction grid and the corresponding point of the CAD triangular grid image to obtain the deviation of the reconstruction three-dimensional grid image and the CAD triangular grid image;
(7) Defect determination: and judging the defect of the workpiece to be detected according to the calculated deviation.
Common defects include cracks, holes, dimensional errors, inclusions and the like, for example, a closed polygon is formed by identifying boundary edges of a triangular mesh head and tail based on a half-edge data structure, and the defects are judged to be holes or cracks by calculating the distances between the edges of the polygon.
As shown in fig. 4, a schematic diagram of a registered image in an example is shown, in the registered image, a missing portion of the reconstructed three-dimensional grid image relative to the CAD triangle grid image may be marked, for example, black areas (such as schematic 1, 2 and 3) in the figure indicate that a crack exists in the three-dimensional reconstructed grid, which indicates that a crack defect exists in a corresponding position of the workpiece to be measured.
The method can detect various common defects of the workpiece including cracks, taking fig. 4 as an example, the cracks in the workpiece are measured by a vernier caliper after the workpiece is disassembled to obtain the crack length of 5.25mm, the length value measured by the method is 5.2464mm, the error is small, the measurement accuracy is improved, and the method has a very wide application scene, for example, in the production process of enterprises, the assembly performance of injection molding parts can be precisely detected, the defects such as the cracks existing in the production process can be found, the problem of matching between production molds is solved, a dimensional design improvement scheme is provided for the enterprises, and the technical problem is solved.
The embodiment of the application also provides a workpiece defect detection system, as shown in fig. 5, including: the first unit is used for reconstructing the three-dimensional surface of the processed CT image data of the workpiece to be detected to obtain a reconstructed three-dimensional grid image; the second unit is used for triangulating the CAD model of the workpiece to be measured into a CAD triangular grid image; a third unit for registering the reconstructed three-dimensional grid image and the CAD triangular grid image; a fourth unit for calculating a deviation of the reconstructed three-dimensional mesh image and the CAD triangle mesh image; and a fifth unit, configured to determine a defect type of the workpiece to be tested according to the deviation.
The present embodiments also provide a computer readable storage medium storing a computer program which, when executed, performs at least the method as described above.
The computer-readable storage medium may be implemented by any type of volatile or non-volatile storage device, or combination thereof. Wherein the nonvolatile Memory may be Read Only Memory (ROM), programmable Read Only Memory (PROM, programmable Read-Only Memory), erasable programmable Read Only Memory (EPROM, erasable Programmable Read-Only Memory), electrically erasable programmable Read Only Memory (EEPROM, electrically Erasable Programmable Read-Only Memory), magnetic random access Memory (FRAM, ferromagnetic Random Access Memory), flash Memory (Flash Memory), magnetic surface Memory, optical disk, or compact disk Read Only Memory (CD-ROM, compact Disc Read-Only Memory); the magnetic surface memory may be a disk memory or a tape memory. The volatile memory may be random access memory (RAM, random Access Memory), which acts as external cache memory. By way of example, and not limitation, many forms of RAM are available, such as static random access memory (SRAM, static Random Access Memory), synchronous static random access memory (SSRAM, synchronous Static Random Access Memory), dynamic random access memory (DRAM, dynamic Random Access Memory), synchronous dynamic random access memory (SDRAM, synchronous Dynamic Random Access Memory), double data rate synchronous dynamic random access memory (ddr SDRAM, double Data Rate Synchronous Dynamic Random Access Memory), enhanced synchronous dynamic random access memory (ESDRAM, enhanced Synchronous Dynamic Random Access Memory), synchronous link dynamic random access memory (SLDRAM, sync Link Dynamic Random Access Memory), direct memory bus random access memory (DRRAM, direct Rambus Random Access Memory). The storage media described in embodiments of the present invention are intended to comprise, without being limited to, these and any other suitable types of memory.
The foregoing is a further detailed description of the invention in connection with the preferred embodiments, and it is not intended that the invention be limited to the specific embodiments described. It will be apparent to those skilled in the art that several equivalent substitutions and obvious modifications can be made without departing from the spirit of the invention, and the same should be considered to be within the scope of the invention.
Claims (7)
1. A method for detecting defects of a workpiece is characterized in that the workpiece has a density of less than 1.5g/cm 3 Comprises the following steps:
s1: carrying out three-dimensional surface reconstruction on the processed CT image data of the workpiece to be detected to obtain a reconstructed three-dimensional grid image;
s2: triangulation of the CAD model of the workpiece to be measured is carried out to obtain a CAD triangular grid image;
s3: registering the reconstructed three-dimensional grid image and the CAD triangular grid image so that the reconstructed three-dimensional grid image and the CAD triangular grid image are completely overlapped; step S3 comprises the following sub-steps:
s3.1: randomly selecting three non-coplanar grid points from the reconstructed three-dimensional grid image, and marking the three non-coplanar grid points as { x1, x2, x3}; respectively finding out the corresponding point of each grid point from the points of the CAD triangular grid image, marking the points as { y1, y2 and y3}, and taking { x1, x2, x3} and { y1, y2 and y3} as samples;
s3.2: estimating parameters R, T of the reconstructed three-dimensional grid image from the samples, wherein R represents a rotation matrix and T represents a translation matrix;
s3.3: transforming the rest grid points except for the three non-coplanar grid points in the reconstructed three-dimensional grid image by using the parameters R, T, calculating the distance error between the rest grid points in the transformed reconstructed three-dimensional grid image and the corresponding points in the CAD triangular grid image, and adding the grid points into an inner point set Q if the distance error of a certain grid point is smaller than a first preset threshold;
s3.4: repeating the substeps S3.1-S3.3 until the number of grid points in the inner point set Q reaches a second preset threshold value or the iteration number is greater than the first preset iteration number, and stopping iterative calculation;
s3.5: taking parameters of an image formed by all grid points in the internal point set Q as optimal parameters R ', T ', wherein R ' represents a rotation matrix, T ' represents a translation matrix, the internal point set Q carries out rotation transformation through the rotation matrix R ' and carries out translation transformation through the translation matrix T ', a grid point set Q ' is obtained, and coarse registration of the reconstructed three-dimensional grid image and the CAD triangular grid image is realized;
s3.6: forming a corresponding point set U by points corresponding to grid points in the grid point set Q 'in the CAD triangular grid image, and calculating the average distance d between the grid point set Q' and the corresponding point set U by adopting the following formula:
wherein n is the number of nearest point pairs; after the rough registration, some grid points are registered, the registered grid points are overlapped and have no distance, some grid points are not registered, the unregistered grid points have a distance, the fine registration aims at registering the unregistered grid points, in step S3.6, the calculated average distance d refers to the calculated distance between each unregistered grid point in the grid point set Q 'and the corresponding point in the corresponding point set U, and then the average value is calculated, wherein for the unregistered grid point a in the grid point set Q', the point closest to the grid point a in the corresponding point set U is the corresponding point a 'of the grid point a, and the grid point a and the corresponding point a' form a nearest point pair;
s3.7: stopping iterative computation when the average distance d is smaller than a third preset threshold value or the iteration number is larger than a second preset iteration number, and finishing fine registration;
s4: calculating the deviation between the reconstructed three-dimensional grid image and the CAD triangular grid image;
s5: and judging the defect type of the workpiece to be detected according to the deviation, identifying boundary edges of the triangular mesh based on a half-edge data structure, forming a closed polygon from the front to the rear of the boundary edges, and judging whether the defect is a hole or a crack by calculating the distance between the edges of the polygon.
2. The method of detecting a defect in a workpiece according to claim 1, wherein the step S4 includes the sub-steps of:
s4.1: traversing each vertex of the CAD triangular mesh image, and establishing an AABB tree of the reconstructed three-dimensional mesh image;
s4.2: for the vertex, searching a triangle nearest to the vertex in the AABB tree;
s4.3: calculating the distance from the vertex to one of the triangles closest to the vertex as a deviation value of the vertex;
s4.4: repeating the steps S4.1-S4.3, and calculating the deviation value of each vertex in the reconstructed three-dimensional grid image and the corresponding point of the CAD triangular grid image to obtain the deviation of the reconstructed three-dimensional grid image and the CAD triangular grid image.
3. The method according to claim 1 or 2, wherein the processing in step S1 means noise reduction correction of the CT image of the workpiece to be measured by a filtering method.
4. The workpiece defect detection method according to claim 1 or 2, wherein step S1 includes: and reading the three-dimensional points of the workpiece to be measured according to the CT image data of the workpiece to be measured after noise reduction according to a moving cube algorithm so as to reconstruct the three-dimensional surface, and obtaining a reconstructed three-dimensional grid image.
5. The method for detecting defects of a workpiece according to claim 1, wherein,
the first preset threshold in step S3.3 is 1.5 times the distance between any two adjacent grid points in the reconstructed three-dimensional grid image;
the second preset threshold in step S3.4 is two-thirds of the number of grid points in the reconstructed three-dimensional grid image;
the third preset threshold in step S3.7 is 1.2 times the spacing between any two adjacent grid points in the reconstructed three-dimensional grid image;
the first preset iteration number in the step S3.4 is 40 ten thousand times;
the second preset number of iterations in step S3.7 is 40 ten thousand.
6. A workpiece defect inspection system for use in the inspection method of any one of claims 1-5, comprising:
the first unit is used for reconstructing the three-dimensional surface of the processed CT image data of the workpiece to be detected to obtain a reconstructed three-dimensional grid image;
the second unit is used for triangulating the CAD model of the workpiece to be measured into a CAD triangular grid image;
a third unit, configured to perform registration processing on the reconstructed three-dimensional grid image and the CAD triangle grid image, so that the reconstructed three-dimensional grid image and the CAD triangle grid image completely coincide;
a fourth unit for calculating a deviation of the reconstructed three-dimensional mesh image and the CAD triangle mesh image;
and a fifth unit, configured to determine a defect type of the workpiece to be detected according to the deviation, determine whether the defect is a hole or a crack by identifying boundary edges of the triangular mesh based on a half-edge data structure and forming a closed polygon from the front to the rear of the boundary edges, and calculating a distance between the edges of the polygon.
7. A computer readable storage medium storing a computer program, which when executed by a processor performs the method according to any one of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011639478.0A CN112669460B (en) | 2020-12-31 | 2020-12-31 | Workpiece defect detection method, system and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011639478.0A CN112669460B (en) | 2020-12-31 | 2020-12-31 | Workpiece defect detection method, system and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112669460A CN112669460A (en) | 2021-04-16 |
CN112669460B true CN112669460B (en) | 2023-07-25 |
Family
ID=75413872
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011639478.0A Active CN112669460B (en) | 2020-12-31 | 2020-12-31 | Workpiece defect detection method, system and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112669460B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113658166B (en) * | 2021-08-24 | 2024-04-12 | 凌云光技术股份有限公司 | Point cloud defect detection method and device based on grid model |
CN113888609B (en) * | 2021-10-26 | 2024-05-28 | 北京航空航天大学 | Residual gray field calculation method of local digital image correlation method |
CN114004034B (en) * | 2021-11-26 | 2024-08-06 | 安徽江淮安驰汽车有限公司 | Trigonometric function analysis method for vehicle body precision |
CN118799649A (en) * | 2024-08-22 | 2024-10-18 | 西安第六镜网络科技有限公司 | A metal surface defect identification method, device and equipment |
CN119151945B (en) * | 2024-11-20 | 2025-03-14 | 杭州灵西机器人智能科技有限公司 | Image defect detection method, device, system and computer-readable storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101377851A (en) * | 2007-08-29 | 2009-03-04 | 鸿富锦精密工业(深圳)有限公司 | System and method for computing a minimum distance from point cloud to point cloud |
CN103236064A (en) * | 2013-05-06 | 2013-08-07 | 东南大学 | Point cloud automatic registration method based on normal vector |
CN109658515A (en) * | 2017-10-11 | 2019-04-19 | 阿里巴巴集团控股有限公司 | Point cloud gridding method, device, equipment and computer storage medium |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102506753B (en) * | 2011-11-04 | 2013-10-16 | 西安电子科技大学 | Fourteen-point spherical wavelet transformation-based shape difference detection method for irregular parts |
CN104568974A (en) * | 2013-10-22 | 2015-04-29 | 镇江胡氏光电科技有限公司 | Area-comparison-algorithm-based soldering lug defect and missing detection method |
CN111402245B (en) * | 2020-03-20 | 2024-02-27 | 中建材(合肥)粉体科技装备有限公司 | Roll surface defect identification method and device for roll squeezer |
CN111932505B (en) * | 2020-07-20 | 2022-08-02 | 武汉美和易思数字科技有限公司 | Book damage automatic detection method and device |
-
2020
- 2020-12-31 CN CN202011639478.0A patent/CN112669460B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101377851A (en) * | 2007-08-29 | 2009-03-04 | 鸿富锦精密工业(深圳)有限公司 | System and method for computing a minimum distance from point cloud to point cloud |
CN103236064A (en) * | 2013-05-06 | 2013-08-07 | 东南大学 | Point cloud automatic registration method based on normal vector |
CN109658515A (en) * | 2017-10-11 | 2019-04-19 | 阿里巴巴集团控股有限公司 | Point cloud gridding method, device, equipment and computer storage medium |
Non-Patent Citations (2)
Title |
---|
基于机器视觉的船体缺陷检测技术研究;李坤;《中国优秀博硕士学位论文全文数据库(硕士) 工程科技Ⅱ辑》;20200215;第C036-160页 * |
顾小进.逆向工程辅助的废旧零部件再制造方法及关键技术.《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》.2016,第C029-139页. * |
Also Published As
Publication number | Publication date |
---|---|
CN112669460A (en) | 2021-04-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112669460B (en) | Workpiece defect detection method, system and computer readable storage medium | |
CN112581457B (en) | Pipeline inner surface detection method and device based on three-dimensional point cloud | |
US6504957B2 (en) | Method and apparatus for image registration | |
Yagüe-Fabra et al. | A 3D edge detection technique for surface extraction in computed tomography for dimensional metrology applications | |
CN110060338B (en) | Prefabricated part point cloud identification method based on BIM model | |
WO2023060683A1 (en) | Three-dimensional point cloud model-based method for measuring surface flatness of prefabricated beam segment | |
CN114049428B (en) | Three-dimensional irregular defect contour reconstruction method based on improved trust domain projection algorithm | |
CN113888641B (en) | A method for measuring standing tree diameter at breast height based on machine vision and deep learning | |
CN115235375A (en) | Multi-circle characteristic parameter measuring method, detecting method and device for cover plate type workpiece | |
CN109785370A (en) | A kind of weak texture image method for registering based on space time series model | |
CN114693660A (en) | Solid rocket engine charging calculation grid generation method based on ICT | |
CN118781178A (en) | A volume measurement method based on surface reconstruction and triple integral | |
KR101865434B1 (en) | Method and evaluation device for determining the position of a structure located in an object to be examined by means of x-ray computer tomography | |
CN108827197B (en) | Linear array industrial CT homogeneous material size measurement method capable of reducing edge degradation influence | |
Catalucci et al. | Intelligent systems for optical form measurement: automated assessment of pose and coverage | |
Lou et al. | Simulation for XCT and CMM measurements of additively manufactured surfaces | |
CN114519697A (en) | Hole defect quantitative detection method based on micro CT | |
Prieto et al. | A non contact CAD based inspection system | |
CN113396441A (en) | Computer-implemented method for determining a surface in measurement data | |
CN111932509A (en) | Pipeline inner surface defect positioning method based on positron annihilation detection technology | |
CN113048924B (en) | A Method of Calibrating CT Measurement Data Using Profile Measurement Data | |
CN119437045B (en) | Method for detecting vehicle door, computing equipment and storage medium | |
Chekanov et al. | 1-point RANSAC for circular motion estimation in computed tomography (CT) | |
CN117392325B (en) | Three-dimensional model construction method and device for switch rail | |
JP2002521699A (en) | Calibration method and device for non-contact distance sensor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |