Circuit board appearance defect analysis system and method based on visual inspection
By adopting an automated analysis system based on visual detection in circuit board appearance defect detection, combining data fitting and multi-dimensional adaptive thresholds, the problems of low detection efficiency and unstable accuracy in the prior art are solved, and efficient and accurate automated detection and alarms are achieved.
Patent Information
- Application Number
- CN202510112570.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-03-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the detection of existing technology circuit board appearance defects, there are problems such as low detection efficiency, unstable accuracy, high labor costs, high working intensity and inability to meet the real-time inspection and diversification needs of high-speed production lines.
A circuit board appearance defect analysis system based on visual detection is adopted, and the circuit board appearance image data is collected and marked, and a comprehensive evaluation formula is designed using data fitting, combined with the principal component analysis of multi-dimensional data, a multi-dimensional adaptive threshold is designed, and visual features are extracted through the deep learning model CNN to achieve automated detection and alarm.
It improves the accuracy and efficiency of circuit board appearance defect detection, reduces the probability of error judgment, realizes automated detection, saves human resources, and adapts to process fluctuations in different production environments.
Smart Images

Figure CN119559450A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of visual inspection and data analysis, and in particular to a circuit board appearance defect analysis system and method based on visual inspection. Background Art
[0002] Visual inspection and data analysis technology is a technical means to identify, analyze and process objects using computer vision, image processing and data analysis technology. These technologies are usually used in many fields such as automated production lines and quality inspection.
[0003] With the rapid development of electronic products, the quality of printed circuit boards (PCBs), as core components, is crucial to the performance of the entire product. Appearance defects such as poor welding, scratches, bubbles, copper leakage, short circuits, and open circuits are inevitable during the production process of printed circuit boards. If these defects are not detected and repaired in time, they will affect the performance of the product and even cause serious failures.
[0004] Traditional circuit board appearance defect detection methods mainly rely on manual visual inspection, but with the increase in PCB design complexity and the acceleration of production line speed, manual inspection has gradually exposed many problems, such as low inspection efficiency, unstable accuracy, high labor cost, and high work intensity. Therefore, automated inspection technology based on visual inspection has gradually become a research hotspot.
[0005] Many traditional methods require manual setting of parameters, such as thresholds and templates, which leads to a lack of adaptability when dealing with different types of defects or circuit board styles, and cannot meet the diverse needs in actual production; some existing methods require a lot of time to process a single image, and cannot meet the needs of real-time detection on high-speed production lines; many detection systems fail to make full use of the large amount of image data accumulated in production for learning and optimization, and it is difficult to improve detection accuracy and generalization capabilities through data-driven methods. Summary of the invention
[0006] The purpose of the present invention is to provide a circuit board appearance defect analysis system and method based on visual inspection to solve the problems raised in the prior art.
[0007] To achieve the above object, the present invention provides the following technical solution: a circuit board appearance defect analysis method based on visual inspection, the circuit board appearance defect analysis method specifically comprising the following steps: Collect circuit board appearance image data and perform data annotation; Preprocess the annotated circuit board appearance image data and extract circuit board appearance defect features; According to the appearance defect characteristics of the circuit board, function mapping is performed through data fitting, and a comprehensive circuit board appearance defect evaluation formula is designed. The comprehensive evaluation value of the circuit board appearance defect is calculated according to the formula; among them, data fitting uses MATLAB high-order polynomial fitting algorithm, smooth smoothing fitting algorithm, partial space constrained least squares learning method fitting algorithm and nonlinear fitting algorithm; Collect multidimensional data, including production equipment status (such as temperature, humidity, pressure, vibration, etc.), production line process parameters (such as speed, pressure, current, etc.), environmental factors (such as workshop temperature, humidity, pollutant concentration, etc.) and historical circuit board appearance defect data; extract key features related to defect occurrence from multidimensional data through principal component analysis (PCA) method, and design multidimensional adaptive thresholds based on the key features; According to the relationship between the comprehensive evaluation value of the circuit board appearance defects and the multi-dimensional adaptive threshold, the circuit board appearance defects are detected and alarmed; After an alarm occurs, a manual re-inspection is performed, and the alarm results and manual re-inspection results are recorded. A secondary function mapping is performed through data fitting to optimize the function mapping relationship and improve data fitting.
[0008] Specifically: Use industrial cameras and multispectral cameras to collect appearance images of circuit boards with different defect types; The collected circuit board appearance image data is annotated to mark the specific location, shape, type and size of each defect. The image clarity and contrast are also recorded to provide label data for supervised learning.
[0009] Specifically: Through wavelet transform denoising, the image is decomposed into multi-scale and multi-frequency components, and high frequency (detail noise) and low frequency (global information) are processed separately. The specific steps are as follows: Wavelet decomposition: decompose the image into several levels of wavelet coefficients (low-frequency and high-frequency subbands); Noise processing: Apply soft threshold filtering to the high-frequency sub-band coefficients to remove noise signals; Wavelet reconstruction: Reconstruct the processed wavelet coefficients into a denoised image.
[0010] By means of rotation, scaling, shearing and illumination adjustment, diversified data is generated to enhance the generalization ability of the model; among them, defect images with less than the average number of defect types are expanded and resampled to enhance the defect image data; Extracting circuit board defect features by image processing technology; the image processing technology includes edge detection, contour analysis and texture feature extraction; the circuit board appearance defect features include position features, size features, shape features, texture features, defect type and environmental factors; The position feature is the shortest distance between the defect point and different circuits of the circuit board; the size feature is the area of the defect point; the shape feature is the roundness of the defect point; the texture feature is the texture difference of the defect point; the environmental factor is the ambient temperature and humidity; Among them, circularity is an indicator used to measure the degree to which the shape of the defect area is close to a circle. The circularity of the defect reflects the degree to which its boundary is close to a circle. It can be used to analyze the shape characteristics of the defect point in circuit board inspection. The circularity is calculated as follows: X shape =(4ΠX size ) / l 2 ; Among them, X size Indicates the area of the defect point; X shape Indicates the circularity of the defect point; l is the projected circumference of the defect point; Texture difference is an indicator used to measure the difference in texture characteristics between the defective area and the surrounding normal area. It is described by the grayscale distribution pattern of the image or the statistical relationship between local pixels. The texture difference is calculated by comparing the texture of the defective area with the surrounding normal area. Specifically: Segment the defect area and its adjacent background area from the image; Select GLCM or LBP method to calculate the texture features of the two regions respectively; According to the difference in texture feature values, the chi-square distance is used to calculate the texture difference.
[0011] The deep learning model CNN is used to further extract visual features; the types of circuit board appearance defects are identified to enhance the recognition of circuit board defect features; the defect types include copper leakage, scratches, short circuits, open circuits and foreign body contamination.
[0012] According to the extracted circuit board appearance defect features, function mapping is performed from different dimensions through data fitting, and a comprehensive circuit board appearance defect evaluation formula is designed by function mapping. The specific method for calculating the comprehensive evaluation value of circuit board appearance defects according to the formula is as follows: ; Where D represents the circuit board appearance defect evaluation value; f(X size )、f(X shape )、f(X texture )、f(X position ) and f(X evn ) are the sub-functions that constitute the comprehensive circuit board appearance defect evaluation formula; f(X size ) represents the area influence subfunction of the defect point; f(X shape ) represents the shape influence subfunction of the defect point; f(X texture ) represents the texture difference of the defect point affecting the sub-function; f(Xposition ) represents the position of the defect point affecting the subfunction; f(X evn ) represents the environmental impact subfunction of the defect point; f(X type ) represents the weight coefficient corresponding to different defect types; ; Among them, X size Indicates the area of the defect point; T size Indicates the defect point area threshold of different circuit boards; among them, circuit boards of different sizes have different error ranges, and the defect point area threshold is the boundary value of the error range, which is set according to the specific situation; σ size is the rate constant, controlling the smoothness of the function; ; Among them, X shape represents the circularity of the defect point; a represents the fitting parameter of different defect types and the circularity of the defect point; among them, the fitting parameter a is different for circuit boards of different sizes due to different manufacturing processes and use environments; ; Among them, X texture Indicates the texture difference of the defect point; γ texture A coefficient that indicates the degree of texture influence; ; Among them, X position Indicates the shortest distance between the defect point and different lines of the circuit board; T position Indicates the safe distance between different lines on the circuit board; (Among them, the safe distance between different lines is the maximum distance that affects the normal power supply of the line. Different types of circuit boards are different and are set according to actual conditions;) position The distance adjustment coefficient of the function; ; Among them, X evn 1 Indicates the ambient temperature of the production circuit board; X evn 2 Indicates the ambient humidity of the circuit board production environment; C indicates the operating temperature of the circuit board; H indicates the operating humidity of the circuit board; ; Among them, X type Indicates the type of appearance defect of the circuit board; type Represents the weight coefficient that affects the evaluation value.
[0013] Collect multidimensional data, and use the principal component analysis (PCA) method to standardize data, calculate covariance matrix, find eigenvalues and eigenvectors, and perform dimensionality reduction projection to extract key features related to defect occurrence from multidimensional data, and design multidimensional adaptive thresholds based on the key features; The specific expression is: ; Among them, T defect represents the multidimensional adaptive threshold of the appearance defect of the circuit board; μ represents the average value of the appearance defect evaluation value of the historical circuit board; σ represents the standard deviation of the appearance defect evaluation value of the historical circuit board; k represents the control coefficient of the multidimensional adaptive threshold; wherein, under normal circumstances, according to the central limit theorem, it approximately obeys the standard normal distribution, and according to the three times standard deviation law of the normal distribution, k is 3; f i represents the input value of the i-th key feature; w i represents f i Corresponding weight; n represents the total number of key features, n is a positive integer, i is the feature label, i is a positive integer, 1≤i≤n; ΔT feedback It is the correction amount of the threshold based on real-time monitoring and feedback information (equipment status, environmental changes, etc.). feedback Indicates the rate of change of feedback information; Circuit board appearance defect detection and alarm, specifically: Real-time calculation of the circuit board appearance defect evaluation value D and the multi-dimensional adaptive threshold T defect Make a judgment, when D>T defect An alarm will be sounded in real time, and staff will be arranged to conduct manual re-inspection and record the results of the manual re-inspection.
[0014] Specifically: The alarm results, manual re-inspection results, and cases of false positives and missed negatives are recorded, and the recorded data is mapped to a secondary function by means of data fitting to optimize the function mapping relationship and improve the data fitting degree; According to the alarm results and manual re-inspection results, the objective factors causing the appearance defects of the circuit board are analyzed, and the multi-dimensional adaptive threshold is optimized in combination with historical key features; The objective factors causing the appearance defects of the circuit board include equipment status and environmental parameters.
[0015] A circuit board appearance defect analysis system based on visual inspection, the circuit board appearance defect analysis system comprising a data acquisition module, a data preprocessing module, a feature extraction module, a defect assessment module, a defect detection and alarm module and a data update and optimization module; The data acquisition module is responsible for collecting the appearance image and environmental data of the circuit board, using industrial cameras and multi-spectral cameras to take images, and recording equipment status data and production line process parameters; the data preprocessing module is used to denoise, enhance images and perform geometric correction on the collected data; and mark defect data, including position, shape, type and size; for defect analysis; the feature extraction module is used to extract defect features from image data; and extract key features related to defect occurrence through PCA principal component analysis method; the defect assessment module calculates the circuit board appearance defect assessment value based on the extracted defect features and the fitted comprehensive circuit board appearance defect assessment formula; designs multidimensional adaptive thresholds based on key features; the defect detection and alarm module issues an alarm by comparing the circuit board appearance defect assessment value with the multidimensional adaptive threshold; the data update and optimization module is used to collect alarm results and manual re-inspection results; analyze false alarm and missed alarm cases; update the data fitting formula to improve the model fitting degree, and optimize the multidimensional adaptive threshold based on feedback information.
[0016] Compared with the prior art, the present invention has the following beneficial effects: 1. The present invention combines multiple features such as shape, texture and area to ensure good detection capabilities for different types of defects. Through PCA analysis and domain knowledge weight adjustment, the evaluation method is more reliable; 2. The present invention dynamically adjusts the threshold value through historical data and real-time feedback to adapt to process fluctuations in different production environments and improve the flexibility of judgment; 3. The present invention adopts a dynamic threshold value, which significantly reduces the probability of erroneous judgment, and realizes automation, replacing manual detection, saving human resources and improving detection speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 The present invention is a flowchart of the steps of a circuit board appearance defect analysis system and method based on visual inspection. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.
[0019] Example: Figure 1 As shown, the present invention provides a technical solution, a circuit board appearance defect analysis method based on visual inspection, and the circuit board appearance defect analysis method specifically includes the following steps: Collect circuit board appearance image data and perform data annotation; Preprocess the annotated circuit board appearance image data and extract circuit board appearance defect features; According to the appearance defect characteristics of the circuit board, function mapping is performed through data fitting, and a comprehensive circuit board appearance defect evaluation formula is designed. The comprehensive evaluation value of the circuit board appearance defect is calculated according to the formula; among them, data fitting uses MATLAB high-order polynomial fitting algorithm, smooth smoothing fitting algorithm, partial space constrained least squares learning method fitting algorithm and nonlinear fitting algorithm; Collect multidimensional data, including production equipment status (such as temperature, humidity, pressure, vibration, etc.), production line process parameters (such as speed, pressure, current, etc.), environmental factors (such as workshop temperature, humidity, pollutant concentration, etc.) and historical circuit board appearance defect data; extract key features related to defect occurrence from multidimensional data through principal component analysis (PCA) method, and design multidimensional adaptive thresholds based on the key features; According to the relationship between the comprehensive evaluation value of the circuit board appearance defects and the multi-dimensional adaptive threshold, the circuit board appearance defects are detected and alarmed; After an alarm occurs, a manual re-inspection is performed, and the alarm results and manual re-inspection results are recorded. A secondary function mapping is performed through data fitting to optimize the function mapping relationship and improve data fitting.
[0020] Specifically: Use industrial cameras and multispectral cameras to collect appearance images of circuit boards with different defect types; The collected circuit board appearance image data is annotated to mark the specific location, shape, type and size of each defect. The image clarity and contrast are also recorded to provide label data for supervised learning.
[0021] Specifically: Through wavelet transform denoising, the image is decomposed into multi-scale and multi-frequency components, and high frequency (detail noise) and low frequency (global information) are processed separately. The specific steps are as follows: Wavelet decomposition: decompose the image into several levels of wavelet coefficients (low-frequency and high-frequency subbands); Noise processing: Apply soft threshold filtering to the high-frequency sub-band coefficients to remove noise signals; Wavelet reconstruction: Reconstruct the processed wavelet coefficients into a denoised image.
[0022] By means of rotation, scaling, shearing and illumination adjustment, diversified data is generated to enhance the generalization ability of the model; among them, defect images with less than the average number of defect types are expanded and resampled to enhance the defect image data; Extracting circuit board defect features by image processing technology; the image processing technology includes edge detection, contour analysis and texture feature extraction; the circuit board appearance defect features include position features, size features, shape features, texture features, defect type and environmental factors; The position feature is the shortest distance between the defect point and different circuits of the circuit board; the size feature is the area of the defect point; the shape feature is the roundness of the defect point; the texture feature is the texture difference of the defect point; the environmental factor is the ambient temperature and humidity; Among them, circularity is an indicator used to measure the degree to which the shape of the defect area is close to a circle. The circularity of the defect reflects the degree to which its boundary is close to a circle. It can be used to analyze the shape characteristics of the defect point in circuit board inspection. The circularity is calculated as follows: X shape =(4ΠX size ) / l 2 ; Among them, X size Indicates the area of the defect point; X shape Indicates the circularity of the defect point; l is the projected circumference of the defect point; Among them, the detection result: the detected area: X size =5 mm 2 ; Projection circumference: l=10 mm; Calculation: X shape =4π×5 / 10 2 ≈0.628; Roundness: X shape =0.628; Texture difference is an indicator used to measure the difference in texture characteristics between the defective area and the surrounding normal area. It is described by the grayscale distribution pattern of the image or the statistical relationship between local pixels. The texture difference is calculated by comparing the texture of the defective area with the surrounding normal area. Specifically: Segment the defect area and its adjacent background area from the image; Select GLCM or LBP method to calculate the texture features of the two regions respectively; According to the difference in texture feature values, the chi-square distance is used to calculate the texture difference.
[0023] The deep learning model CNN is used to further extract visual features; the types of circuit board appearance defects are identified to enhance the recognition of circuit board defect features; the defect types include copper leakage, scratches, short circuits, open circuits and foreign body contamination.
[0024] According to the extracted circuit board appearance defect features, function mapping is performed from different dimensions through data fitting, and a comprehensive circuit board appearance defect evaluation formula is designed by function mapping. The specific method for calculating the comprehensive evaluation value of circuit board appearance defects according to the formula is as follows: ; Where D represents the circuit board appearance defect evaluation value; f(X size )、f(X shape )、f(X texture )、f(X position ) and f(X evn ) are the sub-functions that constitute the comprehensive circuit board appearance defect evaluation formula; f(X size ) represents the area influence subfunction of the defect point; f(X shape ) represents the shape influence subfunction of the defect point; f(X texture ) represents the texture difference of the defect point affecting the sub-function; f(X position ) represents the position of the defect point affecting the subfunction; f(X evn ) represents the environmental impact subfunction of the defect point; f(X type ) represents the weight coefficient corresponding to different defect types; ; Among them, X size Indicates the area of the defect point; T size Indicates the defect point area threshold of different circuit boards; among them, circuit boards of different sizes have different error ranges, and the defect point area threshold is the boundary value of the error range, which is set according to the specific situation; σ size is the rate constant, controlling the smoothness of the function; in, Circuit board 1: Size: 100mm×50mm; Design features: high-density wiring, small component spacing; Allowable error range: ±0.05mm²; Defect point area threshold: Minor defect: area ≤ 0.03mm² (negligible without treatment); General defects: 0.03mm²< area ≤ 0.05mm² (need to be recorded, may affect some functions); Serious defects: area > 0.05mm² (need to be marked and processed).
[0025] Circuit board 2: Size: 200mm×150mm; Design features: used in medical equipment or avionics equipment, with extremely high quality requirements; Allowable error range: ±0.02mm²; Defect point area threshold: Minor defect: area ≤ 0.01mm² (does not affect the function, acceptable); General defects: 0.01mm²< area ≤ 0.02mm² (need to be recorded, may affect performance); Serious defects: area > 0.02mm² (need to be marked and handled immediately).
[0026] ; Among them, X shape represents the circularity of the defect point; a represents the fitting parameter of different defect types and the circularity of the defect point; among them, the fitting parameter a is different for circuit boards of different sizes due to different manufacturing processes and use environments; ; Among them, X texture Indicates the texture difference of the defect point; γ texture A coefficient that indicates the degree of texture influence; ; Among them, X position Indicates the shortest distance between the defect point and different lines of the circuit board; T position Indicates the safety distance of different lines on the circuit board; the safety distance of different lines is the maximum distance that affects the normal power supply of the line. It is different for different types of circuit boards and is set according to the actual situation; β position The distance adjustment coefficient of the function; ; Among them, X evn 1 Indicates the ambient temperature of the production circuit board; X evn 2 Indicates the ambient humidity of the circuit board production environment; C indicates the operating temperature of the circuit board; H indicates the operating humidity of the circuit board; ; Among them, X type Indicates the appearance defect type of the circuit board; type Represents the weight coefficient that affects the evaluation value.
[0027] Among them, the comparison table of circuit board appearance defect types and weight coefficients is as follows: Collect multidimensional data, and use the principal component analysis (PCA) method to standardize data, calculate covariance matrix, find eigenvalues and eigenvectors, and perform dimensionality reduction projection to extract key features related to defect occurrence from multidimensional data, and design multidimensional adaptive thresholds based on the key features; The specific expression is: ; Among them, T defectrepresents the multidimensional adaptive threshold of the appearance defect of the circuit board; μ represents the average value of the appearance defect evaluation value of the historical circuit board; σ represents the standard deviation of the appearance defect evaluation value of the historical circuit board; k represents the control coefficient of the multidimensional adaptive threshold; wherein, under normal circumstances, according to the central limit theorem, it approximately obeys the standard normal distribution, and according to the three times standard deviation law of the normal distribution, k is 3; f i represents the input value of the i-th key feature; w i represents f i Corresponding weight; n represents the total number of key features, n is a positive integer, i is the feature label, i is a positive integer, 1≤i≤n; ΔT feedback It is the correction amount of the threshold based on real-time monitoring and feedback information (equipment status, environmental changes, etc.). feedback Indicates the rate of change of feedback information; Among them, the corresponding table of key features and weights is as follows: Circuit board appearance defect detection and alarm, specifically: Real-time calculation of the circuit board appearance defect evaluation value D and the multi-dimensional adaptive threshold T defect Make a judgment, when D>T defect An alarm will be sounded in real time, and staff will be arranged to conduct manual re-inspection and record the results of the manual re-inspection.
[0028] Specifically: The alarm results, manual re-inspection results, and cases of false positives and missed negatives are recorded, and the recorded data is mapped to a secondary function by means of data fitting to optimize the function mapping relationship and improve the data fitting degree; According to the alarm results and manual re-inspection results, the objective factors causing the appearance defects of the circuit board are analyzed, and the multi-dimensional adaptive threshold is optimized in combination with historical key features; The objective factors causing the appearance defects of the circuit board include equipment status and environmental parameters.
[0029] A circuit board appearance defect analysis system based on visual inspection, the circuit board appearance defect analysis system comprising a data acquisition module, a data preprocessing module, a feature extraction module, a defect assessment module, a defect detection and alarm module and a data update and optimization module; The data acquisition module is responsible for collecting the appearance image and environmental data of the circuit board, using industrial cameras and multi-spectral cameras to capture images, and recording equipment status data and production line process parameters; The data preprocessing module is used to perform denoising, image enhancement and geometric correction on the collected data; and to mark the defect data, including location, shape, type and size; for defect analysis; The feature extraction module is used to extract defect features from image data; and extract key features related to defect occurrence through PCA principal component analysis method; The defect assessment module calculates the circuit board appearance defect assessment value according to the extracted defect features and the fitted comprehensive circuit board appearance defect assessment formula; designs a multi-dimensional adaptive threshold through key features; The defect detection and alarm module issues an alarm by comparing the circuit board appearance defect evaluation value with the multi-dimensional adaptive threshold; The data update and optimization module is used to collect alarm results and manual re-inspection results; analyze false positive and false negative cases; update the data fitting formula to improve the model fitting degree, and optimize the multi-dimensional adaptive threshold according to the feedback information.
[0030] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
Claims
1. A circuit board appearance defect analysis method based on visual inspection, characterized in that: The circuit board appearance defect analysis method specifically comprises the following steps: Collect circuit board appearance image data and perform data annotation; Preprocess the annotated circuit board appearance image data and extract circuit board appearance defect features; According to the appearance defect characteristics of the circuit board, function mapping is performed by data fitting, and a comprehensive circuit board appearance defect evaluation formula is designed, and the comprehensive evaluation value of the circuit board appearance defect is calculated according to the formula; Collect multi-dimensional data, extract key features related to defect occurrence, and design multi-dimensional adaptive thresholds based on the key features; According to the relationship between the comprehensive evaluation value of the circuit board appearance defects and the multi-dimensional adaptive threshold, the circuit board appearance defects are detected and alarmed; After an alarm occurs, a manual re-inspection is performed, and the alarm results and manual re-inspection results are recorded. A secondary function mapping is performed through data fitting to optimize the function mapping relationship and improve data fitting.
2. The circuit board appearance defect analysis method based on visual inspection according to claim 1, characterized in that: Specifically: Use industrial cameras and multispectral cameras to collect appearance images of circuit boards with different defect types; The collected circuit board appearance image data is annotated to mark the specific location, shape, type and size of each defect. The image clarity and contrast are also recorded to provide label data for supervised learning.
3. The circuit board appearance defect analysis method based on visual inspection according to claim 2, characterized in that: Preprocess the annotated circuit board appearance image data and extract circuit board appearance defect features; Specifically: De-noising using wavelet transform; By means of rotation, scaling, shearing and illumination adjustment, diversified data is generated to enhance the generalization ability of the model; among them, defect images with less than the average number of defect types are expanded and resampled to enhance the defect image data; Extracting the appearance defect features of the circuit board by image processing technology; the image processing technology includes edge detection, contour analysis and texture feature extraction; the appearance defect features of the circuit board include position features, size features, shape features, texture features, defect type and environmental factors; The position feature is the shortest distance between the defect point and different circuits of the circuit board; the size feature is the area of the defect point; the shape feature is the roundness of the defect point; the texture feature is the texture difference of the defect point; and the environmental factor is the ambient temperature and humidity.
4. The circuit board appearance defect analysis method based on visual inspection according to claim 3 is characterized in that: The deep learning model CNN is used to further extract visual features; the types of circuit board appearance defects are identified to enhance the recognition of circuit board defect features; the defect types include copper leakage, scratches, short circuits, open circuits and foreign body contamination.
5. The circuit board appearance defect analysis method based on visual inspection according to claim 4 is characterized in that: According to the appearance defect characteristics of the circuit board, function mapping is performed by data fitting, and a comprehensive circuit board appearance defect evaluation formula is designed. The comprehensive evaluation value of the circuit board appearance defect is calculated according to the formula; specifically: ; Where D represents the circuit board appearance defect evaluation value; f(X size )、f(X shape )、f(X texture )、f(X position ) and f(X evn ) are the sub-functions that constitute the comprehensive circuit board appearance defect evaluation formula; f(X size ) represents the area influence subfunction of the defect point; f(X shape ) represents the shape influence subfunction of the defect point; f(X texture ) represents the texture difference of the defect point affecting the sub-function; f(X position ) represents the position of the defect point affecting the subfunction; f(X evn ) represents the environmental impact subfunction of the defect point; f(X type ) represents the weight coefficient corresponding to different defect types; ; Among them, X size Indicates the area of the defect point; T size Indicates the defect area threshold of different circuit boards; σ size is the rate constant, controlling the smoothness of the function; ; Among them, X shape represents the circularity of the defect point; a represents the fitting parameter of different defect types and the circularity of the defect point; ; Among them, X texture Indicates the texture difference of the defect point; γ texture A coefficient that indicates the degree of texture influence; ; Among them, X position Indicates the shortest distance between the defect point and different lines of the circuit board; T position Indicates the safe distance between different circuits on the circuit board; β position The distance adjustment coefficient of the function; ; Among them, X evn 1 Indicates the ambient temperature of the production circuit board; X evn 2 Indicates the ambient humidity of the circuit board production environment; C indicates the operating temperature of the circuit board; H indicates the operating humidity of the circuit board; ; Among them, X type Indicates the type of appearance defect of the circuit board; type Represents the weight coefficient that affects the evaluation value.
6. The circuit board appearance defect analysis method based on visual inspection according to claim 5, characterized in that: Collect multidimensional data, extract key features related to defect occurrence from the multidimensional data, and design multidimensional adaptive thresholds based on the key features; Specifically: ; Among them, T defect represents the multidimensional adaptive threshold of the circuit board appearance defect; μ represents the average value of the historical circuit board appearance defect evaluation value; σ represents the standard deviation of the historical circuit board appearance defect evaluation value; k represents the control coefficient of the multidimensional adaptive threshold; f i represents the input value of the i-th key feature; w i represents f i Corresponding weight; n represents the total number of key features, n is a positive integer, i is the feature label, i is a positive integer, 1≤i≤n; ΔT feedback It is the correction amount made to the threshold based on real-time monitoring and feedback information.
7. The circuit board appearance defect analysis method based on visual inspection according to claim 6, characterized in that: Circuit board appearance defect detection and alarm, specifically: Real-time calculation of the circuit board appearance defect evaluation value D and the multi-dimensional adaptive threshold T defect Make a judgment, when D>T defect An alarm will be sounded in real time, and staff will be arranged to conduct manual re-inspection and record the results of the manual re-inspection.
8. The circuit board appearance defect analysis method based on visual inspection according to claim 7, characterized in that: Specifically: The alarm results, manual re-inspection results, and cases of false positives and missed negatives are recorded, and the recorded data is mapped to a secondary function by means of data fitting to optimize the function mapping relationship and improve the data fitting degree; According to the alarm results and manual re-inspection results, the objective factors causing the appearance defects of the circuit board are analyzed, and the multi-dimensional adaptive threshold is optimized in combination with historical key features; The objective factors causing the appearance defects of the circuit board include equipment status and environmental parameters.
9. A circuit board appearance defect analysis system based on visual inspection, characterized in that: The circuit board appearance defect analysis system includes a data acquisition module, a data preprocessing module, a feature extraction module, a defect evaluation module, a defect detection and alarm module and a data update and optimization module; The data acquisition module is responsible for collecting the appearance image and environmental data of the circuit board, using industrial cameras and multi-spectral cameras to capture images, and recording equipment status data and production line process parameters; The data preprocessing module is used to perform denoising, image enhancement and geometric correction on the collected data; and to mark the defect data, including location, shape, type and size; For defect analysis; The feature extraction module is used to extract defect features from image data; and extract key features related to defect occurrence through PCA principal component analysis method; The defect assessment module calculates the circuit board appearance defect assessment value according to the extracted defect features and the fitted comprehensive circuit board appearance defect assessment formula; designs a multi-dimensional adaptive threshold through key features; The defect detection and alarm module issues an alarm by comparing the circuit board appearance defect evaluation value with the multi-dimensional adaptive threshold; The data update and optimization module is used to collect alarm results and manual re-inspection results; analyze false positive and false negative cases; update the data fitting formula to improve the model fitting degree, and optimize the multi-dimensional adaptive threshold according to the feedback information.
Citation Information
Patent Citations
Circuit board on-line detection re-judgment algorithm
CN117830287A
Road cavity defect detection system and detection method
CN118247230A
High-precision wire harness defect intelligent detection system
CN119023677A
New energy automobile part surface defect testing method based on computer vision
CN119091186A
Visual inspection system for appearance defects of pressure sensor
CN119198754A