PCB defect online detection method based on image visual analysis

By analyzing the spectral data of the solder pad surface using multispectral imaging technology, identifying oxide layer and microcrack features, and constructing a corrosion propagation prediction model, the problem of identifying potential problems during the aging process of the solder pad surface is solved, and efficient reliability detection and early warning of printed circuit boards are achieved.

CN121068634APending Publication Date: 2025-12-05MEIZHOU HONGYU CIRCUIT BOARD CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511166273.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-20
Publication Date
2025-12-05

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately identify the oxide layer and microscopic changes on the surface of solder pads in complex environments. In particular, they lack the ability to proactively identify potential problems in the early stages of aging, resulting in the failure to detect the risk of solder pad reliability degradation in a timely manner.

Method used

Spectral data of the printed circuit board pad surface are collected by multispectral imaging equipment. The changes in the reflectance characteristics of the oxide layer on the copper foil surface are analyzed to identify the precursor corrosion zone with the oxide layer thickness gradient, extract the microcrack features, quantify the accumulation area of ​​copper oxide, and construct a corrosion propagation prediction model in combination with temperature and humidity cycling aging conditions to generate a reliability degradation risk level and set the detection cycle.

Benefits of technology

It enables efficient detection and accurate early warning of corrosion on the surface of solder pads, improving the reliability and stability of printed circuit boards in harsh environments, and can detect potential risk areas before corrosion causes substantial damage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121068634A_ABST
    Figure CN121068634A_ABST
Patent Text Reader

Abstract

The invention provides a PCB defect online detection method based on image visual analysis, and the method comprises the steps: collecting the spectral data of the surface of a printed circuit board bonding pad, covering an ultraviolet band to a near-infrared band, and determining the spectral feature distribution of the surface of the printed circuit board bonding pad in combination with the reflection characteristics of the surface of a copper foil; according to the spectral feature distribution of the surface of the printed circuit board bonding pad, identifying the oxide layer features of the surface of the copper foil, and analyzing a reflectivity abnormal region to obtain the position of a precursor corrosion region with gradient change of the oxide layer thickness; performing edge enhancement processing on the spectral image according to the extracted micro-crack characteristics of the edge of the printed circuit board bonding pad to obtain the shape and distribution information of the crack, and judging whether the crack presents a dendritic corrosion trend or not; and according to the degradation risk level of the reliability of the welding printed circuit board, generating a corresponding early warning signal, through comprehensive analysis of spectral characteristics and corrosion forms, obtaining a stability index of the surface of the bonding pad in a high-sulfur environment, and judging whether an early warning trigger condition is met or not.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of information technology, and in particular to a PCB defect online detection method based on image visual analysis. BACKGROUND

[0002] In the field of electronic manufacturing, the quality of printed circuit boards is directly related to the stability and reliability of electronic products, and its importance is self-evident. As the core component of electronic component connection, the pad state on the surface of the circuit board has a decisive influence on the welding effect and long-term use performance, and any slight defect may cause a major failure, so accurate detection of pad surface defects has become a key requirement for industry development. However, the current mainstream detection methods often appear to be inadequate when facing the evolution of defects in complex environments. These methods rely on a single visual feature or fixed condition surface state analysis, and are difficult to adapt to the diversification of pads in dynamic aging processes such as temperature and humidity cycles or high sulfur environments, especially in the early stages of defects, lacking the ability to identify potential problems in advance, resulting in many hidden dangers that are not discovered in time before they develop to a serious level. The more serious challenge is the microscopic change characteristics of the pad surface during the aging process. First, the oxide layer on the surface of the copper foil will gradually form a unique reflection characteristic under the action of the environment, and this characteristic presents dynamic changes due to different aging stages, increasing the difficulty of identification. With the accumulation of the oxide layer, fine cracks may appear on the edge of the pad and further evolve into complex corrosion lines or even oxide accumulation areas, and this evolution process from micro to macro makes it difficult for traditional detection methods to capture early signals, and thus unable to realize early warning of potential risks. Therefore, how to analyze the reflection characteristic changes of the oxide layer on the surface of the copper foil, accurately identify the precursor corrosion area in the early stage of aging, and on this basis evaluate the reliability degradation of the pad in harsh environments, has become a key problem that needs to be solved. SUMMARY

[0003] The present application provides a PCB defect online detection method based on image visual analysis, mainly including:

[0004] Spectral data of the printed circuit board (PCB) pad surface, covering the ultraviolet to near-infrared bands, is collected to obtain spectral image data, and the spectral feature distribution of the PCB pad surface is determined. The spectral feature distribution is compared with a pre-established spectral fingerprint database to identify the oxide layer characteristics on the copper foil surface, analyze areas of abnormal reflectivity, and determine the location of the precursor corrosion zone where the oxide layer thickness gradient changes. Based on the location of the precursor corrosion zone, micro-crack features of the PCB pad edges are extracted, and edge enhancement processing is performed on the spectral image data to obtain crack morphology and distribution information, determining whether the crack morphology exhibits a dendritic feature. Based on whether the crack morphology exhibits a dendritic feature, [further analysis is needed]. Analyze the spectral characteristics of copper oxide in the spectral image data to quantify the area and distribution density of oxide aggregation regions and determine the severity of corrosion propagation. Based on the severity of corrosion propagation and historical data under temperature and humidity cyclic aging conditions, construct a corrosion propagation prediction model. The inputs are spectral feature distribution and environmental parameters, and the outputs are corrosion propagation area and depth. Based on the corrosion propagation area and depth, determine the degradation risk level of the printed circuit board pad reliability. Based on the degradation risk level, combined with the spectral feature distribution and crack morphology, calculate the stability index vector to determine whether the early warning trigger condition has been met. Set the time interval for the next detection cycle based on the early warning trigger condition.

[0005] Furthermore, the step of acquiring spectral data of the printed circuit board pad surface using a multispectral imaging device, covering the ultraviolet to near-infrared bands, to obtain spectral image data and determine the spectral characteristic distribution of the printed circuit board pad surface includes:

[0006] A point-by-point scan of the printed circuit board pad area is performed to obtain the reflectance spectral intensity value of each sampling point in the ultraviolet to near-infrared band, constructing a reflectance spectral curve dataset. For this dataset, principal component analysis (PCA) is used, with the input being a vector of reflectance values ​​corresponding to each wavelength, and the output being a dimensionality-reduced principal component feature vector. Based on the principal component feature vector, a two-dimensional feature map of the pad surface is constructed, where the horizontal and vertical axes represent physical locations, and pixel values ​​encode surface reflectance characteristic parameters. Difference operations are performed on the encoded values ​​of adjacent pixels in the two-dimensional feature map to obtain the feature change rate. Based on the spatial distribution of the feature change rate, the spectral feature distribution of the printed circuit board pad surface is determined.

[0007] Furthermore, the step of comparing the spectral feature distribution with a pre-established spectral fingerprint database to identify the oxide layer characteristics on the copper foil surface, analyzing areas of abnormal reflectance, and determining the location of the precursor corrosion zone where the oxide layer thickness gradient changes includes:

[0008] Based on the spectral feature distribution, the characteristic spectral curve of each sampling point is extracted and cross-correlated with the standard copper oxide spectral template in the spectral fingerprint database to obtain the correlation coefficient. Based on the correlation coefficient, the oxide region is determined and a spatial distribution map of the oxide region is generated. For the spatial distribution map of the oxide region, the least squares fitting method is used to represent the measured spectrum as a linear combination of the pure copper substrate spectrum and the oxide layer spectrum, and the oxide layer thickness value of each sampling point is calculated. Based on the oxide layer thickness value, a thickness distribution matrix is ​​constructed, and the thickness values ​​of adjacent sampling points are differentially calculated to obtain the thickness gradient vector. Continuous regions with gradient values ​​exceeding a preset threshold are marked to determine the location of the precursor corrosion zone.

[0009] Furthermore, based on the location of the precursor corrosion zone, the micro-crack features of the printed circuit board pad edges are extracted, and edge enhancement processing is performed on the spectral image data to obtain crack morphology and distribution information, including:

[0010] Based on the location of the precursor corrosion zone, the spectral reflectance difference between adjacent pixels is calculated, potential crack points with differences exceeding a preset threshold are marked, and the potential crack points are connected to form an initial crack profile. The Laplacian operator is used to perform edge enhancement processing on the spectral image data to extract the precise crack profile line, calculate the curvature information of the precise crack profile line, and generate the crack morphology feature matrix and spatial distribution map.

[0011] Furthermore, after generating the morphological feature matrix and spatial distribution map of the crack, the following is included:

[0012] Based on the morphological feature matrix and spatial distribution map of the cracks, the number of branch points and the branch angle of each crack are counted, and the proportion of dendritic cracks to the total number of cracks in the region is calculated. Regions with a proportion exceeding a preset threshold are marked as dendritic corrosion regions. For the dendritic corrosion regions, the absorption peak positions and intensity values ​​of copper oxide in the spectral image data are extracted to generate an intensity distribution matrix, the boundary of the oxide aggregation region is determined, and the area and distribution density of the oxide aggregation region are calculated.

[0013] Furthermore, based on the severity of corrosion expansion and combined with historical data under temperature and humidity cyclic aging conditions, a corrosion expansion prediction model is constructed. The inputs are spectral characteristic distribution and environmental parameters, and the outputs are the corrosion expansion area and depth, including:

[0014] Based on the severity of corrosion propagation, the intensity of oxide absorption peaks and crack density data in the spectral feature distribution are extracted. Combined with environmental parameters and historical aging data, a multidimensional feature vector is constructed. Using a multiple linear regression method, the multidimensional feature vector is input, and the predicted values ​​of corrosion propagation area and depth are output.

[0015] Furthermore, the step of combining the spectral characteristic distribution and crack morphology to calculate the stability index vector and determine whether the early warning triggering condition has been met includes:

[0016] Based on the spectral characteristic distribution and crack morphology, the corrosion resistance index is calculated as the reciprocal of the oxide layer thickness growth rate, and the structural integrity index is calculated as the proportion of the area of ​​the crack-free region to the total area. A stability index vector containing the corrosion resistance index and the structural integrity index is generated. Based on the stability index vector, regions that meet a preset threshold are marked, and an early warning signal is generated.

[0017] Furthermore, setting the next detection cycle time interval based on the early warning triggering condition includes:

[0018] Based on the warning triggering conditions, the contour lines and curvature information of the crack morphology are extracted, the boundary coordinates of the oxide accumulation area are extracted, and the spectral feature distribution, crack morphology and oxide accumulation area data are integrated and stored as historical records. Based on the characteristic peak positions and intensity information of the spectral feature distribution, the characteristic reference values ​​of the spectral fingerprint database are updated. Based on the characteristic reference values, the corrosion development rate is calculated and the time interval for the next detection cycle is set.

[0019] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:

[0020] This invention discloses an online PCB defect detection method based on image visual analysis. Addressing the reliability degradation problem caused by copper foil surface oxidation and cracking in high-sulfur environments, the method acquires spectral data in the ultraviolet to near-infrared bands using a multispectral imaging device. It analyzes the surface roughness, oxidation degree, and metal purity characteristics of the copper foil, and combines this with a spectral fingerprint database to accurately identify oxide layer thickness, color differences, and chemical composition, locating precursor corrosion zones. Further, edge enhancement processing extracts the length, width, and propagation direction of microcracks to determine dendritic corrosion trends, quantifies the area and distribution density of copper oxide accumulation areas, and assesses the severity of corrosion. Combining historical data from temperature and humidity cycling aging, a corrosion propagation prediction model is constructed to predict corrosion area, depth, and evolution rate, generating reliability degradation risk levels and early warning signals. A comprehensive analysis of corrosion resistance, structural integrity, and electrical connection reliability determines whether an early warning is triggered and generates a corrosion status report. This invention achieves efficient detection and accurate early warning of solder pad surface corrosion through comprehensive analysis of spectral characteristics and corrosion morphology, improving the reliability and stability of printed circuit boards in harsh environments. Attached Figure Description

[0021] Figure 1 This is a flowchart of an online PCB defect detection method based on image visual analysis according to the present invention. Detailed Implementation

[0022] The technical solutions of the embodiments of the present invention will be clearly and thoroughly described below with reference to the accompanying drawings. The described embodiments are merely some embodiments of the present invention.

[0023] like Figure 1 This embodiment of an online PCB defect detection method based on image visual analysis may specifically include:

[0024] Step S101: Collect spectral data of the printed circuit board pad surface, covering the ultraviolet to near-infrared band, and determine the spectral characteristic distribution of the printed circuit board pad surface by combining the reflection characteristics of the copper foil surface.

[0025] The printed circuit board pad area was scanned point-by-point using a multispectral imaging device to obtain the reflectance spectral intensity value of each sampling point in the ultraviolet to near-infrared band. Based on the reflectance differences of the copper foil material at different wavelengths, a reflectance spectral curve dataset was established. The reflectance change in the near-infrared short band was negatively correlated with surface roughness, while the absorption peak depth in the near-infrared mid band was positively correlated with the degree of oxidation. For each spectral curve in the reflectance spectral curve dataset, principal component analysis was used. The input was the reflectance value vector corresponding to each wavelength, and the output was the dimensionality-reduced principal component feature vector. The first five principal components were extracted as spectral feature representations. Based on the linear relationship between the reflectance peak intensity of the copper foil surface in the visible green band and the metal purity, the purity index value of each sampling point was calculated. If this value was lower than a preset purity threshold, the sampling point was marked as a potential defect point. Based on the marked potential defect points and their corresponding principal component feature vectors, a two-dimensional feature map of the pad surface is constructed, where the horizontal and vertical coordinates represent physical locations. The pixel values ​​are encoded by a weighted summation method to encode three feature parameters: surface roughness, oxidation degree, and metal purity. The feature change rate is obtained by performing a difference operation on the encoded values ​​of adjacent pixels. Based on the spatial distribution of the feature change rate, the spectral feature distribution of the printed circuit board pad surface is determined.

[0026] In one possible implementation, a multispectral imaging device achieves full-spectrum scanning of the printed circuit board pad surface by configuring light sources and detector arrays of different wavelengths. The ultraviolet band mainly reflects the microstructural features of the copper foil surface, the visible light band reflects the basic optical properties of the material, while the near-infrared band is more sensitive to changes in surface chemical composition. During point-by-point scanning, the spot diameter of each sampling point is controlled within 50 micrometers to ensure that the acquired spectral data has sufficient spatial resolution.

[0027] Specifically, the negative correlation between surface roughness and near-infrared short-band reflectivity stems from the scattering mechanism. As the surface roughness of the copper foil increases, incident light undergoes multiple scatterings within the microscopic uneven structure, leading to a decrease in specular reflection and an increase in diffuse reflection in this band, resulting in a decrease in overall reflectivity. The relationship between oxidation degree and near-infrared mid-band absorption peaks is based on the characteristic absorption band of copper oxide; the thicker the oxide layer, the more pronounced the absorption peak, and the oxidation degree can be quantitatively assessed through peak depth. Principal component analysis (PCA) serves a dual purpose of dimensionality reduction and feature extraction when processing spectral data. The input reflectivity vector contains data from hundreds of wavelengths. Through eigenvalue decomposition of the covariance matrix, the top five principal components with the largest contributions are extracted. The first principal component typically reflects the overall reflectance intensity, while the second and third principal components are often related to specific physicochemical properties. This dimensionality reduction not only reduces data redundancy but also highlights key features related to pad quality.

[0028] In one embodiment, the linear relationship between metal purity and the reflection peak in the visible green light band can be obtained through standard sample calibration. Pure copper has a characteristic reflection peak in this band; the presence of impurities alters the electronic band structure, leading to a decrease in the intensity of the reflection peak. By establishing a calibration curve of reflection peak intensity versus purity, the metal purity of each sampling point can be quickly assessed. A preset purity threshold is determined based on welding process requirements; areas below this threshold may exhibit defects such as incomplete soldering or cold soldering in subsequent welding processes. The construction of the two-dimensional feature map involves the fusion and encoding of multi-dimensional information. The weighted summation method assigns weight coefficients based on the degree of influence of each feature parameter on welding quality, with surface roughness, oxidation degree, and metal purity assigned different weight values. The difference operation between adjacent pixels reveals the spatial variation law of the feature parameters; areas with large feature change rates often correspond to pad edges or defect locations. By analyzing the spatial distribution pattern of feature change rates, the quality distribution characteristics of the pad surface can be identified, providing a basis for subsequent quality control and process optimization.

[0029] Step S102: Based on the spectral characteristic distribution of the printed circuit board pad surface, identify the oxide layer characteristics of the copper foil surface, analyze the reflectivity abnormal area, and obtain the location of the precursor corrosion zone with oxide layer thickness gradient change.

[0030] Based on the acquired spectral feature distribution data of the printed circuit board pad surface, the characteristic spectral curve of each sampling point is extracted and cross-correlated with the standard copper oxide spectral template stored in the pre-established spectral fingerprint database. The correlation coefficient is obtained by summing the spectral intensities at each wavelength and normalizing the results. Regions with correlation coefficients exceeding a preset threshold are identified as oxide regions, thus obtaining a spatial distribution map of the oxide regions. For each oxide point in the spatial distribution map, the least squares fitting method is used to represent the measured spectrum as a linear combination of the pure copper substrate spectrum and the oxide layer spectrum. The spectral components are separated using the fitting coefficients. Based on the linear relationship between absorbance and material thickness in Beer-Lambert's law, the oxide layer thickness value at each sampling point is calculated from the intensity of the oxide layer spectral components. Simultaneously, color differences and chemical composition changes in the oxide layer are identified by changes in reflectance at characteristic wavelengths. Based on the calculated oxide layer thickness value, a thickness gradient vector is obtained by differential calculation of the thickness values ​​of adjacent sampling points. If the gradient value exceeds a preset gradient threshold and the gradient values ​​of multiple adjacent sampling points are all positive, the region is marked as a potential corrosion extension region. The location of the precursor corrosion region is determined by identifying the boundaries of continuous regions where the gradient value exceeds the threshold.

[0031] In one possible implementation, the spectral fingerprint database is established based on the spectral acquisition of a large number of standard samples. Pure copper surfaces exhibit specific reflectance spectral curves in the visible to near-infrared bands, while copper oxide, due to changes in electronic transition energy levels, shows distinct absorption bands near 580 nm and 850 nm. The database stores standard spectral templates for different oxidation degrees, each template corresponding to a specific oxide layer thickness range. Cross-correlation calculations, by point-by-point calculating the similarity between the measured spectrum and the template spectrum, enable rapid identification of the oxidation state.

[0032] Specifically, the cross-correlation calculation involves multiplying and summing the intensity values ​​of the two spectral curves at each wavelength. When the spectrum to be measured is highly similar to a copper oxide template, the correlation coefficient is close to 1; if it is similar to a pure copper template, it is determined to be an unoxidized region. This template-matching-based method avoids complex spectral analysis and improves identification efficiency. The threshold setting of the correlation coefficient takes into account measurement noise and normal fluctuations in surface condition, and is usually set at around 0.85. The application of the least squares fitting method in spectral decomposition is based on the principle of linear superposition. The actual measured mixed spectrum can be regarded as a combination of the pure copper substrate spectrum and the oxide layer spectrum in a certain proportion. The fitting process solves for the contribution coefficient of each component by minimizing the sum of squared residuals.

[0033] For example, if the oxide layer accounts for 30% of the spectral composition and the pure copper substrate accounts for 70%, it indicates that there is partial oxidation at that point. The Lambert-Beer law establishes a quantitative relationship between absorbance and thickness, allowing the thickness value to be directly calculated from the intensity of the oxide layer's spectral composition.

[0034] In one embodiment, the color difference of the oxide layer reflects changes in its chemical composition. Early oxidation forms cuprous oxide, which is red and has high reflectivity at the 600 nm wavelength; deep oxidation forms copper oxide, which is black and has very low reflectivity across the entire visible light spectrum. By analyzing the reflectivity ratio at characteristic wavelengths, it is possible to determine whether the main component of the oxide layer is cuprous oxide or copper oxide, which is crucial for assessing the degree of corrosion. The calculation of the thickness gradient reveals the spatial variation of the oxide layer. The gradient value is obtained by dividing the thickness difference between adjacent sampling points by the spatial distance. When the gradient values ​​at multiple consecutive sampling points are all positive and large, it indicates that the oxide layer thickness increases rapidly in that direction; such regions are often active corrosion fronts. The identification of precursor corrosion zones is based on gradient distribution characteristics; the boundaries of continuous regions with high gradient values ​​are the frontal locations of corrosion propagation.

[0035] It should be noted that this corrosion detection method based on spectral characteristics enables non-contact early diagnosis. By identifying minute changes and gradient distributions in oxide layer thickness, potential risk areas can be detected before corrosion causes substantial damage, providing a reliable basis for preventative maintenance of printed circuit boards.

[0036] Step S103: Based on the extracted micro-crack features of the printed circuit board pad edges, perform edge enhancement processing on the spectral image to obtain the morphology and distribution information of the cracks, and determine whether the cracks exhibit a dendritic corrosion trend.

[0037] Based on the location of the precursor corrosion zone, high-resolution spectral imaging scanning is performed on the edge of the printed circuit board pads. Abnormal change points are identified by calculating the spectral reflectance difference between adjacent pixels. When the difference exceeds a preset threshold, it is marked as a potential crack point. Adjacent potential crack points are connected to form an initial crack profile. The maximum span of the initial crack profile is measured to obtain the length value, and the minimum width of the enclosing rectangle perpendicular to the profile direction is obtained to obtain the width value. The propagation direction is determined by calculating the angle between the principal axis of the profile and the horizontal direction. For the acquired crack length, width, and propagation direction data, the Laplacian operator is used to perform edge enhancement processing on the spectral image. The crack boundary is highlighted by calculating the sum of the second derivatives of each pixel in the horizontal and vertical directions. The precise crack profile is extracted based on the enhanced edge features. The curvature information is recorded by calculating the angle change formed by three adjacent points along the precise profile. Points on the profile with angles less than a preset angle threshold are identified as branch points, resulting in the crack morphological feature matrix and spatial distribution map. Based on the crack morphology matrix and spatial distribution map, the number of branch points of each crack and the angle between each branch and the main trunk are counted. If the number of branch points of a single crack exceeds a preset threshold and the angle between the branches is less than a preset angle threshold, then the crack exhibits a dendritic feature. The proportion of the number of dendritic cracks to the total number of cracks in the area is calculated. When the proportion exceeds a preset proportion threshold, it is determined that the area exhibits a dendritic corrosion trend.

[0038] In one possible implementation, the calculation of spectral reflectance difference is based on the influence of changes in the microstructure of the material surface on optical properties. When microcracks appear on the pad surface, the light scattering characteristics at the crack location differ significantly from those of the intact surface. Incident light undergoes diffraction and multiple scattering at the crack edges, leading to a sharp decrease in local reflectance. The reflectance difference between adjacent pixels is calculated by comparing the spectral intensities of eight neighboring pixels. When the average reflectance difference between the center pixel and its surrounding pixels exceeds a set threshold, it is marked as an anomaly.

[0039] Specifically, the initial crack contour is formed using a region growing method. Starting from the marked outliers, adjacent outliers are searched and connected to form a continuous crack path. The minimum bounding rectangle is determined using a rotating caliper algorithm, calculating the projected length of the crack contour at different angles; the minimum projected width is the crack width. The principal axis direction is obtained by calculating the eigenvectors of the covariance matrix of the contour points; the direction of the eigenvector corresponding to the largest eigenvalue is the main crack propagation direction. The application principle of the Laplacian operator in edge enhancement is based on the second derivative properties of the image. This operator highlights areas with abrupt grayscale changes by calculating the rate of change of pixel grayscale in the horizontal and vertical directions. For crack edges, due to significant optical discontinuities, the second derivative value will show a peak. In the enhanced image, the crack edges appear as bright, continuous lines, facilitating subsequent accurate contour extraction.

[0040] In one embodiment, the curvature information is calculated to reflect the degree of curvature of the crack path. Three consecutive points are selected at fixed intervals along a precise profile, and the angle formed by these three points is calculated. The smaller the angle, the more abrupt the curvature. When the angle is less than 60 degrees, it usually indicates the presence of a branching structure. Identification of branch points relies not only on local curvature but also on the topological structure of the profile to confirm whether multiple paths extend from that point. The assessment of dendritic corrosion is based on the statistical characteristics of crack morphology. Dendritic cracks exhibit obvious fractal characteristics, with multiple branches extending outward from the main trunk, and these branches may generate secondary branches. This morphology is closely related to the mechanisms of grain boundary corrosion or stress corrosion. When corrosion extends along the weak interfaces of the material, it forms a branching structure similar to a tree branch. By statistically analyzing the number of branches, branch angles, and branch length ratios, the development stage of corrosion can be quantitatively assessed.

[0041] It is important to note that early identification of dendritic corrosion trends is crucial for preventative maintenance. Once formed, this corrosion pattern expands rapidly, severely impacting the reliability of electrical connections on solder pads. By analyzing the morphological characteristics and spatial distribution of cracks, intervention measures can be taken before corrosion causes functional failure, significantly extending the lifespan of printed circuit boards.

[0042] In step S104, if a dendritic corrosion trend is observed, the spectral characteristics of the copper oxide in the spectral image are further analyzed to quantify the area and distribution density of the oxide aggregation region, thereby assessing the severity of corrosion propagation. If no dendritic corrosion trend is observed, the spectral characteristics of the pad surface are continuously monitored, and the current state is recorded as a potential risk area, establishing a subsequent tracking and detection sequence.

[0043] If the assessment results show a dendritic corrosion trend, a targeted spectral scan is performed on the area to identify the absorption peak positions of the copper oxide at specific wavelengths. The half-width at half-maximum (WHM) value is obtained by measuring the wavelength width at half the absorption peak height. Combined with the peak intensity, the oxide concentration information is calculated, and the absorption peak intensity value of each sampling point is recorded to form an intensity distribution. The boundary of the oxide accumulation area is determined based on the sampling points whose intensity exceeds a preset threshold. Based on the boundary of the oxide accumulation area, a continuous region composed of adjacent sampling points with intensity exceeding the threshold is identified, and the area value of this continuous region is calculated. The distribution density value is obtained by counting the number of sampling points with absorption peak intensity exceeding the threshold per unit area. The total oxide index is calculated by multiplying the area and the distribution density. When the total index exceeds a preset severity threshold, it is judged as a high corrosion risk, and the severity assessment result of corrosion expansion is obtained. If the assessment results do not show a dendritic corrosion trend, the reflectance values ​​of each sampling point on the current pad surface and the location coordinates of the identified cracks are recorded as spectral feature reference data. A detection data record indexed by timestamps and location coordinates is established, and a periodic detection time interval is set to form a follow-up tracking detection sequence for potential risk areas.

[0044] In one possible approach, the spectral characterization of patina oxides is based on their unique electronic transition properties. Basic copper carbonate, the main component of patina, exhibits distinct absorption peaks at wavelengths of 470 nm and 680 nm, due to the dd electronic transitions of copper ions. The full width at half maximum (FWHM) of the absorption peaks reflects the crystallinity and purity of the oxide. Well-crystallized patina has a narrower FWHM, typically in the range of 20-30 nm, while amorphous or mixed oxides show a significantly larger FWHM.

[0045] Specifically, the full width at half maximum (FWHM) measurement starts from the highest point of the absorption peak, descends to half the peak height, and measures the wavelength span at that height. This parameter is inversely proportional to the oxide concentration; higher concentrations result in stronger intermolecular interactions, leading to energy level broadening and an increased FWHM. By establishing a calibration curve of FWHM versus concentration, the degree of oxide aggregation can be quantitatively analyzed. The intensity distribution matrix records the absorption intensity at each spatial location, forming a two-dimensional concentration distribution map. Continuous region identification employs region labeling methods from image processing. Starting from any sampling point exceeding a threshold, its eight adjacent directions are searched, and points also exceeding the threshold are grouped into the same region. This connectivity analysis accurately defines the oxide aggregation boundary, avoiding misclassification of discrete small oxidation points as large-area corrosion. Area calculation is obtained by counting the number of sampling points within a continuous region and multiplying it by the physical area of ​​a single sampling point.

[0046] In one embodiment, the calculation of distribution density considers not only the number of oxidation points but also the uniformity of their intensity distribution. High-density aggregation often exhibits a gradient distribution with extremely high intensity in the central region, gradually decreasing towards the edges. This distribution pattern is consistent with the diffusion mechanism of corrosion, where corrosion products accumulate at the initial location and then diffuse outwards. The total oxide content index, combining both area and density dimensions, can more accurately reflect the actual range and severity of corrosion impact.

[0047] It is important to note that for cases not exhibiting dendritic corrosion, establishing baseline data is crucial for capturing early signs of corrosion. Subtle changes in reflectivity may indicate alterations in surface condition, while recording crack location coordinates helps track crack propagation rates. By comparing detection data at different time points, the corrosion development rate can be calculated, predicting potential failure times. The detection sequence takes into account the nonlinear characteristics of corrosion development. Initially, the corrosion rate is slow, allowing for relatively longer detection intervals; once signs of accelerated corrosion are detected, the detection interval is automatically shortened. This adaptive detection strategy ensures monitoring effectiveness while avoiding resource waste from over-detection, achieving an optimal balance for preventative maintenance.

[0048] Step S105: Based on the severity assessment of corrosion propagation, analyze the potential evolution path of the precursor corrosion zone in a high-sulfur environment to obtain a corrosion propagation prediction model. The model inputs are the current spectral characteristics, environmental parameters, and historical aging data, and the outputs are the corrosion propagation area, depth, and evolution rate at future time points. Based on the corrosion propagation prediction model, determine the degradation risk level of the reliability of the soldered printed circuit board.

[0049] Based on the severity assessment of corrosion propagation, spectral characteristic parameters of the current corrosion zone are extracted, including oxide absorption peak intensity, crack density, and oxide layer thickness data. Simultaneously, temperature, humidity, and sulfide concentration values ​​recorded by environmental monitoring equipment are acquired. Corrosion evolution records under the same environmental conditions are retrieved from historical databases, constructing a multidimensional feature vector containing spectral characteristics, environmental parameters, and historical evolution data. A corrosion propagation prediction model is established using a multiple linear regression method. The multidimensional feature vector from historical data is used as the training set of independent variables, and the corresponding predicted values ​​of corrosion area, depth, and rate are used as the training set of dependent variables. The regression coefficient matrix is ​​obtained by fitting using the least squares method. Substituting the current multidimensional feature vector into the regression equation, the predicted values ​​of corrosion propagation area, corrosion depth, and evolution rate at future preset time points are calculated. Based on the predicted values ​​of corrosion expansion area, corrosion depth, and evolution rate, the ratio of the remaining effective area of ​​the pad to the initial area is calculated. If the ratio is lower than the preset high-risk threshold, it is determined to be a high degradation risk level. If the ratio is between the high-risk threshold and the medium-risk threshold, it is determined to be a medium degradation risk level. Otherwise, it is determined to be a low degradation risk level, thus determining the degradation risk level of the reliability of the soldered printed circuit board.

[0050] In one possible implementation, the construction of multidimensional feature vectors reflects the multi-factor coupling characteristics of corrosion development. The intensity of oxide absorption peaks in the spectral feature parameters directly reflects the cumulative amount of corrosion products, crack density characterizes the degree of mechanical damage to the material surface, and oxide layer thickness indicates the depth of chemical corrosion. These three parameters are interrelated: cracks provide penetration channels for the corrosive medium, accelerating the oxidation reaction; the volume expansion of oxidation products, in turn, promotes crack propagation, forming a positive feedback mechanism.

[0051] Specifically, the catalytic effect of high-sulfur environments on corrosion cannot be ignored. Sulfides form sulfurous acid and sulfuric acid under humid conditions, significantly lowering the surface pH and accelerating the electrochemical corrosion of copper. Temperature and humidity cycles periodically alter corrosion reaction conditions through thermal expansion and contraction and water vapor condensation. Historical databases record the corrosion evolution under different combinations of temperature, humidity, and sulfide concentrations. Each record includes the initial state, environmental parameters, and final corrosion result, forming the training basis for the predictive model. The establishment of the multiple linear regression model involves feature selection and parameter optimization. Independent variables include current corrosion characteristics and environmental conditions, while the dependent variable is the future corrosion state. Each element in the regression coefficient matrix represents the contribution weight of the corresponding feature to corrosion development.

[0052] For example, the temperature coefficient reflects the accelerating effect of temperature on the corrosion rate, while the humidity coefficient reflects the promoting effect of moisture on electrochemical reactions. The optimal regression coefficients are obtained by minimizing the sum of squared deviations between the predicted and historical measured values ​​using the least squares method.

[0053] In one embodiment, the prediction of corrosion depth takes into account diffusion kinetics. In the early stages of corrosion, surface reactions dominate, leading to rapid depth growth. As the oxide layer thickens, diffusion of the corrosive medium becomes the rate-limiting step, and depth growth slows. This nonlinear characteristic is represented by introducing a power-law term of time into the regression model. The evolution rate is calculated based on the state differences between adjacent time points, reflecting the dynamic characteristics of corrosion.

[0054] It should be noted that the risk level classification is based on the requirements for pad functional integrity. The ratio of remaining effective area directly relates to the reliability of electrical connections. When the effective area drops below 70% of the initial value, contact resistance increases significantly, signal transmission quality deteriorates, and this is defined as high risk; 70%-85% is medium risk, where functionality is still maintainable but close monitoring is required; above 85% is low risk, and routine periodic inspections can be performed. This risk assessment method based on predictive models achieves a shift from passive maintenance to proactive prevention. By quantifying corrosion development trends, targeted measures can be taken before failure occurs, such as adjusting environmental control parameters, applying protective layers, or replacing vulnerable components, significantly improving the service life of printed circuit boards and system reliability.

[0055] Step S106: Based on the degradation risk level of the reliability of the soldered printed circuit board, generate a corresponding early warning signal. Through comprehensive analysis of spectral characteristics and corrosion morphology, obtain the stability index of the solder pad surface in a high-sulfur environment, and determine whether the early warning triggering condition has been met.

[0056] Based on the degradation risk level of the reliability of soldered printed circuit boards, a correspondence between risk level and early warning level is established: high risk level corresponds to Level 1 early warning, medium risk level corresponds to Level 2 early warning, and low risk level corresponds to Level 3 monitoring. The degradation risk level values ​​are converted into corresponding early warning level codes. Crack morphology parameters, distribution information, and oxide accumulation area data obtained from the aforementioned analysis are acquired. Combined with the reflectance changes and absorption peak intensities in the current spectral characteristics, the corrosion resistance index is calculated as the reciprocal of the oxide layer thickness growth rate, the structural integrity index is the proportion of the crack-free area to the total area, and the electrical connection reliability index is the ratio of the effective conductive area to the initial area, resulting in a stability index vector containing these three sub-indices. Based on the three sub-indices in the stability index vector and the early warning level code, if the corrosion resistance index, structural integrity index, or electrical connection reliability index is below a preset threshold, the early warning trigger condition is determined to be met, and an early warning signal containing the early warning level code and the stability index value is generated.

[0057] In one possible implementation, the correspondence between risk levels and warning levels is established based on a quantitative assessment of failure probability. A high-risk level means there is an 80% probability of functional failure within a short period, requiring immediate intervention; this corresponds to a Level 1 warning. A medium-risk level indicates a failure probability between 30% and 80%, allowing sufficient time for planned maintenance; this corresponds to a Level 2 warning. A low-risk level has a failure probability below 30%, requiring only routine monitoring; this corresponds to a Level 3 monitoring level. Warning level codes are numerically encoded for easy automation and rapid identification.

[0058] Specifically, the corrosion resistance index reflects the dynamic ability of a material to resist environmental erosion. The oxide layer thickness growth rate is obtained through linear fitting of continuously monitored data; the larger the thickness increment per unit time, the more active the corrosion. The reciprocal of this rate is taken as the corrosion resistance index, so that a larger value represents stronger corrosion resistance. This definition aligns with engineering intuition and is easy to understand and apply. When the oxide layer grows rapidly, the index value drops sharply, promptly reflecting the deterioration of material performance. The structural integrity index focuses on the degree of physical damage to the pad surface. The area of ​​crack-free regions is obtained through image segmentation and region statistics; its ratio to the total area directly reflects the proportion of intact surfaces. This index is particularly sensitive to the propagation of microcracks. Even if a single crack is very fine, as the crack network develops, the crack-free area decreases rapidly, and the index value drops accordingly. Maintaining structural integrity is crucial for mechanical stress resistance and thermal cycling tolerance.

[0059] In one embodiment, the electrical connection reliability index is designed with the inherent function of welding in mind. The effective conductive area refers to the remaining metal surface after deducting oxide and cracked areas, which still maintains good electrical conductivity. As corrosion progresses, the insulating properties of oxides and the blocking effect of cracks jointly reduce the effective conductive area. When this index drops below 0.7, contact resistance begins to increase significantly, potentially leading to signal attenuation or increased power loss.

[0060] It should be noted that the comprehensive judgment of the three stability indicators uses "OR" logic rather than "AND" logic, reflecting the safety-first design philosophy. Deterioration of any one indicator could lead to welding failure; therefore, an early warning is triggered as soon as any indicator falls below the threshold. This judgment method improves the system's sensitivity and enables it to capture early signs of different failure modes.

[0061] For example, in some cases, the structure remains intact but its corrosion resistance drops sharply, indicating that rapid corrosion is imminent; in other cases, the corrosion resistance is still acceptable, but a large number of microcracks have appeared, increasing the risk of mechanical failure. The generation of early warning signals not only includes the warning level but also carries specific stability index values, providing a quantitative basis for subsequent maintenance decisions.

[0062] Step S107: If the warning trigger condition is met, record the current pad surface data and early warning signal, and generate a corrosion status report. If the warning trigger condition is not met, store the current detection data in the historical database, update the feature benchmark of the spectral fingerprint database, and set the time interval for the next detection cycle.

[0063] If the warning trigger condition is met, the reflectance, absorption peak position, and intensity parameters at the current moment are extracted as spectral feature data; the crack location coordinates, length, width, and propagation direction are extracted as crack distribution data; and the boundary coordinates and concentration distribution of the oxide accumulation area are extracted as oxide area data. These data are then integrated with the level code and stability index value of the early warning signal according to a preset report template format to generate a corrosion status report containing the detection timestamp, location identifier, and corrosion status parameters. If the warning trigger condition is not met, the currently obtained spectral feature data, environmental parameters, and corrosion morphology data are packaged into historical records and added to the historical database in a time-series manner. Simultaneously, the characteristic peak position and intensity information in the current spectral features are extracted, compared with existing templates in the spectral fingerprint database, and weighted averaged to obtain updated feature baseline values. Based on the updated feature baseline values, the change in oxide layer thickness between two adjacent detections is divided by the time interval to obtain the corrosion development rate. An exponential decay function is used to calculate the time interval for the next detection based on the corrosion development rate. The calculation formula can be:

[0064]

[0065] Tnext represents the time interval for the next detection, T0 represents the baseline detection time interval, α represents the decay coefficient, and Rcorr represents the current corrosion development rate. This formula calculates the detection interval using an exponential decay function. The higher the corrosion rate, the shorter the detection interval. The calculated time interval is set as the parameter for the next detection cycle.

[0066] In one possible implementation, the corrosion status report is generated using a structured data format, facilitating subsequent automated processing and traceability analysis. The report template predefines the storage locations and format specifications for various data types, and the detection timestamp is accurate to the second, ensuring the uniqueness of each detection. Location identification uses a three-level coding system of board number, area number, and coordinates, enabling precise location of specific pads. The corrosion status parameter section includes quantitative data and qualitative descriptions. Quantitative data, such as oxide layer thickness and crack density, are directly derived from measurement results, while qualitative descriptions are automatically generated based on preset grading standards.

[0067] Specifically, the historical database design considers the temporal characteristics and correlations of the data. Each historical record not only contains the original data from the current detection but also retains information on the differences from previous detections, facilitating the tracking of the corrosion evolution process. During data packaging, spectral feature data occupies the main storage space, typically containing reflectance values ​​at hundreds of wavelengths. Environmental parameters record the temperature, humidity, and sulfide concentration at the time of detection, which are acquired in real time through environmental monitoring sensors. Corrosion morphology data is stored in the form of image features, including binarized crack distribution maps and oxide concentration distribution maps. The update mechanism of the spectral fingerprint database embodies the idea of ​​adaptive learning. The weighted average weight allocation is based on the freshness and reliability of the data, with newly acquired data given higher weights, enabling the feature benchmark to reflect the changing trends of the corrosion state in a timely manner. The position information of the feature peaks corresponds to specific chemical compositions, and their drift may indicate the formation of new corrosion products. The intensity information reflects the relative content changes of each component. Through continuous updates, the database can accumulate feature patterns of different corrosion stages, improving the accuracy of subsequent detections.

[0068] In one embodiment, the corrosion development rate is calculated based on time-series data of oxide layer thickness. The average corrosion rate is obtained by dividing the difference between two adjacent thickness values ​​by the time interval. This simple difference calculation effectively captures the dynamic characteristics of corrosion. A low rate value indicates that corrosion is in a stable phase; a sudden increase in the rate may indicate the onset of accelerated corrosion.

[0069] It should be noted that the application of the exponential decay function in calculating the detection cycle is based on the principle of risk management. The function's form makes the detection frequency non-linearly related to the corrosion risk, avoiding over-detection in low-risk situations and increasing monitoring intensity in high-risk situations.

[0070] For example, when the corrosion rate is 0.1 micrometers per month, the detection interval can be set to 30 days; when the rate increases to 1 micrometer per month, the interval is automatically shortened to 7 days. This adaptive adjustment mechanism not only ensures the effectiveness of monitoring but also optimizes resource utilization efficiency, realizing intelligent management of preventive maintenance.

[0071] The above-disclosed embodiments are merely preferred embodiments of the present invention and should not be construed as limiting the scope of the invention. Those skilled in the art will understand that implementing all or part of the above-described embodiments and making equivalent changes in accordance with the claims of the present invention are still within the scope of the invention.

Claims

1. A PCB defect online detection method based on image visual analysis, characterized in that, The method comprises: Collecting spectral data of a printed circuit board pad surface covering ultraviolet to near-infrared bands to obtain spectral image data and determine spectral feature distribution of the printed circuit board pad surface; comparing the spectral feature distribution with a pre-established spectral fingerprint database to identify copper foil surface oxide layer features, analyze abnormal reflectivity areas, and determine precursor corrosion area positions of oxide layer thickness gradient changes; extracting microcrack features of printed circuit board pad edges according to the precursor corrosion area positions, performing edge enhancement processing on the spectral image data to obtain crack morphology and distribution information, and determining whether the crack morphology presents dendritic features; analyzing spectral features of copper green oxides in the spectral image data according to whether the crack morphology presents dendritic features, quantifying areas and distribution densities of oxide accumulation areas, and determining corrosion expansion severity; constructing a corrosion expansion prediction model according to the corrosion expansion severity, with spectral feature distribution and environmental parameters as inputs and corrosion expansion area and depth as outputs; determining printed circuit board pad reliability degradation risk levels according to the corrosion expansion area and depth; calculating stability index vectors according to the degradation risk levels, the spectral feature distribution, and the crack morphology to determine whether a warning trigger condition is reached; and setting a next detection cycle time interval according to the warning trigger condition.

2. The method for online detection of PCB defects based on image visual analysis according to claim 1, characterized in that, The method for collecting spectral data of a printed circuit board pad surface by a multispectral imaging device, covering ultraviolet to near-infrared bands to obtain spectral image data and determining spectral feature distribution of the printed circuit board pad surface comprises: Point-by-point scanning of a printed circuit board pad area to obtain reflectance spectral intensity values of each sampling point in the ultraviolet to near-infrared bands and construct a reflectance spectral curve data set; performing principal component analysis on the reflectance spectral curve data set, with reflectance value vectors corresponding to each wavelength as inputs and dimension-reduced principal component feature vectors as outputs; constructing a two-dimensional feature spectrum of the pad surface according to the principal component feature vectors, with horizontal and vertical coordinates representing physical positions and pixel values encoding surface reflectance characteristic parameters; performing difference operation on encoding values of adjacent pixels in the two-dimensional feature spectrum to obtain a feature change rate, and determining spectral feature distribution of the printed circuit board pad surface according to the spatial distribution of the feature change rate. 3.The image vision analysis based PCB defect online detection method according to claim 1, characterized in that, The method for comparing the spectral feature distribution with a pre-established spectral fingerprint database to identify copper foil surface oxide layer features, analyze abnormal reflectivity areas, and determine precursor corrosion area positions of oxide layer thickness gradient changes comprises: According to the spectral feature distribution, a feature spectrum curve of each sampling point is extracted, and a correlation coefficient is obtained by performing cross-correlation operation on the feature spectrum curve and a standard copper oxide spectrum template in a spectrum fingerprint database; according to the correlation coefficient, an oxidation region is determined, and a spatial distribution map of the oxidation region is generated; for the spatial distribution map of the oxidation region, a least square fitting method is used to represent the measured spectrum as a linear combination of a pure copper substrate spectrum and an oxide layer spectrum, and an oxide layer thickness value of each sampling point is calculated; and according to the oxide layer thickness value, a thickness distribution matrix is constructed, a difference operation is performed on thickness values of adjacent sampling points, a thickness gradient vector is obtained, a continuous region with a gradient value exceeding a preset threshold is marked, and a position of the precursor corrosion region is determined.

4. The method for online detection of PCB defects based on image visual analysis according to claim 1, characterized in that, According to the position of the precursor corrosion region, microcrack features of a printed circuit board pad edge are extracted, and edge enhancement processing is performed on the spectral image data to obtain crack morphology and distribution information, including: According to the position of the precursor corrosion region, a spectral reflectivity difference value between adjacent pixels is calculated, potential crack points with a difference value exceeding a preset threshold are marked, and the potential crack points are connected to form an initial crack contour; a Laplace operator is used to perform edge enhancement processing on the spectral image data, an accurate crack contour line is extracted, curvature information of the accurate crack contour line is calculated, a morphology feature matrix and a spatial distribution map of the crack are generated.

5. The method for online detection of PCB defects based on image visual analysis according to claim 4, characterized in that, After the morphology feature matrix and the spatial distribution map of the crack are generated, including: According to the morphology feature matrix and the spatial distribution map of the crack, a branch point quantity and a branch angle value of each crack are counted, a proportion of dendritic crack quantity in total crack quantity in a region is calculated, a region with a proportion exceeding a preset threshold is marked as a dendritic corrosion region; for the dendritic corrosion region, an absorption peak position and an intensity value of copper oxide in the spectral image data are extracted, an intensity distribution matrix is generated, a boundary of an oxide accumulation region is determined, and an area value and a distribution density value of the oxide accumulation region are calculated.

6. The method for online PCB defect detection based on image visual analysis according to claim 1, characterized in that, According to the corrosion expansion severity, historical data under a temperature and humidity cycle aging condition are combined to construct a corrosion expansion prediction model, an input is a spectral feature distribution and an environmental parameter, and an output is a corrosion expansion area and a depth, including: According to the corrosion expansion severity, oxide absorption peak intensity and crack density data in the spectral feature distribution are extracted, environmental parameters and historical aging data are combined to construct a multi-dimensional feature vector; a multiple linear regression method is used, the multi-dimensional feature vector is input, and a corrosion expansion area prediction value and a depth prediction value are output.

7. The method for online PCB defect detection based on image visual analysis according to claim 1, characterized in that, The spectral feature distribution and the crack morphology are combined to calculate a stability index vector, and whether a pre-warning trigger condition is reached is judged, including: According to the spectral feature distribution and the crack morphology, an anti-corrosion ability index is calculated as an inverse of an oxide layer thickness growth rate, a structural integrity index is calculated as a proportion of a crack-free region area to a total area, a stability index vector including the anti-corrosion ability index and the structural integrity index is generated, and a region meeting a preset threshold is marked to generate a pre-warning signal.

8. The method for online PCB defect detection based on image visual analysis according to claim 1, characterized in that, According to the pre-warning trigger condition, a next detection cycle time interval is set, including: According to the early warning trigger condition, the contour line and curvature information of the crack morphology are extracted, the boundary coordinates of the oxide aggregation area are extracted, the spectral feature distribution, crack morphology and oxide aggregation area data are integrated, and are stored as a historical record entry; according to the feature peak position and intensity information of the spectral feature distribution, the feature reference value of the spectral fingerprint database is updated; and according to the feature reference value, the corrosion development rate is calculated, and the next detection cycle time interval is set.

Citation Information

Cited By

  • PCB character printing defect identification and qualification self-evaluation method and system

    CN122200661A