A method and system for identifying true and false defects in PCB boards
By multi-dimensionally analyzing the grayscale value and texture profile data of PCB boards and establishing a defect probability calculation model, the problem of insufficient accuracy of existing detection methods in complex structures and diverse defect types is solved, and efficient and reliable true and false defect identification is achieved.
Patent Information
- Application Number
- CN202510920226.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-07-04
AI Technical Summary
Existing PCB board defect detection methods have low detection accuracy when faced with complex structures and diverse defect types, making it difficult to distinguish between true and false defects. They are also unable to quickly adapt to manufacturing process changes, resulting in reduced detection reliability and stability.
By acquiring the image information of the PCB board to be inspected, analyzing the grayscale value distribution data in real time, combining the surface texture and edge contour data, calculating the grayscale difference index, texture anomaly index and contour deformation index, and establishing a multi-dimensional defect probability calculation model, the comprehensive defect probability value is obtained through comprehensive analysis, and judgment is made based on preset screening rules.
It improves the accuracy and reliability of identifying true and false defects in PCB boards, reduces the misjudgment rate, can adapt to complex structures and diverse defect types, improves quality qualification rate and production efficiency, reduces production costs, and provides protection for the performance and reliability of electronic equipment.
Smart Images

Figure CN120411115B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of PCB board defect identification, and in particular to a method and system for identifying true and false defects in PCB boards. Background Art
[0002] In today's rapidly developing world of electronic information technology, PCBs, as essential core components of electronic devices, have a quality that directly impacts their performance and reliability. As electronic devices move toward miniaturization and higher precision, PCB integration continues to increase, and their structures become increasingly complex. This places higher demands on PCB manufacturing processes and poses significant challenges to PCB defect detection.
[0003] During the PCB production process, various defects inevitably occur due to factors such as raw material quality, production processes, and equipment parameters. These defects include not only real defects that can seriously impact PCB performance, but also false defects caused by factors such as the testing environment and testing equipment errors. Accurately identifying true and false PCB defects is crucial for improving PCB quality, reducing production costs, and ensuring the stability of electronic equipment.
[0004] Traditional PCB defect detection methods rely primarily on manual visual inspection. This approach is not only inefficient but also susceptible to subjective influences from the inspector, making it difficult to meet the demands of large-scale production. Later, with the development of computer vision technology, several automated inspection methods based on computer vision have emerged. These methods identify defects by processing and analyzing PCB images. However, these existing automated inspection methods often suffer from low detection accuracy when faced with complex PCB structures and diverse defect types.
[0005] Specifically, existing inspection methods typically perform simple comparisons when dealing with differences in grayscale distribution, failing to fully consider the impact of changing inspection conditions on grayscale values, which can easily lead to misjudgments. When analyzing the texture and contours of defective areas, they lack a comprehensive and in-depth analysis, making it impossible to accurately grasp the characteristics of the defects. Furthermore, existing methods often only consider a single or a few factors when determining defect probability, failing to establish a multi-dimensional comprehensive analysis model, making it difficult to accurately distinguish between true and false defects.
[0006] Furthermore, with the continuous innovation of PCB manufacturing processes, new defect types continue to emerge. Existing detection methods struggle to adapt quickly to these changes, resulting in a decrease in detection reliability and stability. Therefore, there is an urgent need for a method and system that can more accurately and efficiently identify true and false PCB defects to meet the quality inspection needs of modern PCB manufacturing. Summary of the Invention
[0007] The purpose of the present invention is to provide a method and system for identifying true and false defects in PCB boards, so as to solve the problems raised in the above background technology.
[0008] To achieve the above object, the present invention provides the following technical solution: a method for identifying true and false defects in PCB boards, the method comprising:
[0009] Acquire image information to be inspected of the PCB board, wherein the image information to be inspected includes a plurality of inspection areas and grayscale value distribution data of each inspection area;
[0010] When the PCB board is inspected under the preset inspection conditions, the actual grayscale value distribution data of each inspection area is obtained in real time, and the grayscale value distribution data of each inspection area is combined for difference analysis to obtain the grayscale difference index of each inspection area;
[0011] Determine in real time whether the grayscale difference index of each detection area is within the preset grayscale difference threshold range;
[0012] If the grayscale difference index of a certain detection area is outside the preset grayscale difference threshold range, the detection area is marked as an abnormal detection area, and the surface texture data and edge contour data of the abnormal detection area are simultaneously obtained and comprehensively analyzed to obtain the texture abnormality index and contour deformation index of the abnormal detection area;
[0013] Comprehensively analyze the grayscale difference index, texture anomaly index, and contour deformation index of the abnormal detection area to obtain the preliminary defect probability value and deep defect probability value of the abnormal detection area;
[0014] Performing a comprehensive analysis on the preliminary defect probability value and the deep defect probability value at the abnormal detection area to obtain a comprehensive defect probability value at the abnormal detection area, and screening the comprehensive defect probability value at the abnormal detection area based on a preset screening rule;
[0015] Taking defect identification measures in the abnormal detection area based on the comprehensive defect probability value after screening;
[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 of obtaining the grayscale difference index of each detection area are as follows:
[0018] The grayscale value distribution data of each detection area is combined with the actual grayscale value distribution data of the detection area for comprehensive analysis to obtain the grayscale difference index of each detection area.
[0019] Preferably, the specific steps of obtaining the texture anomaly index and the contour deformation index of the anomaly detection area are as follows:
[0020] Comprehensively analyze the texture clarity value, texture uniformity value, and texture direction value of the abnormality detection area to obtain the texture abnormality index of the abnormality detection area;
[0021] A comprehensive analysis is performed on the contour smoothness value, contour continuity value, and contour curvature value of the abnormality detection area to obtain the contour deformation index of the abnormality detection area.
[0022] Preferably, the specific steps of obtaining the preliminary defect probability value at the abnormal detection area are as follows:
[0023] A comprehensive analysis is performed on the grayscale difference index, texture anomaly index, and contour deformation index in the abnormal detection area to obtain a preliminary defect probability value in the abnormal detection area.
[0024] Preferably, the specific steps of obtaining the depth defect probability value at the abnormal detection area are as follows:
[0025] Acquire standard contour data of the abnormality detection area, and perform deviation analysis in combination with edge contour data of the abnormality detection area to obtain a contour deviation index of the abnormality detection area;
[0026] Obtaining an initial texture weight coefficient, and performing a comprehensive analysis based on the texture anomaly index at the anomaly detection area to obtain a texture adjustment weight coefficient at the anomaly detection area;
[0027] Obtaining an initial contour weight coefficient, and performing a comprehensive analysis based on the contour deformation index of the anomaly detection area to obtain a contour adjustment weight coefficient of the anomaly detection area;
[0028] A comprehensive analysis is performed on the texture adjustment weight coefficient, grayscale difference index, contour adjustment weight coefficient, and contour deviation index in the abnormal detection area to obtain the depth defect probability value in the abnormal detection area.
[0029] Preferably, the specific steps of obtaining the contour deviation index, texture adjustment weight coefficient, and contour adjustment weight coefficient at the abnormality detection area are as follows:
[0030] Comparing the standard contour data of the abnormality detection area with the edge contour data of the abnormality detection area to obtain a contour deviation index of the abnormality detection area;
[0031] Performing weighted calculation on the initial texture weight coefficient at the abnormality detection area and the texture abnormality index at the abnormality detection area to obtain the texture adjustment weight coefficient at the abnormality detection area;
[0032] The initial contour weight coefficient at the abnormality detection area and the contour deformation index at the abnormality detection area are weightedly calculated to obtain the contour adjustment weight coefficient at the abnormality detection area.
[0033] Preferably, the specific steps of obtaining the comprehensive defect probability value in the abnormal detection area are as follows:
[0034] The preliminary defect probability value at the abnormal detection area and the deep defect probability value at the abnormal detection area are weightedly summed to obtain a comprehensive defect probability value at the abnormal detection area.
[0035] Preferably, the specific steps of screening the comprehensive defect probability value at the abnormal detection area based on the preset screening rules 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, the abnormal detection area is determined to be a non-defective area;
[0038] When the comprehensive defect probability value at the abnormal detection area is higher than a preset defect probability threshold, the abnormal detection area is determined to be a defect area.
[0039] Preferably, the specific steps of taking defect identification measures for the abnormal detection area are as follows:
[0040] If the abnormality detection area is determined to be a defect area, the defect type and location information of the abnormality detection area are output;
[0041] If the abnormal detection area is determined to be a non-defective area, the abnormal detection area is skipped and the detection continues to the next area.
[0042] Preferably, the present invention also includes a system for identifying true and false defects of PCB boards, applying the above-mentioned method for identifying true and false defects of PCB boards, the system including: 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 image information to be detected of the PCB board, wherein the image information to be detected includes a plurality of detection areas and grayscale value distribution data of each detection area;
[0044] The difference analysis module is used to obtain the actual grayscale value distribution data of each detection area in real time when the PCB board is tested under preset test conditions, and perform difference analysis based on 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] The index analysis module is used to mark a detection area as an abnormal detection area when the grayscale difference index of a detection area is outside a preset grayscale difference threshold range, and simultaneously obtain the surface texture data and edge contour data of the abnormal detection area, and perform comprehensive analysis on them 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 anomaly index, and contour deformation index of the abnormal detection area to obtain a preliminary defect probability value and a depth defect probability value of the abnormal detection area, perform comprehensive analysis on the preliminary defect probability value and the depth defect probability value of the abnormal detection area to obtain a comprehensive defect probability value of the abnormal detection area, and perform screening processing on the comprehensive defect probability value of the abnormal detection area based on a preset screening rule;
[0048] The defect recognition module is used to take defect recognition measures in the abnormal detection area based on the comprehensive defect probability value after screening processing.
[0049] Compared with the prior art, the present invention has the following beneficial effects:
[0050] After acquiring the image information of the PCB to be inspected, the system combines the actual grayscale value distribution data with the preset data for difference analysis to determine the grayscale difference index. This process fully considers the influence of inspection conditions and can more accurately identify potential abnormal areas. When the grayscale difference index exceeds the threshold, a comprehensive analysis of the surface texture data and edge contour data of the abnormal detection area is performed to determine the texture anomaly index and contour deformation index. This method comprehensively captures defect characteristics from multiple dimensions, avoiding the limitations of single-dimensional analysis.
[0051] In calculating defect probability, a preliminary defect probability value is obtained through a comprehensive analysis of the grayscale difference index, texture anomaly index, and contour deformation index. Deviation analysis is then performed on the standard contour data to obtain the contour deviation index. Furthermore, the depth defect probability value is obtained by adjusting the weight coefficient. This multi-dimensional, multi-level analysis model significantly improves the accuracy of defect probability calculations. The weighted summation of the preliminary defect probability value and the depth defect probability value yields a comprehensive defect probability value, which is then processed based on preset screening rules. This enables a more scientific and reasonable assessment of defect areas, effectively distinguishing true from false defects, and reducing the rate of false positives.
[0052] In actual applications, if a defective area is identified, the defect type and location information can be output, providing precise guidance for subsequent repair and processing, thereby improving production efficiency. If a non-defective area is identified, the system skips and continues testing the next area, ensuring the efficiency of the inspection process. Through comprehensive analysis of multi-dimensional data and a scientific probability calculation model, this method and system comprehensively improves the accuracy and reliability of identifying true and false defects in PCB boards. It can adapt to complex PCB board structures and diverse defect types, meeting the high-quality inspection needs of modern PCB board manufacturing, effectively improving the quality pass rate of PCB boards, reducing production costs, and providing strong guarantees for the performance and reliability of electronic equipment. At the same time, the various modules of the system have clear division of labor and work in coordination, with good operability and practicality, and can be widely used in actual production. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 This is a working principle diagram of the method for identifying true and false defects of PCB boards according to the present invention;
[0054] Figure 2 Design diagram for anomaly detection area analysis;
[0055] Figure 3 Diagram of the steps for obtaining the depth defect probability value;
[0056] Figure 4 Design drawings for comprehensive defect probability screening;
[0057] Figure 5 This is the design drawing of the PCB board true and false defect identification system. DETAILED DESCRIPTION
[0058] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0059] See also Figure 1-Figure 5 The present invention relates to a method for identifying true and false defects of PCB boards, and the specific implementation steps are as follows:
[0060] Acquire image information of a PCB to be inspected, including multiple inspection areas and grayscale distribution data for each inspection area. In practical applications, a high-precision image acquisition device, such as an industrial camera, can be used to capture images of the PCB from multiple angles, capturing images containing multiple inspection areas. The grayscale distribution data for each inspection area can then be preprocessed and stored to generate standardized grayscale distribution data.
[0061] When a PCB is inspected under preset inspection conditions, the system acquires the actual grayscale value distribution data for each inspection area in real time. This data is then combined with the grayscale value distribution data for each inspection area for difference analysis, resulting in a grayscale difference index for each inspection area. Preset inspection conditions include, but are not limited to, the ambient light intensity, camera angle, and resolution. By collecting the actual grayscale value distribution data for each inspection area in real time and comparing it with pre-stored standard grayscale value distribution data, the system calculates the degree of difference between the two, which is the grayscale difference index.
[0062] The system determines in real time whether the grayscale difference index of each inspection area is within the preset grayscale difference threshold range. The preset grayscale difference threshold range is pre-set based on the PCB production process and quality requirements and is used to determine whether there are any abnormalities in the inspection area.
[0063] If the grayscale difference index of a detection area falls outside the preset grayscale difference threshold range, the detection area is marked as an abnormal detection area. The surface texture data and edge contour data of the abnormal detection area are simultaneously acquired and comprehensively analyzed to obtain the texture abnormality index and contour deformation index of the abnormal detection area. The surface texture data includes texture clarity, texture uniformity, and texture direction values, while the edge contour data includes contour smoothness, contour continuity, and contour curvature values. Through the comprehensive analysis of these data, a more comprehensive understanding of the characteristics of the abnormal detection area can be achieved.
[0064] A comprehensive analysis of the grayscale difference index, texture anomaly index, and contour deformation index in the abnormal detection area is performed to obtain the preliminary defect probability value and deep defect probability value in the abnormal detection area. By establishing a reasonable mathematical model and performing weighted calculation and analysis on each index, the preliminary defect probability value and deep defect probability value are obtained to assess the possibility of defects in the abnormal detection area.
[0065] A comprehensive analysis is performed on the preliminary defect probability value and the deep defect probability value in the abnormal detection area to obtain a comprehensive defect probability value in the abnormal detection area. The comprehensive defect probability value in the abnormal detection area is then filtered based on the preset filtering rules. By comprehensively considering the preliminary defect probability value and the deep defect probability value, a more accurate comprehensive defect probability value is obtained and judged according to the preset filtering rules.
[0066] Based on the comprehensive defect probability value after screening, defect identification measures are taken in the abnormal detection area. According to the judgment result of the comprehensive defect probability value, the abnormal detection area is processed accordingly, such as determining whether there is a defect, the type of defect, and the location of the defect.
[0067] The present invention will be further described below in conjunction with Examples 1 to 5:
[0068] Example 1:
[0069] To acquire image information from a PCB to be inspected, high-precision image acquisition equipment is required. Industrial cameras are a common technique. During the acquisition process, it is crucial to maintain stable camera parameters, such as a fixed shooting angle, an appropriate focal length, and a consistent exposure time, to ensure that the captured image clearly and accurately reflects the PCB's actual condition. After acquisition, the image will contain several inspection areas. These areas can be divided based on the PCB's circuit layout, component distribution, and other characteristics. For example, they can be divided according to different functional modules, circuit paths, or component packaging areas. This ensures that each inspection area has relatively independent characteristics and functions, facilitating subsequent targeted analysis.
[0070] Grayscale value distribution data must be obtained for each inspection area. To obtain this data, the captured image undergoes preprocessing. This preprocessing includes, but is not limited to, denoising to eliminate noise that may have been introduced during image acquisition, such as Gaussian noise and salt-and-pepper noise. Denoising can employ methods such as mean filtering and median filtering, which smooth the image and preserve its key features. Next, grayscale normalization is performed to map the image's grayscale values to a uniform range, such as [0, 1]. This eliminates grayscale differences between images caused by factors such as lighting conditions and camera parameters, making the grayscale value distribution data for different inspection areas comparable. After preprocessing, the grayscale values of each inspection area are statistically analyzed to obtain grayscale value distribution data for that area, including the frequency of occurrence of each grayscale value, the mean, and the variance. This data is then stored as standard data for subsequent inspections.
[0071] When a PCB is inspected under preset inspection conditions, the actual grayscale value distribution data for each inspection area must be acquired in real time. The preset inspection conditions must be consistent with those used to obtain the standard grayscale value distribution data, including parameters such as the illumination intensity of the inspection environment, the camera's shooting angle, and resolution, to ensure comparability between the actual grayscale value distribution data and the standard data. For example, a fixed light source can be set in the inspection environment to prevent changes in illumination intensity; the camera's position and angle can be maintained to ensure a consistent shooting angle; and the same resolution can be set to ensure the same level of image detail. During the inspection process, an image acquisition device captures images of the PCB in real time. The grayscale values of each area are statistically analyzed according to the previously divided inspection areas to obtain the actual grayscale value distribution data for each inspection area. Preprocessing steps such as denoising and normalization are also performed.
[0072] The grayscale value distribution data for each inspection area is combined with the actual grayscale value distribution data for that inspection area to obtain a grayscale difference index. During this analysis, the two sets of data must first be aligned and matched to ensure they correspond to the same location in the same inspection area. This can be achieved through image registration techniques, such as feature point-based registration methods. This method finds the feature points in the two sets of images and then transforms the images based on the corresponding relationship between the feature points to ensure that the two sets of images are fully aligned.
[0073] After alignment, various methods are used to calculate the difference between the two. One common method is to calculate the mean squared error (MSE), which is the average of the squared differences in the grayscale values of corresponding pixels in the two data sets. Specifically, for each detection area, all pixels are traversed, and the difference between the grayscale value of each pixel in the standard grayscale value distribution data and the grayscale value of the corresponding pixel in the actual grayscale value distribution data is calculated. These differences are squared, summed, and then divided by the total number of pixels to obtain the mean squared error (MSE). The magnitude of the MSE reflects the degree of difference between the two data sets: a larger MSE indicates a greater grayscale difference; conversely, a smaller MSE indicates a smaller grayscale difference.
[0074] You can also calculate the Peak Signal-to-Noise Ratio (PSNR). This is a measure of image quality based on mean square error. While primarily used to measure image quality after compression, it can also be used to compare the differences between two sets of grayscale value distribution data. A higher PSNR value indicates a smaller difference between the two sets of data, resulting in higher image quality. Conversely, a lower PSNR value indicates a greater difference.
[0075] In addition to the above methods, analysis can also be conducted from the perspective of statistical characteristics, such as comparing the mean, variance, skewness, kurtosis, and other statistical quantities between two sets of data. The mean reflects the average level of grayscale values. If the mean difference between the two sets of data is large, it indicates that there is a difference in the overall grayscale level. The variance reflects the degree of dispersion of the grayscale values. The larger the variance, the more dispersed the distribution of grayscale values. The skewness and kurtosis reflect the shape characteristics of the grayscale value distribution. By calculating the difference between these statistical quantities and comprehensively weighting them, an index that reflects the degree of grayscale difference can be obtained.
[0076] During the comprehensive analysis process, it's necessary to consider the advantages and disadvantages of different methods and select an appropriate method or combine multiple methods to calculate the grayscale difference index based on the actual situation. For example, while the mean square error is simple to calculate, it may not be sensitive to local differences. Analysis methods that incorporate statistical features can more comprehensively reflect the overall distribution of data. By properly selecting and combining analysis methods, the grayscale difference index for each detection area can be accurately determined, providing a reliable basis for subsequent determination of abnormalities in the detection area.
[0077] After obtaining the grayscale difference index, it needs to be compared with the preset grayscale difference threshold range. The preset grayscale difference threshold range is pre-set based on factors such as the production process requirements, quality standards, and actual testing experience of the PCB board. For example, during the production process of the PCB board, due to process limitations and material properties, the grayscale value distribution of the normal inspection area will have a certain fluctuation range. The threshold range is set based on this normal fluctuation range. If the grayscale difference index is within the threshold range, it means that the grayscale value distribution of the inspection area is within the normal range compared with the standard data, and there is no obvious abnormality. If the grayscale difference index is outside the threshold range, it means that the grayscale value distribution of the inspection area is significantly different from 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 the area. The surface texture data includes texture clarity value, texture uniformity value, and texture direction value. The acquisition of these data needs to be based on image processing technology. For example, when obtaining the texture clarity value, the image of the abnormal detection area can be processed by an edge detection algorithm, such as using the Canny operator or the Sobel operator to evaluate the clarity of the edge by detecting the gradient change of the texture edge. In the specific operation, the image is first Gaussian smoothed to reduce the influence of noise, and then the gradient amplitude and direction of each pixel are calculated. The clear texture edge will show obvious gradient changes. By statistically analyzing the gradient intensity distribution of the edge pixels, the quantitative value of the texture clarity can be obtained.
[0080] Obtaining the texture uniformity value requires analyzing the distribution characteristics of texture pixel values. First, the anomaly detection area is divided into several sub-areas, and the variance of the pixel grayscale values within each sub-area is calculated. The smaller the variance, the closer the texture pixel values within the sub-area, and the higher the texture uniformity; conversely, the lower the uniformity. A statistical analysis of the variances of all sub-areas is then performed, such as calculating their mean or weighted average, which is used as the texture uniformity value for the entire anomaly detection area. When dividing the areas, the size of the sub-areas must be determined based on the actual scale of the texture and the required detection accuracy to ensure that the texture uniformity characteristics are accurately reflected.
[0081] Texture direction values can be determined using methods such as Fourier transforms or Gabor filters. For example, a two-dimensional Fourier transform is performed on the image of the anomaly detection area, converting the image from the spatial domain to the frequency domain. The energy distribution in the frequency domain is then analyzed. Texture direction information typically corresponds to areas of concentrated energy in a specific direction in the frequency domain. By calculating the dominant direction of the energy distribution, the primary direction of the texture can be determined. Alternatively, a Gabor filter bank can be used to convolve the image with Gabor filters of different orientations. The filter direction with the largest response is the dominant direction of the texture, thus determining the texture direction.
[0082] The process for obtaining the contour smoothness, continuity, and curvature values in edge contour data is as follows: First, contour extraction is performed on the image of the anomaly detection area. This can be achieved through threshold segmentation, edge detection, and then contour tracking, such as using a chain code-based contour tracking algorithm, to obtain a sequence of pixel coordinates for the contour. When extracting the contour, care must be taken to eliminate the effects of noise and false edges to ensure that the extracted contour truly reflects the edge characteristics of the area.
[0083] The smoothness of a contour can be assessed by calculating the curvature change of the contour curve. For each point on the contour, the curvature values of its adjacent points are calculated. The gentler the curvature change, the smoother the contour and the higher the smoothness value; conversely, the more dramatic the curvature change, the lower the smoothness value. The curvature can be estimated using a differential method or curve fitting. For example, for a point Pi on the contour, several points before and after it (such as Pi-2, Pi-1, Pi, Pi+1, Pi+2) are taken and the curvature value of that point is calculated by fitting a quadratic or cubic curve. The curvature change amplitude of all points on the entire contour is then statistically analyzed to obtain a quantitative value of the contour smoothness.
[0084] Determining the contour continuity value requires checking for breaks or discontinuities. After contour extraction, the chain code sequence or coordinate sequence of the contour is analyzed to determine if there are any breakpoints. For example, if the contour tracking process becomes unsuccessful or if there are significant jumps in the coordinate sequence, the contour is considered discontinuous. The contour continuity value can be measured by the number of breaks or the ratio of the break length to the total contour length. Fewer breaks and smaller percentages of break length indicate better contour continuity and a higher continuity value.
[0085] The contour curvature value directly calculates the curvature of each point on the contour. The curvature reflects the degree of curvature of the contour at that point. For regular contours, such as circular contours, the curvature is relatively consistent at each point; however, the curvature of irregular contours varies greatly. When calculating curvature, it is important to select an appropriate neighborhood range. A neighborhood that is too small may be affected by noise, while a neighborhood that is too large may smooth out the actual curvature changes. Generally, depending on the scale of the contour and the detection accuracy requirements, 3-5 neighboring points are selected to calculate the curvature of the current point to ensure that the curvature value accurately reflects the local curvature characteristics of the contour.
[0086] After obtaining the texture clarity, texture uniformity, and texture direction values, these three values need to be comprehensively analyzed to obtain the texture anomaly index. During this comprehensive analysis, the weight coefficients for each parameter must first be determined. The weight coefficients must be set based on the importance of each parameter in reflecting texture anomalies. For example, for certain PCB board defects, changes in texture clarity may be more critical, so a higher weight can be assigned to the texture clarity value. For other defects, abnormalities in texture direction may be more representative, so the weight can be adjusted accordingly. The weight coefficients can be determined based on the PCB material properties, production process requirements, and statistical analysis of historical inspection data. For example, the weight ratio of each parameter can be determined by analyzing the correlation between texture parameters and defect types for a large number of known defect samples.
[0087] A specific method for comprehensive analysis can be weighted summation, where each texture parameter value is multiplied by its corresponding weight coefficient and then added together 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. The texture parameter values here need to be normalized first and mapped to the same numerical range (such as [0,1]) to avoid affecting the accuracy of the weighted results due to different dimensions. The normalization method can use linear normalization, such as subtracting the minimum value from the parameter value and dividing it by the difference between the maximum and minimum values to obtain the normalized value.
[0088] Similarly, a comprehensive analysis of the contour smoothness, continuity, and curvature values is performed to derive the contour deformation index. First, weight coefficients for these three contour parameters are determined. The weighting principle is similar to that for texture parameters and can be determined based on the degree of correlation between contour features and defects. For example, for edge fracture defects, the contour continuity value can be given a higher weight; for shape deformation defects, the contour curvature value may be given a higher weight.
[0089] The contour parameters are then normalized to make them comparable, and the contour deformation index is calculated using a weighted summation method. For example, the contour deformation index = w4 × contour smoothness value + w5 × contour continuity value + w6 × contour curvature value (w4 + w5 + w6 = 1). During the calculation process, it is important to pay attention to the normalization direction of the parameters. For example, a higher contour smoothness value indicates a smoother contour, which may be a normal feature. However, the contour deformation index needs to reflect the degree of abnormality. Therefore, during normalization, it may be necessary to reversely map 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 accurately reflects the degree of contour abnormality.
[0090] Example 3:
[0091] Obtain standard contour data for the anomaly detection area. This data is the ideal contour data pre-set during the PCB production process based on design drawings or the contour characteristics of qualified products. This data can be extracted from CAD design files or collected and stored from the corresponding area of a PCB board that has been rigorously tested and confirmed to be defect-free. This data, typically in the form of a sequence of contour coordinate points, accurately describes the expected shape and edge characteristics of the area.
[0092] Obtain edge contour data for the anomaly detection area. This requires image processing techniques to perform edge detection and contour extraction on the image of the anomaly detection area. Specifically, the image is first grayscaled, then a threshold segmentation algorithm is used to separate the target area from the background. Edge pixel points are then extracted using an operator such as the Canny edge detector. Finally, a contour tracking algorithm (such as the eight-neighborhood tracking method) is used to obtain a continuous sequence of contour coordinates, thereby forming the edge contour data for the area.
[0093] After acquiring the standard contour data and edge contour data, a deviation analysis is performed on both to obtain the contour deviation index. During deviation analysis, the two sets of contour data must first be registered to ensure their spatial alignment. A feature point-based registration method can be used. For example, feature points (such as points of significant curvature or corners) are extracted from both the standard contour and edge contour. By matching these feature points, an affine transformation matrix is calculated to transform the edge contour data into the same coordinate system as the standard contour data.
[0094] After the registration is completed, the deviation between the two is calculated. ( , is the number of points of the standard contour), find its nearest neighbor point on the edge contour , calculate the Euclidean distance between two points ,in are the coordinates of the standard contour points, is the coordinate of the corresponding point of the edge contour. Then, the average value of all distances is calculated to obtain the contour deviation index ,Right now:
[0095]
[0096] in, It represents the contour deviation index. The larger the value, the greater the deviation between the edge contour and the standard contour, and vice versa.
[0097] Obtain the initial texture weight coefficient. This is a constant value pre-set based on the PCB material, process, and the impact of texture features on defects. It is typically determined by process engineers based on production experience and historical data. The value range is generally between 0 and 1. It is used to measure the importance of texture features in deep defect assessment.
[0098] Combined with the texture anomaly index of the abnormal detection area, the initial texture weight coefficient is comprehensively analyzed 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, reflecting the degree of abnormality of the texture characteristics of the area. In the specific analysis, the initial texture weight coefficient and the texture anomaly index are weighted and calculated, and multiplication operation is used here to achieve adjustment. Suppose the initial texture weight coefficient is , the texture anomaly index is , then the texture adjustment weight coefficient The calculation formula is:
[0099]
[0100] in, The texture adjustment coefficient is a proportional constant set according to actual production needs. It 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 amount of sample data. The meaning of this formula is that when the texture anomaly index The larger the value, the more obvious the abnormal texture features are. In this case, the texture adjustment weight coefficient It will be increased proportionally based on the initial weight to highlight the role of texture features in depth defect assessment.
[0101] Similarly, the initial contour weight coefficient is obtained. This is a pre-set constant value based on the PCB's process requirements and the impact of contour features on defects. Similar to the initial texture weight coefficient, it is set by professionals and ranges from 0 to 1. It is used to measure the importance of contour features in deep defect assessment.
[0102] Combined with the contour deformation index of the abnormal detection area, the initial contour weight coefficient is comprehensively analyzed to obtain the contour adjustment weight coefficient. The contour deformation index reflects the degree of deformation of the contour features of the area. The initial contour weight coefficient and the contour deformation index are weighted and calculated in a similar way to texture adjustment. Assume that the initial contour weight coefficient is , the contour deformation index is , then the contour adjustment weight coefficient The calculation formula is:
[0103]
[0104] in, The contour adjustment coefficient is a proportional constant set according to the actual production situation. It is used to control the adjustment range of the contour deformation index to the initial weight. Its value can be determined by analyzing a large number of samples. The formula shows that the contour deformation index The larger the value, the greater the contour adjustment weight coefficient The larger the increment relative to the initial weight, the greater the weight of the contour feature in the depth defect assessment as its deformation degree increases.
[0105] After getting the texture adjustment weight coefficient , Grayscale Difference Index , contour adjustment weight coefficient , contour deviation index Finally, these parameters are comprehensively analyzed to obtain the depth defect probability value In the comprehensive analysis, a weighted combination method is adopted to consider the influence of each parameter on the depth defect. Specifically, the calculation formula of the depth defect probability value is:
[0106]
[0107] in, Indicates the depth defect probability value, which ranges from 0 to 1. The larger the value, the higher the possibility of depth defects in the area. Adjust the weight coefficient for the texture calculated above to measure the grayscale difference index weight in depth defect assessment; The grayscale difference index is obtained by performing a difference analysis between the grayscale value distribution data of the detection area and the actual grayscale value distribution data, which reflects the abnormality of the grayscale feature. Adjust the weight coefficient for the calculated contour, which is used to measure the contour deviation index weight in depth defect assessment; The contour deviation index obtained by analyzing the deviation between the standard contour data and the edge contour data reflects the degree of deviation of the contour feature.
[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 value range to avoid distortion of the weighted results due to different dimensions. For example, the grayscale difference index and contour deviation index They may have different value ranges, so they need to be normalized to the interval [0,1]. Linear normalization can be used, such as for the parameter , and its normalized value is ,in and They are the minimum and maximum values of the parameter under normal circumstances.
[0109] Example 4:
[0110] Assume that during the PCB board inspection process, a certain inspection area is marked as an abnormal inspection area because the grayscale difference index exceeds the preset threshold. After analysis, its preliminary defect probability value and deep 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 preliminary defect probability value is derived based on the grayscale difference index, texture anomaly index, and contour deformation index of the anomaly detected area. For example, when inspecting the copper foil trace area of a PCB board, the grayscale difference index indicates a significant deviation between the actual grayscale distribution and the standard data, possibly due to uneven copper foil thickness or oxidation. The texture anomaly index also reflects reduced texture clarity (e.g., a rough trace surface) and decreased texture uniformity (localized spots), while the contour deformation index indicates decreased edge smoothness (jagged edges) and discontinuities (possibly small fractures). A comprehensive evaluation of these three indices yields a preliminary probability of 0.65 for a defect in this area. (This value is for illustrative purposes only and is based on a weighted combination of the indices, with specific weights set according to PCB process requirements, such as a grayscale difference index weight of 0.4, a texture anomaly index weight of 0.3, and a contour deformation index weight of 0.3. This preliminary probability is calculated.)
[0112] Determining the depth defect probability value involves parameters such as the contour deviation index, texture adjustment weight coefficient, and contour adjustment weight coefficient. Continuing with the copper foil wiring area as an example, the standard contour data is the smooth rectangular edge specified in the design drawing, while the actual edge contour data shows localized depressions and protrusions. By aligning 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.05mm, which is determined based on the actual inspection accuracy). At the same time, the initial texture weight coefficient is set to 0.3. Since the texture anomaly index is 0.7 (assuming the degree of texture anomaly is high), the texture adjustment weight coefficient is calculated by adjusting the formula to be 0.3×(1+adjustment coefficient×0.7) (the adjustment coefficient is set according to process experience, and the example here 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, grayscale difference index (assuming it is 0.7), contour adjustment weight coefficient, and contour deviation index (assuming it is 0.6 after normalization) are weighted and combined to obtain a depth defect probability value of 0.405×0.7+0.496×0.6=0.2835+0.2976=0.5811 (this is an example calculation process; actual calculations must be based on normalized parameters).
[0113] A comprehensive analysis of the preliminary defect probability and deep defect probability values is performed to determine the composite defect probability. In PCB inspection scenarios, the preliminary defect probability reflects the overall degree of anomaly based on multi-dimensional features such as grayscale, texture, and contour, while the deep defect probability focuses more on contour deviation and the likelihood of defects after feature weight adjustment. Both assess defect risk from different perspectives. For example, if the preliminary defect probability value for a particular anomaly detection area is 0.7 and the deep defect probability value is 0.6, this indicates that the overall feature anomaly in that area is significantly anomaly, and even after adjustments to contour deviation and feature weights, there is still a high defect risk. In this case, a weighted sum of the two values is performed based on the preset weights.
[0114] The weight setting should be based on the PCB defect type and inspection requirements. For high-density wiring areas, grayscale differences may more easily indicate copper foil thickness issues, so the weight of the preliminary defect probability value can be set to 0.6. For contour-sensitive areas such as plug-in holes, the weight of the depth defect probability value can be set to 0.7. For a general scenario, assuming a weight of 0.5 for the preliminary defect probability value and a weight of 0.5 for the depth defect probability value, the combined defect probability value is 0.7 × 0.5 + 0.6 × 0.5 = 0.35 + 0.3 = 0.65. This calculation process requires normalization of the preliminary and depth probability values to ensure consistent ranges and avoid dimensionality effects. For example, if the preliminary probability value ranges from [0, 1] and the depth probability value is also normalized to [0, 1] after calculation, a direct weighted sum can be used.
[0115] In practical applications, different PCBs have different process standards, and weighting needs to be adjusted flexibly. For example, for the inner layers of a multilayer board, due to the higher requirements for texture characteristics, the weight of the texture anomaly index in the preliminary defect probability value may be higher, which in turn affects the proportion of the preliminary 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, different areas of the same PCB board (such as the pad area, conductor area, and via area) can also be weighted differently due to their different functions.
[0116] The calculation process for the combined defect probability value must ensure rigorous logic. For example, a high preliminary defect probability value but a low deep defect probability value may indicate a surface anomaly (such as slight contamination) but no deep defects. Conversely, a low preliminary probability value but a high deep defect probability value may indicate a hidden structural defect (such as an internal conductor breakage with no obvious surface texture anomaly). By combining these two values, a more comprehensive assessment of the severity and likelihood of defects can be achieved.
[0117] Let's take another example: an anomaly detection area is located at a via on a PCB. The initial defect probability is 0.4 (small grayscale difference, but slightly low texture uniformity), and the depth defect probability is 0.8 (large profile deviation, irregular via edge). In this case, if the via profile integrity weight is set to 0.6, the overall defect probability is 0.4 × 0.4 + 0.8 × 0.6 = 0.16 + 0.48 = 0.64. This indicates that although the initial feature anomaly is not significant, the depth profile deviation leads to a high overall defect probability, which requires special attention.
[0118] Example 5:
[0119] Suppose, during the PCB inspection process, a specific abnormal detection area has been calculated to have a comprehensive defect probability value. It is now necessary to screen and process this area according to pre-set rules and take appropriate measures. For example, in the inspection of a four-layer PCB, a detection area is located on the top layer where signal traces are located. Under pre-set inspection conditions, the grayscale difference index of this area exceeds the threshold and is marked as an abnormal detection area. The calculated preliminary defect probability value is 0.7, the deep defect probability value is 0.6, and the weighted sum of the comprehensive defect probability value is 0.65 (assuming the weights of the preliminary and deep probabilities are 0.5 and 0.5, respectively).
[0120] Obtain a preset defect probability threshold. This threshold is set by the PCB manufacturer based on product quality standards, process capabilities, and customer requirements. The threshold may vary for different PCB types or regions. For example, for general consumer electronics PCBs, the defect probability threshold is typically set to 0.6. For PCBs requiring high precision, such as medical devices, the threshold may be set to 0.5 to increase detection sensitivity. In this example, the preset defect probability threshold is 0.6.
[0121] The combined defect probability value is compared with a threshold. If the combined defect probability value is lower than or equal to the threshold, the abnormality detection area is determined to be a non-defective area; if it is higher than the threshold, it is determined to be a defective area. In this example, the combined defect probability value of 0.65 is higher than the threshold of 0.6, so the area is determined to be a defective area.
[0122] When a defective area is identified, the defect type and location information for the abnormal detection area must be output. The defect type is determined based on various index characteristics of the area. For example, if the grayscale difference index is high and the contour deviation index is large, it may be due to abnormal copper foil trace thickness or edge corrosion. If the texture anomaly index is prominent and the contour deviation is small, it may be due to surface contamination or oxidation. The location information is determined by the coordinate system used during image acquisition. For example, when shooting with an industrial camera, the location of the abnormal area is accurately determined to the millimeter level by mapping pixel coordinates to actual physical coordinates.
[0123] Taking the top-layer signal trace area as an example, the Grayscale Difference Index indicates that the actual grayscale value is lower than the standard value, which may indicate insufficient copper foil thickness. The Texture Anomaly Index indicates a decrease in texture uniformity and the presence of localized dark areas. The Contour Deformation Index shows slight jagged edges. Based on these characteristics, the defect type is determined to be "over-etched copper foil." The location information is the upper left corner of the PCB, with coordinates ranging from X=10.2mm×12.5mm and Y=15.3mm×17.8mm. This information will be displayed on the system interface or exported to a database for subsequent repairs or quality analysis.
[0124] If a non-defective area is determined, it is skipped and the next area is inspected. For example, if an abnormal detection area is located on the solder mask layer of a PCB board, the comprehensive defect probability value is 0.55, which is lower than the threshold of 0.6 and is determined to be a non-defective area. In this case, the system automatically ignores this area and moves to the next inspection area according to the preset inspection path, continuing with grayscale difference analysis and other processes.
[0125] In practical applications, the setting of screening rules requires a balance between the false positive rate and the missed positive rate. For example, if the threshold is set too high (e.g., 0.8), some real defects may be misclassified as non-defective (missed), affecting product quality. If the threshold is set too low (e.g., 0.4), normal areas may be misclassified as defects (false positive), increasing the workload of subsequent manual re-inspection. Therefore, the setting of thresholds typically requires optimization through extensive experimental data and production practice.
[0126] Taking automotive electronics PCB inspection as an example, due to the extremely high reliability requirements, the threshold may be set at 0.5 to identify as many potential defects as possible. Suppose a test area is located on the copper foil of the power supply layer, and the comprehensive defect probability value is 0.52, slightly above the threshold. However, the system still identifies it as a defective area and outputs its location as the lower right corner of the power supply layer. The defect type may be "uneven copper foil thickness," allowing production personnel to promptly investigate.
[0127] Defect identification measures must be implemented in real time and accurately. For example, when the system identifies a defective area, an alarm mechanism must be immediately triggered, alerting the operator through lighting, sound, or a pop-up window. Simultaneously, the defect information must be automatically entered into the production management system, linking it to the PCB board's batch, production date, and other information to facilitate quality traceability. For continuous production lines, the system must also be linked to a robotic arm or sorting device to automatically sort defective PCBs into a substandard area.
[0128] In another example, the comprehensive defect probability value of a via area on a PCB board is 0.58, which is lower than the threshold of 0.6 and is therefore determined to be a defect-free area. In this case, the system does not generate an alarm and proceeds directly to the next area for inspection. However, to ensure detection reliability, the system can set up a regular re-inspection mechanism for low-probability abnormal areas. For example, re-inspect these areas once every 100 PCB boards to avoid missed detections due to accidental factors.
[0129] During the screening process, it's also important to prioritize different defect types. For example, continuity defects that impact electrical performance (such as a broken wire) should be prioritized, even if their combined defect probability just exceeds the threshold. Minor defects that only affect appearance (such as minor scratches on the solder mask) can be prioritized with a higher threshold or individual screening rules.
[0130] The system must have a threshold adjustment function to dynamically optimize based on 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 a customer requires improved product yield, the threshold can be lowered to increase inspection rigor.
[0131] The entire implementation process, from comprehensive probability calculation to defect type determination, to location information output and action execution, requires a complete closed-loop process. For example, if a PCB board is inspected and multiple abnormal detection areas are detected, the system will calculate the comprehensive probability for each area in turn. After screening and determination, it will output the defect type (e.g., "oxidized pad" in area A, "short-circuited conductor" in area B) and the precise location of each area. Operators can use this information to perform targeted repairs or scrap the board to ensure that the PCB board meets quality requirements.
[0132] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.
[0133] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A method for identifying true and false defects in PCB boards, characterized in that: The following steps are involved: Acquire image information to be inspected of the PCB board, wherein the image information to be inspected includes a plurality of inspection areas and grayscale value distribution data of each inspection area; When the PCB board is inspected under the preset inspection conditions, the actual grayscale value distribution data of each inspection area is obtained in real time, and the grayscale value distribution data of each inspection area is combined for difference analysis to obtain the grayscale difference index of each inspection area; Determine in real time whether the grayscale difference index of each detection area is within the preset grayscale difference threshold range; If the grayscale difference index of a certain detection area is outside the preset grayscale difference threshold range, the detection area is marked as an abnormal detection area, and the surface texture data and edge contour data of the abnormal detection area are simultaneously obtained and comprehensively analyzed to obtain the texture abnormality index and contour deformation index of the abnormal detection area; Comprehensively analyze the grayscale difference index, texture anomaly index, and contour deformation index of the abnormal detection area to obtain a preliminary defect probability value of the abnormal detection area; The specific steps for obtaining the depth defect probability value in the abnormal detection area are as follows: Acquire standard contour data of the abnormality detection area, and perform deviation analysis in combination with edge contour data of the abnormality detection area to obtain a contour deviation index of the abnormality detection area; Obtaining an initial texture weight coefficient, and performing a comprehensive analysis based on the texture anomaly index at the anomaly detection area to obtain a texture adjustment weight coefficient at the anomaly detection area; Obtaining an initial contour weight coefficient, and performing a comprehensive analysis based on the contour deformation index of the anomaly detection area to obtain a contour adjustment weight coefficient of the anomaly detection area; Comprehensively analyze the texture adjustment weight coefficient, grayscale difference index, contour adjustment weight coefficient, and contour deviation index in the abnormal detection area to obtain the depth defect probability value in the abnormal detection area; Performing a comprehensive analysis on the preliminary defect probability value and the deep defect probability value at the abnormal detection area to obtain a comprehensive defect probability value at the abnormal detection area, and screening the comprehensive defect probability value at the abnormal detection area based on a preset screening rule; Taking defect identification measures in the abnormal detection area based on the comprehensive defect probability value after screening; 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; The specific steps for screening the comprehensive defect probability value in the abnormal detection area based on the preset screening rules 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, the abnormal detection area is determined to be a non-defective area; When the comprehensive defect probability value at the abnormal detection area is higher than a preset defect probability threshold, the abnormal detection area is determined to be a defect area.
2. The method for identifying true and false defects of PCB boards according to claim 1, characterized in that: The specific steps to obtain the grayscale difference index of each detection area are as follows: The grayscale value distribution data of each detection area is combined with the actual grayscale value distribution data of the detection area for comprehensive analysis to obtain the grayscale difference index of each detection area.
3. The method for identifying true and false defects of PCB boards according to claim 1, characterized in that: The specific steps for obtaining the texture anomaly index and contour deformation index of the anomaly detection area are as follows: Comprehensively analyze the texture clarity value, texture uniformity value, and texture direction value of the abnormality detection area to obtain the texture abnormality index of the abnormality detection area; A comprehensive analysis is performed on the contour smoothness value, contour continuity value, and contour curvature value of the abnormality detection area to obtain the contour deformation index of the abnormality detection area.
4. The method for identifying true and false defects of PCB boards according to claim 1, characterized in that: The specific steps for obtaining the contour deviation index, texture adjustment weight coefficient, and contour adjustment weight coefficient at the abnormality detection area are as follows: Comparing the standard contour data of the abnormality detection area with the edge contour data of the abnormality detection area to obtain a contour deviation index of the abnormality detection area; Performing weighted calculation on the initial texture weight coefficient at the abnormality detection area and the texture abnormality index at the abnormality detection area to obtain the texture adjustment weight coefficient at the abnormality detection area; The initial contour weight coefficient at the abnormality detection area and the contour deformation index at the abnormality detection area are weightedly calculated to obtain the contour adjustment weight coefficient at the abnormality detection area.
5. The method for identifying true and false defects of PCB boards according to claim 1, characterized in that: The specific steps for obtaining the comprehensive defect probability value in the abnormal detection area are as follows: The preliminary defect probability value at the abnormal detection area and the deep defect probability value at the abnormal detection area are weightedly summed to obtain a comprehensive defect probability value at the abnormal detection area.
6. The method for identifying true and false defects of PCB boards according to claim 1, characterized in that: The specific steps for taking defect identification measures in the abnormal detection area are as follows: If the abnormality detection area is determined to be a defect area, the defect type and location information of the abnormality detection area are output; If the abnormal detection area is determined to be a non-defective area, the abnormal detection area is skipped and the detection continues to the next area.
7. A system for identifying genuine and fake defects in PCB boards, applying the method for identifying genuine and fake defects in PCB boards according to any one of claims 1 to 6, characterized in that: include: Image acquisition module, difference analysis module, judgment module, index analysis module, probability analysis module, defect recognition module; The image acquisition module is used to acquire image information to be detected of the PCB board, wherein the image information to be detected includes a plurality of detection areas and grayscale value distribution data of each detection area; The difference analysis module is used to obtain the actual grayscale value distribution data of each detection area in real time when the PCB board is tested under preset test conditions, and perform difference analysis based on 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 a preset grayscale difference threshold range; The index analysis module is used to mark a detection area as an abnormal detection area when the grayscale difference index of a detection area is outside a preset grayscale difference threshold range, and simultaneously obtain the surface texture data and edge contour data of the abnormal detection area, and perform comprehensive analysis on them to obtain the texture abnormality index and contour deformation index of the abnormal detection area; The probability analysis module is used to perform comprehensive analysis on the grayscale difference index, texture anomaly index, and contour deformation index of the abnormal detection area to obtain a preliminary defect probability value of the abnormal detection area; The specific steps for obtaining the depth defect probability value in the abnormal detection area are as follows: Acquire standard contour data of the abnormality detection area, and perform deviation analysis in combination with edge contour data of the abnormality detection area to obtain a contour deviation index of the abnormality detection area; Obtaining an initial texture weight coefficient, and performing a comprehensive analysis based on the texture anomaly index at the anomaly detection area to obtain a texture adjustment weight coefficient at the anomaly detection area; Obtaining an initial contour weight coefficient, and performing a comprehensive analysis based on the contour deformation index of the anomaly detection area to obtain a contour adjustment weight coefficient of the anomaly detection area; Comprehensively analyze the texture adjustment weight coefficient, grayscale difference index, contour adjustment weight coefficient, and contour deviation index in the abnormal detection area to obtain the depth defect probability value in the abnormal detection area; Performing a comprehensive analysis on the preliminary defect probability value and the deep defect probability value at the abnormal detection area to obtain a comprehensive defect probability value at the abnormal detection area, and screening the comprehensive defect probability value at the abnormal detection area based on a preset screening rule; The defect recognition module is used to take defect recognition measures in the abnormal detection area based on the comprehensive defect probability value after screening; The specific steps for screening the comprehensive defect probability value in the abnormal detection area based on the preset screening rules 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, the abnormal detection area is determined to be a non-defective area; When the comprehensive defect probability value at the abnormal detection area is higher than a preset defect probability threshold, the abnormal detection area is determined to be a defect area.
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