PCB detection method, device and system based on image recognition technology

Through the combination of three-dimensional scanning and abnormal detection models, the problem of difficulty in detecting internal defects of multi-layer PCB boards in the prior art is solved, and the accurate identification of complex trace structures and surface fine defects is achieved, which improves the accuracy and adaptability of detection.

CN119722645APending Publication Date: 2025-03-28SHANGHAI LINGLIN INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411884563.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

Existing automatic optical detection technology is difficult to detect defects such as interlayer dislocation, internal short circuit or circuit breaker inside multi-layer PCB boards in depth, and the detection capability is limited when dealing with complex trace structures and fine surface defects, which are prone to false alarms and missed alarms.

Method used

A three-dimensional scanning device is used to collect the three-dimensional point cloud data of the PCB board, obtain the first feature sequence through preprocessing, construct the three-dimensional point cloud map data, and build an abnormality detection model based on this, output the abnormal probability value of each node to identify internal defects and complex trace structures.

Benefits of technology

In-depth detection of the internal structure of the multi-layer PCB board is realized, defects that are difficult to capture in two-dimensional images are identified, the accuracy and adaptability of detection are improved, and false alarms and missed reports are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119722645A_ABST
    Figure CN119722645A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of anomaly detection, and discloses a PCB detection method, device and system based on an image recognition technology, and the method comprises the following steps: S101, collecting the three-dimensional point cloud data of a PCB through a three-dimensional scanning device; step S102, preprocessing the three-dimensional point cloud data to obtain a first feature sequence; s103, constructing three-dimensional point cloud picture data according to the first feature sequence; step S104, constructing an anomaly detection model according to the three-dimensional point cloud image data, and outputting an anomaly probability value of each node of the three-dimensional point cloud image data; and S105, generating a response measure according to the abnormal probability value of each node of the three-dimensional point cloud picture data. By collecting and processing the three-dimensional point cloud data, various defects in the multi-layer PCB and in a complex wiring structure can be deeply detected, the limitation of traditional two-dimensional detection is solved, and the detection precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of abnormality detection, and in particular relates to a PCB board detection method, device and system based on image recognition technology. Background Art

[0002] With the rapid development of electronic products, printed circuit boards (PCBs), as the core components of electronic devices, undertake the important tasks of connecting various components and transmitting electrical signals. Their quality is directly related to the stability and performance of electronic products. Therefore, PCB board inspection technology has gradually become a key link in the field of industrial manufacturing. At present, the inspection of PCB boards mainly relies on automatic optical inspection technology, which uses high-resolution cameras to capture images and compares them with standard images to quickly identify problems such as welding defects and component offset. However, since this technology mainly relies on two-dimensional images, it is difficult to deeply detect defects such as interlayer misalignment, internal short circuits or open circuits inside multilayer boards. In addition, its detection capabilities are also limited when dealing with complex routing structures, such as tiny short circuits or open circuits in HDI circuits. Surface defects, such as fine cracks or cold solder joints, may also fail to be correctly identified due to poor image quality. Due to the working principle of automatic optical inspection, false positives and missed positives are relatively common, which not only increases unnecessary review work, but may also lead to the outflow of unqualified products, thereby affecting the quality of the final product and increasing repair costs.

[0003] Therefore, a PCB board detection method is urgently needed to solve the above problems. Summary of the invention

[0004] The present invention provides a PCB board detection method, device and system based on image recognition technology, which solves the technical problems in the related technology that it relies on two-dimensional images, is difficult to effectively detect internal defects and complex wiring structures of multilayer boards, is prone to false alarms and missed alarms, and affects detection accuracy and product quality.

[0005] The present invention provides a PCB board detection method, device and system based on image recognition technology, comprising the following steps:

[0006] Step S101, using a 3D scanning device to collect 3D point cloud data of the PCB board, wherein each point in the 3D point cloud data represents a position on the PCB board, represented by (x, y, z coordinates;

[0007] Step S102, preprocessing the three-dimensional point cloud data to obtain a first feature sequence, where a sequence unit of the first feature sequence represents a first feature vector of a point in the three-dimensional point cloud data;

[0008] Step S103, constructing three-dimensional point cloud data according to the first feature sequence, the three-dimensional point cloud data including: nodes, initial features of nodes and edges, a mapping relationship is established between nodes and points in the three-dimensional point cloud data, sequence units of the first feature sequence are used as initial features of nodes with which a mapping relationship is established, and edges represent relationships between nodes;

[0009] Step S104, constructing an anomaly detection model according to the three-dimensional point cloud data, wherein the input of the anomaly detection model is the three-dimensional point cloud data, and the output of the anomaly detection model is an anomaly probability value of each node of the three-dimensional point cloud data;

[0010] Step S105: generating a response measure according to the abnormal probability value of each node of the three-dimensional point cloud data.

[0011] Furthermore, the step of preprocessing the three-dimensional point cloud data includes:

[0012] Step S201, calculating the normal vector of each point of the three-dimensional point cloud data by constructing a plane equation;

[0013] Step S202, using eigenvalue decomposition technology to obtain the covariance matrix of the point neighborhood, and obtain the principal curvature through eigenvalue calculation of the matrix;

[0014] Step S203, using a radius filtering algorithm to perform denoising on the three-dimensional point cloud data;

[0015] Step S204, using voxel grid downsampling technology to process the three-dimensional point cloud data, reduce the amount of point cloud data, and retain the main geometric features.

[0016] Furthermore, the specific steps of step S201 include:

[0017] Step S2011, using a k-nearest neighbor algorithm and taking Euclidean distance as a metric to determine k nearest neighbor points of each point in the three-dimensional point cloud data;

[0018] Step S2012, fitting the neighboring points obtained in step S2011 by the least square method to obtain a local plane, the plane equation is: ax+by+cz+d=0;

[0019] Step S2013, obtaining the normal vector (a, b, c) of the plane according to the plane equation.

[0020] Furthermore, the specific steps of step S202 include:

[0021] Step S2021, calculate the average coordinates of neighboring points, the calculation formula is: Where P ij (x ij ,y ij , zij ) are the coordinates of the neighboring points;

[0022] Step S2022, calculating the offset of the neighboring point relative to the average coordinate according to the neighboring point coordinates, the calculation formula is: Where ΔP ij is the offset, and the average coordinates of the neighboring points are:

[0023] Step S2023, constructing a covariance matrix according to the offset, the mathematical expression of which is: Where T is the transpose operation, and the covariance matrix C is a 3*3 symmetric matrix;

[0024] Step S2024, decomposing the covariance matrix to obtain its eigenvalues ​​and eigenvectors, the calculation formula is: C*v=λ*v, where λ is the eigenvalue, represented by the eigenvalues ​​λ1, λ2 and λ3 in three orthogonal directions, and v is the eigenvector;

[0025] Step S2025, calculating the curvature according to the characteristic value, the calculation formula is: Among them, λ1 represents the minimum eigenvalue, and the change in the corresponding direction is the smallest, indicating that the surface in this direction is the flattest. λ1+λ2+λ3 represents the overall change and provides the scale of the entire local area.

[0026] Furthermore, the method for constructing the edge of the three-dimensional point cloud data includes:

[0027] Construct edges based on distance thresholds. The specific operation is as follows: for each point, calculate all points whose distance to it is less than the set threshold, and establish edges between these points;

[0028] The edges are constructed based on the similarity of the node normal vectors. The specific operation is as follows: the cosine similarity of the normal vectors of two nodes is calculated, a similarity threshold is set, and for two nodes whose cosine similarity exceeds the threshold, an edge is established between them;

[0029] The edges are constructed based on the triangulation algorithm. The specific operation is as follows: the Delaunay triangulation algorithm is used to divide the 3D point cloud data into several triangles, ensuring that the line between any two adjacent points does not pass through other points, and then the edges between the nodes are constructed based on the edges of the triangles.

[0030] Further, the anomaly detection model includes: a hidden layer and a first classifier;

[0031] The input of the hidden layer is the 3D point cloud data, and the output is the updated features of the nodes;

[0032] The updated features of the nodes output by the hidden layer are put into the first classifier, and the classification space of the first classifier represents the abnormal probability value of each node of the three-dimensional point cloud data.

[0033] Furthermore, the calculation formula of the hidden layer includes:

[0034]

[0035] in represents the updated features of the node, H represents the initial features of the node, W represents the weight parameter of the node, represents the first adjacency matrix, A represents the adjacency matrix of the hidden layer input 3D point cloud data, the elements of the adjacency matrix represent the connection relationship between nodes, and the element value is represented by 0 or 1, 0 means there is no connection relationship between nodes, otherwise there is a connection relationship, I represents the unit matrix, the element value on the diagonal of the unit matrix is ​​assigned to 1, and the remaining element values ​​are assigned to 0, Represents the normalized degree matrix, the elements of the degree matrix represent the number of edge connections with the node, and ReLU represents the ReLU activation function.

[0036] Furthermore, the anomaly detection model is pre-trained before training. During the pre-training process, the initial features of the nodes of the three-dimensional point cloud data are input into the second classifier. The classification space of the second classifier represents whether there are welding defects on the PCB board, and the classification labels of the second classifier are manually marked.

[0037] The present invention provides a PCB board detection system based on image recognition technology, comprising the following modules:

[0038] A data acquisition module, which is used to collect three-dimensional point cloud data of the PCB board using a three-dimensional scanning device;

[0039] A data preprocessing module, which is used to preprocess the three-dimensional point cloud data to obtain a first feature sequence;

[0040] A graph network construction module, which is used to construct three-dimensional point cloud graph data according to the first feature sequence;

[0041] An anomaly detection model is used to construct an anomaly detection model according to the three-dimensional point cloud data to output an anomaly probability value of each node of the three-dimensional point cloud data;

[0042] A response measure generation module is used to generate a response measure according to the abnormal probability value of each node of the three-dimensional point cloud data.

[0043] The present invention provides an electronic device, comprising a processor and a memory storing a computer program, wherein the processor implements the above-mentioned PCB board detection method based on image recognition technology when executing the computer program.

[0044] The beneficial effects of the present invention are as follows: the present invention can deeply detect the internal structure of a multi-layer PCB board by collecting and processing three-dimensional point cloud data, identify defects such as inter-layer misalignment, internal short circuit and open circuit that are difficult to capture with two-dimensional images, and solve the limitation that traditional automatic optical inspection technology can only detect surface problems;

[0045] The present invention constructs three-dimensional point cloud data and effectively detects complex wiring structures, such as small short circuits, open circuits, surface cracks and solder joint anomalies in HD I circuits, by analyzing node features. Compared with two-dimensional detection, the present invention can handle more complex geometric features and improve detection accuracy.

[0046] The present invention extracts key features of three-dimensional point cloud data by pre-training anomaly detection models, reduces computing resource requirements, speeds up model training and reasoning, and effectively utilizes transfer learning strategies to achieve higher performance in new task scenarios, thereby improving the adaptability and generalization ability of the detection system. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a flow chart of a PCB board detection method based on image recognition technology of the present invention;

[0048] Figure 2 It is a flow chart of preprocessing three-dimensional point cloud data according to the present invention. DETAILED DESCRIPTION

[0049] The subject matter described herein will now be discussed with reference to example embodiments. It should be understood that the discussion of these embodiments is only to enable those skilled in the art to better understand and implement the subject matter described herein, and the functions and arrangements of the elements discussed may be changed without departing from the scope of protection of the present specification. Various examples may omit, replace or add various processes or components as needed. In addition, the features described relative to some examples may also be combined in other examples.

[0050] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in one or more embodiments of the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in one or more embodiments of the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0051] like Figure 1-Figure 2 As shown, a PCB board detection method, device and system based on image recognition technology include the following steps:

[0052] Step S101, using a 3D scanning device to collect 3D point cloud data of the PCB board, wherein each point in the 3D point cloud data represents a position on the PCB board, represented by (x, y, z) coordinates;

[0053] Step S102, preprocessing the three-dimensional point cloud data to obtain a first feature sequence, where a sequence unit of the first feature sequence represents a first feature vector of a point in the three-dimensional point cloud data;

[0054] Step S103, constructing three-dimensional point cloud data according to the first feature sequence, the three-dimensional point cloud data including: nodes, initial features of nodes and edges, a mapping relationship is established between nodes and points in the three-dimensional point cloud data, sequence units of the first feature sequence are used as initial features of nodes with which a mapping relationship is established, and edges represent relationships between nodes;

[0055] Step S104, constructing an anomaly detection model according to the three-dimensional point cloud data, wherein the input of the anomaly detection model is the three-dimensional point cloud data, and the output of the anomaly detection model is an anomaly probability value of each node of the three-dimensional point cloud data;

[0056] Step S105: generating a response measure according to the abnormal probability value of each node of the three-dimensional point cloud data.

[0057] In one embodiment of the present invention, a laser scanner is used to collect three-dimensional point cloud data of a PCB board. The specific operation is: a laser beam is used to illuminate the PCB board, and the reflection time of the light is measured to determine the three-dimensional coordinates of each point. For a multi-layer PCB board, the surface layer is scanned first, and then the angle of the PCB board is adjusted or the PCB board is flipped over to scan other layers.

[0058] In one embodiment of the present invention, the step of preprocessing the three-dimensional point cloud data includes:

[0059] Step S201, calculating the normal vector of each point of the three-dimensional point cloud data by constructing a plane equation;

[0060] Step S202, using eigenvalue decomposition technology to obtain the covariance matrix of the point neighborhood, and obtain the principal curvature through eigenvalue calculation of the matrix;

[0061] Step S203, using a radius filtering algorithm to perform denoising on the three-dimensional point cloud data, the specific operation is: setting a radius threshold, for each point, counting the number of neighboring points within the radius r, if the number of neighboring points is less than the set minimum number, the point is a noise point, and it is deleted;

[0062] Step S204, use voxel grid downsampling technology to process the three-dimensional point cloud data, reduce the amount of point cloud data, and retain the main geometric features. The specific operation is: divide the entire three-dimensional point cloud into a cubic grid of a fixed size, and calculate the average value of the points in the grid as the representative points of the grid, and use these representative points to form a new downsampled point cloud.

[0063] In one embodiment of the present invention, the specific steps of step S201 include:

[0064] Step S2011, using the k nearest neighbor algorithm, taking the Euclidean distance as the metric, to determine the k nearest neighbor points of each point in the three-dimensional point cloud data. Preferably, k is set to 10, and the formula of the Euclidean distance is: Where D(P i , P j ) represents point P i and P j The Euclidean distance between

[0065] Step S2012, fitting the neighboring points obtained in step S2011 by the least square method to obtain a local plane, the plane equation is: ax+by+cz+d=0;

[0066] Step S2013, obtaining the normal vector (a, b, c) of the plane according to the plane equation.

[0067] In one embodiment of the present invention, the specific steps of step S202 include:

[0068] Step S2021, calculate the average coordinates of neighboring points, the calculation formula is: Where P ij (x ij ,y ij , z ij ) are the coordinates of the neighboring points;

[0069] Step S2022, calculating the offset of the neighboring point relative to the average coordinate according to the neighboring point coordinates, the calculation formula is: Where ΔP ij is the offset, and the average coordinates of the neighboring points are:

[0070] Step S2023, constructing a covariance matrix according to the offset, the mathematical expression of which is: Where T is the transpose operation, and the covariance matrix C is a 3*3 symmetric matrix;

[0071] Step S2024, decomposing the covariance matrix to obtain its eigenvalues ​​and eigenvectors, the calculation formula is: C*v=λ*v, where λ is the eigenvalue, represented by the eigenvalues ​​λ1, λ2 and λ3 in three orthogonal directions, and v is the eigenvector;

[0072] Step S2025, calculating the curvature according to the characteristic value, the calculation formula is: Among them, λ1 represents the minimum eigenvalue, and the change in the corresponding direction is the smallest, indicating that the surface in this direction is the flattest. λ1+λ2+λ3 represents the overall change, providing the scale of the entire local area. A smaller curvature value indicates that the point is located in a flat area, and a larger curvature value indicates that the area where the point is located has a high degree of curvature, which may be the edge of a crack, a weld protrusion, etc.

[0073] In one embodiment of the present invention, the method for constructing the edge of the three-dimensional point cloud data includes:

[0074] Construct edges based on distance thresholds. The specific operation is as follows: for each point, calculate all points whose distance to it is less than the set threshold, and establish edges between these points;

[0075] The edges are constructed based on the similarity of the node normal vectors. The specific operation is as follows: the cosine similarity of the normal vectors of two nodes is calculated, a similarity threshold is set, and for two nodes whose cosine similarity exceeds the threshold, an edge is established between them;

[0076] The edges are constructed based on the triangulation algorithm. The specific operation is as follows: the Delaunay triangulation algorithm is used to divide the 3D point cloud data into several triangles, ensuring that the line between any two adjacent points does not pass through other points, and then the edges between the nodes are constructed based on the edges of the triangles.

[0077] In one embodiment of the present invention, the anomaly detection model includes: a hidden layer and a first classifier;

[0078] The input of the hidden layer is the 3D point cloud data, and the output is the updated features of the nodes;

[0079] The updated features of the nodes output by the hidden layer are put into the first classifier, and the classification space of the first classifier represents the abnormal probability value of each node of the three-dimensional point cloud data.

[0080] In one embodiment of the present invention, the calculation formula of the hidden layer includes:

[0081]

[0082] in represents the updated features of the node, H represents the initial features of the node, W represents the weight parameter of the node, represents the first adjacency matrix, A represents the adjacency matrix of the hidden layer input 3D point cloud data, the elements of the adjacency matrix represent the connection relationship between nodes, and the element value is represented by 0 or 1, 0 means there is no connection relationship between nodes, otherwise there is a connection relationship, I represents the unit matrix, the element value on the diagonal of the unit matrix is ​​assigned to 1, and the remaining element values ​​are assigned to 0, Represents the normalized degree matrix, the elements of the degree matrix represent the number of edge connections with the node, and ReLU represents the ReLU activation function.

[0083] In one embodiment of the present invention, the anomaly detection model is pre-trained before being trained. During the pre-training process, the initial features of the nodes of the three-dimensional point cloud data are input into the second classifier. The classification space of the second classifier represents whether there are welding defects on the PCB board, and the classification labels of the second classifier are manually marked.

[0084] It should be noted that pre-training can speed up the training of the model, extract the key features of the 3D point cloud data, and significantly reduce the computational burden and time cost of custom training; and when the new task has something in common with the initial task, through the transfer learning strategy, the features extracted by pre-training can be fully utilized to achieve a significant leap in performance in the new task scenario; in addition, the parameters of the pre-trained model have a strong generalization ability for common patterns due to the experience of being trained on massive data sets. Therefore, in the process of fine-tuning the new data set, the model is more focused on capturing subtle changes unique to the task rather than reconstructing global features. This mechanism effectively reduces the risk of overfitting.

[0085] In one embodiment of the present invention, a cross entropy loss function is used as the loss function of the anomaly detection model. By optimizing the loss function, the model can more accurately adjust the anomaly probability value, so that the distinction between abnormal nodes and normal nodes is higher, thereby improving the overall detection performance.

[0086] In one embodiment of the present invention, the node anomaly probability values ​​of the three-dimensional point cloud data output by the anomaly detection model are divided into three levels: the anomaly probability value is between 0 and 0.3, which is defined as a low risk level, and the response measure for the low risk level is to take no measures, and only perform routine monitoring and data recording; the anomaly probability value is between 0.3 and 0.7, which is defined as a medium risk level, and the response measure for the medium risk level is to perform additional monitoring and re-scanning to ensure the accuracy of the detection; the anomaly probability value is between 0.7 and 1, which is defined as a high risk level, and the response measure for the high risk level is to automatically generate an alarm and record the abnormal node location and characteristics in detail to facilitate further inspection by engineers.

[0087] The present invention also provides a PCB board detection system based on image recognition technology, comprising the following modules:

[0088] A data acquisition module, which is used to collect three-dimensional point cloud data of the PCB board using a three-dimensional scanning device;

[0089] A data preprocessing module, which is used to preprocess the three-dimensional point cloud data to obtain a first feature sequence;

[0090] A graph network construction module, which is used to construct three-dimensional point cloud graph data according to the first feature sequence;

[0091] An anomaly detection model is used to construct an anomaly detection model according to the three-dimensional point cloud data to output an anomaly probability value of each node of the three-dimensional point cloud data;

[0092] A response measure generation module is used to generate a response measure according to the abnormal probability value of each node of the three-dimensional point cloud data.

[0093] The present invention provides an electronic device, comprising a processor and a memory storing a computer program, wherein when the processor executes the computer program, a PCB board detection method based on image recognition technology provided in the above embodiments is implemented.

[0094] The embodiment of the present invention further provides a computer-readable storage medium storing instructions, which, when executed on a computer, enables the computer to execute the above-mentioned PCB board detection method based on image recognition technology. All implementation methods in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.

[0095] The above describes an embodiment of the present embodiment, but the present embodiment is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present embodiment, ordinary technicians in this field can also make many forms, all of which are within the protection of the present embodiment.

Claims

1. A PCB board detection method based on image recognition technology, characterized in that: The following steps are involved: Step S101, using a 3D scanning device to collect 3D point cloud data of the PCB board, wherein each point in the 3D point cloud data represents a position on the PCB board, represented by (x, y, z coordinates; Step S102, preprocessing the three-dimensional point cloud data to obtain a first feature sequence, where a sequence unit of the first feature sequence represents a first feature vector of a point in the three-dimensional point cloud data; Step S103, constructing three-dimensional point cloud data according to the first feature sequence, the three-dimensional point cloud data including: nodes, initial features of nodes and edges, a mapping relationship is established between nodes and points in the three-dimensional point cloud data, sequence units of the first feature sequence are used as initial features of nodes with which a mapping relationship is established, and edges represent relationships between nodes; Step S104, constructing an anomaly detection model according to the three-dimensional point cloud data, wherein the input of the anomaly detection model is the three-dimensional point cloud data, and the output of the anomaly detection model is an anomaly probability value of each node of the three-dimensional point cloud data; Step S105: generating a response measure according to the abnormal probability value of each node of the three-dimensional point cloud data.

2. A PCB board detection method based on image recognition technology according to claim 1, characterized in that: The step of preprocessing the three-dimensional point cloud data includes: Step S201, calculating the normal vector of each point of the three-dimensional point cloud data by constructing a plane equation; Step S202, using eigenvalue decomposition technology to obtain the covariance matrix of the point neighborhood, and obtain the principal curvature through eigenvalue calculation of the matrix; Step S203, using a radius filtering algorithm to perform denoising on the three-dimensional point cloud data; Step S204, using voxel grid downsampling technology to process the three-dimensional point cloud data, reduce the amount of point cloud data, and retain the main geometric features.

3. A PCB board detection method based on image recognition technology according to claim 2, characterized in that: The specific steps of step S201 include: Step S2011, using a k-nearest neighbor algorithm and taking Euclidean distance as a metric to determine k nearest neighbor points of each point in the three-dimensional point cloud data; Step S2012, fitting the neighboring points obtained in step S2011 by the least square method to obtain a local plane, the plane equation is: ax+by+cz+d=0; Step S2013, obtaining the normal vector (a, b, c) of the plane according to the plane equation.

4. A PCB board detection method based on image recognition technology according to claim 2, characterized in that: The specific steps of step S202 include: Step S2021, calculate the average coordinates of neighboring points, the calculation formula is: Where P ij (x ij ,y ij , z ij ) are the coordinates of the neighboring points; Step S2022, calculating the offset of the neighboring point relative to the average coordinate according to the neighboring point coordinates, the calculation formula is: Where ΔP ij is the offset, and the average coordinates of the neighboring points are: Step S2023, constructing a covariance matrix according to the offset, the mathematical expression of which is: Where T is the transpose operation, and the covariance matrix C is a 3*3 symmetric matrix; Step S2024, decomposing the covariance matrix to obtain its eigenvalues ​​and eigenvectors, the calculation formula is: C*v=λ*v, where λ is the eigenvalue, represented by the eigenvalues ​​λ1, λ2 and λ3 in three orthogonal directions, and v is the eigenvector; Step S2025, calculating the curvature according to the characteristic value, the calculation formula is: Among them, λ1 represents the minimum eigenvalue, and the change in the corresponding direction is the smallest, indicating that the surface in this direction is the flattest. λ1+λ2+λ3 represents the overall change and provides the scale of the entire local area.

5. The PCB board detection method based on image recognition technology according to claim 1 is characterized in that: The method for constructing the edge of the three-dimensional point cloud data includes: Construct edges based on distance thresholds. The specific operation is as follows: for each point, calculate all points whose distance to it is less than the set threshold, and establish edges between these points; The edges are constructed based on the similarity of the node normal vectors. The specific operation is as follows: the cosine similarity of the normal vectors of two nodes is calculated, a similarity threshold is set, and for two nodes whose cosine similarity exceeds the threshold, an edge is established between them; The edges are constructed based on the triangulation algorithm. The specific operation is as follows: the Delaunay triangulation algorithm is used to divide the 3D point cloud data into several triangles, ensuring that the line between any two adjacent points does not pass through other points, and then the edges between the nodes are constructed based on the edges of the triangles.

6. The PCB board detection method based on image recognition technology according to claim 1 is characterized in that: The anomaly detection model includes: a hidden layer and a first classifier; The input of the hidden layer is the 3D point cloud data, and the output is the updated features of the nodes; The updated features of the nodes output by the hidden layer are put into the first classifier, and the classification space of the first classifier represents the abnormal probability value of each node of the three-dimensional point cloud data.

7. A PCB board detection method based on image recognition technology according to claim 6, characterized in that: The calculation formula for the hidden layer includes: in represents the updated features of the node, H represents the initial features of the node, W represents the weight parameter of the node, represents the first adjacency matrix, A represents the adjacency matrix of the hidden layer input 3D point cloud data, the elements of the adjacency matrix represent the connection relationship between nodes, and the element value is represented by 0 or 1, 0 means there is no connection relationship between nodes, otherwise there is a connection relationship, I represents the unit matrix, the element value on the diagonal of the unit matrix is ​​assigned to 1, and the remaining element values ​​are assigned to 0, Represents the normalized degree matrix, the elements of the degree matrix represent the number of edge connections with the node, and ReLU represents the ReLU activation function.

8. The PCB board detection method based on image recognition technology according to claim 1 is characterized in that: The anomaly detection model is pre-trained before being trained. During the pre-training process, the initial features of the nodes of the three-dimensional point cloud data are input into the second classifier. The classification space of the second classifier represents whether there are welding defects on the PCB board, and the classification labels of the second classifier are manually annotated.

9. A PCB board detection system based on image recognition technology, characterized in that: A PCB board detection method based on image recognition technology as described in any one of claims 1 to 8 is adopted, comprising the following modules: A data acquisition module, which is used to collect three-dimensional point cloud data of the PCB board using a three-dimensional scanning device; A data preprocessing module, which is used to preprocess the three-dimensional point cloud data to obtain a first feature sequence; A graph network construction module, which is used to construct three-dimensional point cloud graph data according to the first feature sequence; An anomaly detection model is used to construct an anomaly detection model according to the three-dimensional point cloud data to output an anomaly probability value of each node of the three-dimensional point cloud data; A response measure generation module is used to generate a response measure according to the abnormal probability value of each node of the three-dimensional point cloud data.

10. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the PCB board detection method based on image recognition technology described in any one of claims 1 to 8 is implemented.

Citation Information

Cited By

  • Steel plate groove detection and analysis system and method based on three-dimensional point cloud

    CN120524395A