A detection device and method for detecting surface defects of a PCB pad

CN122887913APending Publication Date: 2026-10-09SICHUAN MEIJIESEN CIRCUIT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611375007.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-07
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

结合成像质量统计分布触发光场时空耦合调控机制,生成控制指令信号以获取二次成像原始图像序列,经多级自适应联合重构生成焊盘微观形貌三维量化分布

Benefits of technology

[0072](1)本发明通过融合光-形特征构建多维特征融合序列集合,利用自适应曝光与偏振解析协同抑制异质反射,能够精准解耦复杂材质表面的镜面反射与漫反射分量,有效解决传统单一成像技术在高反光焊盘表面因信号失真导致的特征提取不全问题,显著提升原始图像信噪比与缺陷特征的鲁棒性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122887913A_ABST
    Figure CN122887913A_ABST
Patent Text Reader

Abstract

The application discloses a kind of detection device and detection method for detecting PCB pad surface defects, and relates to the technical field of automated optical inspection, comprising the following steps: image sequence is collected and fusion features are extracted, confidence weight is generated by uncertainty measurement and causal attribution, bias distance fitting light field environment compensation parameters are based on, dynamic response error is analyzed and output set of space-time calibration parameters, combined with mechanical wavefront phase interference to perform synchronous locking, calculate the three-dimensional quantitative distribution of microtopography, and generate the final detection report.The application overcomes the limitations of traditional methods, such as difficulty in suppressing heterogeneous reflection, rigid detection mode, and lack of adaptive quantitative feedback, providing an efficient solution for PCB pad intelligent detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automated optical inspection technology, and in particular to an inspection device and method for detecting defects on the surface of PCB pads. Background Technology

[0002] In the field of PCB pad surface defect detection, with the rapid development of high-density interconnect technology, classical optical inspection systems face severe signal-to-noise ratio challenges in accurately imaging complex pad surfaces and identifying minute defects. Existing automated optical inspection (AOI) algorithms, while utilizing structured light technology to improve 3D topography acquisition, primarily rely on grayscale gradient threshold matching or traditional convolutional neural network feature extraction for defect determination. This method, based solely on geometric appearance features, ignores the complex heterogeneous reflective characteristics of the pad surface caused by oxidation, roughness variations, and ink residue (such as the dynamic coupling of specular and diffuse reflection). This leads to nonlinear distortion of the optical signal during feature extraction, limiting the detection rate of minute defects such as scratches and exposed copper under high reflectivity or low contrast conditions. Furthermore, classical detection methods often struggle to establish imaging quality feedback mechanisms to dynamically optimize illumination parameters, resulting in numerous false alarms or missed detections when processing areas with high uncertainty, increasing the manpower and time costs of re-evaluation.

[0003] Therefore, how to provide a detection device and method for detecting defects on the surface of PCB pads is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0004] This invention discloses a method for detecting surface defects on PCB pads. It constructs a multi-dimensional feature fusion sequence based on adaptive exposure and polarization analysis, decouples reflection components, and utilizes depth-layered inversion of material distribution. A collaborative analytical feature tensor is generated by combining manifold mapping and curvature modulation. A dynamic topological evolution space is constructed, and causal attribution measurement is performed using the steady-state convergence distribution of features to output an uncertainty score. A spatiotemporal coupling control mechanism for the light field is triggered by the statistical distribution of imaging quality to generate control command signals to obtain the original image sequence for secondary imaging. This sequence is then reconstructed through multi-level adaptive joint reconstruction to generate a three-dimensional quantitative distribution of the pad's micro-morphology. The uncertainty score is analyzed; if it exceeds a dynamic confidence threshold, a composite geometric constraint weight map is constructed to drive weighted spatial mapping and analysis, generating a final detection report. This process, by establishing a closed-loop feedback path from "causal attribution measurement" to "spatiotemporal control of the light field," effectively suppresses heterogeneous reflection interference and eliminates imaging quality deviations, ensuring that the generated detection results accurately reflect the true microscopic state of the pads. This achieves the technical effect of improving the anti-interference capability and reliability of defect detection under complex working conditions. This invention overcomes the limitations of traditional methods, such as difficulty in suppressing heterogeneous reflection, rigid detection modes, and lack of adaptive quantization feedback, and provides an efficient solution for intelligent detection of PCB pads.

[0005] A detection method for detecting surface defects of PCB pads according to an embodiment of the present invention includes the following steps:

[0006] Optical reflection signals from PCB pad areas are acquired, and heterogeneous reflections are suppressed based on adaptive exposure and polarization analysis. A multi-dimensional feature fusion sequence set is constructed by fusing light and shape features.

[0007] Based on the decoupling of reflection components from a multidimensional feature sequence set, material distribution is inverted using deep hierarchical inversion, and a collaborative analytical feature tensor is generated by combining manifold mapping and curvature modulation.

[0008] Perform bi-branch feature extraction and joint consistency optimization on the collaborative parsing feature tensor to generate a fused feature map;

[0009] A dynamic topological evolution space is constructed based on the fused feature map, and a causal attribution metric is performed using the steady-state convergence distribution of the features to output an uncertainty score.

[0010] The statistical distribution of imaging quality is constructed and the deviation analysis is performed by combining the uncertainty score. The spatiotemporal coupling control mechanism of the light field is triggered to perform multidimensional dynamic control of the light field parameters and generate control command signals.

[0011] The original image sequence of secondary imaging is obtained based on the control command signal, and the three-dimensional quantitative distribution of the micromorphology of the pad is generated by multi-level adaptive joint reconstruction.

[0012] The uncertainty score is analyzed. If the uncertainty score is higher than the dynamic confidence threshold, a composite geometric constraint weight graph is constructed to drive the weighted spatial mapping and analysis of the defect prediction mask and the three-dimensional quantitative distribution of the pad micromorphology, and the final inspection report is generated.

[0013] Optionally, the suppression of heterogeneous reflection includes:

[0014] Based on the timing control protocol, the light source projection unit is driven to emit coded light within the time window, and the optical reflection signal of the PCB pad area is collected. The incident irradiance distribution of the optical reflection signal is calculated, and the statistical distribution quantile of the incident irradiance distribution is calculated.

[0015] An exposure time-domain truncation weight matrix is ​​generated based on statistical distribution quantiles. The exposure time-domain truncation weight matrix is ​​used to perform pixel-level adaptive exposure adjustment on the optical reflection signal, and output a single-frame grayscale response image with optimized dynamic range.

[0016] Based on a single-frame grayscale response image, the local neighborhood grayscale co-occurrence matrix of the pixel is calculated. Based on the local neighborhood grayscale co-occurrence matrix, the texture structure statistical features are extracted. The ratio of the texture structure statistical features to the global average texture is calculated. Based on the ratio, spatial texture response mapping coefficients are generated. The single-frame grayscale response image and the spatial texture response mapping coefficients are multiplied element-wise to output the specular suppression response frame.

[0017] Based on the high-light suppression response frame, the polarization intensity response components under the multi-dimensional polarization angle domain are mapped, the polarization intensity response difference vector corresponding to the orthogonal polarization state is calculated, the polarization degree parameter distribution is calculated based on the polarization intensity response difference vector, the heterogeneous reflection suppression matrix is ​​constructed using the polarization degree parameter distribution, and a pixel-wise weighted division operation is performed on the high-light suppression response frame and the heterogeneous reflection suppression matrix to output the polarization analytical feature map.

[0018] Based on the phase shift distribution in the polarization analytical feature map, the surface normal vector in the three-dimensional spatial coordinate system is calculated, and the spectral reflectance vector of the corresponding pixel position in different bands is calculated. The spectral reflectance vector and the surface normal vector are subjected to tensor cross product operation to generate the light-shape feature fusion tensor. The temporal dimension is concatenated on the light-shape feature fusion tensor to generate a multi-dimensional feature fusion sequence set.

[0019] Optionally, the inverted material distribution specifically includes:

[0020] Based on a multidimensional feature sequence set, the reflectance difference distribution and phase shift distribution corresponding to the encoded light illumination mode in the multidimensional feature sequence set are calculated, and a reflectance dynamic change rate matrix is ​​generated based on the reflectance difference distribution and phase shift distribution.

[0021] An adaptive separating hyperplane is constructed using the reflection dynamic change rate matrix. Based on the adaptive separating hyperplane, the reflection component decoupling calculation is performed to separate the diffuse reflection component and specular reflection component of the pad surface, and output a multi-channel reflection component dataset and the reflection dynamic change rate matrix.

[0022] Based on the multi-channel reflectance component dataset and the reflectance dynamic change rate matrix, spectral feature vectors are extracted from the multi-channel reflectance component dataset using the reflectance dynamic change rate matrix, and a deep hierarchical feature evolution matrix is ​​constructed.

[0023] Calculate the spectral response attenuation coefficients corresponding to different depth levels according to the layer depth order of the PCB pad surface coating structure, perform numerical constraint correction on the spectral feature vector by slicing back projection operation based on the spectral response attenuation coefficients, invert the depth layer distribution structure of surface material reflection and deep body material reflection, and output the depth layer analytical material distribution map.

[0024] Based on the multi-channel reflection component dataset and the deep hierarchical material distribution map, the joint local neighborhood mutual information density distribution of the multi-channel reflection component dataset and the deep hierarchical material distribution map is calculated.

[0025] A pixel-level manifold spatial mapping relationship is established based on the joint local neighborhood mutual information density distribution. Geometric distortion correction and sub-pixel alignment mapping are performed using the pixel-level manifold spatial mapping relationship, and the aligned and fused multi-channel reflection feature map is output.

[0026] Based on the aligned and fused multi-channel reflection feature map, the phase distribution parameters in the aligned and fused multi-channel reflection feature map are extracted to calculate the three-dimensional topography depth map, and the depth layer fusion spectral response distribution in the aligned and fused multi-channel reflection feature map is extracted as the initial material property vector.

[0027] The modulation factor of the spatial surface curvature distribution corresponding to the 3D topography depth map on the initial material attribute vector is calculated. Based on the modulation factor, the initial material attribute vector is subjected to collaborative weighting calculation to generate the target material attribute vector. The 3D topography depth map and the target material attribute vector are concatenated by tensor dimension to output a collaborative analytical feature tensor.

[0028] Optionally, the dual-branch feature extraction specifically includes:

[0029] Based on the collaborative analytical feature tensor, the gradient direction discreteness of the pixel neighborhood is calculated, and the structural sensitivity distribution matrix is ​​constructed using the gradient direction discreteness.

[0030] Based on the structural sensitivity distribution matrix, texture fidelity enhancement weights are generated. Based on the texture fidelity enhancement weights, local contrast adaptive modulation is performed on the collaborative analytic feature tensor to output the initial geometric features.

[0031] Based on the initial geometric features, the spatial adjacency affinity between feature pixels is calculated, and the spatial adjacency affinity is used to construct the region growth aggregation probability;

[0032] An edge closure constraint mask is generated based on the region growth aggregation probability. Based on the edge closure constraint mask, discontinuous edge connection and isolated noise filtering are performed on the initial geometric features to output geometric shape features.

[0033] Based on the geometric features, the rate of change of spatial structure and the channel spectral response value are extracted, and the covariance statistic of the rate of change of spatial structure with respect to the channel spectral response value is calculated.

[0034] A geometric interference suppression factor is generated using the covariance statistic. Based on the geometric interference suppression factor, channel-dimensional decoupling correction is performed on the geometric morphology features, and the material spectral features are output.

[0035] Based on the geometric features and the material spectral features, a global joint probability distribution of the feature space is constructed. The peak region of the global joint probability distribution is approximated by multiple iterative random sampling. Based on the peak region, a consistency metric of the feature distribution is calculated.

[0036] Noise suppression weights are generated using the consistency metric, and signal-to-noise ratio optimization is performed on the geometric features and the material spectral features based on the noise suppression weights to output a steady-state feature map.

[0037] Based on the steady-state feature map, the geometric attribute components and spectral attribute components of the steady-state feature map are extracted respectively. The gradient energy of the geometric attribute components and the information entropy density of the spectral attribute components are calculated. The feature confidence ratio is generated using the gradient energy and the information entropy density.

[0038] Pixel-level dynamic allocation coefficients are constructed based on the feature confidence ratios, and weighted aggregation is performed on the steady-state feature map based on the pixel-level dynamic allocation coefficients to output a fused feature map.

[0039] Optionally, the causal attribution metric specifically includes:

[0040] Based on the fused feature map, pixel-level classification probability vectors and spatial geometric gradient features are extracted. An adaptive classification boundary constraint matrix is ​​generated using the spatial geometric gradient features. Based on the adaptive classification boundary constraint matrix, dynamic threshold truncation is performed on the pixel-level classification probability vectors, and a defect prediction mask is output.

[0041] Based on the fused feature map and the defect prediction mask, a random differential mapping space from feature response to prediction probability is constructed; random deactivation iterative sampling of neuron weights is performed in the random differential mapping space, the sensitivity distribution matrix of prediction variance relative to feature activation value is calculated, and the prediction confidence distribution is output based on the sensitivity distribution matrix.

[0042] Based on the fused feature map and the predicted confidence distribution, the feature nodes in the fused feature map are mapped to the dynamic probability topology space;

[0043] The predicted confidence distribution is used to control the state update and neighborhood interaction iteration of the feature nodes. The density distribution of the dynamic probability topology space in steady state is calculated. Based on the drift rate of the density distribution in steady state relative to the initial activation distribution of the fused feature map, a feature stability contribution map is output.

[0044] Based on the feature stability contribution map, causal weight redistribution is performed on the feature values ​​in the feature stability contribution map, the marginal contribution expectation integral is calculated, a feature causal weight matrix is ​​generated, and a causal attribution feature map is output. Based on the causal attribution feature map, cognitive uncertainty values ​​and data uncertainty values ​​are calculated respectively. An uncertainty measure vector is constructed using the cognitive uncertainty values ​​and the data uncertainty values. Based on the uncertainty measure vector, a nonlinear normalization mapping is performed, and an uncertainty score is output.

[0045] Optionally, the spatiotemporal coupling control mechanism of the optical field specifically includes:

[0046] Acquire historical image data sequences, perform statistical analysis on the historical image data sequences to generate an imaging quality statistical distribution, acquire the current real-time acquired image, and calculate the uncertainty score of the current real-time acquired image;

[0047] Based on the uncertainty score and the imaging quality statistical distribution, the deviation distance of the uncertainty score relative to the imaging quality statistical distribution is calculated. The deviation distance is used to perform joint compensation fitting mapping on photon radiation flux and spatial angle. Based on the joint compensation fitting mapping result, the light field environment compensation parameters are calculated, and the light field adjustment vector is output.

[0048] Based on the light field adjustment vector, the modal components of the light field adjustment vector are analyzed, and a coupled constraint feasible region of radiant flux mode and spatial angle mode is constructed. Multi-objective parameter optimization is performed within the coupled constraint feasible region, and the adjustment intensity and illumination angle offset corresponding to each degree of freedom are calculated to generate a set of device control parameters.

[0049] Based on the set of equipment control parameters, the set of equipment control parameters is discrete-time differential to calculate the time-domain variation gradient. The time-domain variation gradient is combined with the physical motion characteristics of the actuator to calculate the dynamic response error. Based on the dynamic response error, the set of equipment control parameters is subjected to time-domain smoothing correction and amplitude limiting truncation processing to output the spatiotemporal calibration parameter set.

[0050] Based on the spatiotemporal calibration parameter set, the illumination modulation signal and mechanical drive signal are generated by parsing, the mechanical motion frequency characteristics of the actuator are mapped to the spatial modulation domain constraint of light wave propagation, and the phase interference distribution between the light wave wavefront and the mechanical vibration wavefront is calculated.

[0051] Based on the phase interference distribution, phase locking and time-domain synchronization are performed on the illumination modulation signal and the mechanical drive signal. The locked and synchronized illumination modulation signal and mechanical drive signal are encapsulated into a device drive protocol signal, and a control command signal is output.

[0052] Optionally, the multi-level adaptive joint reconstruction specifically includes:

[0053] Based on the control command signal, the target projection parameters are analyzed to obtain the original image sequence of the secondary imaging. The local texture sharpness response map of the original image sequence of the secondary imaging is calculated. The pixel-level dynamic radiometric modulation coefficient is calculated in combination with the target projection parameters. Based on the pixel-level dynamic radiometric modulation coefficient, multi-scale radiometric dynamic compensation fusion is performed on the original image sequence of the secondary imaging to output the secondary fusion reference frame.

[0054] Based on the aforementioned secondary fusion reference frame, the gradient direction consistency constraint of the coded structured light stripe pixel domain is calculated, and the gradient field topological connectivity constraint is calculated.

[0055] Based on the gradient field topological connectivity constraints, perform manifold mapping from pixel gradient to phase topology, perform Gaussian centroid integral localization on the phase topological manifold, and output a set of quadratic encoded feature maps;

[0056] Based on the secondary encoding feature mapping set, a forward spatial mapping calculation is performed on the feature points to obtain the model projection coordinates, the Euclidean space residual vector between the feature points and the model projection coordinates is calculated, and the asymmetric skewness distribution of the Euclidean space residual vector is calculated.

[0057] Based on the asymmetric skewness distribution, the error suppression weights are iteratively updated, and the weighted least squares iteration convergence is performed on the feature coordinates using the error suppression weights to output the three-dimensional quantitative distribution of the pad micromorphology.

[0058] Optionally, constructing the composite geometric constraint weight graph specifically includes:

[0059] Based on the probability density distribution of the uncertainty score, the kurtosis and skewness statistical characteristics of the uncertainty score are calculated. Based on the kurtosis and skewness statistical characteristics, a higher-order moment nonlinear transformation is performed to generate dynamic offset coefficients. The dynamic offset coefficients are used to adaptively correct the uncertainty score and output a dynamic confidence threshold.

[0060] Based on the dynamic confidence threshold and the uncertainty score, a decision logic operation is performed. If the uncertainty score is higher than the dynamic confidence threshold, the defect prediction mask and the three-dimensional quantization distribution of the pad micromorphology are obtained, and the surface gradient tensor field of the three-dimensional quantization distribution of the pad micromorphology is calculated.

[0061] Spatial distribution statistics are performed on the uncertainty score to generate uncertainty spatial distribution fluctuation characteristics. A composite geometric constraint weight map is constructed using the surface gradient tensor field and the uncertainty spatial distribution fluctuation characteristics, and the composite geometric constraint weight map is output.

[0062] Based on the composite geometric constraint weight graph, a weighted spatial mapping is performed on the defect prediction mask to generate a weighted defect response graph. The morphological topological encoding and spatial geometric moment parameters of each connected component in the weighted defect response graph are calculated. Based on the morphological topological encoding and spatial geometric moment parameters, the defect type, coordinates, and confidence level are generated, and the final detection report is output.

[0063] A detection device for detecting surface defects of PCB pads according to an embodiment of the present invention includes the following modules:

[0064] The multi-dimensional feature construction module is used to collect optical reflection signals from the PCB pad area, suppress heterogeneous reflection based on adaptive exposure and polarization analysis, and construct a multi-dimensional feature fusion sequence set by fusing light and shape features.

[0065] The feature tensor generation module is used to decouple reflection components based on a multidimensional feature sequence set, utilize deep hierarchical inversion of material distribution, and combine manifold mapping and curvature modulation to generate a collaborative analytical feature tensor.

[0066] The feature fusion optimization module is used to perform bi-branch feature extraction and joint consistency optimization on the collaborative parsing feature tensor to generate a fused feature map.

[0067] The uncertainty measurement module is used to construct a dynamic topological evolution space based on the fused feature map, perform causal attribution measurement using the steady-state convergence distribution of features, and output uncertainty score.

[0068] The light field modulation module is used to construct the statistical distribution of imaging quality and perform deviation analysis by combining uncertainty scores, trigger the spatiotemporal coupling modulation mechanism of light field to perform multidimensional dynamic modulation of light field parameters, and generate control command signals.

[0069] The morphology reconstruction module is used to acquire the original image sequence of secondary imaging based on the control command signal, and generate a three-dimensional quantitative distribution of the micromorphology of the pad through multi-level adaptive joint reconstruction.

[0070] The report generation module is used to analyze the uncertainty score. If the uncertainty score is higher than the dynamic confidence threshold, a composite geometric constraint weight graph is constructed to drive the weighted spatial mapping and analysis of the defect prediction mask and the three-dimensional quantitative distribution of the pad micromorphology, and generate the final inspection report.

[0071] This invention provides a method for detecting surface defects on PCB pads, relating to industrial vision inspection and light field control technology, which has the following beneficial effects:

[0072] (1) This invention constructs a multi-dimensional feature fusion sequence set by fusing light-shape features, and uses adaptive exposure and polarization analysis to suppress heterogeneous reflection. It can accurately decouple the specular reflection and diffuse reflection components of complex material surfaces, effectively solve the problem of incomplete feature extraction caused by signal distortion on highly reflective pad surfaces in traditional single imaging technology, and significantly improve the signal-to-noise ratio of the original image and the robustness of defect features.

[0073] (2) By constructing a dynamic topological evolution space and using the feature steady-state convergence distribution to perform causal attribution measurement and output uncertainty score, this invention can deeply quantify the cognitive uncertainty and data uncertainty of the prediction results, effectively overcome the limitations of traditional deep learning black box models that lack confidence assessment and have poor interpretability of results, and greatly improve the confidence and reliability of detection results.

[0074] (3) By triggering the spatiotemporal coupling control mechanism of the light field, the present invention performs deviation analysis on the uncertainty score and the statistical distribution of imaging quality to generate control commands, which can adaptively adjust the phase locking and spatiotemporal synchronization of the illumination modulation signal and the mechanical drive signal, effectively eliminate the quality fluctuation caused by the solidification of static imaging parameters, and realize the optimal active optimization of imaging conditions for micro-defects.

[0075] (4) By using the weighted spatial mapping of the defect prediction mask driven by the composite geometric constraint weight map and the three-dimensional quantitative distribution of the pad micro-morphology, the present invention can combine the three-dimensional morphology true value and uncertainty distribution to analyze the defect attributes, solve the problem of low recognition rate and high false alarm rate of traditional two-dimensional detection methods for small depressions or protrusions, and realize high-precision quantitative evaluation of pad micro-morphology. Attached Figure Description

[0076] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0077] Figure 1 This is an overall flowchart of a detection method for detecting surface defects of PCB pads proposed in this invention;

[0078] Figure 2 This is a flowchart illustrating the working principle of the light field spatiotemporal coupling control mechanism of the detection method for detecting defects on the surface of PCB pads proposed in this invention.

[0079] Figure 3 This is a schematic diagram of the structure of a detection device for detecting surface defects of PCB pads proposed in this invention. Detailed Implementation

[0080] The invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0081] refer to Figure 1 and Figure 2 A method for detecting defects on the surface of PCB pads, comprising the following steps:

[0082] Optical reflection signals from PCB pad areas are acquired, and heterogeneous reflections are suppressed based on adaptive exposure and polarization analysis. A multi-dimensional feature fusion sequence set is constructed by fusing light and shape features.

[0083] Based on the decoupling of reflection components from a multidimensional feature sequence set, material distribution is inverted using deep hierarchical inversion, and a collaborative analytical feature tensor is generated by combining manifold mapping and curvature modulation.

[0084] Perform bi-branch feature extraction and joint consistency optimization on the collaborative parsing feature tensor to generate a fused feature map;

[0085] A dynamic topological evolution space is constructed based on the fused feature map, and a causal attribution metric is performed using the steady-state convergence distribution of the features to output an uncertainty score.

[0086] The image quality statistical distribution is constructed and the deviation analysis is performed by combining the uncertainty score. The spatiotemporal coupling control mechanism of the light field is triggered to perform multidimensional dynamic control of the light field parameters and generate control command signals.

[0087] The original image sequence of secondary imaging is obtained based on the control command signal, and the three-dimensional quantitative distribution of the micromorphology of the pad is generated by multi-level adaptive joint reconstruction.

[0088] The uncertainty score is analyzed. If the uncertainty score is higher than the dynamic confidence threshold, a composite geometric constraint weight graph is constructed to drive the weighted spatial mapping and analysis of the defect prediction mask and the three-dimensional quantitative distribution of the pad micromorphology, and the final inspection report is generated.

[0089] In this embodiment, suppressing heterogeneous reflection includes:

[0090] Read the time window parameters in the timing control protocol, set the time window width to 50 milliseconds, drive the light source projection unit to emit coded light within the time window, collect the optical reflection signal of the PCB pad area, extract the gray value of each pixel in the optical reflection signal as the incident irradiance value, count the incident irradiance values ​​of all pixels, calculate the statistical distribution quantile, set the quantile to 85%, and take the value of the incident irradiance value that is equal to the 85th quantile as the statistical distribution quantile.

[0091] Construct an exposure time-domain truncation weight matrix with the same number of columns as the number of pixels in the optical reflection signal. Set the weight matrix elements corresponding to pixels with incident irradiance values ​​greater than the 85th percentile of the statistical distribution to a value of 0.2, and set the weight matrix elements corresponding to pixels with incident irradiance values ​​less than or equal to the 85th percentile of the statistical distribution to a value of 1.0. Multiply the gray value of each pixel in the optical reflection signal by the weight element at the corresponding position in the exposure time-domain truncation weight matrix to obtain a single-frame grayscale response image with optimized dynamic range.

[0092] Extract the local neighborhood gray-level co-occurrence matrix of each pixel in a 3x3 window in a single-frame gray-level response image. Calculate the mean of the gray-level co-occurrence matrix as the texture structure statistical feature. Calculate the global average texture value of the entire single-frame gray-level response image. Divide the texture structure statistical feature by the global average texture value to obtain the ratio. Define this ratio as the spatial texture response mapping coefficient. Multiply the gray value of each pixel in the single-frame gray-level response image by the spatial texture response mapping coefficient at the corresponding position to output the specular suppression response frame.

[0093] The specular suppression response frame is mapped to four polarization angle domains: 0°, 45°, 90°, and 135°. The pixel grayscale value at each polarization angle is extracted as a polarization intensity response component. The difference between the 0° and 90° polarization intensity response components is calculated as the first difference vector, and the difference between the 45° and 135° polarization intensity response components is calculated as the second difference vector. The absolute values ​​of the first and second difference vectors are added together to obtain the polarization intensity response difference vector. The polarization degree parameter distribution is calculated by dividing the polarization intensity response difference vector by the total pixel grayscale value of the specular suppression response frame. An initial matrix with element values ​​of 1.0 is constructed. Each element in the initial matrix is ​​multiplied by the corresponding polarization degree parameter distribution to obtain the heterogeneous reflection suppression matrix. The grayscale value of each pixel in the specular suppression response frame is divided by the corresponding matrix element in the heterogeneous reflection suppression matrix to output the polarization analytical feature map.

[0094] The phase offset distribution value of each pixel in the polarization analysis feature map is read, and the arctangent value of the phase offset distribution value is calculated using the arctangent function. The surface normal vector in the three-dimensional spatial coordinate system is obtained. The spectral reflectance values ​​of the corresponding pixel position in the red, green and blue light bands are obtained to form the spectral reflectance vector. The tensor cross product of the surface normal vector and the spectral reflectance vector is calculated. The surface normal vector is used as the column vector and the spectral reflectance vector is used as the row vector to construct the light-shape feature fusion tensor. The light-shape feature fusion tensors generated in five consecutive time windows are concatenated in the temporal dimension to generate a multi-dimensional feature fusion sequence set.

[0095] In this embodiment, the inverted material distribution specifically includes:

[0096] Read the pixel grayscale value corresponding to the coded light illumination mode of each frame in the multidimensional feature sequence set, calculate the absolute value of the difference between the pixel grayscale values ​​of two adjacent frames and divide it by the time interval of 5 milliseconds to obtain the reflectivity difference distribution. At the same time, extract the phase information of each frame as the phase offset distribution, multiply the reflectivity difference distribution by the phase offset distribution to generate the reflectivity dynamic change rate matrix.

[0097] An adaptive separating hyperplane with the same number of rows as the reflection dynamic rate of change matrix is ​​constructed. The classification truncation threshold is set to 0.6. Each element value in the reflection dynamic rate of change matrix is ​​traversed. Regions with element values ​​greater than 0.6 are identified as specular reflection regions, and regions with element values ​​less than or equal to 0.6 are identified as diffuse reflection regions. Pixel data from specular reflection regions are extracted as specular reflection components, and pixel data from diffuse reflection regions are extracted as diffuse reflection components. The specular reflection components and diffuse reflection components are merged to output a multi-channel reflection component dataset, while retaining the reflection dynamic rate of change matrix.

[0098] Read the maximum value in the reflection dynamic change rate matrix, divide the value of each pixel in the multi-channel reflection component dataset by the maximum value and normalize it, extract the normalized value as the spectral feature vector, arrange the spectral feature vectors of three consecutive depths in columns, and construct the deep layered feature evolution matrix.

[0099] Following the layer depth order of the PCB pad surface coating structure, the surface layer depth is set to 0 micrometers and the body layer depth to 20 micrometers. The spectral response attenuation coefficient at a depth of 0 micrometers is calculated to be 0.9, and the spectral response attenuation coefficient at a depth of 20 micrometers is calculated to be 0.4. The spectral response attenuation coefficient at the intermediate depth is calculated using a linear interpolation function. The values ​​in the depth layer feature evolution matrix are multiplied by the spectral response attenuation coefficient at the corresponding depth. Numerical constraint corrections are performed for the slice back projection operation to invert the depth layer distribution structure of surface material reflection and deep body material reflection, and output a depth layer analytical material distribution map.

[0100] Calculate the joint probability density of the multi-channel reflection component dataset and the deep hierarchical material distribution map in a 3x3 neighborhood. Multiply the joint probability density by the logarithmic function value with base 2 and sum them to obtain the joint local neighborhood mutual information density distribution. Based on the joint local neighborhood mutual information density distribution, establish a pixel-level manifold space mapping relationship. Use a polynomial fitting function to perform geometric distortion correction and sub-pixel-level alignment mapping on the multi-channel reflection component dataset, and output the aligned and fused multi-channel reflection feature map.

[0101] Phase distribution parameters are extracted from the aligned and fused multi-channel reflection feature map. The phase wrapping solution function is used to calculate the 3D topographic depth map. At the same time, the depth layer fused spectral response distribution in the aligned and fused multi-channel reflection feature map is extracted as the initial material property vector.

[0102] The gradient value of each pixel in the 3D topographic depth map is read, and the sum of squares of the gradient values ​​is calculated using the Sobel activation function and the square root is taken to obtain the spatial surface curvature distribution. The baseline coefficient of the initial material attribute vector is set to 1.0, and the spatial surface curvature distribution is normalized to between 0 and 1. The normalized curvature value is added to the baseline coefficient as a modulation factor, and the initial material attribute vector is multiplied by the modulation factor to generate the target material attribute vector. The 3D topographic depth map and the target material attribute vector are concatenated in the channel dimension to output a co-analytical feature tensor.

[0103] In this embodiment, the dual-branch feature extraction specifically includes:

[0104] Read the gradient values ​​of each pixel in the horizontal and vertical directions in the collaborative parsing feature tensor, calculate the gradient direction angle corresponding to the gradient value using the arctangent function, and calculate the standard deviation of the gradient direction angle in the 3x3 pixel neighborhood as the gradient direction dispersion. Divide the gradient direction dispersion by the maximum value for normalization and construct the structure sensitivity distribution matrix.

[0105] The baseline value of the texture fidelity enhancement weight is set to 1.0. The values ​​in the structure sensitivity distribution matrix are multiplied by 0.5 and then added to the baseline value to generate the texture fidelity enhancement weight. The value of each pixel in the co-analytical feature tensor is multiplied by the texture fidelity enhancement weight at the corresponding position, local contrast adaptive modulation is performed, and the initial geometric features are output.

[0106] The Euclidean distance between adjacent feature pixels in the initial geometric features is calculated as the spatial adjacency affinity. The spatial adjacency affinity is normalized using the Sigmoid activation function, and the processed value is set as the region growth aggregation probability.

[0107] The edge closure probability threshold is set to 0.7. Pixel regions with a region growth aggregation probability greater than 0.7 are retained. An edge closure constraint mask is constructed. The edge closure constraint mask is used to perform discontinuous edge connection and isolated noise filtering on the initial geometric features, and the geometric shape features are output.

[0108] The absolute value of the difference between adjacent pixels in the geometric shape features is extracted as the spatial structure change rate. The average pixel value in the multi-channel feature map is extracted as the channel spectral response value. The covariance between the spatial structure change rate and the channel spectral response value is calculated. The covariance is smoothed using a Gaussian kernel function to generate a geometric interference suppression factor. The geometric shape features are divided by the geometric interference suppression factor to output the material spectral features.

[0109] A global joint probability distribution is constructed based on geometric morphology features and material spectral features. The number of Monte Carlo samplings is set to 1000. The peak region of the global joint probability distribution is approximated by random sampling through 1000 iterations. The average distance from the sampling point to the peak region is calculated as a consistency metric.

[0110] The baseline noise weight is set to 0.2. The noise suppression weight is generated by multiplying the consistency metric by a constant of 0.8 and then adding the baseline noise weight. The geometric features and material spectral features are multiplied by the noise suppression weight, the signal-to-noise ratio is optimized, and the steady-state feature map is output.

[0111] The geometric and spectral attribute components of the steady-state feature map are extracted separately. The gradient energy of the geometric attribute component is calculated using the Sobel operator, and the information entropy density of the spectral attribute component is calculated. The feature confidence ratio is obtained by dividing the gradient energy by the information entropy density.

[0112] The feature confidence ratio is input into the Softmax activation function to calculate the pixel-level dynamic allocation coefficients. The steady-state feature map is then weighted and aggregated using the pixel-level dynamic allocation coefficients to output the fused feature map.

[0113] In the specific implementation process, this implementation method inherits the basic mode of extracting texture and geometric features based on convolutional neural networks in traditional visual inspection, but has been deeply modified to address the problems of feature confusion and low signal-to-noise ratio caused by the coexistence of heterogeneous reflection and micro-defects on complex pad surfaces.

[0114] Traditional techniques typically employ single-branch networks for feature extraction or simple channel splicing, which makes it difficult to effectively separate the coupling interference between abrupt changes in geometric shape and variations in spectral material. Furthermore, they lack dynamic evaluation of feature response consistency, leading to the submergence or misjudgment of minute defect features in highlight or textured backgrounds.

[0115] This implementation creatively constructs a feature decoupling and fusion system from "structural sensitivity adaptive modulation" to "dual-branch feature confidence weighted aggregation". It uses gradient direction discreteness to generate texture fidelity enhancement weights to sharpen initial geometric features, and uses edge closure constraint masks to achieve topological connection of discontinuous edges. At the same time, it calculates the covariance statistics of the spatial structure change rate to the channel spectral response, generates a geometric interference suppression factor to decouple material spectral features, and finally calculates the consistency metric index based on the global joint probability distribution to approximate the peak region. It also uses gradient energy and information entropy density to construct the feature confidence ratio for pixel-level dynamic weighted aggregation.

[0116] This modified system completely solves the problems of blurred feature representation and poor noise resistance caused by the strong coupling of geometric structure information and material spectral information in traditional methods. It achieves accurate decoupling and steady-state optimization of geometric shape features and material spectral features, effectively eliminates background noise and geometric interference, and significantly improves the edge integrity and semantic discriminative power of the fused feature map under complex lighting conditions. It provides a highly robust feature foundation for subsequent accurate defect prediction mask generation and uncertainty measurement.

[0117] In this embodiment, the causal attribution metric specifically includes:

[0118] The probability value of each pixel belonging to the defect category in the fused feature map is read as a pixel-level classification probability vector. The gradient magnitude of the fused feature map is calculated using the Sobel operator as a spatial geometric gradient feature. The spatial geometric gradient feature is multiplied by 0.5 as an adaptive threshold to construct an adaptive classification boundary constraint matrix. Elements in the pixel-level classification probability vector with values ​​less than the adaptive threshold are set to 0, and elements with values ​​greater than or equal to the adaptive threshold are set to 1. Dynamic threshold truncation is performed, and the defect prediction mask is output.

[0119] Construct a random differential mapping space from feature response to predicted probability, setting the space dimension to 64. Read the pixel values ​​of the fused feature map as the initial state, and use the Euler-Markov function to iteratively update it with a step size of 0.1 to map the fused feature map to the random differential mapping space.

[0120] Random deactivation iterative sampling of neuron weights is performed within the random differential mapping space. The deactivation probability is set to 0.3 and the number of iterations is 100. The rate of change of the prediction variance relative to the feature activation value after each sampling is calculated. The rate of change is normalized using the Softmax activation function to generate the prediction confidence distribution.

[0121] Read the coordinates of the feature nodes in the fused feature map, use the prediction confidence distribution as the weight coefficient, map the feature nodes to the dynamic probability topology space, and establish the correspondence between the feature nodes and the topology space coordinates.

[0122] The prediction confidence distribution is used to control the state update and neighborhood interaction iteration of feature nodes. The iteration convergence threshold is set to 0.001. The density distribution of the dynamic probability topology space in steady state is calculated. The initial activation distribution of the fused feature map is read. The drift rate of the density distribution in steady state relative to the initial activation distribution is calculated. The feature stability contribution map is output.

[0123] Read the value of each feature node in the feature stability contribution map, perform causal weight redistribution, set the marginal contribution window width to 5 pixels, calculate the expected integral of the marginal contribution, construct a square matrix whose element value is the expected integral of the marginal contribution as the feature causal weight matrix, and output the causal attribution feature map.

[0124] Based on the causal attribution feature map, the values ​​of the diagonal elements are read as the cognitive uncertainty value, and the average value of the off-diagonal elements is read as the data uncertainty value. The cognitive uncertainty value and the data uncertainty value are concatenated to construct an uncertainty measure vector. The sigmoid activation function is used to perform nonlinear normalization mapping on the uncertainty measure vector to output the uncertainty score.

[0125] In its implementation, this method inherits the basic logic of feature classification based on activation response in traditional deep learning, but it has been deeply modified to address the challenges of model prediction distortion and cognitive attribution caused by heterogeneous reflection and material differences in complex industrial scenarios.

[0126] In this embodiment, the optical field spatiotemporal coupling control mechanism specifically includes:

[0127] Acquire historical image data sequences, calculate the mean and variance of image brightness in the historical image data sequences as the statistical distribution of imaging quality, acquire the currently acquired real-time image and read its corresponding uncertainty score value, calculate the absolute value of the difference between the uncertainty score value and the mean in the statistical distribution of imaging quality, and define the absolute value of the difference as the deviation distance.

[0128] A polynomial fitting function is constructed, and the fitting power of the deviation distance is set to 2. The deviation distance is calculated using the polynomial fitting function, and the deviation distance is mapped to the photon radiation flux compensation value and the spatial angle compensation value to obtain the optical field environment compensation parameters. The photon radiation flux compensation value and the spatial angle compensation value are vector concatenated to output the optical field adjustment vector.

[0129] Principal component analysis (PCA) is used to extract the modal components of the light field adjustment vector, which is then decomposed into a radiant flux mode and a spatial angle mode. The adjustment upper limit for the radiant flux mode is set to 200 lumens, and the adjustment upper limit for the spatial angle mode is set to 30 degrees. A coupled constraint feasible region containing these upper limits is constructed. Within the coupled constraint feasible region, a particle swarm optimization (PSO) algorithm is used to perform multi-objective parameter optimization, calculate the adjustment intensity and illumination angle offset corresponding to each degree of freedom, and generate a set of device control parameters.

[0130] Based on the equipment control parameter set, the time interval of discrete time difference is set to 10 milliseconds. The difference between the parameter value at the current moment and the parameter value at the moment 10 milliseconds ago is calculated as the time domain change gradient. The damping coefficient of the actuator is set to 0.85. The dynamic response error is calculated by multiplying the time domain change gradient by the reciprocal of the damping coefficient. Based on the dynamic response error, the equipment control parameter set is subjected to time domain smoothing correction and amplitude limiting truncation processing, and the spatiotemporal calibration parameter set is output.

[0131] Based on the spatiotemporal calibration parameter set, a pulse width modulation signal is generated as an illumination modulation signal, and a sine wave signal is generated as a mechanical drive signal. The mechanical motion frequency is set to 50 Hz, and the frequency characteristics of the mechanical motion are mapped to the spatial modulation domain constraint of the light wave propagation. The difference between the phase of the light wave wavefront and the phase of the mechanical vibration wavefront is calculated to obtain the phase interference distribution.

[0132] The numerical value of the phase interference distribution is read, and the phase-locking and time-domain synchronization of the illumination modulation signal and the mechanical drive signal are performed using the proportional-integral control function. The locked and synchronized illumination modulation signal and mechanical drive signal are encapsulated into a device drive protocol signal according to the communication protocol frame format, and the control command signal is output.

[0133] In practice, this implementation method inherits the basic control logic of adjusting illumination parameters based on imaging feedback in traditional optical detection, but it has been deeply modified to address the problems of image quality fluctuation and dynamic response lag caused by the asynchronous movement of illumination and mechanical motion under complex working conditions.

[0134] Traditional techniques typically rely solely on static threshold compensation or open-loop adjustment based on image brightness histograms. This fails to map the uncertainties and deviations of deep features into the coupling constraints of light field and mechanical motion, resulting in photon radiation flux adjustment and spatial angle offset being independent of each other. Consequently, it is difficult to eliminate dynamic blurring and phase difference caused by mismatch in the inertia or frequency characteristics of the actuator.

[0135] This implementation method creatively constructs a closed-loop execution system from "uncertainty causal attribution" to "light field spatiotemporal coupling control". It calculates the light field environment compensation parameters based on the deviation distance between the uncertainty score and the statistical distribution of imaging quality, and performs multi-objective parameter optimization within the feasible domain of coupling constraints. Furthermore, it uses the temporal gradient and physical motion characteristics to calculate the dynamic response error, maps the mechanical vibration wavefront into the light wave spatial modulation domain constraint, and performs phase locking and temporal synchronization of the illumination modulation signal and the mechanical drive signal through phase interference distribution.

[0136] This modified system completely solves the problems of imaging timing misalignment and micro-morphology reconstruction distortion caused by the separation of light field control and mechanical response in traditional methods. It realizes the accurate mapping from abstract image quality feedback to concrete electromechanical coordination parameters, effectively eliminates motion ghosting and phase jitter in the dynamic imaging process, and significantly improves the spatiotemporal registration accuracy and signal-to-noise ratio of the secondary imaging sequence. It provides a stable and reliable physical input basis for subsequent high-precision three-dimensional quantitative distribution reconstruction of pad micro-morphology.

[0137] In this embodiment, multi-level adaptive joint reconstruction specifically includes:

[0138] The light intensity value and projection angle in the control command signal are read as target projection parameters. The camera is driven to acquire the original image sequence of secondary imaging. The second derivative of each pixel in the original image sequence of secondary imaging is calculated using the Laplacian operator convolution kernel. The absolute value of the second derivative is accumulated to obtain the local texture sharpness response map. The radiation modulation reference coefficient is set to 1.2. The values ​​in the local texture sharpness response map are normalized and multiplied by the reference coefficient 1.2. The values ​​are then combined with the light intensity value in the target projection parameters for weighted summation to calculate the pixel-level dynamic radiation modulation coefficient.

[0139] Based on pixel-level dynamic radiometric modulation coefficients, multiplication is performed on the pixel grayscale values ​​of each frame in the original image sequence of secondary imaging. The number of multi-scale pyramid layers is set to 3. The adjusted image is downsampled and Gaussian blurred. Image data of different scales are superimposed and fused in the pixel dimension, the average value is calculated, and the secondary fusion reference frame is output.

[0140] Read the pixel data of the secondary fusion reference frame, use the Sobel operator to calculate the gradient components in the horizontal and vertical directions, calculate the variance of the gradient component directions as the gradient direction consistency constraint, set the connectivity determination threshold to 0.75, mark the regions with gradient direction consistency constraint values ​​greater than 0.75 as connected regions, calculate the cumulative sum of gradient vectors in the connected regions, and output the gradient field topological connectivity constraint.

[0141] Based on the gradient field topological connectivity constraint, the angle value of the pixel gradient vector is calculated using the arctangent function. The pixel gradient is then mapped to the phase topology manifold. A two-dimensional Gaussian surface function is constructed on the phase topology manifold. The standard deviation of the Gaussian function is set to 1.5 pixels. The integral of the Gaussian surface function within the manifold region is calculated. The coordinates of the centroid of the integral are located, and a set of quadratic encoded feature maps containing the set of centroid coordinates is output.

[0142] Based on the secondary encoding feature mapping set, the coordinates of feature points in the image plane are read. The forward spatial mapping calculation is performed using the pinhole camera model parameters to obtain the model projection coordinates of the feature points in three-dimensional space. The difference between the actual coordinates of the feature points and the model projection coordinates on the X, Y, and Z axes is calculated to form the Euclidean space residual vector. The skewness statistical window size is set to 5, and the asymmetric skewness distribution of the Euclidean space residual vector is calculated using the third moment formula.

[0143] The initial error suppression weight is set to 1.0. The asymmetric skewness distribution is normalized using the Tanh activation function to obtain the correction factor. The correction factor is multiplied by the initial error suppression weight to iteratively update the error suppression weight. The updated error suppression weight is multiplied by the Euclidean space residual vector to construct the weighted least squares objective function. The function is iteratively solved until the residual norm is less than 0.01 mm, and the three-dimensional quantitative distribution of the pad microstructure is output.

[0144] In this embodiment, constructing the composite geometric constraint weight graph specifically includes:

[0145] Read the uncertainty score sequence, calculate the fourth central moment of the sequence values ​​as kurtosis, calculate the third central moment of the sequence values ​​as the cube of the standard deviation as skewness, set the power exponent of the higher-order moment transform to 2, add the values ​​of kurtosis and skewness and multiply by the power exponent 2, process the calculation results using the Tanh activation function to generate dynamic offset coefficients, add the dynamic offset coefficients to the values ​​of uncertainty scores, perform adaptive correction, and output the dynamic confidence threshold.

[0146] Read the dynamic confidence threshold and uncertainty score, perform a logical comparison operation. If the uncertainty score is greater than the dynamic confidence threshold, read the defect prediction mask and the three-dimensional quantization distribution of the pad micromorphology, use the Sobel operator to calculate the gradient vectors of the three-dimensional quantization distribution of the pad micromorphology in the X and Y directions, and combine the gradient vectors to construct the surface gradient tensor field.

[0147] Using a window size of 10 pixels, the variance of the uncertainty score within the window is calculated as the uncertainty spatial distribution fluctuation feature. The magnitude of the surface gradient tensor field is read, and the magnitude is multiplied by the uncertainty spatial distribution fluctuation feature to construct a composite geometric constraint weight map.

[0148] Read the defect prediction mask, multiply its pixel value by the weight value of the corresponding position in the composite geometric constraint weight map to generate a weighted defect response map, extract each connected component in the weighted defect response map using the 8-neighborhood connectivity algorithm, calculate the Euler number of the connected component as the morphological topological code, calculate the sum of squared distances from the pixel coordinates of the connected component to the center point as the spatial geometric moment parameter, match the defect type according to the code and parameter, calculate the coordinates and confidence, and output the final detection report.

[0149] refer to Figure 3 A detection device for detecting defects on the surface of PCB pads, specifically comprising the following modules:

[0150] The multi-dimensional feature construction module is used to collect optical reflection signals from the PCB pad area, suppress heterogeneous reflection based on adaptive exposure and polarization analysis, and construct a multi-dimensional feature fusion sequence set by fusing light and shape features.

[0151] The feature tensor generation module is used to decouple reflection components based on a multidimensional feature sequence set, utilize deep hierarchical inversion of material distribution, and combine manifold mapping and curvature modulation to generate a collaborative analytical feature tensor.

[0152] The feature fusion optimization module is used to perform bi-branch feature extraction and joint consistency optimization on the collaborative parsing feature tensor to generate a fused feature map.

[0153] The uncertainty measurement module is used to construct a dynamic topological evolution space based on the fused feature map, perform causal attribution measurement using the steady-state convergence distribution of features, and output uncertainty score.

[0154] The light field modulation module is used to construct the statistical distribution of imaging quality and perform deviation analysis by combining uncertainty scores, trigger the spatiotemporal coupling modulation mechanism of light field to perform multidimensional dynamic modulation of light field parameters, and generate control command signals.

[0155] The morphology reconstruction module is used to acquire the original image sequence of secondary imaging based on the control command signal, and generate a three-dimensional quantitative distribution of the micromorphology of the pad through multi-level adaptive joint reconstruction.

[0156] The report generation module is used to analyze the uncertainty score. If the uncertainty score is higher than the dynamic confidence threshold, a composite geometric constraint weight graph is constructed to drive the weighted spatial mapping and analysis of the defect prediction mask and the three-dimensional quantitative distribution of the pad micromorphology, and generate the final inspection report.

[0157] Example 1: To verify the feasibility of this invention in high-precision detection and 3D morphology reconstruction of PCB pad defects, the method of this invention was applied to an intelligent optical inspection system (hereinafter referred to as "System F") of an SMT production line in a high-end electronics manufacturing enterprise. In traditional PCB pad inspection systems, threshold segmentation algorithms based on 2D image processing or traditional structured light vision measurement techniques are typically used. These methods not only have poor robustness to heterogeneous reflections and specular interference on the pad surface, but also cannot accurately quantify microscopic morphology and cognitive uncertainties under complex working conditions, easily leading to minor missed detections, misjudgments, and distortion of 3D measurement data. To solve the above problems, System F decided to adopt the detection device and method for detecting PCB pad surface defects proposed in this invention.

[0158] During implementation, system F first utilizes its multimodal imaging unit to drive the light source to project coded light based on a timing control protocol, and acquires the optical reflection signals of the PCB pad area in real time. The system generates an exposure time-domain truncation weight matrix by calculating the statistical quantiles of the incident irradiance distribution, performs pixel-level adaptive exposure adjustment, and combines local gray-level co-occurrence matrix and polarization analysis techniques to successfully filter out specular interference and background noise, outputting a multidimensional feature fusion sequence set containing texture and spectral information.

[0159] Based on the above characteristics, system F constructs a stochastic differential mapping space from feature response to predicted probability. By calculating the prediction variance sensitivity through iterative sampling with random deactivation of neuron weights, it achieves precise decoupling between cognitive uncertainty and data uncertainty. Simultaneously, the system utilizes the deviation distance between the uncertainty score and the statistical distribution of imaging quality to construct a closed-loop feedback system from "uncertainty quantization" to "optical field mechanical coupling control." Through joint compensation fitting and temporal smoothing correction, it generates phase-locked device drive commands, ensuring dynamic optimization and spatiotemporal synchronization of the imaging environment. Finally, the system uses a dynamic confidence threshold and a composite geometric constraint weight map to perform a weighted spatial mapping between the defect prediction mask and the three-dimensional quantized distribution of pad microstructure, outputting a highly reliable final inspection report.

[0160] During implementation, the technical team of System F discovered that, compared with traditional two-dimensional image detection and single structured light measurement methods, the method of this invention significantly improves the detection rate of minute defects in solder pads and the accuracy of three-dimensional morphology measurement. Traditional methods struggle to distinguish between material reflections and actual defects and are subject to large measurement fluctuations due to mechanical vibrations. In contrast, the method of this invention, through multi-dimensional feature decoupling, causal attribution analysis, and opto-mechanical-phase synergistic control, effectively achieves accurate defect identification and high-fidelity reconstruction of microstructures under complex surface conditions. This deep perception capability based on multi-dimensional feature decoupling and the rigorous logical closed loop of causal attribution analysis fundamentally eliminates the coupling influence of heterogeneous reflection interference and mechanical dynamic errors on the measurement results, providing a solid data foundation for subsequent process optimization and quality control.

[0161] To further verify the actual performance of the method of the present invention, system F conducted a detailed comparative test between the method of the present invention and the traditional method. The specific performance data is shown in Table 1:

[0162] Table 1 Performance Comparison of Intelligent Detection Methods for FPCB Pads in the System

[0163]

[0164] As shown in Table 1, the performance of the PCB pad intelligent inspection system has been comprehensively improved after applying the method of this invention. The defect detection rate has increased from 92.5% of the traditional method to 99.2%, and the false alarm rate has been significantly reduced from 5.8% to 0.6%, effectively solving the problems of minor missed detections and over-detection. The accuracy of three-dimensional topography measurement has improved from 15.5 micrometers to 3.2 micrometers, and the measurement error of pad coplanarity has been significantly reduced, meeting the quality control requirements of high-precision electronic manufacturing. The processing time for a single inspection has been reduced from 350 milliseconds to 120 milliseconds, and the equipment adjustment response time has been shortened by 70%, significantly improving the production efficiency of the production line. In addition, the system performs particularly well in terms of the accuracy of high-light area recognition and the confidence level of uncertainty estimation, ensuring the inspection stability under complex lighting conditions.

[0165] Through the method of this invention, system F successfully achieves sub-pixel-level precise detection of PCB pad defects and high-fidelity quantification of three-dimensional microstructure, effectively improving the accuracy and automation level of soldering quality assessment, ensuring the high reliability of electronic products, significantly reducing rework costs caused by visual inspection errors, enhancing the system's environmental adaptability and intelligent decision-making capabilities, and providing strong technical support for high-end PCB intelligent manufacturing.

[0166] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for detecting defects on the surface of PCB pads, characterized in that, Includes the following steps: Optical reflection signals from PCB pad areas are acquired, and heterogeneous reflections are suppressed based on adaptive exposure and polarization analysis. A multi-dimensional feature fusion sequence set is constructed by fusing light and shape features. Based on the decoupling of reflection components from a multidimensional feature sequence set, material distribution is inverted using deep hierarchical inversion, and a collaborative analytical feature tensor is generated by combining manifold mapping and curvature modulation. Perform bi-branch feature extraction and joint consistency optimization on the collaborative parsing feature tensor to generate a fused feature map; A dynamic topological evolution space is constructed based on the fused feature map, and a causal attribution metric is performed using the steady-state convergence distribution of the features to output an uncertainty score. The statistical distribution of imaging quality is constructed and the deviation analysis is performed by combining the uncertainty score. The spatiotemporal coupling control mechanism of the light field is triggered to perform multidimensional dynamic control of the light field parameters and generate control command signals. The original image sequence of secondary imaging is obtained based on the control command signal, and the three-dimensional quantitative distribution of the micromorphology of the pad is generated by multi-level adaptive joint reconstruction. The uncertainty score is analyzed. If the uncertainty score is higher than the dynamic confidence threshold, a composite geometric constraint weight graph is constructed to drive the weighted spatial mapping and analysis of the defect prediction mask and the three-dimensional quantitative distribution of the pad micromorphology, and the final inspection report is generated.

2. The detection method for detecting surface defects of PCB pads according to claim 1, characterized in that, The suppression of heterogeneous reflection includes: Based on the timing control protocol, the light source projection unit is driven to emit coded light within the time window, and the optical reflection signal of the PCB pad area is collected. The incident irradiance distribution of the optical reflection signal is calculated, and the statistical distribution quantile of the incident irradiance distribution is calculated. An exposure time-domain truncation weight matrix is ​​generated based on statistical distribution quantiles. The exposure time-domain truncation weight matrix is ​​used to perform pixel-level adaptive exposure adjustment on the optical reflection signal, and output a single-frame grayscale response image with optimized dynamic range. Based on a single-frame grayscale response image, the local neighborhood grayscale co-occurrence matrix of the pixel is calculated. Based on the local neighborhood grayscale co-occurrence matrix, the texture structure statistical features are extracted. The ratio of the texture structure statistical features to the global average texture is calculated. Based on the ratio, spatial texture response mapping coefficients are generated. The single-frame grayscale response image and the spatial texture response mapping coefficients are multiplied element-wise to output the specular suppression response frame. Based on the high-light suppression response frame, the polarization intensity response components under the multi-dimensional polarization angle domain are mapped, the polarization intensity response difference vector corresponding to the orthogonal polarization state is calculated, the polarization degree parameter distribution is calculated based on the polarization intensity response difference vector, the heterogeneous reflection suppression matrix is ​​constructed using the polarization degree parameter distribution, and a pixel-wise weighted division operation is performed on the high-light suppression response frame and the heterogeneous reflection suppression matrix to output the polarization analytical feature map. Based on the phase shift distribution in the polarization analytical feature map, the surface normal vector in the three-dimensional spatial coordinate system is calculated, and the spectral reflectance vector of the corresponding pixel position in different bands is calculated. The spectral reflectance vector and the surface normal vector are subjected to tensor cross product operation to generate the light-shape feature fusion tensor. The temporal dimension is concatenated on the light-shape feature fusion tensor to generate a multi-dimensional feature fusion sequence set.

3. The detection method for detecting surface defects of PCB pads according to claim 2, characterized in that, The inverted material distribution specifically includes: Based on a multidimensional feature sequence set, the reflectance difference distribution and phase shift distribution corresponding to the encoded light illumination mode in the multidimensional feature sequence set are calculated, and a reflectance dynamic change rate matrix is ​​generated based on the reflectance difference distribution and phase shift distribution. An adaptive separating hyperplane is constructed using the reflection dynamic change rate matrix. Based on the adaptive separating hyperplane, the reflection component decoupling calculation is performed to separate the diffuse reflection component and specular reflection component of the pad surface, and output a multi-channel reflection component dataset and the reflection dynamic change rate matrix. Based on the multi-channel reflectance component dataset and the reflectance dynamic change rate matrix, spectral feature vectors are extracted from the multi-channel reflectance component dataset using the reflectance dynamic change rate matrix, and a deep hierarchical feature evolution matrix is ​​constructed. Calculate the spectral response attenuation coefficients corresponding to different depth levels according to the layer depth order of the PCB pad surface coating structure, perform numerical constraint correction on the spectral feature vector by slicing back projection operation based on the spectral response attenuation coefficients, invert the depth layer distribution structure of surface material reflection and deep body material reflection, and output the depth layer analytical material distribution map. Based on the multi-channel reflection component dataset and the deep hierarchical material distribution map, the joint local neighborhood mutual information density distribution of the multi-channel reflection component dataset and the deep hierarchical material distribution map is calculated. A pixel-level manifold spatial mapping relationship is established based on the joint local neighborhood mutual information density distribution. Geometric distortion correction and sub-pixel alignment mapping are performed using the pixel-level manifold spatial mapping relationship, and the aligned and fused multi-channel reflection feature map is output. Based on the aligned and fused multi-channel reflection feature map, the phase distribution parameters in the aligned and fused multi-channel reflection feature map are extracted to calculate the three-dimensional topography depth map, and the depth layer fusion spectral response distribution in the aligned and fused multi-channel reflection feature map is extracted as the initial material property vector. The modulation factor of the spatial surface curvature distribution corresponding to the 3D topography depth map on the initial material attribute vector is calculated. Based on the modulation factor, the initial material attribute vector is subjected to collaborative weighting calculation to generate the target material attribute vector. The 3D topography depth map and the target material attribute vector are concatenated by tensor dimension to output a collaborative analytical feature tensor.

4. The detection method for detecting surface defects of PCB pads according to claim 3, characterized in that, The dual-branch feature extraction specifically includes: Based on the collaborative analytical feature tensor, the gradient direction discreteness of the pixel neighborhood is calculated, and the structural sensitivity distribution matrix is ​​constructed using the gradient direction discreteness. Based on the structural sensitivity distribution matrix, texture fidelity enhancement weights are generated. Based on the texture fidelity enhancement weights, local contrast adaptive modulation is performed on the collaborative analytic feature tensor to output the initial geometric features. Based on the initial geometric features, the spatial adjacency affinity between feature pixels is calculated, and the spatial adjacency affinity is used to construct the region growth aggregation probability; An edge closure constraint mask is generated based on the region growth aggregation probability. Based on the edge closure constraint mask, discontinuous edge connection and isolated noise filtering are performed on the initial geometric features to output geometric shape features. Based on the geometric features, the rate of change of spatial structure and the channel spectral response value are extracted, and the covariance statistic of the rate of change of spatial structure with respect to the channel spectral response value is calculated. A geometric interference suppression factor is generated using the covariance statistic. Based on the geometric interference suppression factor, channel-dimensional decoupling correction is performed on the geometric morphology features, and the material spectral features are output. Based on the geometric features and the material spectral features, a global joint probability distribution of the feature space is constructed. The peak region of the global joint probability distribution is approximated by multiple iterative random sampling. Based on the peak region, a consistency metric of the feature distribution is calculated. Noise suppression weights are generated using the consistency metric, and signal-to-noise ratio optimization is performed on the geometric features and the material spectral features based on the noise suppression weights to output a steady-state feature map. Based on the steady-state feature map, the geometric attribute components and spectral attribute components of the steady-state feature map are extracted respectively. The gradient energy of the geometric attribute components and the information entropy density of the spectral attribute components are calculated. The feature confidence ratio is generated using the gradient energy and the information entropy density. Pixel-level dynamic allocation coefficients are constructed based on the feature confidence ratios, and weighted aggregation is performed on the steady-state feature map based on the pixel-level dynamic allocation coefficients to output a fused feature map.

5. The method for detecting surface defects of PCB pads according to claim 4, characterized in that, The causal attribution metric specifically includes: Based on the fused feature map, pixel-level classification probability vectors and spatial geometric gradient features are extracted. An adaptive classification boundary constraint matrix is ​​generated using the spatial geometric gradient features. Based on the adaptive classification boundary constraint matrix, dynamic threshold truncation is performed on the pixel-level classification probability vectors, and a defect prediction mask is output. Based on the fused feature map and the defect prediction mask, a stochastic differential mapping space for feature responses to prediction probabilities is constructed; random deactivation iterative sampling of neuron weights is performed in the stochastic differential mapping space, and the sensitivity distribution matrix of prediction variance relative to feature activation values ​​is calculated; based on the sensitivity distribution matrix, the prediction confidence distribution is output; based on the fused feature map and the prediction confidence distribution, the feature nodes in the fused feature map are mapped to a dynamic probability topology space. The predicted confidence distribution is used to control the state update and neighborhood interaction iteration of the feature nodes. The density distribution of the dynamic probability topology space in steady state is calculated. Based on the drift rate of the density distribution in steady state relative to the initial activation distribution of the fused feature map, a feature stability contribution map is output. Based on the feature stability contribution map, causal weight redistribution is performed on the feature values ​​in the feature stability contribution map, the marginal contribution expectation integral is calculated, a feature causal weight matrix is ​​generated, and a causal attribution feature map is output. Based on the causal attribution feature map, cognitive uncertainty values ​​and data uncertainty values ​​are calculated respectively. An uncertainty measure vector is constructed using the cognitive uncertainty values ​​and the data uncertainty values. Based on the uncertainty measure vector, a nonlinear normalization mapping is performed, and an uncertainty score is output.

6. The method for detecting surface defects of PCB pads according to claim 5, characterized in that, The aforementioned optical field spatiotemporal coupling modulation mechanism specifically includes: Acquire historical image data sequences, perform statistical analysis on the historical image data sequences to generate an imaging quality statistical distribution, acquire the current real-time acquired image, and calculate the uncertainty score of the current real-time acquired image; Based on the uncertainty score and the imaging quality statistical distribution, the deviation distance of the uncertainty score relative to the imaging quality statistical distribution is calculated. The deviation distance is used to perform joint compensation fitting mapping on photon radiation flux and spatial angle. Based on the joint compensation fitting mapping result, the light field environment compensation parameters are calculated, and the light field adjustment vector is output. Based on the light field adjustment vector, the modal components of the light field adjustment vector are analyzed, and a coupled constraint feasible region of radiant flux mode and spatial angle mode is constructed. Multi-objective parameter optimization is performed within the coupled constraint feasible region, and the adjustment intensity and illumination angle offset corresponding to each degree of freedom are calculated to generate a set of device control parameters. Based on the set of equipment control parameters, the set of equipment control parameters is discrete-time differential to calculate the time-domain variation gradient. The time-domain variation gradient is combined with the physical motion characteristics of the actuator to calculate the dynamic response error. Based on the dynamic response error, the set of equipment control parameters is subjected to time-domain smoothing correction and amplitude limiting truncation processing to output the spatiotemporal calibration parameter set. Based on the spatiotemporal calibration parameter set, the illumination modulation signal and mechanical drive signal are generated by parsing, the mechanical motion frequency characteristics of the actuator are mapped to the spatial modulation domain constraint of light wave propagation, and the phase interference distribution between the light wave wavefront and the mechanical vibration wavefront is calculated. Based on the phase interference distribution, phase locking and time-domain synchronization are performed on the illumination modulation signal and the mechanical drive signal. The locked and synchronized illumination modulation signal and mechanical drive signal are encapsulated into a device drive protocol signal, and a control command signal is output.

7. The method for detecting surface defects of PCB pads according to claim 6, characterized in that, The multi-level adaptive joint reconstruction specifically includes: Based on the control command signal, the target projection parameters are analyzed to obtain the original image sequence of the secondary imaging. The local texture sharpness response map of the original image sequence of the secondary imaging is calculated. The pixel-level dynamic radiometric modulation coefficient is calculated in combination with the target projection parameters. Based on the pixel-level dynamic radiometric modulation coefficient, multi-scale radiometric dynamic compensation fusion is performed on the original image sequence of the secondary imaging to output the secondary fusion reference frame. Based on the aforementioned secondary fusion reference frame, the gradient direction consistency constraint of the coded structured light stripe pixel domain is calculated, and the gradient field topological connectivity constraint is calculated. Based on the gradient field topological connectivity constraints, perform manifold mapping from pixel gradient to phase topology, perform Gaussian centroid integral localization on the phase topological manifold, and output a set of quadratic encoded feature maps; Based on the secondary encoding feature mapping set, a forward spatial mapping calculation is performed on the feature points to obtain the model projection coordinates, the Euclidean space residual vector between the feature points and the model projection coordinates is calculated, and the asymmetric skewness distribution of the Euclidean space residual vector is calculated. Based on the asymmetric skewness distribution, the error suppression weights are iteratively updated, and the weighted least squares iteration convergence is performed on the feature coordinates using the error suppression weights to output the three-dimensional quantitative distribution of the pad micromorphology.

8. The method for detecting surface defects of PCB pads according to claim 7, characterized in that, The construction of the composite geometric constraint weight graph specifically includes: Based on the probability density distribution of the uncertainty score, the kurtosis and skewness statistical characteristics of the uncertainty score are calculated. Based on the kurtosis and skewness statistical characteristics, a higher-order moment nonlinear transformation is performed to generate dynamic offset coefficients. The dynamic offset coefficients are used to adaptively correct the uncertainty score and output a dynamic confidence threshold. Based on the dynamic confidence threshold and the uncertainty score, a decision logic operation is performed. If the uncertainty score is higher than the dynamic confidence threshold, the defect prediction mask and the three-dimensional quantization distribution of the pad micromorphology are obtained, and the surface gradient tensor field of the three-dimensional quantization distribution of the pad micromorphology is calculated. Spatial distribution statistics are performed on the uncertainty score to generate uncertainty spatial distribution fluctuation characteristics. A composite geometric constraint weight map is constructed using the surface gradient tensor field and the uncertainty spatial distribution fluctuation characteristics, and the composite geometric constraint weight map is output. Based on the composite geometric constraint weight graph, a weighted spatial mapping is performed on the defect prediction mask to generate a weighted defect response graph. The morphological topological encoding and spatial geometric moment parameters of each connected component in the weighted defect response graph are calculated. Based on the morphological topological encoding and spatial geometric moment parameters, the defect type, coordinates, and confidence level are generated, and the final detection report is output.

9. A detection apparatus for detecting surface defects of PCB pads, comprising the detection method for detecting surface defects of PCB pads as described in any one of claims 1 to 8, characterized in that, Includes the following modules: The multi-dimensional feature construction module is used to collect optical reflection signals from the PCB pad area, suppress heterogeneous reflection based on adaptive exposure and polarization analysis, and construct a multi-dimensional feature fusion sequence set by fusing light and shape features. The feature tensor generation module is used to decouple reflection components based on a multidimensional feature sequence set, utilize deep hierarchical inversion of material distribution, and combine manifold mapping and curvature modulation to generate a collaborative analytical feature tensor. The feature fusion optimization module is used to perform bi-branch feature extraction and joint consistency optimization on the collaborative parsing feature tensor to generate a fused feature map. The uncertainty measurement module is used to construct a dynamic topological evolution space based on the fused feature map, perform causal attribution measurement using the steady-state convergence distribution of features, and output uncertainty score. The light field modulation module is used to construct the statistical distribution of imaging quality and perform deviation analysis by combining uncertainty scores, trigger the spatiotemporal coupling modulation mechanism of light field to perform multidimensional dynamic modulation of light field parameters, and generate control command signals. The morphology reconstruction module is used to acquire the original image sequence of secondary imaging based on the control command signal, and generate a three-dimensional quantitative distribution of the micromorphology of the pad through multi-level adaptive joint reconstruction. The report generation module is used to analyze the uncertainty score. If the uncertainty score is higher than the dynamic confidence threshold, a composite geometric constraint weight graph is constructed to drive the weighted spatial mapping and analysis of the defect prediction mask and the three-dimensional quantitative distribution of the pad micromorphology, and generate the final inspection report.