Method and system suitable for identifying true and false defects of PCB (Printed Circuit Board)

By analyzing the grayscale value and comprehensive texture profile data of the PCB board in real time, a multi-dimensional defect probability model was established, which solved the problem of low accuracy in complex structures and diverse defect types in existing detection methods, achieved efficient and reliable identification of true and false defects, and improved the quality detection capability of the PCB board.

CN120411115AActive Publication Date: 2025-08-01SHENZHEN UNITED MULTILAYER CIRCUIT BOARD CO LTD

Patent Information

Application Number
CN202510920226.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2025-08-01
Estimated Expiration
2045-07-04

AI Technical Summary

Technical Problem

When facing complex structures and diverse defect types, the existing PCB board defect detection methods have low detection accuracy, making it difficult to distinguish between true and false defects, and cannot quickly adapt to changes in manufacturing processes, resulting in a decrease in detection reliability and stability.

Method used

By obtaining the image information to be detected on the PCB board, analyzing the grayscale value distribution data in real time, calculating the grayscale difference index, and comprehensively analyzing the surface texture and edge profile data, a multi-dimensional defect probability calculation model is established, including preliminary defect probability values and depth defect probability values, and finally defect identification is performed based on preset screening rules.

Benefits of technology

It improves the accuracy and reliability of authenticity of PCB board defect identification, reduces the misjudgment rate, can adapt to complex structures and diversified defect types, improves quality pass rate and production efficiency, reduces production costs, and provides guarantees for the performance and reliability of electronic equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120411115A_ABST
    Figure CN120411115A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of PCB (Printed Circuit Board) defect identification, and discloses a method and a system suitable for identifying true and false defects of a PCB, and the method comprises the following steps: firstly, obtaining to-be-detected image information of the PCB, obtaining actual gray value distribution data of each detection area in real time under a preset detection condition, obtaining a gray difference index through difference analysis, and judging whether the gray difference index is out of a threshold interval or not. If yes, surface texture data (texture definition, uniformity and direction value) and edge contour data (contour smoothness, continuity and curvature value) of the abnormal area are obtained, a texture abnormal index and a contour deformation index are obtained through analysis, and then a preliminary defect probability value, a depth defect probability value and a comprehensive defect probability value are obtained; and taking corresponding defect identification measures after processing according to the screening rule. The system comprises an image acquisition module, a difference analysis module and the like, can improve the defect identification accuracy and efficiency, and has good real-time performance and adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of PCB board defect recognition, and specifically to a method and system for recognizing true and false defects of PCB boards. Background Art

[0002] At present, with the rapid development of electronic information technology, as an indispensable core component in electronic devices, the quality of PCB boards is directly related to the performance and reliability of electronic devices. With the development of electronic devices towards miniaturization and high precision, the integration of PCB boards is continuously increasing, and the structure is becoming more and more complex. This puts forward higher requirements for the production and manufacturing process of PCB boards, and at the same time makes the defect detection of PCB boards face huge challenges.

[0003] In the production process of PCB boards, due to the influence of various factors such as raw material quality, production process, and equipment parameters, various defects will inevitably occur. These defects not only include real defects that will seriously affect the performance of PCB boards, but also may include some false defects caused by factors such as detection environment and detection equipment errors. Accurately identifying the true and false defects of PCB boards is of crucial significance for improving the quality qualification rate of PCB boards, reducing production costs, and ensuring the stability of electronic devices.

[0004] Traditional PCB board defect detection methods mainly rely on manual visual inspection. This method is not only inefficient, but also the detection results are easily affected by the subjective factors of the inspectors, and it is difficult to meet the needs of large-scale production. Later, with the development of computer vision technology, some automatic detection methods based on computer vision emerged. These methods identify defects by processing and analyzing PCB board images. However, when facing complex PCB board structures and diverse defect types, the existing automatic detection methods often have the problem of low detection accuracy.

[0005] Specifically, when dealing with the difference in gray value distribution, the existing detection methods usually only make simple comparisons, without fully considering the influence of detection condition changes on gray values, which is prone to misjudgment. When analyzing the texture and contour of the defect area, there is a lack of comprehensive and in-depth comprehensive analysis, and it is impossible to accurately grasp the characteristics of the defect. In addition, when judging the defect probability, the existing methods often only consider one or a few factors, and do not establish a multi-dimensional comprehensive analysis model, making it difficult to accurately distinguish true and false defects.

[0006] Moreover, with the continuous innovation of PCB manufacturing processes, new types of defects keep emerging. Existing detection methods are difficult to quickly adapt to these changes, resulting in a decline in the reliability and stability of detection. Therefore, there is an urgent need for a method and system that can more accurately and efficiently identify genuine and fake defects on PCB boards to meet the quality inspection requirements of modern PCB board production and manufacturing. Summary of the Invention

[0007] The purpose of the present invention is to provide a method and system for identifying genuine and fake defects on PCB boards to solve the problems raised in the above-mentioned background technology.

[0008] To achieve the above purpose, the present invention provides the following technical solution: A method for identifying genuine and fake defects on PCB boards, the method comprising:

[0009] Obtain the image information to be detected of the PCB board, where the image information to be detected includes a number of detection areas and the gray value distribution data of each detection area;

[0010] When the PCB board is detected under preset detection conditions, the actual gray value distribution data of each detection area is obtained in real time, and difference analysis is performed in combination with the gray value distribution data of each detection area to obtain the gray difference index of each detection area;

[0011] Judge in real time whether the gray difference index of each detection area is within a preset gray difference threshold range;

[0012] If the gray difference index of a certain detection area is outside the preset gray difference threshold range, mark the detection area as an abnormal detection area, and simultaneously obtain the surface texture data and edge contour data of the abnormal detection area, and perform comprehensive analysis respectively to obtain the texture abnormality index and contour deformation index of the abnormal detection area;

[0013] Perform comprehensive analysis on the gray difference index, texture abnormality index, and contour deformation index at the abnormal detection area to obtain the preliminary defect probability value and depth defect probability value at the abnormal detection area;

[0014] Perform comprehensive analysis on the preliminary defect probability value and depth defect probability value at the abnormal detection area to obtain the comprehensive defect probability value at the abnormal detection area, and perform screening processing on the comprehensive defect probability value at the abnormal detection area based on a preset screening rule;

[0015] Take defect identification measures at the abnormal detection area based on the comprehensively defect probability value after screening processing;

[0016] The surface texture data includes a texture clarity value, a texture uniformity value, and a texture direction value, and the edge contour data includes a contour smoothness value, a contour continuity value, and a contour curvature value.

[0017] Preferably, the specific steps for obtaining the gray-scale difference index of each detection area are as follows:

[0018] Comprehensively analyze the gray-scale value distribution data of each detection area in combination with the actual gray-scale value distribution data of the detection area to obtain the gray-scale difference index of each detection area.

[0019] Preferably, the specific steps for obtaining the texture anomaly index and the contour deformation index of the abnormal detection area are as follows:

[0020] Comprehensively analyze the texture clarity value, the texture uniformity value, and the texture direction value of the abnormal detection area to obtain the texture anomaly index of the abnormal detection area;

[0021] Comprehensively analyze the contour smoothness value, the contour continuity value, and the contour curvature value of the abnormal detection area to obtain the contour deformation index of the abnormal detection area.

[0022] Preferably, the specific steps for obtaining the preliminary defect probability value at the abnormal detection area are as follows:

[0023] Comprehensively analyze the gray-scale difference index, the texture anomaly index, and the contour deformation index at the abnormal detection area to obtain the preliminary defect probability value at the abnormal detection area.

[0024] Preferably, the specific steps for obtaining the depth defect probability value at the abnormal detection area are as follows:

[0025] Obtain the standard contour data at the abnormal detection area, and perform deviation analysis in combination with the edge contour data at the abnormal detection area to obtain the contour deviation index at the abnormal detection area;

[0026] Obtain the initial texture weight coefficient, and comprehensively analyze it in combination with the texture anomaly index at the abnormal detection area to obtain the texture adjustment weight coefficient at the abnormal detection area;

[0027] Obtain the initial contour weight coefficient, and comprehensively analyze it in combination with the contour deformation index at the abnormal detection area to obtain the contour adjustment weight coefficient at the abnormal detection area;

[0028] Comprehensively analyze the texture adjustment weight coefficient, the gray-scale difference index, the contour adjustment weight coefficient, and the contour deviation index at the abnormal detection area to obtain the depth defect probability value at the abnormal detection area.

[0029] Preferably, the specific steps for obtaining the contour deviation index, texture adjustment weight coefficient, and contour adjustment weight coefficient at the abnormal detection area are as follows:

[0030] Compare the standard contour data at the abnormal detection area with the edge contour data at the abnormal detection area to obtain the contour deviation index at the abnormal detection area;

[0031] Perform weighted calculation on the initial texture weight coefficient at the abnormal detection area and the texture abnormality index at the abnormal detection area to obtain the texture adjustment weight coefficient at the abnormal detection area;

[0032] Perform weighted calculation on the initial contour weight coefficient at the abnormal detection area and the contour deformation index at the abnormal detection area to obtain the contour adjustment weight coefficient at the abnormal detection area.

[0033] Preferably, the specific steps for obtaining the comprehensive defect probability value at the abnormal detection area are as follows:

[0034] Perform weighted summation on the preliminary defect probability value at the abnormal detection area and the depth defect probability value at the abnormal detection area to obtain the comprehensive defect probability value at the abnormal detection area.

[0035] Preferably, the specific steps for screening and processing the comprehensive defect probability value at the abnormal detection area based on a preset screening rule are as follows:

[0036] Obtain the preset defect probability threshold;

[0037] When the comprehensive defect probability value at the abnormal detection area is lower than or equal to the preset defect probability threshold, determine that the abnormal detection area is a defect-free area;

[0038] When the comprehensive defect probability value at the abnormal detection area is higher than the preset defect probability threshold, determine that the abnormal detection area is a defective area.

[0039] Preferably, the specific steps for taking defect recognition measures at the abnormal detection area are as follows:

[0040] If the abnormal detection area is determined to be a defective area, output the defect type and location information of the abnormal detection area;

[0041] If the abnormal detection area is determined to be a defect-free area, skip the abnormal detection area and continue to detect the next area.

[0042] Preferably, the present invention further includes a recognition system applicable to the true and false defects of a PCB board, and applies the above-mentioned recognition method applicable to the true and false defects of a PCB board. The system includes: an image acquisition module, a difference analysis module, a judgment module, an index analysis module, a probability analysis module, and a defect recognition module;

[0043] The image acquisition module is used to acquire the image information to be detected of the PCB board. The image information to be detected includes a plurality of detection areas and the grayscale value distribution data of each detection area;

[0044] The difference analysis module is used to, when the PCB board is detected under preset detection conditions, acquire the actual grayscale value distribution data of each detection area in real time, and perform difference analysis in combination with the grayscale value distribution data of each detection area to obtain the grayscale difference index of each detection area;

[0045] The judgment module is used to judge in real time whether the grayscale difference index of each detection area is within a preset grayscale difference threshold range;

[0046] When the grayscale difference index of a certain detection area is outside the preset grayscale difference threshold range, the index analysis module is used to mark the detection area as an abnormal detection area, and synchronously acquire the surface texture data and edge contour data of the abnormal detection area, and perform comprehensive analysis respectively to obtain the texture abnormality index and contour deformation index of the abnormal detection area;

[0047] The probability analysis module is used to perform comprehensive analysis on the grayscale difference index, texture abnormality index, and contour deformation index at the abnormal detection area respectively to obtain the preliminary defect probability value and deep defect probability value at the abnormal detection area, perform comprehensive analysis on the preliminary defect probability value and deep defect probability value at the abnormal detection area to obtain the comprehensive defect probability value at the abnormal detection area, and perform screening processing on the comprehensive defect probability value at the abnormal detection area based on a preset screening rule;

[0048] The defect recognition module is used to take defect recognition measures at the abnormal detection area based on the screened comprehensive defect probability value.

[0049] Compared with the prior art, the beneficial effects of the present invention are:

[0050] After obtaining the image information of the PCB board to be detected, by combining the actual gray value distribution data with the preset data for difference analysis, a gray difference index is obtained. This process fully considers the influence of detection conditions and can more accurately discover potential abnormal areas. When the gray difference index exceeds the threshold, comprehensive analysis is carried out on the surface texture data and edge contour data of the abnormal detection area to obtain a texture abnormality index and a contour deformation index, comprehensively capturing defect features from multiple dimensions and avoiding the limitations of single-dimensional analysis.

[0051] In calculating the defect probability, a preliminary defect probability value is obtained through comprehensive analysis of the gray difference index, texture abnormality index, and contour deformation index. Then, deviation analysis is carried out in combination with the standard contour data to obtain a contour deviation index, and a depth defect probability value is obtained through operations such as adjusting the weight coefficient. This multi-dimensional and multi-level analysis model greatly improves the accuracy of defect probability calculation. The preliminary defect probability value and the depth defect probability value are weighted and summed to obtain a comprehensive defect probability value, and processing based on the preset screening rules can more scientifically and reasonably judge the defect area, effectively distinguish true and false defects, and reduce the misjudgment rate.

[0052] In practical applications, if it is determined as a defect area, the defect type and location information can be output, providing accurate guidance for subsequent repair and processing and improving production efficiency; if it is determined as a non-defect area, it will be skipped and the next area will be continued to be detected to ensure the efficiency of the detection process. Through the comprehensive analysis of multi-dimensional data and the scientific probability calculation model, this method and system comprehensively improve the accuracy and reliability of true and false defect identification of PCB boards, can adapt to complex PCB board structures and diverse defect types, meet the requirements of high-quality detection in modern PCB board production and manufacturing, effectively improve the quality qualification rate of PCB boards, reduce production costs, and provide a strong guarantee for the performance and reliability of electronic devices. At the same time, the various modules of this system have clear division of labor and work together, with good operability and practicality, and can be widely applied in actual production. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 is the working principle diagram of the method for identifying true and false defects of PCB boards according to the present invention;

[0054] Figure 2 is the design diagram of abnormal detection area analysis;

[0055] Figure 3 is the step diagram for obtaining the depth defect probability value;

[0056] Figure 4 is the design diagram of comprehensive defect probability screening;

[0057] Figure 5 is the design diagram of the system for identifying true and false defects of PCB boards. Detailed implementation manners

[0058] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0059] Please refer to Figures 1-5 , a method for identifying true and false defects applicable to a PCB board according to the present invention, and the specific implementation steps are as follows:

[0060] Obtain the image information to be detected of the PCB board, where the image information to be detected includes a plurality of detection regions and the grayscale value distribution data of each detection region. In practical applications, a high-precision image acquisition device, such as an industrial camera, can be used to take pictures of the PCB board from multiple angles, obtain an image containing multiple detection regions, and preprocess and store the grayscale value distribution of each detection region to form standard grayscale value distribution data.

[0061] When the PCB board is detected under preset detection conditions, the actual grayscale value distribution data of each detection region is obtained in real time, and difference analysis is performed in combination with the grayscale value distribution data of each detection region to obtain the grayscale difference index of each detection region. The preset detection conditions include, but are not limited to, the illumination intensity of the detection environment, the shooting angle and resolution of the camera, etc. By collecting the actual grayscale value distribution data of each detection region in real time and comparing and analyzing it with the pre-stored standard grayscale value distribution data, the difference degree between the two is calculated, which is the grayscale difference index.

[0062] Judge in real time whether the grayscale difference index of each detection region is within the preset grayscale difference threshold range. The preset grayscale difference threshold range is preset according to the production process and quality requirements of the PCB board, and is used to judge whether there are abnormalities in the detection region.

[0063] If the grayscale difference index of a certain detection region is outside the preset grayscale difference threshold range, mark the detection region as an abnormal detection region, and synchronously obtain the surface texture data and edge contour data of the abnormal detection region, and perform comprehensive analysis respectively to obtain the texture abnormality index and contour deformation index of the abnormal detection region. The surface texture data includes texture clarity value, texture uniformity value, and texture direction value, and the edge contour data includes contour smoothness value, contour continuity value, and contour curvature value. Through the comprehensive analysis of these data, the characteristics of the abnormal detection region can be more comprehensively understood.

[0064] Comprehensively analyze the grayscale difference index, texture anomaly index, and contour deformation index at the abnormal detection area to obtain the preliminary defect probability value and depth defect probability value at the abnormal detection area. By establishing a reasonable mathematical model, perform weighted calculation and analysis on each index to obtain the preliminary defect probability value and depth defect probability value, so as to evaluate the possibility of defects existing in the abnormal detection area.

[0065] Comprehensively analyze the preliminary defect probability value and depth defect probability value at the abnormal detection area to obtain the comprehensive defect probability value at the abnormal detection area, and perform screening processing on the comprehensive defect probability value at the abnormal detection area based on a preset screening rule. By comprehensively considering the preliminary defect probability value and depth defect probability value, obtain a more accurate comprehensive defect probability value, and make a judgment according to the preset screening rule.

[0066] Based on the comprehensive defect probability value after screening processing, take defect recognition measures at the abnormal detection area. According to the judgment result of the comprehensive defect probability value, perform corresponding processing on the abnormal detection area, such as determining whether there are defects and the type and location of the defects.

[0067] The following further illustrates the present invention in conjunction with Embodiments 1 to 5:

[0068] Embodiment 1:

[0069] When obtaining the image information to be detected of the PCB board, it is necessary to collect images of the PCB board through a high-precision image acquisition device. An industrial camera is a commonly used device. During the acquisition process, it is necessary to ensure that the shooting parameters of the camera are stable, such as fixing the shooting angle, adjusting the appropriate focal length, and setting a unified exposure time, etc., to ensure that the acquired image can clearly and accurately reflect the actual situation of the PCB board. After the acquisition is completed, the image will contain several detection areas. The division of these detection areas can be based on the circuit layout, component distribution, etc. of the PCB board. For example, it can be divided according to different functional modules, circuit routes, or component packaging areas, ensuring that each detection area has relatively independent features and functions for subsequent targeted analysis.

[0070] For each detection area, it is necessary to obtain the grayscale value distribution data. When obtaining this data, the collected images are preprocessed. The preprocessing process includes, but is not limited to, denoising to eliminate the noise interference that may be introduced during image acquisition, such as Gaussian noise, salt-and-pepper noise, etc. Denoising can be performed using methods such as mean filtering and median filtering. Through these methods, the image can be smoothed while retaining the main features of the image. Then, grayscale normalization is performed to map the grayscale values of the image to a unified range, such as [0, 1]. This can eliminate the grayscale differences caused by factors such as lighting conditions and camera parameters between different images, making the grayscale value distribution data of different detection areas comparable. After the preprocessing is completed, the grayscale values of each detection area are statistically analyzed to obtain the grayscale value distribution data of the detection area, such as statistics such as the frequency of each grayscale value, the mean value of the grayscale value, and the variance, and these data are stored as the standard data for subsequent detection.

[0071] When the PCB board is detected under the preset detection conditions, it is necessary to obtain the actual grayscale value distribution data of each detection area in real time. The preset detection conditions need to be consistent with the conditions when obtaining the standard grayscale value distribution data, including parameters such as the lighting intensity of the detection environment, the shooting angle of the camera, and the resolution, to ensure the comparability of the actual grayscale value distribution data and the standard data. For example, a fixed light source is set in the detection environment to avoid changes in lighting intensity; the position and angle of the camera are kept unchanged to ensure the same shooting perspective; the same resolution is set to ensure the same level of image details. During the detection process, the image of the PCB board is collected in real time through an image acquisition device, and for each area divided before, the grayscale values are statistically analyzed to obtain the actual grayscale value distribution data of each detection area, and the same preprocessing steps such as denoising and normalization are also performed.

[0072] The grayscale value distribution data of each detection area and the actual grayscale value distribution data of the detection area are comprehensively analyzed to obtain the grayscale difference index. When performing the analysis, first, the two sets of data need to be aligned and matched to ensure that they correspond to the same position in the same detection area. This can be achieved through image registration techniques. For example, based on feature point registration methods, the feature points in the two sets of images are found, and then, according to the corresponding relationship of the feature points, image transformation is performed to make the two sets of images completely aligned.

[0073] After alignment, multiple methods are used to calculate the difference between the two. A commonly used method is to calculate the mean squared error (MSE), which is the average of the squares of the differences in pixel gray values at corresponding positions in two sets of data. Specifically, for each detection area, all its pixels are traversed, and the difference between the gray value of each pixel in the standard gray value distribution data and the gray value of the corresponding pixel in the actual gray value distribution data is calculated. These differences are squared and summed, and then divided by the total number of pixels to obtain the mean squared error. The magnitude of the mean squared error reflects the degree of difference between the two sets of data. The larger the mean squared error, the greater the gray difference; conversely, the smaller the mean squared error, the smaller the gray difference.

[0074] The peak signal-to-noise ratio (PSNR) can also be calculated. PSNR is a metric for measuring image quality based on the mean squared error. Although mainly used to measure the quality of compressed images, it can also be used to compare the differences between two sets of gray value distribution data. The higher the value of PSNR, the smaller the difference between the two sets of data and the higher the image quality; conversely, the greater the difference.

[0075] In addition to the above methods, analysis can also be carried out from the perspective of statistical features, such as comparing statistical quantities such as the mean, variance, skewness, and kurtosis of the two sets of data. The mean reflects the average level of gray values. If the means of the two sets of data differ significantly, it indicates that there are differences in the overall gray level. The variance reflects the degree of dispersion of gray values. The larger the variance, the more dispersed the distribution of gray values. Skewness and kurtosis reflect the shape characteristics of the gray value distribution. By calculating the differences in these statistical quantities and comprehensively weighting these differences, an index that can reflect the degree of gray difference can also be obtained.

[0076] In the comprehensive analysis process, the advantages and disadvantages of different methods need to be considered, and the appropriate method or a combination of multiple methods should be selected according to the actual situation to calculate the gray difference index. For example, the mean squared error is simple to calculate but may be less sensitive to local differences; while the analysis method combining statistical features can more comprehensively reflect the overall distribution differences of the data. By reasonably selecting and combining analysis methods, the gray difference index of each detection area can be accurately obtained, providing a reliable basis for subsequent judgment of whether the detection area is abnormal.

[0077] After obtaining the grayscale difference index, it is necessary to compare it with a preset grayscale difference threshold range. The preset grayscale difference threshold range is preset according to factors such as the production process requirements, quality standards, and actual detection experience of the PCB board. For example, during the production process of the PCB board, due to process limitations and material characteristics, there will be a certain fluctuation range in the grayscale value distribution of the normal detection area, and this threshold range is set based on this normal fluctuation range. If the grayscale difference index is within this threshold range, it indicates that the grayscale value distribution of this detection area is within the normal range compared to the standard data, and there is no obvious abnormality; if the grayscale difference index is outside the threshold range, it indicates that there is a large difference in the grayscale value distribution of this detection area compared to the standard data, and further analysis and processing are required.

[0078] Example 2:

[0079] When the grayscale difference index of a certain detection area exceeds the preset threshold range and is marked as an abnormal detection area, it is necessary to synchronously obtain the surface texture data and edge contour data of this area. The surface texture data includes texture clarity value, texture uniformity value, and texture direction value, and the acquisition of these data is based on image processing technology. For example, when obtaining the texture clarity value, the image of the abnormal detection area can be processed through an edge detection algorithm, such as using the Canny operator or the Sobel operator, and the clarity of the edge can be evaluated by detecting the gradient change of the texture edge. In specific operations, first perform Gaussian smoothing on the image to reduce the influence of noise, and then calculate the gradient amplitude and direction of each pixel point. Clear texture edges will show obvious gradient changes, and by statistically analyzing the gradient intensity distribution of edge pixels, a quantitative value of texture clarity can be obtained.

[0080] The acquisition of the texture uniformity value requires analyzing the distribution characteristics of texture pixel values. First, divide the abnormal detection area into several sub-areas, and calculate the variance of the pixel grayscale values within each sub-area. The smaller the variance, the closer the texture pixel values within this sub-area are, and the higher the texture uniformity; otherwise, the uniformity is lower. Then, statistically analyze the variances of all sub-areas, such as calculating their mean or weighted average, and use this as the texture uniformity value of the entire abnormal detection area. When dividing the area, it is necessary to determine the size of the sub-areas according to the actual scale of the texture and the requirements of detection accuracy to ensure that the uniformity characteristics of the texture can be accurately reflected.

[0081] The determination of the texture direction value can be achieved by methods such as Fourier transform or Gabor filters. Taking Fourier transform as an example, a two-dimensional Fourier transform is performed on the image of the anomaly detection area to transform the image from the spatial domain to the frequency domain, and then the energy distribution in the frequency domain is analyzed. The direction information of the texture usually corresponds to the energy concentration area in a specific direction in the frequency domain. By calculating the main direction of the energy distribution, the main direction value of the texture can be obtained. Or a Gabor filter bank can be used. Gabor filters with different directions are designed to convolve the image, and the direction of the filter with the maximum response is the dominant direction of the texture, thereby obtaining the texture direction value.

[0082] For the contour smoothness value, contour continuity value, and contour curvature value in the edge contour data, the acquisition process is as follows: First, contour extraction is performed on the image of the anomaly detection area. It can be achieved by methods such as threshold segmentation, edge detection followed by contour tracking, such as using a contour tracking algorithm based on chain codes, to obtain the pixel coordinate sequence of the contour. When extracting the contour, it is necessary to pay attention to eliminating the influence of noise and pseudo-edges to ensure that the extracted contour can truly reflect the edge characteristics of the area.

[0083] The evaluation of the contour smoothness value can be realized by calculating the curvature change of the contour curve. For each point on the contour, calculate the curvature value of its adjacent points. The smoother the curvature change, the smoother the contour and the higher the smoothness value; conversely, if the curvature change is drastic, the smoothness value is low. Specifically, when calculating, the difference method or the method of fitting curves can be used to estimate the curvature. For example, for the point Pi on the contour, take several points before and after it (such as Pi-2, Pi-1, Pi, Pi+1, Pi+2), calculate the curvature value of this point by fitting a quadratic curve or a cubic curve, and then statistically analyze the curvature change amplitude of all points on the entire contour to obtain the quantization value of the contour smoothness.

[0084] The determination of the contour continuity value requires checking whether there are breaks or discontinuities in the contour. After contour extraction, by analyzing the chain code sequence or coordinate sequence of the contour, it is judged whether there are breakpoints. For example, if there is a situation where contour tracking cannot continue during the contour tracking process, or there are obvious jumps in the coordinate sequence, it is regarded as a discontinuous contour. The contour continuity value can be measured by the number of breaks in the contour or the proportion of the break length to the total contour length. The fewer the number of breaks and the smaller the proportion of the break length, the better the contour continuity and the higher the continuity value.

[0085] The contour curvature value directly calculates the curvature of each point on the contour, and the curvature reflects the degree of bending of the contour at that point. For regular contours, such as circular contours, the curvatures of each point are relatively consistent; while for irregular contours, the curvatures vary greatly. When calculating the curvature, it is necessary to pay attention to selecting an appropriate neighborhood range. If the neighborhood is too small, it may be affected by noise, and if the neighborhood is too large, it may smooth out the real curvature changes. Generally, 3 - 5 adjacent points can be selected according to the scale of the contour and the requirements of detection accuracy to calculate the curvature of the current point, ensuring that the curvature value can accurately reflect the local bending characteristics of the contour.

[0086] After obtaining the texture clarity value, texture uniformity value, and texture direction value, it is necessary to comprehensively analyze these three values to obtain the texture anomaly index. In the process of comprehensive analysis, first, it is necessary to determine the weight coefficients of each parameter. The setting of the weight coefficients needs to consider the importance of each parameter in reflecting texture anomalies. For example, for some PCB board defects, the change in texture clarity may be more critical, so a higher weight can be assigned to the texture clarity value; while for other defects, the anomaly in texture direction may be more representative, and the weight can be adjusted accordingly at this time. The determination of the weight coefficients can be based on the material characteristics of the PCB board, production process requirements, and statistical analysis of historical detection data. For example, by analyzing the correlation between the texture parameters and defect types of a large number of known defect samples, the weight ratio of each parameter can be determined.

[0087] The specific way of comprehensive analysis can be weighted summation, that is, multiplying each texture parameter value by its corresponding weight coefficient and then adding them up to obtain the texture anomaly index. For example, assuming the weight of the texture clarity value is w1, the weight of the texture uniformity value is w2, and the weight of the texture direction value is w3 (w1 + w2 + w3 = 1), then the texture anomaly index = w1 × texture clarity value + w2 × texture uniformity value + w3 × texture direction value. Here, the texture parameter values need to be normalized first, mapping them to the same numerical range (such as [0, 1]) to avoid affecting the accuracy of the weighted result due to different dimensions. The normalization method can adopt linear normalization, such as subtracting the minimum value of the parameter value from it and then dividing by the difference between the maximum value and the minimum value to obtain the normalized value.

[0088] Similarly, comprehensively analyze the contour smoothness value, contour continuity value, and contour curvature value to obtain the contour deformation index. First, determine the weight coefficients of these three contour parameters. The weight setting principle is similar to that of texture parameters and can be determined according to the correlation degree between the contour characteristics and defects. For example, for edge fracture - type defects, the weight of the contour continuity value can be set relatively high; for shape deformation - type defects, the weight of the contour curvature value may be more important.

[0089] Then, normalize the contour parameters to make them comparable, and calculate the contour deformation index by weighted summation. For example, contour deformation index = w4 × contour smoothness value + w5 × contour continuity value + w6 × contour curvature value (w4 + w5 + w6 = 1). During the calculation process, attention should be paid to the normalization direction of the parameters. For example, the higher the contour smoothness value, the smoother the contour, which may belong to normal features. However, the contour deformation index needs to reflect the degree of abnormality. Therefore, when normalizing, it may be necessary to perform inverse mapping on the smoothness value, that is, the higher the smoothness value, the smaller the corresponding normalized value used to calculate the deformation index, to ensure that the deformation index can correctly reflect the degree of abnormality of the contour.

[0090] Example 3:

[0091] Obtain the standard contour data at the abnormal detection area. The standard contour data is the ideal contour data preset according to the contour features of the design drawing or qualified products during the production process of the PCB board. It can be extracted from the CAD design file or collected and stored from the corresponding area of the PCB board that has been strictly detected and confirmed to be defect-free. These data usually exist in the form of a sequence of contour coordinate points, accurately describing the shape and edge features that the area should have.

[0092] Obtain the edge contour data at the abnormal detection area. The acquisition of the edge contour data requires image processing technology to perform edge detection and contour extraction on the image of the abnormal detection area. Specifically, first grayscale the image, then use the threshold segmentation algorithm to separate the target area from the background, then use an edge detection operator such as the Canny operator to extract edge pixel points, and finally obtain a continuous sequence of contour coordinates through a contour tracking algorithm (such as the eight-neighbor tracking method) to form the edge contour data of this area.

[0093] After obtaining the standard contour data and the edge contour data, perform deviation analysis on the two to obtain the contour deviation index. During deviation analysis, first register the two sets of contour data to ensure that they are aligned in spatial position. A feature point-based registration method can be used. For example, extract feature points (such as points with larger curvature or corner points) on the standard contour and the edge contour respectively, calculate the affine transformation matrix by matching the corresponding relationships of these feature points, and transform the edge contour data into the same coordinate system as the standard contour data.

[0094] After registration, calculate the deviation between the two. For each point on the standard contour ( , is the number of points on the standard contour), find its nearest neighbor point on the edge contour, and calculate the Euclidean distance between the two points, where is the coordinate of the standard contour point, are the coordinates of the corresponding points on the edge contour. Then, calculate the average value of all distances to obtain the contour deviation index , that is:

[0095]

[0096] where represents the contour deviation index. The larger its value, the greater the deviation between the edge contour and the standard contour, and vice versa, the smaller the deviation.

[0097] Obtain the initial texture weight coefficient. The initial texture weight coefficient is a constant value preset according to the material, process of the PCB board and the influence degree of the texture characteristics on the defects. It is usually determined by the process engineer in combination with production experience and historical data, and its value range is generally between 0 and 1, which is used to measure the importance of texture characteristics in the depth defect evaluation.

[0098] Combined with the texture anomaly index at the abnormal detection area, comprehensively analyze the initial texture weight coefficient to obtain the texture adjustment weight coefficient. The texture anomaly index is obtained by comprehensively analyzing the texture clarity value, texture uniformity value, and texture direction value, which reflects the abnormal degree of the texture characteristics in this area. During specific analysis, the initial texture weight coefficient and the texture anomaly index are weighted and calculated, and here multiplication operation is used to achieve the adjustment. Let the initial texture weight coefficient be , and the texture anomaly index be , then the texture adjustment weight coefficient is calculated by the formula:

[0099]

[0100] where is the texture adjustment coefficient, which is a proportional constant set according to the actual production requirements and is used to control the adjustment range of the texture anomaly index to the initial weight. Its value can be determined by analyzing a large number of sample data. The meaning of this formula is that when the texture anomaly index is larger, it means that the texture characteristics are more abnormal. At this time, the texture adjustment weight coefficient will increase proportionally on the basis of the initial weight to highlight the role of texture characteristics in the depth defect evaluation.

[0101] Similarly, obtain the initial contour weight coefficient. The initial contour weight coefficient is also a constant value preset according to the process requirements of the PCB board and the influence degree of the contour characteristics on the defects. Similar to the initial texture weight coefficient, it is set by professionals, and its value range is between 0 and 1, which is used to measure the importance of contour characteristics in the depth defect evaluation.

[0102] Comprehensively analyze the initial contour weight coefficient in combination with the contour deformation index at the abnormal detection area to obtain the contour adjustment weight coefficient. The contour deformation index reflects the degree of deformation of the contour features in this area. Perform a weighted calculation on the initial contour weight coefficient and the contour deformation index in a similar manner to texture adjustment. Let the initial contour weight coefficient be , and the contour deformation index be , then the calculation formula for the contour adjustment weight coefficient is:

[0103]

[0104] where is the contour adjustment coefficient, which is a proportional constant set according to the actual production situation and is used to control the adjustment range of the contour deformation index on the initial weight. Its value can be determined through the analysis of a large number of samples. This formula indicates that the larger the contour deformation index , the greater the increment of the contour adjustment weight coefficient relative to the initial weight, so that the weight of the contour features in the depth defect assessment increases with the increase of its deformation degree.

[0105] After obtaining the texture adjustment weight coefficient , the gray-scale difference index , the contour adjustment weight coefficient , and the contour deviation index , comprehensively analyze these parameters to obtain the depth defect probability value . When comprehensively analyzing, use a weighted combination method and consider the influence degree of each parameter on the depth defect. Specifically, the calculation formula for the depth defect probability value is:

[0106]

[0107] where represents the depth defect probability value, and its value range is between 0 and 1. The larger the value, the higher the possibility that there is a depth defect in this area. is the texture adjustment weight coefficient obtained from the above calculation and is used to measure the weight of the gray-scale difference index in the depth defect assessment; is the gray-scale difference index obtained by analyzing the difference between the gray-scale value distribution data of the detection area and the actual gray-scale value distribution data, which reflects the abnormal degree of the gray-scale features; is the calculated contour adjustment weight coefficient and is used to measure the weight of the contour deviation index in the depth defect assessment; is the contour deviation index obtained from the deviation analysis of the standard contour data and the edge contour data, which reflects the deviation degree of the contour features.

[0108] During the calculation process, it is necessary to pay attention to the normalization of each parameter to ensure that they have the same dimension and numerical range, so as to avoid the distortion of the weighted result caused by different dimensions. For example, the gray-scale difference index and the contour deviation index may have different numerical ranges. They need to be normalized to the interval [0, 1] first. A linear normalization method can be used. For example, for the parameter , its normalized value is , where and are the minimum and maximum values of this parameter under normal conditions respectively.

[0109] Example 4:

[0110] Suppose during the PCB board detection process, a certain detection area is marked as an abnormal detection area because the gray-scale difference index exceeds the preset threshold. After analysis, the preliminary defect probability value and the depth defect probability value are obtained. Now, it is necessary to comprehensively analyze these two probability values to obtain the comprehensive defect probability value.

[0111] The acquisition of the preliminary defect probability value is based on the gray-scale difference index, texture abnormality index, and contour deformation index of this abnormal detection area. For example, in the detection of the copper foil wiring area of a certain PCB board, the gray-scale difference index of this area shows that there is an obvious deviation between its actual gray-scale distribution and the standard data, which may be caused by uneven copper foil thickness or oxidation; at the same time, the texture abnormality index reflects that the texture clarity of this area decreases (such as the rough wiring surface) and the texture uniformity decreases (local spots appear), while the contour deformation index indicates that the smoothness of the edge contour becomes worse (there are serrated edges) and the continuity is interrupted (there may be tiny fractures). Through the comprehensive evaluation of these three indexes, it is initially judged that the probability of defects in this area is 0.65 (this value is only an example, based on the weighted combination of each index, and the specific weights are set according to the PCB board process requirements. For example, the weight of the gray-scale difference index is 0.4, the weight of the texture abnormality index is 0.3, and the weight of the contour deformation index is 0.3. The preliminary probability is obtained after calculation).

[0112] The acquisition of the deep defect probability value involves parameters such as the contour deviation index, texture adjustment weight coefficient, and contour adjustment weight coefficient. Continuing with the example of this copper foil wiring area, the standard contour data is the smooth rectangular edge specified in the design drawing, while the actually extracted edge contour data shows local depressions and protrusions. By registering the standard contour with the actual contour and calculating the deviation, the contour deviation index is obtained (for example, the average deviation distance is 0.05 mm, and this value is determined according to the actual detection accuracy). At the same time, the initial texture weight coefficient is set to 0.3. Since the texture anomaly index is 0.7 (assuming a relatively high degree of texture anomaly), the texture adjustment weight coefficient is calculated through the adjustment formula as 0.3×(1 + adjustment coefficient×0.7) (the adjustment coefficient is set according to process experience, and here the example is 0.5, so the adjusted weight is 0.3×1.35 = 0.405); the initial contour weight coefficient is set to 0.4, the contour deformation index is 0.6, and the adjusted contour weight coefficient is 0.4×(1 + adjustment coefficient×0.6) (the adjustment coefficient example is 0.4, and the adjusted weight is 0.4×1.24 = 0.496). Finally, the texture adjustment weight coefficient, gray scale difference index (assuming 0.7), contour adjustment weight coefficient, and contour deviation index (assuming 0.6 after normalization) are weighted and combined to obtain the deep defect probability value of 0.405×0.7 + 0.496×0.6 = 0.2835 + 0.2976 = 0.5811 (example calculation process, and the actual calculation needs to be based on the normalized parameters).

[0113] The preliminary defect probability value and the deep defect probability value are comprehensively analyzed to obtain the comprehensive defect probability value. In the PCB board detection scenario, the preliminary defect probability value reflects the comprehensive anomaly degree based on multi-dimensional features such as gray scale, texture, and contour, while the deep defect probability value focuses more on the defect possibility after contour deviation and feature weight adjustment. The two evaluate the defect risk from different levels. For example, the preliminary defect probability value of a certain anomaly detection area is 0.7, and the deep defect probability value is 0.6, which indicates that the overall feature anomaly of this area is relatively obvious, and there is still a relatively high defect risk after contour deviation and feature weight adjustment. At this time, it is necessary to perform a weighted sum on the two according to the preset weight.

[0114] The setting of weights needs to be combined with the defect types and detection requirements of the PCB board. For high-density wiring areas, gray-scale differences may be more likely to reflect copper foil thickness problems, so the weight of the initial defect probability value can be set to 0.6; for contour-sensitive areas such as plug holes, the weight of the depth defect probability value can be set to 0.7. Taking a general scenario as an example, assuming the weight of the initial defect probability value is 0.5 and the weight of the depth defect probability value is 0.5, then the comprehensive defect probability value is 0.7×0.5 + 0.6×0.5 = 0.35 + 0.3 = 0.65. This calculation process needs to normalize the initial probability value and the depth probability value first to ensure that the numerical ranges are consistent and avoid the influence of dimensions. For example, if the range of the initial probability value is [0,1] and the depth probability value is also normalized to [0,1] after calculation, then they can be directly weighted and summed.

[0115] In practical applications, the process standards of different PCB boards are different, and the weight setting needs to be adjusted flexibly. For example, for the inner layer circuits of multilayer boards, since higher requirements are placed on texture features, the weight of the texture anomaly index in the initial defect probability value may be higher, thus affecting the proportion of the initial probability value in the comprehensive calculation; for the outer solder mask layer, contour integrity is more critical, and the weight of the depth defect probability value may be increased accordingly. In addition, due to different functions, the weights of different areas (such as pad areas, wire areas, via areas) on the same PCB board can also be set differently.

[0116] The calculation process of the comprehensive defect probability value needs to ensure strict logic. For example, when the initial defect probability value is high but the depth defect probability value is low, it may indicate that there are surface anomalies (such as slight contamination) in this area but no depth defects are formed; conversely, if the initial probability value is low but the depth defect probability value is high, it may imply the existence of hidden structural defects (such as internal wire breaks but no obvious surface texture anomalies). By combining the two, the severity and possibility of defects can be evaluated more comprehensively.

[0117] Take another example: An abnormal detection area is located at the via position of the PCB board. The initial defect probability value is 0.4 (the gray-scale difference is small, but the texture uniformity is slightly low), and the depth defect probability value is 0.8 (the contour deviation is large, and the via edge is irregular). At this time, if the weight of the via contour integrity is set to 0.6, then the comprehensive defect probability value is 0.4×0.4 + 0.8×0.6 = 0.16 + 0.48 = 0.64. This indicates that although the initial feature anomalies are not significant, the large depth contour deviation results in a relatively high comprehensive defect probability, which requires key attention.

[0118] Example 5:

[0119] Suppose that during the PCB board inspection process, a comprehensive defect probability value is calculated for a certain abnormal detection area. Now, it is necessary to screen and process it according to the preset rules and take corresponding measures. Taking the inspection of a four-layer PCB board as an example, a certain detection area is located at the top-layer signal trace position. Under the preset detection conditions, the gray-scale difference index of this area exceeds the threshold range and is marked as an abnormal detection area. After calculation, its preliminary defect probability value is 0.7, the deep defect probability value is 0.6, and the comprehensive defect probability value is obtained by weighted summation as 0.65 (assuming the weights of the preliminary and deep probabilities are 0.5 and 0.5 respectively).

[0120] Obtain the preset defect probability threshold. This threshold is preset by the PCB board manufacturer according to product quality standards, process capabilities, and customer requirements. The thresholds for different types of PCB boards or different areas may be different. For example, for the PCB boards of general consumer electronics products, the defect probability threshold is usually set to 0.6; for the PCB boards with high-precision requirements such as medical equipment, the threshold may be set to 0.5 to improve the detection sensitivity. In this example, the preset defect probability threshold is 0.6.

[0121] Compare the comprehensive defect probability value with the threshold. If the comprehensive defect probability value is lower than or equal to the threshold, it is determined that this abnormal detection area is a defect-free area; if it is higher than the threshold, it is determined as a defective area. In this example, the comprehensive defect probability value of 0.65 is higher than the threshold of 0.6, so it is determined that this area is a defective area.

[0122] When it is determined as a defective area, it is necessary to output the defect type and location information of this abnormal detection area. The determination of the defect type is based on the various index characteristics of this area. For example: if the gray-scale difference index is high and the contour deviation index is large, it may be an abnormal copper foil trace thickness or edge corrosion; if the texture abnormality index is prominent and the contour deviation is small, it may be surface contamination or oxidation. The location information is determined by the coordinate system during image acquisition. For example, when an industrial camera takes a picture, through the mapping relationship between pixel coordinates and actual physical coordinates, the location of the abnormal area is accurate to the millimeter level.

[0123] Taking this top-layer signal trace area as an example, its gray-scale difference index shows that the actual gray value is lower than the standard value, which may imply insufficient copper foil thickness; the texture abnormality index indicates a decrease in texture uniformity and there are local dull areas; the contour deformation index shows that there are small serrations at the edge. Combining these characteristics, it is determined that the defect type is "excessive copper foil etching", and the location information is the upper left corner area of the PCB board, with the coordinate range of X = 10.2mm - 12.5mm, Y = 15.3mm - 17.8mm. This information will be displayed through the system interface or output to the database for subsequent maintenance or quality analysis.

[0124] If it is determined to be a defect-free area, skip this area and continue to detect the next area. For example, an abnormal detection area is located on the solder mask layer of a PCB board, and the comprehensive defect probability value is 0.55, which is lower than the threshold of 0.6, so it is determined to be a defect-free area. At this time, the system automatically ignores this area, moves to the next detection area according to the preset detection path, and continues with processes such as gray-scale difference analysis.

[0125] In practical applications, the setting of the screening rule needs to consider the balance between the false positive rate and the false negative rate. For example, if the threshold is set too high (such as 0.8), some real defects may be misjudged as defect-free (false negative), which affects product quality; if the threshold is set too low (such as 0.4), normal areas may be misjudged as defects (false positive), increasing the workload of subsequent manual re-inspection. Therefore, the setting of the threshold usually needs to be optimized through a large amount of experimental data and production practice.

[0126] Taking the detection of automotive electronic PCB boards as an example, due to the extremely high requirement for reliability, the threshold may be set to 0.5 to identify all potential defects as much as possible. Suppose a detection area is located on the copper foil of the power layer, and the comprehensive defect probability value is 0.52. Although it is slightly higher than the threshold, the system still determines it as a defect area, outputs its position as the lower right corner of the power layer, and the defect type may be "uneven copper foil thickness" for production personnel to check in time.

[0127] The execution of defect identification measures needs to be real-time and accurate. For example, when the system determines that a certain area is a defect area, it needs to immediately trigger an alarm mechanism to prompt the operator through lights, sounds or pop-up windows; at the same time, automatically enter the defect information into the production management system, associate information such as the batch and production date of this PCB board for quality traceability. For a continuous production line, the system also needs to be linked with a robotic arm or sorting device to automatically sort defective PCB boards into the non-conforming product area.

[0128] In another example, the comprehensive defect probability value of the via area of a PCB board is 0.58, which is lower than the threshold of 0.6, so it is determined to be a defect-free area. At this time, the system does not give an alarm and directly proceeds to the next area for detection. However, to ensure the reliability of detection, the system can set a regular re-inspection mechanism for low-probability abnormal areas. For example, re-inspect such areas once every 100 PCB boards to avoid false negatives caused by accidental factors.

[0129] During the screening process, the priorities of different defect types also need to be considered. For example, for conductivity defects (such as broken wires) that affect electrical performance, even if the comprehensive defect probability value just exceeds the threshold, they should be processed preferentially; for minor defects that only affect appearance (such as minor scratches on the solder mask layer), a higher threshold can be set or separate screening rules can be formulated.

[0130] The system shall have a threshold adjustment function to enable dynamic optimization according to changes in the production process or adjustments to quality targets. For example, when a new copper foil supplier is replaced, the threshold can be re-evaluated through test batches; when the customer requires an increase in the product yield rate, the threshold can be lowered to increase the detection strictness.

[0131] Throughout the implementation process, from comprehensive probability calculation to defect type determination, then to location information output and measure execution, a complete closed-loop process shall be formed. For example, when multiple abnormal detection areas are found during the inspection of a certain PCB board, the system will calculate the comprehensive probability for each area in sequence, screen and determine, and then output the defect types (such as "pad oxidation" in area A and "wire short circuit" in area B) and precise locations of each area. The operator will perform targeted repairs or scrapping based on this information to ensure that the quality of the PCB board meets the requirements.

[0132] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or device.

[0133] Although the embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for identifying true and false defects of PCB boards, characterized in that, Including the following steps: Obtain the image information to be detected of the PCB board, where the image information to be detected includes several detection regions and the grayscale value distribution data of each detection region; When the PCB board is detected under preset detection conditions, obtain the actual grayscale value distribution data of each detection region in real time, and perform difference analysis by combining the grayscale value distribution data of each detection region to obtain the grayscale difference index of each detection region; Judge in real time whether the grayscale difference index of each detection region is within the preset grayscale difference threshold range; If there is a grayscale difference index of a certain detection region outside the preset grayscale difference threshold range, mark this detection region as an abnormal detection region, and synchronously obtain the surface texture data and edge contour data of this abnormal detection region, and perform comprehensive analysis respectively to obtain the texture abnormality index and contour deformation index of this abnormal detection region; Perform comprehensive analysis on the grayscale difference index, texture abnormality index, and contour deformation index at this abnormal detection region to obtain the preliminary defect probability value and depth defect probability value at this abnormal detection region; Perform comprehensive analysis on the preliminary defect probability value and depth defect probability value at this abnormal detection region to obtain the comprehensive defect probability value at this abnormal detection region, and perform screening processing on the comprehensive defect probability value at this abnormal detection region based on the preset screening rules; Take defect recognition measures at this abnormal detection region based on the screened comprehensive defect probability value; The surface texture data includes texture clarity value, texture uniformity value, and texture direction value, and the edge contour data includes contour smoothness value, contour continuity value, and contour curvature value.

2. The method for identifying true and false defects applicable to a PCB board according to claim 1, characterized in that, The specific steps to obtain the grayscale difference index of each detection region are as follows: Perform comprehensive analysis on the grayscale value distribution data of each detection region by combining the actual grayscale value distribution data of this detection region respectively to obtain the grayscale difference index of each detection region.

3. The method for identifying true and false defects applicable to a PCB board according to claim 1, wherein The specific steps to obtain the texture abnormality index and contour deformation index of this abnormal detection region are as follows: Perform comprehensive analysis on the texture clarity value, texture uniformity value, and texture direction value of this abnormal detection region to obtain the texture abnormality index of this abnormal detection region; Perform comprehensive analysis on the contour smoothness value, contour continuity value, and contour curvature value of this abnormal detection region to obtain the contour deformation index of this abnormal detection region.

4. The method for identifying true and false defects applicable to PCB boards according to claim 1, characterized in that, The specific steps to obtain the preliminary defect probability value at this abnormal detection region are as follows: Perform comprehensive analysis on the grayscale difference index, texture abnormality index, and contour deformation index at this abnormal detection region to obtain the preliminary defect probability value at this abnormal detection region.

5. The method for identifying true and false defects applicable to a PCB board according to claim 1, characterized in that, The specific steps to obtain the depth defect probability value at this abnormal detection region are as follows: Obtain the standard contour data at this abnormal detection region, and perform deviation analysis by combining the edge contour data at this abnormal detection region to obtain the contour deviation index at this abnormal detection region; Obtain the initial texture weight coefficient, and perform comprehensive analysis by combining the texture abnormality index at this abnormal detection region to obtain the texture adjustment weight coefficient at this abnormal detection region; Obtain the initial contour weight coefficient, and conduct comprehensive analysis in combination with the contour deformation index at the abnormal detection area to obtain the contour adjustment weight coefficient at the abnormal detection area; Conduct comprehensive analysis on the texture adjustment weight coefficient, grayscale difference index, contour adjustment weight coefficient, and contour deviation index at the abnormal detection area to obtain the depth defect probability value at the abnormal detection area.

6. The method for identifying true and false defects applicable to a PCB board according to claim 5, characterized in that, The specific steps to obtain the contour deviation index, texture adjustment weight coefficient, and contour adjustment weight coefficient at the abnormal detection area are as follows: Compare the standard contour data at the abnormal detection area with the edge contour data at the abnormal detection area to obtain the contour deviation index at the abnormal detection area; Perform weighted calculation on the initial texture weight coefficient at the abnormal detection area and the texture abnormality index at the abnormal detection area to obtain the texture adjustment weight coefficient at the abnormal detection area; Perform weighted calculation on the initial contour weight coefficient at the abnormal detection area and the contour deformation index at the abnormal detection area to obtain the contour adjustment weight coefficient at the abnormal detection area.

7. The method for identifying true and false defects applicable to a PCB board according to claim 1, wherein The specific steps to obtain the comprehensive defect probability value at the abnormal detection area are as follows: Perform weighted summation on the preliminary defect probability value at the abnormal detection area and the depth defect probability value at the abnormal detection area to obtain the comprehensive defect probability value at the abnormal detection area.

8. The method for identifying true and false defects applicable to a PCB board according to claim 1, characterized in that, The specific steps to perform screening processing on the comprehensive defect probability value at the abnormal detection area based on a preset screening rule are as follows: Obtain the preset defect probability threshold; When the comprehensive defect probability value at the abnormal detection area is lower than or equal to the preset defect probability threshold, determine that the abnormal detection area is a defect-free area; When the comprehensive defect probability value at the abnormal detection area is higher than the preset defect probability threshold, determine that the abnormal detection area is a defective area.

9. The method for identifying true and false defects applicable to a PCB board according to claim 1, wherein The specific steps to take defect identification measures for the abnormal detection area are as follows: If the abnormal detection area is determined to be a defective area, output the defect type and location information of the abnormal detection area; If the abnormal detection area is determined to be a defect-free area, skip the abnormal detection area and continue to detect the next area.

10. An identification system for true and false defects of PCB boards, applying the identification method for true and false defects of PCB boards according to any one of claims 1-9, characterized in that, Including: An image acquisition module, a difference analysis module, a judgment module, an index analysis module, a probability analysis module, and a defect identification module; The image acquisition module is used to acquire the image information to be detected of the PCB board, and the image information to be detected includes several detection areas and the grayscale value distribution data of each detection area; The difference analysis module is used to, when the PCB board is detected under preset detection conditions, acquire the actual grayscale value distribution data of each detection area in real time, and conduct difference analysis in combination with the grayscale value distribution data of each detection area to obtain the grayscale difference index of each detection area; The judgment module is used to judge in real time whether the grayscale difference index of each detection area is within the preset grayscale difference threshold range; The exponential analysis module is used to mark the detection area as an abnormal detection area when the gray - scale difference index of a certain detection area is outside the preset gray - scale difference threshold range, and simultaneously obtain the surface texture data and edge contour data of the abnormal detection area, and perform comprehensive analysis respectively to obtain the texture abnormality index and contour deformation index of the abnormal detection area; The probability analysis module is used to comprehensively analyze the gray - scale difference index, texture abnormality index, and contour deformation index at the abnormal detection area to obtain the preliminary defect probability value and depth defect probability value at the abnormal detection area, comprehensively analyze the preliminary defect probability value and depth defect probability value at the abnormal detection area to obtain the comprehensive defect probability value at the abnormal detection area, and perform screening processing on the comprehensive defect probability value at the abnormal detection area based on the preset screening rules; The defect recognition module is used to take defect recognition measures at the abnormal detection area based on the comprehensively defect probability value after screening processing.

Citation Information

Patent Citations

  • Method for detecting and identifying internal defects of in-operation high-voltage cable through X-ray digital imaging

    CN114778574A

  • Hydration degree appearance detection method for regenerated granules

    CN118379301A

  • Bearing defect detection method and system based on computer vision

    CN118799706A

  • PCB surface defect detection method and system, electronic equipment and medium

    CN119579583A

  • Mobile phone appearance detection system and method based on visual identification

    CN119672449A

Cited By

  • Infrared spectrum image measurement alignment method and device based on artificial intelligence

    CN120953385A

  • Intelligent edge computing system for sweet potato sorting

    CN121103696A

  • Computer visual defect detection system and method on electric control board production line

    CN121120584A

  • Zinc-aluminum-magnesium steel strip surface scratch data processing system and method

    CN121144787A

  • PCB edge size detection method and system based on image recognition

    CN121147173A