A control method, system, storage medium and computer equipment for automatic inspection of PCB appearance defects
By comparing and dividing the detection images of the PCB detection board with the standard images, combining the matching and dependency and stability information of the light information table, the composite defect information is extracted and the degree of defect is judged, which solves the problem of the difficulty of distinguishing pseudo-defects and real defects in visual detection, and improves the detection efficiency and accuracy.
Patent Information
- Application Number
- CN202411905666.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-12-23
AI Technical Summary
In the prior art, it is difficult to accurately distinguish between pseudo-defects formed by light shadows and real defects in visual detection, and shadows may cover real defects, increasing detection difficulty and reducing efficiency.
By acquiring the detection image and standard images of the PCB detection board, comparing it to obtain the appearance difference information set, and it is divided into a natural defect information set and a derivative defect information set according to the first characteristic information. Use the ray information table to match the derived defect information set and the natural defect information set, obtain dependency information and stability information, calculate the correlation value to extract the composite defect information, and determine whether the real defect value is within the preset defect interval.
It improves the accuracy of defect analysis, reduces unnecessary processing steps and resource waste, quickly filters out defect information that really needs attention, and improves the efficiency of the detection process.
Smart Images

Figure CN119359705B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of PCB boards, and in particular to a control method, system, storage medium and computer equipment for automatic inspection of PCB appearance defects. Background Art
[0002] PCB is an important electronic component. It is an electronic component connection carrier with a specific circuit pattern formed on an insulating material substrate by printing, etching and other processes. Its main function is to provide electrical connection for electronic components and play a mechanical support function to ensure that various electronic components in electronic equipment can work stably according to the predetermined circuit design. With the increasing demand for miniaturization and high performance of electronic equipment and the increasing amount of data processing, the performance and reliability requirements of PCB are also getting higher and higher. The appearance defects of PCB will directly affect its electrical performance and mechanical stability. The electronics industry has strict standards and specifications to constrain the quality of PCB, and appearance defect inspection is an important part of meeting these standards.
[0003] At present, visual inspection technology is mainly used to detect PCB appearance defects. Specifically, industrial cameras are used to collect high-definition images of PCBs and convert them into digital signals. The image digital signals are then processed by computer software and hardware technology to analyze image features to identify various appearance defects such as line defects, component defects, and process defects. However, in the process of visual inspection, light conditions play a vital role. When light is projected onto the real defective part of the PCB board, based on optical principles, shadows will be formed in the area around the defect. These shadows will fall on the surface of the PCB board. In the image obtained by visual inspection, these shadow parts will appear in a form similar to appearance defects. This is because visual inspection mainly relies on image analysis to determine whether there are defects on the PCB board. The appearance of shadows changes the characteristics such as pixel distribution and grayscale value in the image, which can easily be misjudged as actual appearance defects by the inspection system. In addition, this shadow will also cause another problem, that is, it may cover the defects that actually exist in the surrounding areas of the PCB board. Due to the occlusion of the shadow, these covered real defects become difficult to be directly observed in the image, which increases the difficulty of detection. To determine whether there are real defects hidden under these appearance defects formed by shadows, a large number of PCB images need to be collected. The board images are analyzed. These images must cover different lighting conditions, different types of real defects and various possible shadow situations. Only by comparing these massive images can we try to establish the correlation pattern between shadows and real defects. The whole process involves a large amount of data processing, which seriously affects the efficiency of detection. Summary of the invention
[0004] The main purpose of the present invention is to provide a control method, system, storage medium and computer equipment for automatic inspection of PCB appearance defects, aiming to solve the technical problems in the prior art.
[0005] The present invention provides a control method for automatic inspection of PCB appearance defects, comprising:
[0006] Acquire a test image and a standard image of a PCB test board, and compare the test image with the standard image to obtain an appearance difference information set;
[0007] Acquire first feature information of the appearance difference information set, and divide the plurality of appearance difference information sets according to the first feature information to obtain a natural defect information set and a derived defect information set;
[0008] Acquire second characteristic information of the derived defect information set, wherein the second characteristic information includes dependency information and stability information;
[0009] Acquire a correlation value according to the dependency information and the stability information, and extract the real information in the derived defect information set according to the correlation value to obtain a plurality of composite defect information;
[0010] Acquire a real defect value according to the plurality of composite defect information and natural defect information sets, and determine whether the real defect value is within a preset defect interval;
[0011] If the actual defect value is within the preset defect interval, it is determined that the defect degree of the PCB is relatively light;
[0012] If the actual defect value is not within the preset defect interval, it is determined that the defect degree of the PCB is relatively serious.
[0013] Preferably, the step of comparing the detection image with the standard image to obtain an appearance difference information set comprises:
[0014] Extracting a first key feature group from the detection image, and acquiring geometric information of the detection image according to the first key feature group;
[0015] extracting a second key feature group from the standard image;
[0016] Acquire coincident matching features of the second key feature group and the first key feature group, and transform geometric information of the detection image according to the coincident matching features to obtain a geometrically transformed image;
[0017] Performing interpolation processing on the geometrically transformed image to obtain a resampled image;
[0018] The resampled image and the standard image are compared pixel by pixel to obtain an appearance difference information set.
[0019] Preferably, the step of obtaining the second characteristic information of the derived defect information set includes:
[0020] Obtaining a light information table when the detection image is collected, and matching the derived defect information set with the natural defect information set according to the light information table;
[0021] Acquire a plurality of first geometric parameters of the derived defect information sets, and acquire a plurality of first edge coordinate parameters and first area parameters of the first geometric parameters;
[0022] Acquire multiple second geometric parameters of preset projection information through the light information table, and acquire second edge coordinate parameters and second area parameters of the multiple second geometric parameters;
[0023] Acquire position deviation data according to the first edge coordinate parameters and the second edge coordinate parameters, and acquire projection overlap ratio according to the first area parameters and the second area parameters;
[0024] Acquiring dependency information according to the plurality of position deviation data and projection overlap ratios;
[0025] Acquire multiple gray value parameters by deriving the defect information set, and acquire the first light intensity according to the multiple gray value parameters;
[0026] A plurality of second light intensities of preset projection information are obtained according to the light information table, a relative change rate of a derived defect information set is obtained through the plurality of the first light intensities and the second light intensities, and stability information is obtained according to the relative change rate.
[0027] Preferably, the step of calculating the association value according to the dependency information and the stability information comprises:
[0028] Acquire first coordinate information of a plurality of first geometric parameters and second coordinate information of a second geometric parameter according to the dependency information, and calculate difference mean information according to the plurality of first coordinate information and second coordinate information;
[0029] The dependency value is calculated according to the plurality of first coordinate information, the second coordinate information and the difference mean information, wherein the calculation formula is:
[0030] ;
[0031] Among them, R represents the dependency value, n represents the number of first coordinate information, x i Indicates the i-th first coordinate information, y i represents the i-th second coordinate information, d represents the difference mean information, and i represents the sequence number of the first coordinate information;
[0032] Acquire a first change mean and a first change standard deviation of a plurality of first light intensities according to the stability information;
[0033] Acquire a second change mean and a second change standard deviation of a plurality of second light intensities according to the stability information;
[0034] The stability value is calculated according to the first change mean, the first change standard deviation, the second change mean and the second change standard deviation, wherein the calculation formula is:
[0035] ;
[0036] Among them, S represents the stable value, represents the first variation mean, represents the second variation mean, represents the first standard deviation of variation, represents the second standard deviation of variation;
[0037] Obtaining a preset PCB detection case record table, and obtaining a first correlation coefficient of a dependent value and a second correlation coefficient of a stable value according to the preset PCB detection case record table;
[0038] The correlation value is calculated according to the dependency value, the first correlation coefficient, the stability value and the second correlation coefficient, wherein the calculation formula is:
[0039] ;
[0040] Wherein, D represents the correlation value, α represents the first correlation coefficient, R represents the dependency value, β represents the second correlation coefficient, and S represents the stable value.
[0041] Preferably, the step of extracting the real information in the derived defect information set according to the associated value to obtain a plurality of composite defect information comprises:
[0042] Obtain appearance defect history information of the PCB board, and obtain defect location information and defect appearance information based on the appearance defect history information;
[0043] Acquire defect distribution information according to the defect location information, and acquire defect degree information according to the defect appearance information;
[0044] Acquire type-degree association data according to the defect distribution information and defect degree information, and acquire an association threshold according to the type-degree association data;
[0045] Determining whether the correlation value is greater than a correlation threshold;
[0046] If the correlation value is greater than the correlation threshold, the derived defect information is classified as composite defect information.
[0047] Preferably, the step of obtaining the real defect value according to the plurality of composite defect information and natural defect information sets comprises:
[0048] Acquire defect characteristics of the PCB according to the composite defect information and the natural defect information, wherein the defect characteristics include line defect characteristics, component defect characteristics and process defect characteristics;
[0049] Respectively obtaining the first area of the circuit defect characteristic, the second area of the component defect characteristic, and the third area of the process defect characteristic, and obtaining the total defect area according to the first area, the second area, and the third area;
[0050] Obtaining a first proportion value according to the area of the first region and the total defect area, and quantifying the line defect feature according to the first proportion value to obtain a line defect value;
[0051] Obtaining a second proportion value according to the area of the second region and the total defect area, and quantifying the component defect feature according to the second proportion value to obtain a component defect value;
[0052] Obtaining a third proportion value according to the third region area and the total defect area, and quantifying the process defect feature according to the third proportion value to obtain a process defect value;
[0053] Respectively obtaining a first weight factor of a line defect feature, a second weight factor of a component defect feature, and a third weight factor of a process defect feature;
[0054] The actual defect degree value is calculated according to the line defect value, the component defect value, the process defect value, the first weight factor, the second weight factor and the third weight factor, wherein the calculation formula is:
[0055] ;
[0056] Among them, E represents the true defect information value, w1 represents the line defect value, q1 represents the first weight factor, w2 represents the component defect value, q2 represents the second weight factor, w3 represents the process defect value, and q3 represents the third weight factor.
[0057] The present application also provides a control system for automatic inspection of PCB appearance defects, comprising:
[0058] A first acquisition module is used to acquire a test image and a standard image of a PCB test board, and compare the test image with the standard image to obtain an appearance difference information set;
[0059] A second acquisition module, configured to acquire first feature information of the appearance difference information set, and divide the plurality of appearance difference information sets according to the first feature information to obtain a natural defect information set and a derived defect information set;
[0060] A third acquisition module is used to acquire second characteristic information of the derived defect information set, wherein the second characteristic information includes dependency information and stability information;
[0061] An extraction module, used to obtain a correlation value according to the dependency information and the stability information, and extract the real information in the derived defect information set according to the correlation value to obtain a plurality of composite defect information;
[0062] A judgment module, used to obtain a real defect value according to the plurality of composite defect information and natural defect information sets, and judge whether the real defect value is within a preset defect interval;
[0063] If the actual defect value is within the preset defect interval, it is determined that the defect degree of the PCB is relatively light;
[0064] If the actual defect value is not within the preset defect interval, it is determined that the defect degree of the PCB is relatively serious.
[0065] Preferably, the third acquisition module comprises:
[0066] A matching unit, used to obtain a light information table when the detection image is collected, and match the derived defect information set with the natural defect information set according to the light information table;
[0067] A first acquisition unit, used for acquiring first geometric parameters of a plurality of the derived defect information sets, and acquiring first edge coordinate parameters and first area parameters of the plurality of the first geometric parameters;
[0068] A second acquisition unit, configured to acquire a plurality of second geometric parameters of the preset projection information through the light information table, and acquire second edge coordinate parameters and second area parameters of the plurality of second geometric parameters;
[0069] a third acquisition unit, configured to acquire position deviation data according to a plurality of the first edge coordinate parameters and the second edge coordinate parameters, and acquire projection overlap ratios according to a plurality of the first area parameters and the second area parameters;
[0070] A first analysis unit, configured to obtain dependency information according to the plurality of position deviation data and projection overlap ratios;
[0071] a fourth acquisition unit, configured to acquire a plurality of gray value parameters by deriving the defect information set, and acquire the first light intensity according to the plurality of gray value parameters;
[0072] The second analysis unit is used to obtain multiple second light intensities of preset projection information according to the light information table, obtain a relative change rate of the derived defect information set through the multiple first light intensities and second light intensities, and obtain stability information according to the relative change rate.
[0073] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the control method for automatic inspection of PCB appearance defects when executing the computer program.
[0074] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the control method for automatic inspection of PCB appearance defects are implemented.
[0075] The beneficial effects of the present invention are as follows: in the present invention, the appearance difference information set obtained by comparing the detection image of the detection board with the standard image is divided to obtain a natural defect information set and a derived defect information set. Through the first division, the determined natural defects can be retained so as to conduct further in-depth research on the natural defects in the future. After matching the derived defect information set with the natural defect information set according to the light information table, the dependency information between the derived defect information set and the natural defect information set can be obtained through the first geometric parameter of the derived defect information set and the second geometric parameter of the preset projection information, and the stability information of the derived defect information set can be obtained through the first light intensity of the derived defect information set and the second light intensity of the preset projection information. The correlation value is calculated according to the dependency information and the stability information, and the defect position in the PCB appearance defect history information is converted into the defect position information. The location information and defect appearance information are quantified, and the correlation relationship between different types of defects and their severity is established. The correlation threshold is obtained through these correlation data. By comparing the size of the correlation value and the correlation threshold, the derived defect information set is used for a second division, so that the pseudo-defect information composed entirely of shadows in the derived defect information set is eliminated, and the composite defect information composed of shadows and real defects in the derived defect information set is extracted. Through two divisions and extractions, the subsequent appearance defect detection is more targeted. For the derived defect information that does not affect the performance of the PCB, discarding this information can reduce unnecessary processing steps and resource waste. In the large-scale PCB production inspection process, the defect information that really needs attention can be quickly screened out, which improves the efficiency of the entire inspection process and enables the inspection and repair work to be carried out more efficiently. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] Figure 1 The figure is a schematic diagram of a method flow according to an embodiment of the present invention.
[0077] Figure 2FIG. 1 is a schematic diagram of a system structure according to an embodiment of the present invention.
[0078] Figure 3 A schematic diagram of the internal structure of a computer device according to an embodiment of the present application.
[0079] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0080] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0081] like Figure 1-Figure 3 As shown, the present application provides a method for detecting high impedance performance of a PCB board, comprising:
[0082] S1. Obtain a test image and a standard image of a PCB test board, and compare the test image with the standard image to obtain an appearance difference information set;
[0083] S2, obtaining first feature information of the appearance difference information set, and dividing the multiple appearance difference information sets according to the first feature information to obtain a natural defect information set and a derived defect information set;
[0084] S3, obtaining second characteristic information of the derived defect information set, wherein the second characteristic information includes dependency information and stability information;
[0085] S4, obtaining a correlation value according to the dependency information and the stability information, and extracting real information in the derived defect information set according to the correlation value to obtain a plurality of composite defect information;
[0086] S5. Obtaining a real defect value according to the plurality of composite defect information and natural defect information sets, and determining whether the real defect value is within a preset defect interval;
[0087] If the actual defect value is within the preset defect interval, it is determined that the defect degree of the PCB is relatively light;
[0088] If the actual defect value is not within the preset defect interval, it is determined that the defect degree of the PCB is relatively serious.
[0089] As described in the above steps S1-S5, PCB is an important electronic component, and its main function is to provide electrical connection for electronic components and play a mechanical support function, ensuring that various electronic components in electronic equipment can work stably according to the predetermined circuit design. With the increasing demand for miniaturization and high performance of electronic equipment and the increasing amount of data processing, the performance and reliability requirements of PCB are also getting higher and higher. The appearance defects of PCB will directly affect its electrical performance and mechanical stability. The electronics industry has strict standards and specifications to constrain the quality of PCB, and appearance defect inspection is an important part of meeting these standards. At present, PCB appearance defects are mainly detected through visual inspection technology. Specifically, industrial cameras are used to collect high-definition images of PCB and convert them into digital signals. The image digital signals are then processed by computer software and hardware technology to analyze image features to identify various appearance defects such as line defects, component defects, and process defects. However, during the visual inspection process, when light is projected onto the real defective part of the PCB board, based on optical principles, shadows will be formed in the area around the defect. These shadows will fall on the surface of the PCB board and present a form similar to the appearance defects. In addition, the shadows may also cover the defects that actually exist in the surrounding areas of the PCB board. To determine whether there are real defects hidden under these appearance defects formed by the shadows, a large number of PCB board images need to be collected for analysis. The amount of data processing involved in the whole process is very large, which seriously affects the efficiency of detection. In the present invention, multiple appearance difference information sets are divided according to the first feature information to obtain natural defect information sets and derived defect information sets, wherein the natural defect information set generally refers to a set of real appearance defects that can be intuitively identified on the PCB, such as circuit defects, component defects and process defects, and the derived defect information set generally refers to a set of appearance defects formed on the PCB due to light irradiating the real defects during the appearance inspection process. This type of shadow and its coverage area will be displayed through an image to form a set of appearance defects. Separating the natural defect information set from the derived defect information set allows the detection system to more accurately determine the nature of the defects. For example, for the key factors in the natural defect information set that directly affect the function of the PCB, by analyzing them separately, it is possible to more accurately evaluate whether the quality of the PCB meets the electrical performance requirements. The derived defect set contains defects that are completely caused by the detection environment (shadows caused by light irradiation). This type of defect will be displayed through an image, but will not affect the quality of the PCB. Separating them can avoid these non-essential "defects". The system can detect the real defects that affect the function, thereby improving the accuracy of defect analysis, and obtain the correlation value based on the dependency information and stability information. The dependency information refers to the data related to the mutual dependence between the derived defect information set and the natural defect information set. For example, if a component has a size defect,The size defect of this component belongs to the natural defect information set, and light shining on this component will produce a shadow on the PCB, then this shadow and its coverage area belong to the derived defect information set. By obtaining the dependency between this coverage area and this component, if the dependency is strong, then this coverage area is likely to only contain the shadow defect, if the dependency is weak, then this coverage area is likely to contain other defects besides the shadow. Specifically, it reflects the extent to which the derived defect is caused by the existence of the real defect, and the stability information is data about the change of derived defects relative to natural defects under different detection conditions (such as different light intensities). For example, a defect composed entirely of shadows will show randomness in repeated detection and poor stability, while a defect composed of shadows and real defects will have better stability in repeated detection. It reflects the reliability of the derived defect or whether it appears stably under various conditions. The correlation value is a numerical value used to quantify the closeness of the relationship between the derived defect information set and the real defect. It is based on the dependency information and stability information. The size of the correlation value is calculated comprehensively based on qualitative information. It directly reflects the strength of the correlation between the derived defects and the real defects. The real information in the derived defect information set is extracted according to the correlation value to obtain multiple composite defect information. Since the derived defect information set consists of two parts, one part is pseudo-defect information completely formed by shadows generated by light irradiation, and the other part is shadows generated by light irradiation. The shadows are projected on the PCB and cover the real defects. The composite defect information is formed by the overlap of shadows and real defects. The pseudo-defect information will not affect the performance of the PCB, so there is no need to consider the pseudo-defect information. The composite defect information contains real defects, which will affect the performance of the PCB. Therefore, it is necessary to extract the composite defect information in order to make a more accurate assessment of the appearance quality of the PCB. The real defect value is obtained based on multiple composite defect information and natural defect information sets, and it is judged whether the real defect value is within the preset defect interval. Among them, the real defect value is a comprehensive quantitative value obtained through multiple composite defect information and natural defect information sets, which is used to characterize the PCB The actual degree of defects on the board is an overall evaluation index obtained after comprehensive consideration of various types of defects, and the preset defect interval is a pre-set numerical range used as a standard for judging the severity of PCB board defects. The setting of this interval is usually based on factors such as industry standards, product design requirements, production process level, and previous quality control experience. The preset defect interval provides a decision boundary for quality control. When the actual defect value falls within the preset defect interval, it can be operated according to the processing flow of lighter defect levels, such as simple repair, marking and continuing to circulate, etc.; when the actual defect value exceeds the preset defect interval, more stringent measures need to be taken, such as scrapping, detailed analysis of the cause of the defect, and adjustment of the production process.
[0090] In one embodiment, the step S1 of comparing the detection image with the standard image to obtain an appearance difference information set includes:
[0091] S11, extracting a first key feature group from the detection image, and acquiring geometric information of the detection image according to the first key feature group;
[0092] S12, extracting a second key feature group from the standard image;
[0093] S13, obtaining overlapping matching features of the second key feature group and the first key feature group, and transforming the geometric information of the detection image according to the overlapping matching features to obtain a geometrically transformed image;
[0094] S14, performing interpolation processing on the geometrically transformed image to obtain a resampled image;
[0095] S15. Compare the resampled image and the standard image pixel by pixel to obtain an appearance difference information set.
[0096] As described in the above steps S11-S15, the present invention extracts the first key feature group in order to identify the parts of the detection image that are important for subsequent comparison. These key features may include the outline of the components on the PCB board, the direction of the circuit, the location of the solder joints, etc. The second key feature group is extracted to establish a reference template. Because the standard image usually represents the ideal state of the PCB board, its second key feature group contains the correct component shape, circuit layout, solder joint location and other information, which can provide a standard basis for subsequent feature matching and difference comparison. The corresponding relationship between the key features in the detection image and the standard image can be found through the coincidence matching features. These features may vary due to shooting angles, PCB There are differences in position, angle or size in the image due to factors such as the placement of the plate. By overlapping the matching features, we can determine how to transform the geometric information of the test image so that the key features in the test image are better aligned with the key features in the standard image. However, after the test image is geometrically transformed to obtain the geometrically transformed image, the pixel distribution of the geometrically transformed image may change, resulting in pixel vacancies or unevenness. Therefore, interpolation processing can be used to fill these vacancies based on the information of the surrounding pixels to make the pixel distribution of the image more reasonable, thereby obtaining a resampled image. Comparing the resampled image with the standard image pixel by pixel can comprehensively and carefully obtain the appearance difference information.
[0097] In one embodiment, the step S3 of obtaining the second characteristic information of the derived defect information set includes:
[0098] S31, obtaining a light information table when the detection image is collected, and matching the derived defect information set with the natural defect information set according to the light information table;
[0099] S32, obtaining first geometric parameters of a plurality of the derived defect information sets, and obtaining first edge coordinate parameters and first area parameters of the plurality of the first geometric parameters;
[0100] S33, obtaining a plurality of second geometric parameters of preset projection information through the light information table, and obtaining second edge coordinate parameters and second area parameters of the plurality of second geometric parameters;
[0101] S34, acquiring position deviation data according to a plurality of the first edge coordinate parameters and the second edge coordinate parameters, and acquiring projection overlap ratios according to a plurality of the first area parameters and the second area parameters;
[0102] S35, acquiring dependency information according to the plurality of position deviation data and projection overlap ratios;
[0103] S36, obtaining a plurality of gray value parameters by deriving the defect information set, and obtaining a first light intensity according to the plurality of gray value parameters;
[0104] S37, obtaining a plurality of second light intensities of preset projection information according to the light information table, obtaining a relative change rate of a derived defect information set through the plurality of the first light intensities and the second light intensities, and obtaining stability information according to the relative change rate.
[0105] As described in the above steps S31-S37, the present invention matches the derived defect information set with the natural defect information set through the light information table, because part of the cause of the derived defect information is due to the light irradiating the natural defect, and the light information table records the relevant information of the light conditions when the derived defect information set is collected. Matching is conducive to discovering the potential relationship between the derived defect information set and the natural defect information set, thereby facilitating further exploration of the composition of the derived defect information set. Dependency information is obtained through the first geometric parameter of the derived defect information set and the second geometric parameter of the preset projection information, wherein the preset projection information generally refers to the theoretical projection that should be formed on the PCB when a specific light irradiates a specific defect. The second edge coordinate parameter and the second area parameter of the preset projection information are respectively combined and analyzed with the first edge coordinate parameter and the first area parameter of the derived defect information set. The position deviation data obtained by the first edge coordinate parameter and the second edge coordinate parameter can intuitively reflect the positional offset of the derived defect information relative to the preset projection information. The projection overlap ratio obtained by the first area parameter and the second area parameter can reflect the degree of overlap between the derived defect information and the preset projection information. These two data can evaluate the geometric differences between the derived defect information and the preset projection information from different angles, and provide detailed data support for the subsequent acquisition of dependency information. The gray value in the digital image is related to the light The light intensity of the derived defect information is directly related to the line intensity. The light intensity characteristics of the derived defect information can be quantified through multiple grayscale value parameters. The relative change rate is obtained by using the first light intensity of the derived defect information set and the second light intensity of the preset projection information. Through the relative change rate, the degree of change of the light intensity of the derived defect information relative to the preset projection information can be intuitively understood. For pseudo-defects composed entirely of shadows, their light intensity mainly depends on the formation conditions of the shadows. Therefore, when the lighting conditions change, the depth of the shadows will change accordingly, resulting in a large change in the light intensity of the pseudo-defect area. For composite defects composed of shadows and real defects, their light intensity changes are relatively complex. When the lighting conditions change, The real defect part in the composite defect will not produce drastic changes in light intensity like shadows, and due to the existence of real defects, its relative change rate will be smaller than the pseudo-defect composed entirely of shadows. This is because the real defect buffers the impact of illumination changes on the overall light intensity to a certain extent. In short, a smaller relative change rate usually means that the performance of the derived defect under different light intensities is relatively stable, that is, the appearance characteristics of the defect will not change significantly with the change of light intensity, which means that this type of derived defect information contains real defects; on the contrary, a larger relative change rate indicates poor stability, then this type of derived defect information is completely formed by shadows and does not contain real defects.
[0106] In one embodiment, the step S4 of calculating the association value according to the dependency information and the stability information includes:
[0107] S41, acquiring first coordinate information of a plurality of first geometric parameters and second coordinate information of a second geometric parameter according to the dependency information, and calculating difference mean information according to the plurality of first coordinate information and second coordinate information;
[0108] S42, calculating the dependency value according to the plurality of first coordinate information, the second coordinate information and the difference mean information, wherein the calculation formula is:
[0109] ;
[0110] Among them, R represents the dependency value, n represents the number of first coordinate information, x i Indicates the i-th first coordinate information, y i represents the i-th second coordinate information, d represents the difference mean information, and i represents the sequence number of the first coordinate information;
[0111] S43, obtaining a first change mean and a first change standard deviation of a plurality of first light intensities according to the stability information;
[0112] S44, acquiring a second change mean and a second change standard deviation of a plurality of second light intensities according to the stability information;
[0113] S45, calculating a stable value according to the first change mean, the first change standard deviation, the second change mean, and the second change standard deviation, wherein the calculation formula is:
[0114] ;
[0115] Among them, S represents the stable value, represents the first variation mean, represents the second variation mean, represents the first standard deviation of variation, represents the second standard deviation of variation;
[0116] S46, obtaining a preset PCB detection case record table, and obtaining a first correlation coefficient of the dependent value and a second correlation coefficient of the stable value according to the preset PCB detection case record table;
[0117] S47, calculating the correlation value according to the dependency value, the first correlation coefficient, the stability value and the second correlation coefficient, wherein the calculation formula is:
[0118] ;
[0119] Wherein, D represents the correlation value, α represents the first correlation coefficient, R represents the dependency value, β represents the second correlation coefficient, and S represents the stable value.
[0120] As described in the above steps S41-S47, the present invention analyzes the relationship between the derived defect information and the preset projection information from the perspective of geometric position through the first coordinate information of the first geometric parameter and the second coordinate information of the second geometric parameter, and the calculated difference mean information can quantify the average level of this position difference. The calculation formula of the dependency value comprehensively considers the first coordinate information, the second coordinate information and the difference mean information. It is an indicator for measuring the geometric position dependency of the derived defect information and the real defect information. Through this indicator, the degree of dependence of the position of the derived defect information on the real defect information can be intuitively understood. The change mean can reflect the average trend of the change of light intensity, and the change standard deviation can reflect the discrete degree of its change, that is, the fluctuation size. The calculation formula of the stability value comprehensively considers the first change mean. , the first change standard deviation, the second change mean and the second change standard deviation are used to measure the stability of the derived defect information relative to the real defect information in terms of light intensity. Then, based on historical experience data or standard data as a reference, the correlation coefficient is determined based on previous inspection cases or industry standards. The correlation coefficient can associate the currently calculated dependency value and stability value with historical experience or standards. These coefficients can be reflected in past inspections, making the calculation of the correlation value more objective and in line with actual experience. This reference can avoid the limitations of calculations based solely on current data and improve the credibility and practicality of the evaluation results. The calculated correlation value combines the two important factors of geometric dependence and light stability, weighted by the correlation coefficient, to provide a comprehensive and integrated evaluation indicator.
[0121] In one embodiment, the step S4 of extracting the real information in the derived defect information set according to the association value to obtain a plurality of composite defect information includes:
[0122] S48, obtaining appearance defect history information of the PCB board, and obtaining defect location information and defect appearance information according to the appearance defect history information;
[0123] S49, acquiring defect distribution information according to the defect position information, and acquiring defect degree information according to the defect appearance information;
[0124] S410, acquiring type-degree association data according to the defect distribution information and defect degree information, and acquiring an association threshold according to the type-degree association data;
[0125] S411, determining whether the association value is greater than an association threshold;
[0126] If the correlation value is greater than the correlation threshold, the derived defect information is classified as composite defect information.
[0127] As described in the above steps S48-S411, the present invention obtains defect location information and defect appearance information through appearance defect history information, and can understand where defects usually appear and what their appearance is in the past PCB production or use process. This information provides a reference for the subsequent judgment of the current derived defects. The defect distribution information is obtained according to the defect location information, and the spatial distribution law of the defects on the PCB board can be clarified, for example, whether it is concentrated in a certain functional area or evenly distributed on the entire board. At the same time, the defect degree information is obtained according to the defect appearance information, and the severity of the defect can be quantified. Then, the correlation relationship between different types of defects and their severity is established. The correlation threshold is obtained through these correlation data. This threshold is used to classify whether the derived defects have sufficient correlation to be determined as composite defects. It can provide a clear standard for the subsequent judgment of whether the derived defects belong to composite defects. If the correlation value is greater than the correlation threshold, the derived defect information is classified as composite defect information. If the correlation value is not greater than the correlation threshold, the derived defect information is classified as pseudo-defect information. Through the above method, the derived defects can be classified more efficiently in the actual defect classification process, and possible composite defects can be quickly screened out, thereby improving the efficiency of the entire detection process.
[0128] In one embodiment, the step S5 of obtaining the real defect value according to the plurality of composite defect information and natural defect information sets comprises:
[0129] S51, acquiring defect characteristics of the PCB according to the composite defect information and the natural defect information, wherein the defect characteristics include line defect characteristics, component defect characteristics and process defect characteristics;
[0130] S52, respectively obtaining the first area of the circuit defect characteristic, the second area of the component defect characteristic, and the third area of the process defect characteristic, and obtaining the total defect area according to the first area, the second area, and the third area;
[0131] S53, obtaining a first proportion value according to the area of the first region and the total defect area, and quantifying the line defect feature according to the first proportion value to obtain a line defect value;
[0132] S54, obtaining a second proportion value according to the area of the second region and the total defect area, and quantifying the component defect feature according to the second proportion value to obtain a component defect value;
[0133] S55, obtaining a third proportion value according to the third region area and the total defect area, and quantifying the process defect feature according to the third proportion value to obtain a process defect value;
[0134] S56, respectively obtaining a first weight factor of a line defect feature, a second weight factor of a component defect feature, and a third weight factor of a process defect feature;
[0135] S57, calculating a true defect degree value according to the line defect value, the component defect value, the process defect value, the first weight factor, the second weight factor and the third weight factor, wherein the calculation formula is:
[0136] ;
[0137] Among them, E represents the true defect information value, w1 represents the line defect value, q1 represents the first weight factor, w2 represents the component defect value, q2 represents the second weight factor, w3 represents the process defect value, and q3 represents the third weight factor.
[0138] As described in the above steps S51-S57, the present invention can sort out and classify defects on the PCB board by extracting defect features of the PCB from the composite defect information and the natural defect information, laying a foundation for accurately evaluating the impact of each type of defect. The regional areas corresponding to the three defect features are calculated respectively, and the total defect area is obtained, in order to quantify the defects from the perspective of area. The regional area can intuitively reflect the size of the defect, and different types of defect features (circuit, component, process) are quantified by the proportion value, so that the three defect types can be compared and analyzed under the same quantitative standard, which is convenient for subsequent comprehensive evaluation. The weight factors of different defect features are obtained to consider the difference in the degree of influence of different types of defects on the performance and quality of the PCB board. For example, in some high-precision electronic equipment, the influence of circuit defects on product performance may be more critical, so its weight factor may be higher; and in some equipment with higher requirements on component performance, the weight factor of component defects may dominate, reflecting the difference in the importance of defects. The weight factor can reasonably allocate the importance of different types of defects in the comprehensive evaluation according to the actual situation, such as the functional requirements of the product, the use environment, etc., which makes the calculation of the true defect degree value more in line with the actual situation and more accurately reflects the influence of different defects on the PCB. The actual impact of the board quality, the calculated true defect degree value is a quantitative indicator that comprehensively considers various defect types and their relative importance, which can comprehensively reflect the true defect degree of the PCB board, and the quality of different PCB boards can be directly compared through this value. For example, a PCB board with a higher line defect value and a larger line defect weight factor will have a higher true defect degree value, indicating that the quality problem of the PCB board is more serious. In addition, when the true defect degree value exceeds a certain set threshold, the PCB board can be judged as a substandard product and needs to be scrapped or reworked; when the value is within a certain range, it can be decided whether to perform simple repairs or directly release it according to the specific situation.
[0139] The present application also provides a control system for automatic inspection of PCB appearance defects, comprising:
[0140] A first acquisition module is used to acquire a test image and a standard image of a PCB test board, and compare the test image with the standard image to obtain an appearance difference information set;
[0141] A second acquisition module, configured to acquire first feature information of the appearance difference information set, and divide the plurality of appearance difference information sets according to the first feature information to obtain a natural defect information set and a derived defect information set;
[0142] A third acquisition module is used to acquire second characteristic information of the derived defect information set, wherein the second characteristic information includes dependency information and stability information;
[0143] An extraction module, used to obtain a correlation value according to the dependency information and the stability information, and extract the real information in the derived defect information set according to the correlation value to obtain a plurality of composite defect information;
[0144] A judgment module, used to obtain a real defect value according to the plurality of composite defect information and natural defect information sets, and judge whether the real defect value is within a preset defect interval;
[0145] If the actual defect value is within the preset defect interval, it is determined that the defect degree of the PCB is relatively light;
[0146] If the actual defect value is not within the preset defect interval, it is determined that the defect degree of the PCB is relatively serious.
[0147] In one embodiment, the third acquisition module includes:
[0148] A matching unit, used to obtain a light information table when the detection image is collected, and match the derived defect information set with the natural defect information set according to the light information table;
[0149] A first acquisition unit, used for acquiring first geometric parameters of a plurality of the derived defect information sets, and acquiring first edge coordinate parameters and first area parameters of the plurality of the first geometric parameters;
[0150] A second acquisition unit, configured to acquire a plurality of second geometric parameters of the preset projection information through the light information table, and acquire second edge coordinate parameters and second area parameters of the plurality of second geometric parameters;
[0151] a third acquisition unit, configured to acquire position deviation data according to a plurality of the first edge coordinate parameters and the second edge coordinate parameters, and acquire projection overlap ratios according to a plurality of the first area parameters and the second area parameters;
[0152] A first analysis unit, configured to obtain dependency information according to the plurality of position deviation data and projection overlap ratios;
[0153] a fourth acquisition unit, configured to acquire a plurality of gray value parameters by deriving the defect information set, and acquire the first light intensity according to the plurality of gray value parameters;
[0154] The second analysis unit is used to obtain multiple second light intensities of preset projection information according to the light information table, obtain a relative change rate of the derived defect information set through the multiple first light intensities and second light intensities, and obtain stability information according to the relative change rate.
[0155] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the control method for automatic inspection of PCB appearance defects when executing the computer program.
[0156] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the control method for automatic inspection of PCB appearance defects are implemented.
[0157] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0158] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0159] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A control method for automatic inspection of PCB appearance defects, characterized in that: include: Acquire a test image and a standard image of a PCB test board, and compare the test image with the standard image to obtain an appearance difference information set; Acquire first feature information of the appearance difference information set, and divide the plurality of appearance difference information sets according to the first feature information to obtain a natural defect information set and a derived defect information set; Acquire second characteristic information of the derived defect information set, wherein the second characteristic information includes dependency information and stability information; Acquire a correlation value according to the dependency information and the stability information, and extract the real information in the derived defect information set according to the correlation value to obtain a plurality of composite defect information; Acquire a real defect value according to the plurality of composite defect information and natural defect information sets, and determine whether the real defect value is within a preset defect interval; If the actual defect value is within the preset defect interval, it is determined that the defect degree of the PCB is relatively light; If the actual defect value is not within the preset defect interval, it is determined that the defect degree of the PCB is relatively serious.
2. The control method for automatic inspection of PCB appearance defects according to claim 1 is characterized in that: The step of comparing the detection image with the standard image to obtain an appearance difference information set includes: Extracting a first key feature group from the detection image, and acquiring geometric information of the detection image according to the first key feature group; extracting a second key feature group from the standard image; Acquire coincident matching features of the second key feature group and the first key feature group, and transform geometric information of the detection image according to the coincident matching features to obtain a geometrically transformed image; Performing interpolation processing on the geometrically transformed image to obtain a resampled image; The resampled image and the standard image are compared pixel by pixel to obtain an appearance difference information set.
3. The control method for automatic inspection of PCB appearance defects according to claim 1 is characterized in that: The step of obtaining the second characteristic information of the derived defect information set includes: Obtaining a light information table when the detection image is collected, and matching the derived defect information set with the natural defect information set according to the light information table; Acquire a plurality of first geometric parameters of the derived defect information sets, and acquire a plurality of first edge coordinate parameters and first area parameters of the first geometric parameters; Acquire multiple second geometric parameters of preset projection information through the light information table, and acquire second edge coordinate parameters and second area parameters of the multiple second geometric parameters; Acquire position deviation data according to the first edge coordinate parameters and the second edge coordinate parameters, and acquire projection overlap ratio according to the first area parameters and the second area parameters; Acquiring dependency information according to the plurality of position deviation data and projection overlap ratios; Acquire multiple gray value parameters by deriving the defect information set, and acquire the first light intensity according to the multiple gray value parameters; A plurality of second light intensities of preset projection information are obtained according to the light information table, a relative change rate of a derived defect information set is obtained through the plurality of the first light intensities and the second light intensities, and stability information is obtained according to the relative change rate.
4. The control method for automatic inspection of PCB appearance defects according to claim 1 is characterized in that: The step of acquiring the association value according to the dependency information and the stability information comprises: Acquire first coordinate information of a plurality of first geometric parameters and second coordinate information of a second geometric parameter according to the dependency information, and calculate difference mean information according to the plurality of first coordinate information and second coordinate information; The dependency value is calculated according to the plurality of first coordinate information, the second coordinate information and the difference mean information, wherein the calculation formula is: ; Among them, R represents the dependency value, n represents the number of first coordinate information, x i Indicates the i-th first coordinate information, y i represents the i-th second coordinate information, d represents the difference mean information, and i represents the sequence number of the first coordinate information; Acquire a first change mean and a first change standard deviation of a plurality of first light intensities according to the stability information; Acquire a second change mean and a second change standard deviation of a plurality of second light intensities according to the stability information; The stability value is calculated according to the first change mean, the first change standard deviation, the second change mean and the second change standard deviation, wherein the calculation formula is: ; Among them, S represents the stable value, represents the first variation mean, represents the second variation mean, represents the first standard deviation of variation, represents the second standard deviation of variation; Obtaining a preset PCB detection case record table, and obtaining a first correlation coefficient of a dependent value and a second correlation coefficient of a stable value according to the preset PCB detection case record table; The correlation value is calculated according to the dependency value, the first correlation coefficient, the stability value and the second correlation coefficient, wherein the calculation formula is: ; Wherein, D represents the correlation value, α represents the first correlation coefficient, R represents the dependency value, β represents the second correlation coefficient, and S represents the stable value.
5. The control method for automatic inspection of PCB appearance defects according to claim 1 is characterized in that: The step of extracting the real information from the derived defect information set according to the associated value to obtain a plurality of composite defect information includes: Obtain appearance defect history information of the PCB board, and obtain defect location information and defect appearance information based on the appearance defect history information; Acquire defect distribution information according to the defect location information, and acquire defect degree information according to the defect appearance information; Acquire type-degree association data according to the defect distribution information and defect degree information, and acquire an association threshold according to the type-degree association data; Determining whether the correlation value is greater than a correlation threshold; If the correlation value is greater than the correlation threshold, the derived defect information is classified as composite defect information.
6. The control method for automatic inspection of PCB appearance defects according to claim 1 is characterized in that: The step of obtaining the real defect value according to the plurality of composite defect information and natural defect information sets comprises: Acquire defect characteristics of the PCB according to the composite defect information and the natural defect information, wherein the defect characteristics include line defect characteristics, component defect characteristics and process defect characteristics; Respectively obtaining the first area of the circuit defect characteristic, the second area of the component defect characteristic, and the third area of the process defect characteristic, and obtaining the total defect area according to the first area, the second area, and the third area; Obtaining a first proportion value according to the area of the first region and the total defect area, and quantifying the line defect feature according to the first proportion value to obtain a line defect value; Obtaining a second proportion value according to the area of the second region and the total defect area, and quantifying the component defect feature according to the second proportion value to obtain a component defect value; Obtaining a third proportion value according to the third region area and the total defect area, and quantifying the process defect feature according to the third proportion value to obtain a process defect value; Respectively obtaining a first weight factor of a line defect feature, a second weight factor of a component defect feature, and a third weight factor of a process defect feature; The actual defect degree value is calculated according to the line defect value, the component defect value, the process defect value, the first weight factor, the second weight factor and the third weight factor, wherein the calculation formula is: ; Among them, E represents the true defect information value, w1 represents the line defect value, q1 represents the first weight factor, w2 represents the component defect value, q2 represents the second weight factor, w3 represents the process defect value, and q3 represents the third weight factor.
7. A control system for automatic inspection of PCB appearance defects, characterized in that: include: A first acquisition module is used to acquire a test image and a standard image of a PCB test board, and compare the test image with the standard image to obtain an appearance difference information set; A second acquisition module is used to acquire first feature information of the appearance difference information set, and divide the multiple appearance difference information sets according to the first feature information to obtain a natural defect information set and a derived defect information set; A third acquisition module is used to acquire second characteristic information of the derived defect information set, wherein the second characteristic information includes dependency information and stability information; An extraction module, used for obtaining a correlation value according to the dependency information and the stability information, and extracting the real information in the derived defect information set according to the correlation value to obtain a plurality of composite defect information; A judgment module, used to obtain a real defect value according to the plurality of composite defect information and natural defect information sets, and judge whether the real defect value is within a preset defect interval; If the actual defect value is within the preset defect interval, it is determined that the defect degree of the PCB is relatively light; If the actual defect value is not within the preset defect interval, it is determined that the defect degree of the PCB is relatively serious.
8. The control system for automatic inspection of PCB appearance defects according to claim 7, characterized in that: The third acquisition module includes: A matching unit, used to obtain a light information table when the detection image is collected, and match the derived defect information set with the natural defect information set according to the light information table; A first acquisition unit, used for acquiring first geometric parameters of a plurality of the derived defect information sets, and acquiring first edge coordinate parameters and first area parameters of the plurality of the first geometric parameters; A second acquisition unit, configured to acquire a plurality of second geometric parameters of the preset projection information through the light information table, and acquire second edge coordinate parameters and second area parameters of the plurality of second geometric parameters; a third acquisition unit, configured to acquire position deviation data according to a plurality of the first edge coordinate parameters and the second edge coordinate parameters, and acquire projection overlap ratios according to a plurality of the first area parameters and the second area parameters; A first analysis unit, configured to obtain dependency information according to the plurality of position deviation data and projection overlap ratios; a fourth acquisition unit, configured to acquire a plurality of gray value parameters by deriving the defect information set, and acquire the first light intensity according to the plurality of gray value parameters; The second analysis unit is used to obtain multiple second light intensities of preset projection information according to the light information table, obtain a relative change rate of the derived defect information set through the multiple first light intensities and second light intensities, and obtain stability information according to the relative change rate.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
PCB intelligent detection method and system
CN116907341A
Wafer defect detection method, device, equipment and system and storage medium
CN118229609A