A rigid PCB metal hole copper-embedded structure visual detection system

CN122597364APending Publication Date: 2026-08-18SHENZHEN DINGYEXIN ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610774172.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-01
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0004]为解决上述技术问题,提供一种刚性PCB金属孔嵌铜结构视觉检测系统,本技术方案解决了上述背景技术中提出的在实际检测环境中,由于嵌铜结构表面呈现典型的金属高光特性,从而容易产生镜面反射污染和铜面反射率的整体漂移的问题

Benefits of technology

本方案通过迭代剔除镜面反射污染,能够有效抑制金属高光对三维重建的干扰,获得准确的嵌铜结构法向量与高度图;进一步地,利用反射率自校准模型消除了铜面氧化和工艺波动带来的整体漂移,保证了检测的一致性;在此基础上,融合三维形貌与二维纹理特征并采用多核SVM分类,有效提升了对凹陷、凸起、空洞等缺陷的识别准确率,同时根据置信度动态调整复检优先级与判定阈值,实现了高鲁棒、自适应的在线检测。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122597364A_ABST
    Figure CN122597364A_ABST
Patent Text Reader

Abstract

The application discloses a kind of rigid PCB metal hole copper-embedded structure visual detection systems, it is related to hole copper-embedded structure detection field, comprising: data acquisition module, for solving light source direction vector and collecting multi-angle image sequence;Specular reflection optimization module, for solving the unit normal vector distribution map of each point of copper-embedded structure surface and relative height map;Topographic feature module, for constructing three-dimensional topographic feature vector;Reflectivity correction module, for dynamically eliminating the overall drift of copper surface reflectivity;Texture feature module, for extracting the texture feature vector of copper-embedded hole edge;Defect identification module, for outputting defect type and corresponding confidence;Detection priority module, for determining the recheck priority and dynamic determination threshold of each copper-embedded structure. Through iterative rejection specular reflection pollution, high-precision three-dimensional reconstruction is realized, and the detection robustness and accuracy of high-reflectivity copper-embedded structure are improved by combining reflectivity self-calibration and multi-modal feature fusion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of copper hole embedding structure inspection, specifically to a visual inspection system for rigid PCB metal copper hole embedding structure. Background Technology

[0002] As rigid printed circuit boards (PCBs) continue to evolve towards higher density, higher frequency, and higher reliability, copper-embedded metal vias, as a special interconnect and heat dissipation enhancement design, play an irreplaceable role in critical applications such as RF modules, power amplifiers, and power management units by embedding solid copper pillars or plugs into the PCB dielectric layer to achieve low-impedance interlayer conduction and efficient local heat transfer. The three-dimensional morphological quality of the copper-embedded structure, including the flatness of the via edges, the height of copper surface depressions or protrusions, and the distribution of internal voids, directly determines the reliability of electrical connections and long-term service life. Therefore, developing a high-precision, non-contact, automated visual inspection system for copper-embedded structures has significant technical and economic value and industrial driving force for improving the manufacturing yield of high-end PCBs and reducing the risk of field failures caused by hidden defects.

[0003] However, in real-world testing environments, copper-embedded surfaces exhibit typical metallic specular highlights. Existing photometric stereoscopic vision-based 3D inspection methods generally face two core challenges. First, traditional photometric stereoscopic techniques typically assume the tested surface follows a Lambertian diffuse reflection model. However, copper surfaces produce strong specular reflection components under illumination, causing the acquired grayscale values ​​to deviate significantly from the theoretical Lambertian values. This leads to systematic biases in the surface normal vectors and Gaussian curvature maps obtained using the least squares method, resulting in misjudgments or omissions of 3D defects such as depressions and protrusions. Second, different production batches of PCBs experience objective fluctuations in copper oxidation levels and plating process parameters during surface treatment and storage, causing proportional changes in surface diffuse reflectance. Traditional inspection methods fail to self-calibrate reflectance during reconstruction, rendering the defect judgment threshold based on absolute grayscale values ​​ineffective under different process conditions, making it difficult to guarantee inspection stability and batch consistency. Summary of the Invention

[0004] To address the aforementioned technical problems, a visual inspection system for rigid PCB metal hole copper-embedded structures is provided. This technical solution solves the problem mentioned in the background art that, in actual inspection environments, the copper-embedded structure surface exhibits typical metallic high-gloss characteristics, which easily leads to specular reflection contamination and overall drift of the copper surface reflectivity.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A visual inspection system for rigid PCB metal hole copper embedding structures includes: The data acquisition module is used to solve the light source direction vector of each light source in the camera coordinate system by means of the mirror sphere calibration method, and to acquire multi-angle image sequences of the copper-embedded structure under the illumination of light sources in multiple known directions according to the PCB sample to be inspected. The mirror reflection optimization module is used to solve the unit normal vector distribution map and relative height map of each point on the surface of the copper-embedded structure by iteratively removing the mirror reflection contamination observations based on the multi-angle image sequence and the light source direction vector. The topography feature module is used to calculate the Gaussian curvature and principal curvature of each copper-embedded area in physical coordinates based on the reconstructed relative height map, and construct a three-dimensional topography feature vector. A reflectivity correction module is used to establish a copper surface reflectivity self-calibration model, and dynamically eliminate the overall drift of copper surface reflectivity based on the grayscale statistical characteristics of the remaining effective light source after iterative elimination of the same copper embedded structure. The texture feature module is used to select the image with the largest angle between the light source direction and the camera optical axis from a multi-angle image sequence based on the directional gradient histogram as the original grayscale image, and extract the texture feature vector of the copper-embedded hole edge. The defect identification module is used to standardize the three-dimensional shape feature vector and texture feature vector, then concatenate the feature layers, input them into a multi-kernel support vector machine classifier, and output the defect type and corresponding confidence level. The detection priority module is used to determine the re-inspection priority and dynamic judgment threshold of each copper-embedded structure according to the defect type and confidence level.

[0006] Preferably, the step of solving the light source direction vector of each light source in the camera coordinate system using the mirror sphere calibration method specifically includes: Set up several point light sources in different directions, and use the mirror sphere calibration method to pre-calibrate and solve the light source direction vector of each light source in the camera coordinate system; Under individual illumination from each light source, grayscale images of the same copper-embedded structure are acquired to obtain the grayscale values ​​at each pixel. The acquired grayscale images are preprocessed with median filtering to eliminate noise interference.

[0007] Preferably, the method of iteratively removing specular reflection contamination observations to solve for the normal vector distribution map and relative height map of each point on the surface of the copper-embedded structure specifically includes: Include all configured light source numbers into the valid light source index set; Based on the light source direction vector and the gray value vector corresponding to the current set of effective light sources, a temporary vector is initially estimated using the least squares method. Calculate the magnitude of the temporary vector and divide the temporary vector by its magnitude to obtain the temporary unit normal vector; For each light source in the current set of valid light sources, calculate the dot product between the temporary unit normal vector and the direction vector of that light source. If the dot product is less than or equal to 0, it indicates that the light source is located on the back side of the surface and cannot provide valid information. In this case, the light source is removed from the set of valid light sources. Based on the observations in the remaining effective light source set, a product vector is calculated using the least squares method, and the diffuse reflectance and unit normal vector are calculated using the product vector. Wherein, the diffuse reflectance of the current pixel is equal to the magnitude of the product vector, and the unit normal vector is equal to the product vector divided by its magnitude; For each light source in the remaining set of effective light sources, calculate the theoretical Lambertian gray value based on the unit normal vector and diffuse reflectance; The absolute residual is obtained by subtracting the actual collected gray value from the theoretical Lambertian gray value and taking the absolute value. Set a residual threshold and define the relative residual as the sum of the absolute residual divided by the theoretical Lambertian gray level and a very small positive number. If the maximum relative residual exceeds the residual threshold, the light source with the largest residual is removed from the set. Perform an iterative loop on the current pixel until the number of effective light sources meets the solution requirements and all relative residuals are below the residual threshold, or the number of iterations reaches the upper limit, or the number of effective light sources is insufficient to support the solution. Stop the iteration and obtain the unit normal vector and original diffuse reflectance of the current pixel. By traversing all pixels in the entire image, the normal vector distribution map of the whole image is obtained. Based on the normal vector distribution map, the relative height map is reconstructed using the Poisson integral method.

[0008] Preferably, the morphological feature module specifically includes: The unit transformation unit is used to convert the reconstructed relative height map from pixel coordinates to camera image plane physical coordinates, and to convert the pixel relative height to physical height through steps of known standard height; The surface fitting unit is used to perform quadratic surface fitting on the physical height map in the local neighborhood of each pixel to obtain the first and second partial derivatives of the surface. The basic form coefficient unit is used to calculate the first and second basic form coefficients of a surface based on its first and second partial derivatives. Curvature unit, used to calculate Gaussian curvature, mean curvature and principal curvature based on the first basic form coefficient and the second basic form coefficient; The morphological feature unit is used to statistically analyze the mean and standard deviation of Gaussian curvature and principal curvature within the annular region of the copper-embedded aperture, forming a three-dimensional morphological feature vector.

[0009] Preferably, the step of establishing a copper surface reflectivity self-calibration model, based on the grayscale statistical characteristics of the remaining effective light source after iterative elimination of the same copper-embedded structure, to dynamically eliminate the overall drift of the copper surface reflectivity specifically includes: For the same copper-embedded structure area, based on the set of valid light source indices remaining after removal, record the actual grayscale value of each pixel under each valid light source and the unit normal vector obtained by solving; A standard reflectivity reference value is set using a pre-calibrated copper surface reference area with known reflectivity; For each effective light source, substitute the standard reflectance reference value to calculate the theoretical Lambertian gray value at each pixel. Calculate the actual grayscale mean and theoretical Lambertian grayscale mean of all pixels in the region under all effective light sources. The actual grayscale mean is equal to the sum of all actual grayscale values ​​of all pixels in the region under the set of effective light sources divided by the product of the number of pixels in the region and the number of effective light sources. The theoretical Lambertian grayscale mean is calculated in the same way. The ratio of the actual mean gray level to the theoretical mean Lambertian gray level is defined as the reflectance drift coefficient. For each pixel within the region, the calibrated reflectance is equal to the original diffuse reflectance divided by the reflectance drift coefficient; Set a threshold range for reflectivity drift coefficient. If the reflectivity drift coefficient exceeds this threshold range, trigger an alarm on the device. A self-calibration model for copper surface reflectivity is constructed, which includes: mean value calculation, drift coefficient calculation, reflectivity calibration, and threshold warning.

[0010] Preferably, the texture feature module specifically includes: The original grayscale image unit is used to select the image with the largest angle between the light source direction and the camera optical axis from the multi-angle image sequence as the original grayscale image; The region of interest (ROI) cell is used to extract the region of interest centered on the copper via and with a side length twice the diameter of the via. Sobel operator unit, used to calculate the gradient magnitude and direction of each pixel using the Sobel operator; The histogram cell is used to divide the gradient direction into 9 equally wide gradient direction intervals and to calculate the gradient direction histogram within an 8×8 pixel cell. The normalization unit is used to group adjacent 2×2 cells into blocks with a block sliding step of 8 pixels, and to perform L2 normalization on the histogram vector within the block. Texture feature units are used to concatenate the feature vectors of all blocks to form the texture feature vector of the copper-embedded hole edge.

[0011] Preferably, the step of standardizing the three-dimensional shape feature vector and texture feature vector, concatenating them in a feature layer, and inputting them into a multi-kernel support vector machine classifier to output the defect type and corresponding confidence score specifically includes: Z-score normalization is applied to the 3D shape feature vector and texture feature vector respectively to eliminate differences in dimensions and scale. The two standardized feature vectors are concatenated end to end to obtain a combined feature vector; A multi-kernel support vector machine is used as the classifier, with the kernel function being a convex combination of a Gaussian kernel and a multinomial kernel. The parameters are determined through K-fold cross-validation. Platt scaling is used to convert SVM decision values ​​into probability outputs, and the category corresponding to the highest probability is taken as the defect type. This probability value is the confidence level.

[0012] Preferably, the step of determining the re-inspection priority and dynamic judgment threshold of each copper-embedded structure according to the defect type and confidence level specifically includes: Preset a basic priority and corresponding baseline curvature threshold for each defect type; The final priority is calculated based on the base priority set for each defect type and the confidence level output by the classifier. Based on the baseline curvature threshold set for each defect type, and combined with the confidence level output by the classifier, a dynamic judgment threshold is set. When multiple defects coexist, the highest priority and the lowest dynamic threshold of the corresponding defect type are used.

[0013] Compared with the prior art, the beneficial effects of the present invention are as follows: This solution effectively suppresses the interference of metallic highlights on 3D reconstruction by iteratively eliminating specular reflection contamination, thus obtaining accurate copper-embedded structure normal vectors and height maps. Furthermore, a reflectivity self-calibration model is used to eliminate the overall drift caused by copper surface oxidation and process fluctuations, ensuring the consistency of detection. On this basis, 3D morphology and 2D texture features are integrated and multi-kernel SVM classification is adopted, which effectively improves the accuracy of identifying defects such as depressions, protrusions, and voids. At the same time, the re-inspection priority and judgment threshold are dynamically adjusted according to the confidence level, realizing highly robust and adaptive online detection. Attached Figure Description

[0014] Figure 1 This is a structural block diagram of the visual inspection system for rigid PCB metal hole copper embedding structure of the present invention; Figure 2 This is a flowchart of the method for solving the normal vector distribution map and relative height map of each point on the surface of the copper-embedded structure by iteratively removing the observed values ​​of specular reflection contamination according to the present invention; Figure 3 This is a flowchart illustrating the overall process of dynamically eliminating the reflectivity drift of copper surfaces according to the present invention. Detailed Implementation

[0015] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.

[0016] Reference Figure 1 As shown, a visual inspection system for rigid PCB metal hole copper embedding structures includes: The data acquisition module is used to solve the light source direction vector of each light source in the camera coordinate system by means of the mirror sphere calibration method, and to acquire multi-angle image sequences of the copper-embedded structure under the illumination of light sources in multiple known directions according to the PCB sample to be inspected. The mirror reflection optimization module is used to solve the unit normal vector distribution map and relative height map of each point on the surface of the copper-embedded structure by iteratively removing the mirror reflection contamination observations based on the multi-angle image sequence and the light source direction vector. The topography feature module is used to calculate the Gaussian curvature and principal curvature of each copper-embedded area in physical coordinates based on the reconstructed relative height map, and construct a three-dimensional topography feature vector. A reflectivity correction module is used to establish a copper surface reflectivity self-calibration model, and dynamically eliminate the overall drift of copper surface reflectivity based on the grayscale statistical characteristics of the remaining effective light source after iterative elimination of the same copper embedded structure. The texture feature module is used to select the image with the largest angle between the light source direction and the camera optical axis from a multi-angle image sequence based on the directional gradient histogram as the original grayscale image, and extract the texture feature vector of the copper-embedded hole edge. The defect identification module is used to standardize the three-dimensional shape feature vector and texture feature vector, then concatenate the feature layers, input them into a multi-kernel support vector machine classifier, and output the defect type and corresponding confidence level. The detection priority module is used to determine the re-inspection priority and dynamic judgment threshold of each copper-embedded structure according to the defect type and confidence level.

[0017] Reference Figure 1 As shown, the morphological feature module specifically includes: The unit transformation unit is used to convert the reconstructed relative height map from pixel coordinates to camera image plane physical coordinates, and to convert the pixel relative height to physical height through steps of known standard height; The surface fitting unit is used to perform quadratic surface fitting on the physical height map in the local neighborhood of each pixel to obtain the first and second partial derivatives of the surface. The basic form coefficient unit is used to calculate the first and second basic form coefficients of a surface based on its first and second partial derivatives. Curvature unit, used to calculate Gaussian curvature, mean curvature and principal curvature based on the first basic form coefficient and the second basic form coefficient; The morphological feature unit is used to statistically analyze the mean and standard deviation of Gaussian curvature and principal curvature within the annular region of the copper-embedded aperture, forming a three-dimensional morphological feature vector.

[0018] Reference Figure 1 As shown, the texture feature module specifically includes: The original grayscale image unit is used to select the image with the largest angle between the light source direction and the camera optical axis from the multi-angle image sequence as the original grayscale image; The region of interest (ROI) cell is used to extract the region of interest centered on the copper via and with a side length twice the diameter of the via. Sobel operator unit, used to calculate the gradient magnitude and direction of each pixel using the Sobel operator; The histogram cell is used to divide the gradient direction into 9 equally wide gradient direction intervals and to calculate the gradient direction histogram within an 8×8 pixel cell. The normalization unit is used to group adjacent 2×2 cells into blocks with a block sliding step of 8 pixels, and to perform L2 normalization on the histogram vector within the block. Texture feature units are used to concatenate the feature vectors of all blocks to form the texture feature vector of the copper-embedded hole edge.

[0019] This scheme employs a data acquisition module to pre-calculate the direction vectors of each light source in the camera coordinate system using the mirror sphere calibration method, and acquires multi-angle image sequences of the copper-embedded structure under illumination from multiple known directions. Simultaneously, a specular reflection optimization module is set up. Based on the multi-angle image sequences and light source direction vectors, iteratively removes specular reflection contamination observations to solve for the unit normal vector distribution map and relative height map of each point on the copper-embedded structure surface, effectively suppressing the interference of metallic specular highlights on 3D reconstruction. Building upon this, the morphology feature module calculates the Gaussian curvature and principal curvature of each copper-embedded region based on the relative height map, constructing a 3D morphology feature vector. Simultaneously, the reflectivity correction module establishes a copper surface reflectivity self-calibration model, dynamically eliminating overall reflectivity drift caused by copper surface oxidation or process fluctuations by utilizing the grayscale statistical characteristics of the remaining effective light sources after iterative removal. Furthermore, the texture feature module selects the image with the largest angle between the light source direction and the camera optical axis from the multi-angle image sequence as the original grayscale image, extracting the directional gradient histogram texture feature vector of the copper-embedded aperture edge. The defect identification module standardizes and concatenates 3D morphological and texture features, inputs them into a multi-core support vector machine classifier, and outputs the defect type and confidence level. Finally, the detection priority module determines the re-inspection priority and dynamic judgment threshold for each copper-embedded structure based on the defect type and confidence level. On the one hand, by iteratively eliminating specular reflection contamination and self-calibrating reflectivity, accurate reconstruction of the 3D morphology of highly reflective copper-embedded structures is achieved, avoiding detection failures caused by specular highlights and batch fluctuations in copper surfaces, which are common in traditional photometric stereo methods. On the other hand, by integrating 3D morphological and 2D texture features and dynamically adjusting the threshold, the accuracy of identifying defects such as depressions, protrusions, and voids, as well as the adaptability to the production line, is effectively improved, achieving highly robust and adaptive online visual inspection.

[0020] Specifically, the method of determining the light source direction vectors in the camera coordinate system using the mirror sphere calibration includes: Set up several point light sources in different directions, and use the mirror sphere calibration method to pre-calibrate and solve the light source direction vector of each light source in the camera coordinate system; Under individual illumination from each light source, grayscale images of the same copper-embedded structure are acquired to obtain the grayscale values ​​at each pixel. The acquired grayscale images are preprocessed with median filtering to eliminate noise interference.

[0021] The principle behind the mirror sphere calibration method for determining the light source direction vector in the camera coordinate system is as follows: When a light source illuminates a sphere, a highlight is generated on the sphere. The spherical normal at this highlight is directed from the center of the sphere to the highlight. According to the specular reflection law, the angle of incidence equals the angle of reflection, and the reflected ray points towards the camera's optical center. Therefore, the light source direction can be uniquely determined by the spherical normal and the reflected ray direction. Specifically, this involves: fixing a highly reflective mirror sphere of known radius at the test station and calibrating the camera's intrinsic parameters; sequentially illuminating each light source; acquiring spherical images and extracting the highlight pixel coordinates; fitting the spherical center's three-dimensional coordinates in the camera coordinate system based on the spherical edge contour; calculating the spherical normal vector at the highlight based on the highlight pixel coordinates and their geometric relationship with the spherical center; knowing the reflected ray direction and combining it with the specular reflection law to deduce the incident ray direction, which is the three-dimensional direction vector of the light source; and normalizing all light source direction vectors to form the light source direction vector.

[0022] Reference Figure 2 As shown, by iteratively removing specular reflection contamination observations, the normal vector distribution map and relative height map of each point on the surface of the copper-embedded structure are obtained, including: Include all configured light source numbers into the valid light source index set; Based on the light source direction vector and the gray value vector corresponding to the current set of effective light sources, a temporary vector is initially estimated using the least squares method. Calculate the magnitude of the temporary vector and divide the temporary vector by its magnitude to obtain the temporary unit normal vector; For each light source in the current set of valid light sources, calculate the dot product between the temporary unit normal vector and the direction vector of that light source. If the dot product is less than or equal to 0, it indicates that the light source is located on the back side of the surface and cannot provide valid information. In this case, the light source is removed from the set of valid light sources. Based on the observations in the remaining effective light source set, a product vector is calculated using the least squares method, and the diffuse reflectance and unit normal vector are calculated using the product vector. Wherein, the diffuse reflectance of the current pixel is equal to the magnitude of the product vector, and the unit normal vector is equal to the product vector divided by its magnitude; For each light source in the remaining set of effective light sources, calculate the theoretical Lambertian gray value based on the unit normal vector and diffuse reflectance; The absolute residual is obtained by subtracting the actual collected gray value from the theoretical Lambertian gray value and taking the absolute value. Set a residual threshold and define the relative residual as the sum of the absolute residual divided by the theoretical Lambertian gray level and a very small positive number. If the maximum relative residual exceeds the residual threshold, the light source with the largest residual is removed from the set. Perform an iterative loop on the current pixel until the number of effective light sources meets the solution requirements and all relative residuals are below the residual threshold, or the number of iterations reaches the upper limit, or the number of effective light sources is insufficient to support the solution. Stop the iteration and obtain the unit normal vector and original diffuse reflectance of the current pixel. By traversing all pixels in the entire image, the normal vector distribution map of the whole image is obtained. Based on the normal vector distribution map, the relative height map is reconstructed using the Poisson integral method.

[0023] This can be explained by the fact that this scheme uses the Lambertian reflection model as a basic assumption and approximates this assumption by iteratively eliminating observations contaminated by specular reflection. The grayscale value satisfies the following: under a certain light source, the grayscale value of a pixel is equal to the positive part of the surface diffuse reflectance multiplied by the dot product of the light source direction vector and the unit normal vector, plus the positive deviation caused by specular reflection, because specular reflection will only make the grayscale value higher than the theoretical Lambertian grayscale value. Furthermore, taking advantage of the physical property that specular reflection is a positive deviation, specular reflection contamination is gradually eliminated by iteratively eliminating the observation with the largest residual. Backlight preprocessing and standard least squares method ensure the freedom of positive and negative normal vector components, thereby obtaining an accurate normal vector distribution map and an accurate relative height map of each point on the surface of the copper-embedded structure. To facilitate understanding of this invention, a specific example is provided below to further illustrate the solution. For each pixel, the following iterative removal process is performed: Set up n point light sources in different directions, where n≥6, and initialize the set of valid light source indices S={1,…,n}; Using all current light source observations in S, a preliminary estimate of the temporary vector is made using the least squares method: In the formula, For temporary vectors, This is the direction vector of the light source corresponding to the current S. for transpose, This is the grayscale value vector corresponding to the current set of effective light sources S; In the case of an ideal Lambertian surface and no noise, the product vector obtained by solving the effective light source set using the least squares method is mathematically strictly equal to the product of diffuse reflectance and normal vector. The actual collected gray values ​​include positive deviations caused by specular reflection. Therefore, the temporary vector calculated from the initial set is only a rough estimate and is only used to eliminate backlights. After removing backlight sources, the product vector is calculated using the least squares method based on the current set of remaining effective light sources, thereby obtaining initial estimates of the unit normal vector and diffuse reflectance. Using the initial estimates of the unit normal vector and diffuse reflectance, the residual between the theoretical Lambertian gray level and the actual gray level is calculated. The light source with the most severe specular reflection pollution is removed, and the set of effective light sources is updated. This iterative process is repeated, and the product vector is recalculated based on the updated set of effective light sources in each iteration, so that the product vector gradually approaches the true value of the ideal Lambertian body under noise-free conditions. When the iteration terminates, the current product vector can be regarded as a reliable estimate of the diffuse reflectance and the unit normal vector, thus obtaining accurate unit normal vector and diffuse reflectance. The theoretical Lambert grayscale expression is: In the formula, This represents the theoretical Lambertian grayscale value at the pixel under the illumination of the current light source S. The diffuse reflectance of the surface at that pixel is... This is the transpose of the unit normal vector at that pixel. The relative residual is defined as the absolute residual divided by the theoretical Lambertian gray level and a very small positive number. If the maximum relative residual exceeds a residual threshold, the light source with the largest residual is removed from the set. In the specific example, the very small positive number is... The residual threshold is based on the statistical distribution of residuals of a large number of normal, defect-free copper surface samples under the Lambertian assumption. The mean of the normal residuals plus three times the standard deviation is taken as the upper limit to ensure that the pass rate of normal samples exceeds 99.7%, while effectively identifying abnormal residuals caused by specular reflection. The expression for reconstructing the relative height map using the Poisson integral method is as follows: In the formula, Z represents the relative height. , , Let x be the x, y, and z components of the unit normal vector in a Cartesian coordinate system. For gradient operators, For the Laplace operator; The boundary conditions are set as follows: a flat copper surface region in the image far from the copper-embedded structure is selected as the reference zero point, the Dirichlet boundary condition Z=0 is set, and the discrete cosine transform method is used for fast solution. For the unit normal vector... Singularities with components close to 0, i.e. The 3×3 neighborhood averaging method is used for filling.

[0024] Specifically, based on the reconstructed relative height map, the Gaussian curvature and principal curvature of each copper-embedded region are calculated in physical coordinates, and a three-dimensional topographic feature vector is constructed, including: The reconstructed relative height map is converted from pixel coordinates to camera image plane physical coordinates, and the pixel relative height is converted to physical height using steps of known standard height. A quadratic surface is fitted to the physical height map in the local neighborhood of each pixel to obtain the first and second partial derivatives of the surface. Based on the first and second partial derivatives of the surface, calculate the first and second fundamental form coefficients of the surface; Calculate the Gaussian curvature, mean curvature, and principal curvature based on the first and second fundamental form coefficients. Within the annular region of the copper-embedded aperture, the mean and standard deviation of the Gaussian curvature and principal curvature are statistically analyzed to form a three-dimensional morphological feature vector.

[0025] The explanation is as follows: The relative height map exists in the pixel coordinate system, and its numerical unit is pixel-level relative height, which does not have an actual physical scale. In order to obtain curvature values ​​with physical scale, it is necessary to use camera calibration parameters to convert pixel coordinates into physical coordinates and scale the height values ​​according to the physical scale. The first basic type coefficient describes the measurement on the tangent plane of the surface, and the second basic type coefficient describes the curvature of the surface. Gaussian curvature and mean curvature are the essential invariants of the surface and are invariant to translation and rotation. The principal curvatures are the curvature values ​​in the directions of maximum and minimum curvature, respectively. The distribution characteristics of each curvature in the annular area of ​​the copper-embedded hole can be statistically analyzed to effectively characterize the three-dimensional morphology of the hole edge and distinguish defects such as normal, concave, convex, and void. To facilitate understanding of the present invention, the following specific example will be used to further illustrate and explain this solution: For the transformed physical height map, a quadratic surface is fitted within the 3×3 local neighborhood of each pixel. Let the local physical coordinates (x, y) within the neighborhood be centered at the current pixel, with the center point coordinates being (0, 0). The fitting function is in the form of: In the formula, a, b, c, d, e, and f are the coefficients to be fitted. Using the coordinates and height values ​​of nine points in the neighborhood, an overdetermined system of equations is established, and the coefficients are solved using the least squares method. At the center point (x=0, y=0) of the fitted surface, the first-order partial derivative is: The second-order partial derivative is: The coefficients of the first basic form are defined as follows: , , ; remember The second basic form coefficient is defined as follows: , , ; Calculate Gaussian curvature and mean curvature H: , ; Calculate the principal curvature: , ; Because numerical errors can result in extremely small negative values, when At that time, Forced to be set to 0, at this time Within the annular region of the copper-embedded aperture, typically with the aperture center as the center, the inner radius is equal to half the aperture diameter, and the outer radius is equal to 0.6 times the aperture diameter. Specific parameters can be adjusted according to the actual aperture diameter. The mean and standard deviation of the principal curvature and Gaussian curvature are statistically analyzed to form a three-dimensional morphological feature vector. In the formula, This is the arithmetic mean of all pixels within the region. denoted as the standard deviation of all pixels within the region.

[0026] Reference Figure 3 As shown, dynamically eliminating the overall drift in the reflectivity of a copper surface includes: For the same copper-embedded structure area, based on the set of valid light source indices remaining after removal, record the actual grayscale value of each pixel under each valid light source and the unit normal vector obtained by solving; A standard reflectivity reference value is set using a pre-calibrated copper surface reference area with known reflectivity; For each effective light source, substitute the standard reflectance reference value to calculate the theoretical Lambertian gray value at each pixel. Calculate the actual grayscale mean and theoretical Lambertian grayscale mean of all pixels and all effective light sources within the region. The actual grayscale mean is equal to the sum of all actual grayscale values ​​of all pixels within the region under the set of effective light sources, divided by the product of the number of pixels in the region and the number of effective light sources. The theoretical Lambertian grayscale mean is calculated similarly. The ratio of the actual grayscale mean to the theoretical Lambertian grayscale mean is defined as the reflectance drift coefficient. For each pixel within the region, the calibrated reflectance is equal to the original diffuse reflectance divided by the reflectance drift coefficient; Set a threshold range for reflectivity drift coefficient. If the reflectivity drift coefficient exceeds this threshold range, trigger an alarm on the device. A self-calibration model for copper surface reflectivity is constructed, which includes: mean value calculation, drift coefficient calculation, reflectivity calibration, and threshold warning.

[0027] This can be explained by the fact that copper surface oxidation or plating process fluctuations can cause a uniform and proportional change in surface diffuse reflectance. Since the unit normal vector is calculated from the grayscale ratio, it is not sensitive to this overall drift. This solution uses a preset standard reflectance benchmark as input to calculate the theoretical Lambertian grayscale. The reflectance drift coefficient is then calculated using the ratio of the actual collected average grayscale value to the theoretical average Lambertian grayscale value, thus calibrating the original diffuse reflectance to the reflectance under the standard benchmark. When the reflectance drift coefficient exceeds a threshold range, it indicates attenuation of light source intensity, severe copper surface oxidation, or abnormal surface treatment process, requiring the triggering of an equipment maintenance alarm. The standard reflectance benchmark is specifically implemented by pre-calibrating a copper surface reference area with known reflectance: a standard copper sheet with the same material and plating process as the PCB to be inspected is selected. Its absolute diffuse reflectance is first measured using a spectrophotometer at the same wavelength as the light source in the detection system. Then, the copper sheet is fixed to... At the inspection station, images are acquired under the same camera exposure and light source intensity parameters as normal inspection. The ratio of the average gray level of the uniform area of ​​the copper sheet to the theoretical Lambertian gray level is calculated as the system response coefficient. Finally, the absolute reflectance of the standard copper sheet is multiplied by the system response coefficient to obtain the preset standard reflectance benchmark value. The reasonable threshold range is determined based on the historical data statistics of normal copper surface samples. For example, the lower limit is the mean of the reflectance drift coefficient value of normal samples minus three standard deviations, and the upper limit is the mean plus three standard deviations. Under the assumption of normal distribution, this range can cover about 99.7% of normal fluctuation samples. If it exceeds this range, it is judged as abnormal. This threshold range can be dynamically adjusted according to the actual production process control requirements.

[0028] Specifically, from a multi-angle image sequence, the image with the largest angle between the light source direction and the camera optical axis is selected as the original grayscale image. The texture feature vector of the copper-embedded aperture edge is extracted, including: The image with the largest angle between the light source direction and the camera optical axis is selected from the multi-angle image sequence as the original grayscale image; Extract the region of interest centered on the copper-embedded hole, with a side length twice the hole diameter; The Sobel operator is used to calculate the gradient magnitude and direction of each pixel; The gradient direction is divided into 9 equally wide gradient direction intervals, and a gradient direction histogram is calculated in an 8×8 pixel cell. Group adjacent 2×2 cells into blocks, with a block sliding step of 8 pixels, and perform L2 normalization on the histogram vector within the block; The feature vectors of all blocks are concatenated to form the texture feature vector of the edge of the copper-embedded hole.

[0029] This can be explained by the Torrance-Sparrow specular reflection principle: the larger the angle between the light source direction and the observation direction, the weaker the specular reflection component, and the closer the image contrast is to the ideal diffuse reflection situation. This is beneficial for the stable extraction of texture features from the histogram of oriented gradients. In this scheme, the observation direction refers to the camera optical axis. Therefore, in the multi-angle image sequence, the image with the largest angle between the light source direction and the camera optical axis is selected as the original grayscale image, which can suppress the influence of specular reflection on texture features to the greatest extent. The histogram of oriented gradients describes the edge and texture structure by statistically analyzing the local gradient direction distribution, which has a certain robustness to illumination changes. The Sobel operator is used to calculate the gradient, and the division of cells and blocks and L2 normalization ensure the local contrast normalization of the features, making the features more robust to illumination changes. The final feature vector dimension is determined by the size of the region of interest and the block sliding step size, which can effectively characterize the texture pattern of the copper-embedded hole edge and distinguish different defect types. To facilitate understanding of the present invention, the following specific example will be used to further illustrate and explain this solution: For each copper via, the cosine of the angle between the direction vector of each light source and the direction vector of the camera optical axis is calculated from the acquired multi-angle image sequence. The image corresponding to the light source with the smallest cosine value is selected as the original grayscale image. This selection principle can minimize the specular reflection component and make the image closer to the ideal situation of Lambert diffuse reflection. Obtain the pixel coordinates of the center of the copper via in the image and the physical size of the designed aperture of the copper via. Combine this with the pixel equivalent obtained from camera calibration, which is the actual physical size corresponding to each pixel. Divide the physical size of the aperture by the pixel equivalent to obtain the pixel diameter occupied by the aperture in the image. Using the center pixel coordinates as a reference, extend the distance by one pixel diameter to the left, right, up, and down to determine the pixel coordinates of the upper left and lower right corners of the square region of interest. Based on these two coordinates, crop out the corresponding area from the original grayscale image as the region of interest. The gradient of each pixel is calculated using the Sobel operator, with the horizontal and vertical gradient convolution kernels configured as follows: Horizontal gradient convolution kernel: ; Vertical gradient convolution kernel: ; The gradient magnitude and gradient direction corresponding to each pixel are as follows; Gradient magnitude: Gradient direction: To adapt to the statistical rules of unsigned gradients in the directional gradient histogram, the gradient direction is uniformly mapped from [0, 360] degrees to [0, 180] degrees for unsigned gradient directions. Then increase ,like Then reduce This ensures that all gradient directions fall within the effective statistical interval. The region of interest is divided into multiple non-overlapping cells, each cell being 8×8 pixels in size. The [0, 180] degree is divided into 9 gradient direction intervals of equal width, each interval being 20 degrees wide. Within each cell, each pixel is voted to the corresponding direction interval based on its gradient direction, with the voting weight being the gradient magnitude of that pixel. Thus, each cell yields a 9-dimensional histogram vector. Two adjacent 2×2 cells are grouped into a feature block, with a sliding step of 8 pixels (the width of a single cell) to ensure local overlap between adjacent feature blocks and fully preserve local texture information. The number of effective feature blocks in the horizontal and vertical directions is calculated based on the pixel width and height of the region of interest: Number of effective feature blocks in the horizontal direction: Number of effective feature blocks in the vertical direction: Total number of feature blocks: ; For each block, the histogram vectors of its four cells are concatenated to obtain a 36-dimensional original block feature vector. Then, L2 normalization is performed. After normalization, the features within the block are more robust to changes in illumination. The normalized feature vectors of all blocks are concatenated in the scanning order from left to right and from top to bottom to form the texture feature vector of the edge of the copper-embedded hole. Histogram of Oriented Gradients (HGP) features describe the statistical distribution of local gradient directions in an image. They are sensitive to the geometric shape and texture changes at the edges of copper-embedded holes. Compared with three-dimensional topography features, HGP features focus on two-dimensional grayscale textures. The two are complementary. By using the image with the largest angle between the light source direction and the camera optical axis as input, texture distortion caused by specular reflection can be effectively suppressed.

[0030] Specifically, the 3D shape feature vector and texture feature vector are standardized and then concatenated in a feature layer. This concatenation is then fed into a multi-kernel support vector machine classifier, which outputs the defect type and its corresponding confidence score, including: Z-score normalization is applied to the 3D shape feature vector and texture feature vector respectively to eliminate differences in dimensions and scale. The two standardized feature vectors are concatenated end to end to obtain a combined feature vector; A multi-kernel support vector machine is used as the classifier, with the kernel function being a convex combination of a Gaussian kernel and a multinomial kernel. The parameters are determined through K-fold cross-validation. Platt scaling is used to convert SVM decision values ​​into probability outputs, and the category corresponding to the highest probability is taken as the defect type. This probability value is the confidence level.

[0031] This can be explained by the fact that 3D shape features and texture feature vectors have different physical units and value ranges. Direct concatenation will lead to the large-scale features dominating the classification results. Z-score standardization transforms each feature into a distribution with a mean of 0 and a standard deviation of 1, so that different features have the same weight contribution in the classifier. Multi-kernel SVM combines the local fitting ability of Gaussian kernel and the global generalization ability of multinomial kernel, which can better adapt to mixed feature distributions. Platt scaling maps the original decision values ​​of SVM to probability output to obtain confidence. To facilitate understanding of the present invention, the following specific example will be used to further illustrate and explain this solution: Based on historical data, a training sample set is constructed. Each sample contains a three-dimensional shape feature vector and a texture feature vector. The mean and standard deviation of the training set are calculated for each feature dimension. For the original feature vector of the current test sample, it is standardized by Z-score. The standardized three-dimensional shape feature vector and texture feature vector are concatenated end to end to obtain a combined feature vector. A multi-kernel support vector machine is used, with the kernel function being a convex combination of a Gaussian kernel and a polynomial kernel. In the formula, To combine kernel function values, , It is a combined feature vector of two different copper via samples. For kernel weight coefficients, For Gaussian kernel bandwidth parameters, The square of the Euclidean distance. Let K be the kernel degree of the polynomial; The training sample set is divided into K disjoint subsets. Each time, K-1 subsets are used to train the model, and the remaining subset is used for validation. This process is repeated K times. In the parameter grid, the parameter combination that yields the highest average classification accuracy over K folds is selected as the optimal parameter set. , , Optimal value; for the decision function value output by the classifier, convert it into a probability using Platt scaling: In the formula, Let q be the posterior probability that a given combination of feature vectors q belongs to class s. This represents the decision function value of a binary SVM for class s. , , which are scalar parameters obtained by maximizing the log-likelihood estimate on the training set, used to adjust the shape and offset of the Sigmoid function; For multi-class classification problems, a one-to-one or one-to-many strategy is usually adopted to fit the probability of each binary classifier, and then normalize to obtain the probability of each class. Pre-defined classification categories, including but not limited to: normal, dent, bulge, void and crack, calculate the posterior probability of each category, take the category with the highest probability as the output defect type, and the corresponding probability value is the confidence level.

[0032] Specifically, based on the defect type and confidence level, the re-inspection priority and dynamic judgment threshold for each copper-embedded structure are determined according to the defect type, including: Preset a basic priority and corresponding baseline curvature threshold for each defect type; The final priority is calculated based on the base priority set for each defect type and the confidence level output by the classifier. Based on the baseline curvature threshold set for each defect type, and combined with the confidence level output by the classifier, a dynamic judgment threshold is set. When multiple defects coexist, the highest priority and the lowest dynamic threshold of the corresponding defect type are used.

[0033] This can be explained as follows: In industrial visual inspection, different defect types have varying degrees of impact on product quality, necessitating the setting of differentiated re-inspection priorities. Simultaneously, the confidence level output by the classifier reflects the reliability of the current judgment result: when the confidence level is high, the judgment threshold should be appropriately lowered to improve detection sensitivity; when the confidence level is low, the threshold should be raised to suppress false positives. By dynamically calculating the final priority using a combination of basic priority and confidence level, resources can be preferentially allocated to severe defects with high confidence levels. In cases where multiple defects exist in the same inspection area, such as both dents and cracks, the highest priority and the lowest dynamic threshold should be used to ensure that the most serious problem is addressed first. To facilitate understanding of the present invention, the following specific example will be used to further illustrate and explain this solution: Based on PCB design specifications and quality control requirements, a basic priority and corresponding baseline curvature threshold are pre-defined for each defect type, as shown in Table 1 below: Based on the base priority set for each defect type, and combined with the confidence score output by the classifier, the final priority is calculated, and its expression is as follows: In the formula This represents the final re-inspection priority, with values ​​ranging from 1 to 5. A higher value indicates that the defect requires a higher priority for re-inspection or processing. Based on priority, This is the rounding function. This is a maximum value function, ensuring that the final priority is at least 1, and avoiding a priority of 0 due to excessively low confidence. Based on the baseline curvature threshold set for each defect type, and combined with the confidence level output by the classifier, a dynamic judgment threshold is set, the expression of which is: In the formula, For the dynamic judgment threshold of defect type i, For the baseline curvature threshold of defect type i, This is the relaxation coefficient, and an empirical value of 0.3 can be taken. When the classification confidence is high, the threshold should be appropriately lowered to improve the detection sensitivity. When the confidence is low, the threshold should be close to the baseline value to avoid misjudgment caused by noise, thereby balancing the risks of missed detection and false alarm.

[0034] In summary, the advantages of this invention are: by iteratively eliminating specular reflection contamination through photometric stereoscopic 3D reconstruction and self-calibrating copper surface reflectivity, combined with multi-kernel SVM classification of 3D morphology and 2D texture features, high-precision and robust visual inspection of copper-embedded structures in high-reflectivity rigid PCB metal holes is achieved.

[0035] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.

Claims

1. A rigid PCB metal hole copper-embedded structure visual detection system, characterized in that, include: The data acquisition module is used to solve the light source direction vector of each light source in the camera coordinate system by means of the mirror sphere calibration method, and to acquire multi-angle image sequences of the copper-embedded structure under the illumination of light sources in multiple known directions according to the PCB sample to be inspected. The mirror reflection optimization module is used to solve the unit normal vector distribution map and relative height map of each point on the surface of the copper-embedded structure by iteratively removing the mirror reflection contamination observations based on the multi-angle image sequence and the light source direction vector. The topography feature module is used to calculate the Gaussian curvature and principal curvature of each copper-embedded area in physical coordinates based on the reconstructed relative height map, and construct a three-dimensional topography feature vector. A reflectivity correction module is used to establish a copper surface reflectivity self-calibration model, and dynamically eliminate the overall drift of copper surface reflectivity based on the grayscale statistical characteristics of the remaining effective light source after iterative elimination of the same copper embedded structure. The texture feature module is used to select the image with the largest angle between the light source direction and the camera optical axis from a multi-angle image sequence based on the directional gradient histogram as the original grayscale image, and extract the texture feature vector of the copper-embedded hole edge. The defect identification module is used to standardize the three-dimensional shape feature vector and texture feature vector, then concatenate the feature layers, input them into a multi-kernel support vector machine classifier, and output the defect type and corresponding confidence level. The detection priority module is used to determine the re-inspection priority and dynamic judgment threshold of each copper-embedded structure according to the defect type and confidence level. 2.The visual inspection system for rigid PCB copper-embedded metal hole structure of claim 1, wherein, The specific steps of solving the light source direction vector in the camera coordinate system using the mirror sphere calibration method include: Set up several point light sources in different directions, and use the mirror sphere calibration method to pre-calibrate and solve the light source direction vector of each light source in the camera coordinate system; Under individual illumination from each light source, grayscale images of the same copper-embedded structure are acquired to obtain the grayscale values ​​at each pixel. The acquired grayscale images are preprocessed with median filtering to eliminate noise interference. 3.The visual inspection system for rigid PCB copper-embedded metal hole structure of claim 2, wherein, The method of iteratively removing specular reflection contamination observations to solve the normal vector distribution map and relative height map of each point on the surface of the copper-embedded structure specifically includes: Include all configured light source numbers into the valid light source index set; Based on the light source direction vector and the gray value vector corresponding to the current set of effective light sources, a temporary vector is initially estimated using the least squares method. Calculate the magnitude of the temporary vector and divide the temporary vector by its magnitude to obtain the temporary unit normal vector; For each light source in the current set of valid light sources, calculate the dot product between the temporary unit normal vector and the direction vector of that light source. If the dot product is less than or equal to 0, it indicates that the light source is located on the back side of the surface and cannot provide valid information. In this case, the light source is removed from the set of valid light sources. Based on the observations in the remaining effective light source set, a product vector is calculated using the least squares method, and the diffuse reflectance and unit normal vector are calculated using the product vector. Wherein, the diffuse reflectance of the current pixel is equal to the magnitude of the product vector, and the unit normal vector is equal to the product vector divided by its magnitude; For each light source in the remaining set of effective light sources, calculate the theoretical Lambertian gray value based on the unit normal vector and diffuse reflectance; The absolute residual is obtained by subtracting the actual collected gray value from the theoretical Lambertian gray value and taking the absolute value. Set a residual threshold and define the relative residual as the sum of the absolute residual divided by the theoretical Lambertian gray level and a very small positive number. If the maximum relative residual exceeds the residual threshold, the light source with the largest residual is removed from the set. Perform an iterative loop on the current pixel until the number of effective light sources meets the solution requirements and all relative residuals are below the residual threshold, or the number of iterations reaches the upper limit, or the number of effective light sources is insufficient to support the solution. Stop the iteration and obtain the unit normal vector and original diffuse reflectance of the current pixel. By traversing all pixels in the entire image, the normal vector distribution map of the whole image is obtained. Based on the normal vector distribution map, the relative height map is reconstructed using the Poisson integral method.

4. The visual inspection system for rigid PCB copper-in-hole structure according to claim 3, wherein, The morphological feature module specifically includes: The unit transformation unit is used to convert the reconstructed relative height map from pixel coordinates to camera image plane physical coordinates, and to convert the pixel relative height to physical height through steps of known standard height; The surface fitting unit is used to perform quadratic surface fitting on the physical height map in the local neighborhood of each pixel to obtain the first and second partial derivatives of the surface. The basic form coefficient unit is used to calculate the first and second basic form coefficients of a surface based on its first and second partial derivatives. Curvature unit, used to calculate Gaussian curvature, mean curvature and principal curvature based on the first basic form coefficient and the second basic form coefficient; The morphological feature unit is used to statistically analyze the mean and standard deviation of Gaussian curvature and principal curvature within the annular region of the copper-embedded aperture, forming a three-dimensional morphological feature vector.

5. The visual inspection system for rigid PCB copper-in-hole structure according to claim 4, wherein, The establishment of a self-calibration model for copper surface reflectivity, based on the grayscale statistical characteristics of the same copper-embedded structure under the remaining effective light source after iterative elimination, dynamically eliminates the overall drift of copper surface reflectivity, specifically including: For the same copper-embedded structure area, based on the set of valid light source indices remaining after removal, record the actual grayscale value of each pixel under each valid light source and the unit normal vector obtained by solving; A standard reflectivity reference value is set using a pre-calibrated copper surface reference area with known reflectivity; For each effective light source, substitute the standard reflectance reference value to calculate the theoretical Lambertian gray value at each pixel. Calculate the actual grayscale mean and theoretical Lambertian grayscale mean of all pixels in the region under all effective light sources. The actual grayscale mean is equal to the sum of all actual grayscale values ​​of all pixels in the region under the set of effective light sources divided by the product of the number of pixels in the region and the number of effective light sources. The theoretical Lambertian grayscale mean is calculated in the same way. The ratio of the actual mean gray level to the theoretical mean Lambertian gray level is defined as the reflectance drift coefficient. For each pixel within the region, the calibrated reflectance is equal to the original diffuse reflectance divided by the reflectance drift coefficient; Set a threshold range for reflectivity drift coefficient. If the reflectivity drift coefficient exceeds this threshold range, trigger an alarm on the device. A self-calibration model for copper surface reflectivity is constructed, which includes: mean value calculation, drift coefficient calculation, reflectivity calibration, and threshold warning.

6. The visual inspection system for rigid PCB metal hole copper embedding structure according to claim 5, characterized in that, The texture feature module specifically includes: The original grayscale image unit is used to select the image with the largest angle between the light source direction and the camera optical axis from the multi-angle image sequence as the original grayscale image; The region of interest (ROI) cell is used to extract the region of interest centered on the copper via and with a side length twice the diameter of the via. Sobel operator unit, used to calculate the gradient magnitude and direction of each pixel using the Sobel operator; The histogram cell is used to divide the gradient direction into 9 equally wide gradient direction intervals and to calculate the gradient direction histogram within an 8×8 pixel cell. The normalization unit is used to group adjacent 2×2 cells into blocks with a block sliding step of 8 pixels, and to perform L2 normalization on the histogram vector within the block. Texture feature units are used to concatenate the feature vectors of all blocks to form the texture feature vector of the copper-embedded hole edge.

7. A visual inspection system for rigid PCB metal hole copper embedding structure according to claim 6, characterized in that, The process of standardizing the 3D shape feature vector and texture feature vector, concatenating them at the feature layer, and inputting them into a multi-kernel support vector machine classifier to output the defect type and corresponding confidence score specifically includes: Z-score normalization is applied to the 3D shape feature vector and texture feature vector respectively to eliminate differences in dimensions and scale. The two standardized feature vectors are concatenated end to end to obtain a combined feature vector; A multi-kernel support vector machine is used as the classifier, with the kernel function being a convex combination of a Gaussian kernel and a multinomial kernel. The parameters are determined through K-fold cross-validation. Platt scaling is used to convert SVM decision values ​​into probability outputs, and the category corresponding to the highest probability is taken as the defect type. This probability value is the confidence level.

8. A visual inspection system for rigid PCB metal hole copper embedding structure according to claim 7, characterized in that, The specific steps of determining the re-inspection priority and dynamic judgment threshold for each copper-embedded structure based on defect type and confidence level include: Preset a basic priority and corresponding baseline curvature threshold for each defect type; The final priority is calculated based on the base priority set for each defect type and the confidence level output by the classifier. Based on the baseline curvature threshold set for each defect type, and combined with the confidence level output by the classifier, a dynamic judgment threshold is set. When multiple defects coexist, the highest priority and the lowest dynamic threshold of the corresponding defect type are used.