Abnormal defect detection method and system for PCB intelligent welding
Through the combination of image segmentation technology and deep learning model, the resolution is dynamically adjusted to perform virtual welding detection, solving the problem of inaccurate identification of virtual welding defects in the existing technology, and achieving high-precision welding joint defect detection.
Patent Information
- Application Number
- CN202510121379.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-26
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2045-01-26
AI Technical Summary
The prior art is difficult to accurately identify false welding defects during welding, resulting in an increased risk of electrical failures and equipment failures.
The welding joints are accurately positioned through image segmentation technology, and combined with the rapid screening of initial resolution, key features reflecting signs of virtual welding are extracted, and virtual welding is predicted using deep learning models, and resolution is dynamically adjusted for refined inspection to ensure a comprehensive inspection of the details of the welding joints at high resolution.
It significantly improves the accuracy and accuracy of solder joint defect detection, reduces the missed detection rate and misjudgment rate, and ensures efficient control of intelligent welding quality of PCB boards.
Smart Images

Figure CN119559175B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of PCB board welding detection, and in particular to an abnormal defect detection method and system applied to PCB board intelligent welding. Background Art
[0002] Abnormal defect detection for intelligent soldering of PCB boards refers to real-time monitoring and identification of abnormal defects that may occur during the soldering process of PCB boards through high-precision sensors, image recognition technology, and machine learning algorithms. These defects may include poor solder joints (such as cold solder joints, cold solder joints, short circuits, open circuits, etc.), too much or too little solder, soldering position offset, incorrect component installation, and other problems. Through the intelligent defect detection system, these problems can be captured in real time during the soldering process, and timely warnings and feedback can be given to the production system to avoid defective products and improve the quality control accuracy and production efficiency of the soldering process. This detection system usually relies on a machine vision system to capture images of the soldering area, extract features through image processing algorithms, and use deep learning models to classify and judge defects, thereby achieving efficient and accurate automatic detection and feedback.
[0003] Cold soldering often occurs during the intelligent soldering of PCB boards. Cold soldering refers to the situation in which, during the soldering process of PCB boards, the surface of the solder joint appears to have solder, but in fact the soldering is incomplete, resulting in a loose or unreliable electrical connection between the solder joint and the pin of the electronic component. Cold soldering usually occurs when the soldering temperature is insufficient, the soldering time is too short, the amount of solder is inappropriate, or the soldering process is inappropriate. Although cold soldering may not look much different from normal soldering, it can lead to poor circuit connection, poor contact, signal loss, and even complete circuit failure, which may cause equipment failure in severe cases. The hazards of cold soldering are often difficult to detect with the naked eye, so automated detection systems (such as X-ray detection, machine vision, etc.) are needed to detect and repair them in a timely manner to ensure the reliability of welding quality.
[0004] The prior art has the following deficiencies:
[0005] Existing technologies usually use a uniform resolution when identifying cold solder joints through machine vision, aiming to simplify system design, improve processing efficiency, and ensure rapid scanning and detection of welding areas over a large range to avoid excessive consumption of computing resources. However, cold solder joints usually manifest as subtle defects such as insufficient solder, uneven solder joint surface, or incomplete connection. These problems may be blurred or ignored at low resolution, resulting in missed detection. Missed detection of cold solder joints means potential electrical failure, which may cause the equipment to not work properly or cause serious failure in the short term.
[0006] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art that is already known to one of ordinary skill in the art. Summary of the invention
[0007] The purpose of the present invention is to provide an abnormal defect detection method and system for intelligent welding of PCB boards, which realizes accurate positioning of solder joints through image segmentation technology, and improves detection efficiency through rapid screening of initial resolution; then, key features reflecting signs of cold solder joints are extracted, and cold solder joints are predicted by combining deep learning models, thereby realizing efficient classification of obvious non-cold solder joints and potential cold solder joints. For potential cold solder joints, a method of dynamically adjusting resolution is adopted to perform refined detection at high resolution, which effectively compensates for the problem of insufficient detail recognition at low resolution, thereby accurately determining whether there is a cold solder joint at the solder joint, significantly improving the accuracy and precision of solder joint defect detection, and greatly reducing the missed detection rate and the false positive rate, providing strong technical support for efficient control of the quality of intelligent welding of PCB boards, so as to solve the problems in the above-mentioned background technology.
[0008] In order to achieve the above object, the present invention provides the following technical solution: a method for detecting abnormal defects in intelligent welding of PCB boards, comprising the following steps:
[0009] Use a high-definition camera to capture images of the entire PCB board, and use image segmentation technology to identify and locate all solder joints on the PCB board;
[0010] Each solder joint is inspected at the expected resolution initially set, and solder joints with obvious soldering problems are identified and then screened out;
[0011] A solder point analysis set is established for the solder points that have not been screened out on the PCB board. For all solder points in the solder point analysis set, key features reflecting signs of poor solder joints are extracted. After feature extraction, the extracted features are analyzed and input into a pre-trained deep learning model to predict solder points with poor solder joints.
[0012] According to the prediction results of the deep learning model, the solder joints are divided into obvious non-cold solder joints and potential cold solder joints, and the potential cold solder joints are marked;
[0013] For the marked potential cold solder joints, the resolution is reallocated according to the obviousness of the cold solder joint signs, and the reallocated high resolution is used for more detailed inspection, ensuring that the details of the solder joints are fully inspected at high resolution and the cold solder joints are accurately identified.
[0014] Preferably, all solder joints on the PCB are identified and located by image segmentation technology, and the specific steps are as follows:
[0015] After image acquisition, the image is preprocessed to ensure that the solder joints are accurately separated and identified;
[0016] Apply edge detection algorithm to extract solder joint edge information, highlight the outline of solder joint and remove background noise;
[0017] Separate the solder joint area from the non-solder joint area to form a database of solder joint locations;
[0018] The segmented solder joint areas are morphologically processed to remove irregular and incomplete solder joint areas, fill solder joint voids and smooth solder joint edges to optimize the segmentation results.
[0019] Preferably, key features reflecting signs of poor solder joints are extracted, wherein the extracted features include the surface roughness of the solder joint and the temperature distribution around the solder joint. After the features are obtained, the surface roughness of the solder joint and the temperature distribution around the solder joint are analyzed, and a surface roughness reference value and a temperature distribution difference reference value are generated respectively. The surface roughness reference value is used to quantify the unevenness of the solder joint surface, reflecting whether the solder joint surface is uniform and smooth, and the temperature distribution difference reference value is used to quantify the unevenness of the temperature distribution around the solder joint.
[0020] After obtaining the surface roughness reference value and temperature distribution difference reference value generated by analyzing the key features reflecting the signs of cold solder joints, the surface roughness reference value and the temperature distribution difference reference value are input into the pre-trained deep learning model to generate a cold solder joint quantitative index, and the cold solder joint condition of the solder joint is predicted by the cold solder joint quantitative index.
[0021] Preferably, the cold solder joint quantitative index generated when the pre-trained deep learning model is used to predict the solder joint is compared and analyzed with a pre-set cold solder joint quantitative index reference threshold, and the solder joint is divided. The specific division steps are as follows:
[0022] If the cold solder joint quantitative index is greater than or equal to the cold solder joint quantitative index reference threshold, the solder joint is classified as a potential cold solder joint, and the potential cold solder joint is marked to prepare for subsequent refined processing;
[0023] If the cold solder joint quantitative index is less than the cold solder joint quantitative index reference threshold, the solder joint is classified as an obvious non-cold solder joint, and the obvious non-cold solder joint is directly marked as normal, and no further detection is required.
[0024] Preferably, the specific steps of generating a surface roughness reference value after analyzing the surface roughness of the solder joint are as follows:
[0025] Extract the micro texture and details of the solder joint surface from the solder joint image;
[0026] After the solder joint surface details are extracted, the roughness of the solder joint surface is quantified by the microstructure changes in the local area. The gray value corresponding to each pixel on the solder joint surface is set to , where x and y are image coordinates, and the gradient change of each pixel in the local neighborhood is calculated, that is, the local gradient amplitude is calculated , the calculation expression is: ,The local gradient amplitude reflects the amplitude of the image brightness change, and represents the degree of local texture change on the solder spot surface;
[0027] The local gradient amplitude is quantified using variance calculation to obtain the local roughness index of the solder joint surface roughness. The calculation expression of the local roughness index is: , where N is the number of pixels contained in the local area, i represents the index of the pixel in the local neighborhood, represents the local roughness index of the jth local area;
[0028] The surface roughness reference value of the entire solder joint is obtained by weighted averaging all local roughness indices. The surface roughness reference value is used to represent the roughness of the entire solder joint. The calculation expression is: ,in, is the weight of the jth local region, M represents the total number of local regions, Indicates the reference value of surface roughness.
[0029] Preferably, the specific steps of generating a temperature distribution difference reference value after analyzing the temperature distribution around the solder joint are as follows:
[0030] Extract the temperature distribution of the soldering point area and its surroundings from the temperature image around the soldering point;
[0031] In each divided block, the local temperature difference in the area is calculated, and the local temperature difference is introduced The temperature difference of each small block k is measured, and the specific calculation method is:
[0032] For each small block k, by comparing the temperature of each pixel in the area The local temperature difference is calculated by the temperature difference of its neighboring blocks. The calculation expression of the local temperature difference is: ,in, is the temperature value of the adjacent area, indicating the temperature difference of the area adjacent to the small block k at the same position, Represents the kth small area;
[0033] By integrating the local temperature differences of all small blocks, a reference value of the temperature distribution difference of the entire solder joint area is generated. The temperature distribution difference reference value quantifies the non-uniformity of the overall temperature distribution around the solder joint, reflecting the degree of temperature fluctuation or uneven heating. The generation expression of the temperature distribution difference reference value is: , where m represents the number of small blocks divided into regions. is the local temperature difference of the kth patch.
[0034] Preferably, for the marked potential solder joints with poor solder joints, the resolution is reallocated according to the obviousness of the signs of poor solder joints, and the specific steps are as follows:
[0035] For each potential solder joint marked, the difference between its solder joint quantitative index and the reference threshold of the solder joint quantitative index is first calculated. , as a standard for judging the obvious degree of false soldering, the difference The calculation expression is: ,in, It is a quantitative index of cold solder joints generated by analyzing the characteristics of solder joints through a deep learning model; It is a preset reference threshold value of the cold solder joint quantitative index, which is used to judge whether there are obvious signs of cold solder joint;
[0036] Difference according to the signs of poor soldering To calculate the required resolution increment, the resolution increment The calculation formula is: ,in, is the resolution increment factor, which is used to control the resolution increment; It is the maximum value of the quantitative index of cold solder joint in the system, which is used for normalization;
[0037] Based on the initial expected resolution and resolution increments , calculate the final detection resolution of the solder joint To ensure the fine detection of the details of the cold solder joint, the calculation formula for the final detection resolution is: , represents the final detection resolution after redistribution, is the expected resolution set initially;
[0038] At the final detection resolution, the solder joints are inspected in detail to ensure accurate identification of cold solder joints.
[0039] An abnormal defect detection system applied to intelligent welding of PCB boards, comprising a solder joint positioning module, a preliminary screening module, a feature extraction and prediction module, a solder joint classification module and a fine detection module;
[0040] The solder joint positioning module uses a high-definition camera to capture images of the entire PCB board and uses image segmentation technology to identify and locate all solder joints on the PCB board;
[0041] The preliminary screening module detects each solder joint at the initially set expected resolution, identifies the solder joints with obvious soldering problems and removes them;
[0042] The feature extraction and prediction module establishes a solder joint analysis set for the solder joints that have not been screened out on the PCB board. For all solder joints in the solder joint analysis set, key features reflecting signs of poor solder joints are extracted. After feature extraction, the extracted features are analyzed and input into the pre-trained deep learning model to predict the solder joints with poor solder joints.
[0043] The solder joint classification module divides the solder joints into obvious non-cold solder joints and potential cold solder joints according to the prediction results of the deep learning model, and marks the potential cold solder joints.
[0044] The fine inspection module reallocates the resolution of the marked potential cold solder joints according to the obviousness of their cold solder joint signs, and uses the reallocated high resolution for more detailed inspection, ensuring a comprehensive inspection of the details of the solder joints at high resolution and accurate identification of cold solder joints.
[0045] In the above technical solution, the technical effects and advantages provided by the present invention are:
[0046] The present invention firstly realizes the precise positioning of solder joints through image segmentation technology, and improves the detection efficiency through rapid screening of initial resolution; then, it extracts key features reflecting signs of cold solder joints, and predicts cold solder joints of solder joints in combination with deep learning models, thereby realizing efficient classification of obvious non-cold solder joints and potential cold solder joints. For potential cold solder joints, a method of dynamically adjusting resolution is adopted to perform refined detection at high resolution, which effectively makes up for the problem of insufficient detail recognition at low resolution, thereby accurately determining whether there is a cold solder joint, significantly improving the accuracy and precision of solder joint defect detection, and greatly reducing the missed detection rate and false positive rate, providing strong technical support for the efficient control of the intelligent welding quality of PCB boards. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0048] Figure 1 The present invention is a method flow chart of an abnormal defect detection method applied to intelligent welding of PCB boards.
[0049] Figure 2The present invention is a module schematic diagram of an abnormal defect detection system applied to intelligent welding of PCB boards. DETAILED DESCRIPTION
[0050] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of the present disclosure will be more comprehensive and complete, and the concept of the example embodiments will be fully conveyed to those skilled in the art.
[0051] The present invention provides Figure 1 The method for detecting abnormal defects in PCB intelligent welding shown in the figure comprises the following steps:
[0052] Use a high-definition camera to capture images of the entire PCB board, and use image segmentation technology to identify and locate all solder joints on the PCB board;
[0053] All solder joints on the PCB are identified and located using image segmentation technology. The specific steps are as follows:
[0054] After image acquisition, the image is preprocessed to ensure that the solder joints can be accurately separated and identified;
[0055] Common image preprocessing techniques include image denoising, binarization, and grayscale conversion to enhance the edge and detail features of solder joints;
[0056] Apply edge detection algorithms (such as Sobel operator or Canny operator) to extract solder joint edge information, highlight the outline of solder joints, and remove background noise;
[0057] After applying the edge detection algorithm to extract the edge information of the solder joint, the edges of the solder joints in the image will become clearer, helping the subsequent image segmentation algorithm to more accurately identify the boundaries of each solder joint.
[0058] Separate the solder joint area from the non-solder joint area to form a database of solder joint locations;
[0059] Common image segmentation methods include threshold segmentation, region growing, K-means clustering, etc. By selecting the appropriate threshold or clustering method, the system can identify the precise location of the solder joint and isolate each solder joint area from other parts. At this time, the center position, shape, size and other information of the solder joint are extracted to form a database of solder joint locations. These solder joint locations provide basic data support for subsequent false solder joint detection, quality assessment and other work.
[0060] Perform morphological processing on the segmented solder joint area to remove irregular and incomplete solder joint areas, fill solder joint voids, smooth solder joint edges, and optimize segmentation results;
[0061] At this point, the system can exclude some incorrectly segmented areas or irrelevant objects by verifying the shape and size of the solder joints, ensuring that only actual solder joints are included in subsequent processing.
[0062] Each solder joint is inspected at the expected resolution initially set, and solder joints with obvious soldering problems are identified and then screened out;
[0063] This expected resolution is set according to the system design, computing resources and processing speed requirements. Usually a resolution that covers most solder joint features is selected to ensure efficient detection of a wide range of soldering areas. The initial low resolution helps to quickly scan the entire PCB board and perform preliminary defect screening. Although this resolution cannot capture all details, it can effectively identify obvious soldering problems (such as excessive solder, severe lack of material, etc.) in the early stages. This preset resolution selection, combined with the system processing power, helps balance detection efficiency and accuracy.
[0064] A solder point analysis set is established for the solder points that have not been screened out on the PCB board. For all solder points in the solder point analysis set, key features reflecting signs of poor solder joints are extracted. After feature extraction, the extracted features are analyzed and input into a pre-trained deep learning model to predict solder points with poor solder joints.
[0065] The key features reflecting the signs of cold solder joints are extracted, wherein the extracted features include the surface roughness of the solder joint and the temperature distribution around the solder joint. After acquisition, the surface roughness of the solder joint and the temperature distribution around the solder joint are analyzed, and a surface roughness reference value and a temperature distribution difference reference value are generated respectively. The surface roughness reference value is used to quantify the unevenness of the solder joint surface, reflecting whether the solder joint surface is uniform and smooth, so as to evaluate whether the solder joint has signs of cold solder joints such as insufficient solder coverage or incomplete welding. The temperature distribution difference reference value is used to quantify the unevenness of the temperature distribution around the solder joint, reflecting whether there is temperature fluctuation or uneven heating during the welding process, so as to judge whether the solder joint is cold soldered due to temperature problems.
[0066] After obtaining the surface roughness reference value and temperature distribution difference reference value generated by analyzing the extracted key features reflecting the signs of cold solder joints, the surface roughness reference value and the temperature distribution difference reference value are input into a pre-trained deep learning model to generate a cold solder joint quantitative index, and the cold solder joint condition of the solder joint is predicted by the cold solder joint quantitative index.
[0067] A pre-trained deep learning model is a deep neural network model that can automatically identify and predict the condition of a cold solder joint by using a large amount of labeled solder joint image data for training in a cold solder joint detection system. The training process of this model includes extracting features from the input image data and learning how to identify cold solder joints through these features (such as surface roughness reference values and temperature distribution difference reference values) through a large number of training samples. During the training process, the deep learning model automatically adjusts its internal parameters (such as weights and biases) to minimize the error between the predicted results and the actual annotations. This process usually uses supervised learning methods to gradually improve the prediction accuracy of the model by comparing with the real labels of known cold solder joints and non-cold solder joints. Through repeated training, the model can extract more refined and effective features from the image and optimize its classification ability to adapt to the cold solder joint detection task of actual solder joints.
[0068] In the actual application of solder joint cold solder joint detection, the trained deep learning model can effectively process the input features such as the reference value of surface roughness and the reference value of temperature distribution difference, and generate a "cold solder joint quantitative index" through the forward propagation calculation of the model. This cold solder joint quantitative index represents the possibility of cold solder joints in solder joints, and it is a quantitative prediction of the cold solder joint situation of solder joints. Specifically, the deep learning model predicts whether there is a cold solder joint in the solder joint based on the input feature data. The higher the value of the cold solder joint quantitative index, the more likely it is that the solder joint has a cold solder joint problem. When the system is running, the surface roughness and temperature distribution data are calculated by the model, and the obtained cold solder joint quantitative index can help engineers quickly identify potential cold solder joints and perform subsequent repairs or troubleshooting. In this way, the deep learning model converts complex image features into a simple cold solder joint risk indicator, significantly improving the automation and accuracy of solder joint quality detection.
[0069] Higher surface roughness of solder joints usually indicates that the solder joints have a higher risk of cold solder joints. Higher surface roughness of solder joints means that the solder is not evenly covered on the solder joints, the surface is not smooth, and there may be insufficient soldering or incomplete solder flow. Cold solder joints usually occur when there is insufficient solder, incomplete solder melting, or uneven temperature during the soldering process, which will cause the solder to fail to fully wet the pad, resulting in an uneven or rough surface. A high-roughness surface usually means insufficient soldering, and the electrical connection may not be strong, resulting in poor signal transmission or incomplete contact, thereby increasing the risk of cold solder joints. Therefore, higher surface roughness of solder joints can be an important indicator of cold solder joints.
[0070] The specific steps to generate the surface roughness reference value after analyzing the surface roughness of the solder joint are as follows:
[0071] Extract the micro texture and details of the solder joint surface from the solder joint image;
[0072] Canny edge detection algorithms or Laplacian of Gaussian (LoG) filters can be used to highlight the details of the surface structure, thereby providing a basis for subsequent roughness calculations. The extracted features contain the texture details of the solder joint surface, which directly affect the judgment of the surface roughness. The local change pattern of the solder joint surface is obtained through image processing algorithms to provide data support for generating the roughness index.
[0073] After the solder joint surface details are extracted, the roughness of the solder joint surface is quantified by the microstructure change in the local area (i.e., the local texture gradient). Each pixel on the solder joint surface has a grayscale value , where x and y are image coordinates, and the gradient change of each pixel in the local neighborhood is calculated, that is, the local gradient amplitude is calculated , the calculation expression is: ,The local gradient amplitude reflects the amplitude of the image brightness change, and represents the degree of local texture change on the solder spot surface;
[0074] In this way, the roughness of different areas on the solder joint surface can be obtained.
[0075] The local gradient amplitude is quantified using variance calculation to obtain the local roughness index of the solder joint surface roughness. The calculation expression of the local roughness index is: , where N is the number of pixels contained in the local area, i represents the index of the pixel in the local neighborhood, represents the local roughness index of the jth local area;
[0076] This step effectively quantifies the local roughness of the solder joint surface, the local roughness index The larger the gradient amplitude, the more severe the local roughness of the solder joint surface.
[0077] The surface roughness reference value of the entire solder joint is obtained by weighted averaging all local roughness indices. The surface roughness reference value is used to represent the roughness of the entire solder joint. The calculation expression is: ,in, is the weight of the jth local region, M represents the total number of local regions, Indicates the reference value of surface roughness;
[0078] The weight of each local area It can be set according to the size, importance or relative position of the local area. The area with a larger weight may correspond to the key part of the weld, such as the contact surface or the welding edge.
[0079] It can be seen from the local roughness index that the larger the performance value of the surface roughness reference value generated after analyzing the surface roughness of the solder joint, the greater the hidden danger of cold solder joint in the solder joint, and vice versa. Specifically, the surface roughness reference value reflects the unevenness of the solder joint surface. A higher roughness index indicates that the solder is unevenly distributed on the solder joint surface, and there may be problems such as insufficient solder, incomplete welding, or loose solder joint connection. These problems will lead to poor electrical contact, thereby increasing the risk of cold solder joint. Therefore, when the surface roughness reference value is high, it indicates that the solder joint has a greater hidden danger of cold solder joint; and a lower surface roughness reference value usually means that the solder joint surface is smoother and more uniform, the welding quality is better, and the risk of cold solder joint is lower.
[0080] Large differences in temperature distribution around solder joints usually indicate uneven heat conduction during soldering, which is an important sign of cold solder joints. Cold solder joints usually occur when the solder joints are not heated sufficiently or unevenly, which causes the solder to fail to melt completely or to be evenly distributed between the solder joints and the pads. If the temperature is too low during the soldering process, the solder cannot reach a sufficient melting temperature, resulting in poor contact at the solder joints; if the temperature is too high, it may cause excessive volatilization of the solder or the formation of voids. Large differences in temperature distribution indicate that the solder in certain areas has not been in sufficient contact with the substrate or has not flowed well. This uneven heat distribution can make the solder joints loose and increase the risk of cold solder joints. Therefore, large differences in temperature distribution around solder joints are usually a potential risk signal for cold solder joints.
[0081] The specific steps to generate a reference value of temperature distribution difference after analyzing the temperature distribution around the solder joint are as follows:
[0082] Extract the temperature distribution of the soldering point area and its surroundings from the temperature image around the soldering point;
[0083] This step uses image processing techniques such as edge detection or region segmentation to accurately determine the temperature image of the solder joint and its surrounding areas. The solder joint area is divided into multiple small blocks (such as neighborhood grids) through a segmentation algorithm so that the temperature distribution of each small block can be analyzed independently. The size of these small blocks can be set according to the specific situation to more accurately capture the subtle differences in temperature around the solder joint. Set a temperature image matrix ,in Represents the position in the image The solder joint area and surrounding area are divided into multiple The sub-blocks are further processed;
[0084] In each divided block, the local temperature difference in the area is calculated, and the local temperature difference is introduced The temperature difference of each small block k is measured, and the specific calculation method is:
[0085] For each small block k, by comparing the temperature of each pixel in the area The local temperature difference is calculated by the temperature difference of its neighboring blocks. The calculation expression of the local temperature difference is: ,in, is the temperature value of the adjacent area, indicating the temperature difference of the area adjacent to the small block k at the same position, Represents the kth small area;
[0086] The local temperature difference metric can be used to quantify the local fluctuations in temperature within each small block, thereby reflecting whether there is obvious temperature inhomogeneity in the area.
[0087] By integrating the local temperature differences of all small blocks, a reference value of the temperature distribution difference of the entire solder joint area is generated. The temperature distribution difference reference value quantifies the non-uniformity of the overall temperature distribution around the solder joint, reflecting the degree of temperature fluctuation or uneven heating. The generation expression of the temperature distribution difference reference value is: , where m represents the number of small blocks divided into regions. is the local temperature difference of the kth patch;
[0088] By calculating the average value of the temperature difference of all small blocks, the temperature distribution difference reference value of the entire solder joint area can be obtained, which can be used to quantify the unevenness of temperature distribution. If the temperature distribution difference reference value is high, it means that there may be temperature fluctuations or uneven heating during the welding process, which increases the risk of cold solder joints.
[0089] It can be seen from the temperature distribution difference reference value that the larger the performance value of the temperature distribution difference reference value generated after analyzing the temperature distribution around the solder joint, the more uneven the temperature distribution around the solder joint is, which reflects that there may be large temperature fluctuations or uneven heating during the welding process. Such temperature anomalies usually cause the solder to fail to fully melt or flow poorly, thereby increasing the risk of cold solder joints. Therefore, when the temperature distribution difference reference value is high, it means that the solder joint has a greater risk of cold solder joints; on the contrary, a lower temperature distribution difference reference value indicates that the temperature distribution is more uniform, the heating is sufficient and stable, and the solder joint has a smaller risk of cold solder joints. The size of the temperature distribution difference reference value can be used as an effective reference for evaluating the quality of solder joints and the risk of cold solder joints.
[0090] The deep learning model is not specifically limited here, and can achieve the surface roughness reference value and temperature distribution difference reference value Comprehensive analysis to generate a quantitative index of cold solder joints In order to realize the technical solution of the present invention, the present invention provides a specific implementation method; the virtual solder joint quantification index The generated expression is:
[0091]
[0092] , where , are the surface roughness reference values and temperature distribution difference reference value The preset scaling factor of , Both are greater than 0.
[0093] It can be seen from the cold solder joint quantitative index that the greater the performance value of the surface roughness reference value generated after analyzing the surface roughness of the solder joint, the greater the performance value of the temperature distribution difference reference value generated after analyzing the temperature distribution around the solder joint. That is, the greater the performance value of the cold solder joint quantitative index generated when predicting the solder joint through the pre-trained deep learning model, the greater the potential risk of the solder joint being a cold solder joint, and vice versa.
[0094] According to the prediction results of the deep learning model, the solder joints are divided into obvious non-cold solder joints and potential cold solder joints, and the potential cold solder joints are marked;
[0095] The solder joint quantitative index generated by the pre-trained deep learning model when predicting the solder joint is compared with the pre-set reference threshold of the solder joint quantitative index, and the solder joints are divided. The specific division steps are as follows:
[0096] If the cold solder joint quantitative index is greater than or equal to the cold solder joint quantitative index reference threshold, the solder joint is classified as a potential cold solder joint. Potential cold solder joints refer to those solder joints that may have cold solder joint problems. These solder joints need further analysis. At this time, the system will mark the potential cold solder joints and separate them from other normal solder joints to prepare for subsequent refined processing.
[0097] If the cold solder joint quantitative index is less than the cold solder joint quantitative index reference threshold, the solder joint will be classified as an obviously non-cold solder joint. An obviously non-cold solder joint refers to a solder joint without obvious signs of cold solder joint. The system can directly mark it as normal and no further detection is required.
[0098] In this way, the system can conduct further analysis in a targeted manner and avoid over-processing obviously good solder joints.
[0099] For the marked potential cold solder joints, the resolution is reallocated according to the obviousness of the cold solder joint signs, and the high resolution after reallocation is used for more detailed inspection, ensuring that the details of the solder joints are fully inspected at high resolution and the cold solder joints are accurately identified;
[0100] For the potential solder joints marked, the resolution is reallocated according to the obviousness of the solder joint signs. The specific steps are as follows:
[0101] For each potential solder joint marked, the difference between its solder joint quantitative index and the reference threshold of the solder joint quantitative index is first calculated. , as a criterion for judging the obviousness of the signs of poor soldering, the difference The calculation expression is: ,in, It is a quantitative index of cold solder joints generated by analyzing the characteristics of solder joints through a deep learning model, indicating the possibility of cold solder joints. It is a preset reference threshold value of the cold solder joint quantitative index, which is used to judge whether there are obvious signs of cold solder joint;
[0102] When the difference The larger the value is, the more obvious the signs of poor soldering are. Otherwise, the signs of poor soldering are weaker.
[0103] Difference according to the signs of poor soldering To calculate the required resolution increment, the resolution increment The calculation formula is: ,in, is the resolution increment factor, which is used to control the resolution increment; It is the maximum value of the quantitative index of cold solder joint in the system, which is used for normalization;
[0104] This formula allows the resolution increment to be dynamically adjusted based on how obvious the signs of a solder joint are, ensuring that the resolution is increased to capture more details when signs of a solder joint are not obvious.
[0105] Based on the initial expected resolution and resolution increments , calculate the final detection resolution of the solder joint To ensure the fine detection of the details of the cold solder joint, the calculation formula for the final detection resolution is: , represents the final detection resolution after redistribution, is the expected resolution set initially;
[0106] This formula ensures that the resolution is automatically increased when signs of a poor solder joint are not obvious, thereby capturing more solder joint detail information during the inspection process.
[0107] At the final detection resolution, the solder joints are finely inspected to ensure accurate identification of cold solder joints;
[0108] At this high resolution, the system can more clearly capture the subtle features of the solder joints (such as the distribution of solder, surface roughness, temperature distribution, etc.), thereby further confirming whether there is a cold solder joint. Through the detection results at high resolution, the system can obtain a more accurate quantitative index of cold solder joints, reduce the misjudgment rate and missed detection rate, and achieve comprehensive inspection and accurate identification of cold solder joints. This step ensures the comprehensive detection of potential cold solder joints, which helps quality assurance in the production process and subsequent repair decisions.
[0109] The present invention firstly realizes the precise positioning of solder joints through image segmentation technology, and improves the detection efficiency through rapid screening of initial resolution; then, it extracts key features reflecting signs of cold solder joints, and predicts cold solder joints of solder joints in combination with deep learning models, thereby realizing efficient classification of obvious non-cold solder joints and potential cold solder joints. For potential cold solder joints, a method of dynamically adjusting resolution is adopted to perform refined detection at high resolution, which effectively makes up for the problem of insufficient detail recognition at low resolution, thereby accurately determining whether there is a cold solder joint, significantly improving the accuracy and precision of solder joint defect detection, and greatly reducing the missed detection rate and false positive rate, providing strong technical support for the efficient control of the intelligent welding quality of PCB boards.
[0110] The present invention provides Figure 2 An abnormal defect detection system for intelligent welding of PCB boards is shown, comprising a solder joint positioning module, a preliminary screening module, a feature extraction and prediction module, a solder joint classification module and a fine detection module;
[0111] The solder joint positioning module uses a high-definition camera to capture images of the entire PCB board and uses image segmentation technology to identify and locate all solder joints on the PCB board;
[0112] The preliminary screening module detects each solder joint at the initially set expected resolution, identifies the solder joints with obvious soldering problems and removes them;
[0113] The feature extraction and prediction module establishes a solder joint analysis set for the solder joints that have not been screened out on the PCB board. For all solder joints in the solder joint analysis set, key features reflecting signs of poor solder joints are extracted. After feature extraction, the extracted features are analyzed and input into the pre-trained deep learning model to predict the solder joints with poor solder joints.
[0114] The solder joint classification module divides the solder joints into obvious non-cold solder joints and potential cold solder joints according to the prediction results of the deep learning model, and marks the potential cold solder joints.
[0115] The fine inspection module reallocates the resolution of the marked potential cold solder joints according to the obviousness of their cold solder joint signs, and uses the reallocated high resolution for more detailed inspection, ensuring a comprehensive inspection of the details of the solder joints at high resolution and accurate identification of cold solder joints.
[0116] An abnormal defect detection method for PCB board intelligent welding provided by an embodiment of the present invention is implemented by the above-mentioned abnormal defect detection system for PCB board intelligent welding. The specific method and process of an abnormal defect detection system for PCB board intelligent welding are detailed in the above-mentioned embodiment of the abnormal defect detection method for PCB board intelligent welding, which will not be repeated here.
[0117] The above description is only by way of illustration of certain exemplary embodiments of the present invention. It is undoubted that those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the above drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.
[0118] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0119] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0120] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0121] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0122] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0123] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0124] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for detecting abnormal defects in intelligent welding of PCB boards, characterized in that: The following steps are involved: Use a high-definition camera to capture images of the entire PCB board, and use image segmentation technology to identify and locate all solder joints on the PCB board; Each solder joint is inspected at the expected resolution initially set, and solder joints with obvious soldering problems are identified and then screened out; A solder point analysis set is established for the solder points that have not been screened out on the PCB board. For all solder points in the solder point analysis set, key features reflecting signs of poor solder joints are extracted. After feature extraction, the extracted features are analyzed and input into a pre-trained deep learning model to predict solder points with poor solder joints. According to the prediction results of the deep learning model, the solder joints are divided into obvious non-cold solder joints and potential cold solder joints, and the potential cold solder joints are marked; For the marked potential cold solder joints, the resolution is reallocated according to the obviousness of the cold solder joint signs, and the high resolution after reallocation is used for more detailed inspection, ensuring that the details of the solder joints are fully inspected at high resolution and the cold solder joints are accurately identified; Extract key features reflecting signs of solder joint defects, where the extracted features include the surface roughness of the solder joint and the temperature distribution around the solder joint. After obtaining, analyze the surface roughness of the solder joint and the temperature distribution around the solder joint, and generate a surface roughness reference value and a temperature distribution difference reference value respectively. The surface roughness reference value is used to quantify the unevenness of the solder joint surface, reflecting whether the solder joint surface is uniform and smooth. The temperature distribution difference reference value is used to quantify the unevenness of the temperature distribution around the solder joint. After obtaining the surface roughness reference value and temperature distribution difference reference value generated by analyzing the key features reflecting the signs of cold solder joints, the surface roughness reference value and the temperature distribution difference reference value are input into the pre-trained deep learning model to generate a cold solder joint quantitative index, and the cold solder joint condition of the solder joint is predicted by the cold solder joint quantitative index.
2. The abnormal defect detection method for PCB intelligent welding according to claim 1 is characterized in that: All solder joints on the PCB are identified and located using image segmentation technology. The specific steps are as follows: After image acquisition, the image is preprocessed to ensure that the solder joints are accurately separated and identified; Apply edge detection algorithm to extract solder joint edge information, highlight the outline of solder joint and remove background noise; Separate the solder joint area from the non-solder joint area to form a database of solder joint locations; The segmented solder joint areas are morphologically processed to remove irregular and incomplete solder joint areas, fill solder joint voids and smooth solder joint edges to optimize the segmentation results.
3. The abnormal defect detection method for PCB intelligent welding according to claim 1 is characterized in that: The solder joint quantitative index generated by the pre-trained deep learning model when predicting the solder joint is compared with the pre-set reference threshold of the solder joint quantitative index, and the solder joints are divided. The specific division steps are as follows: If the cold solder joint quantitative index is greater than or equal to the cold solder joint quantitative index reference threshold, the solder joint is classified as a potential cold solder joint, and the potential cold solder joint is marked to prepare for subsequent refined processing; If the cold solder joint quantitative index is less than the cold solder joint quantitative index reference threshold, the solder joint is classified as an obvious non-cold solder joint, and the obvious non-cold solder joint is directly marked as normal, and no further detection is required.
4. The abnormal defect detection method for PCB intelligent welding according to claim 1 is characterized in that: The specific steps to generate the surface roughness reference value after analyzing the surface roughness of the solder joint are as follows: Extract the micro texture and details of the solder joint surface from the solder joint image; After the solder joint surface details are extracted, the roughness of the solder joint surface is quantified by the microstructure changes in the local area. The gray value corresponding to each pixel on the solder joint surface is set to , where x and y are image coordinates, and the gradient change of each pixel in the local neighborhood is calculated, that is, the local gradient amplitude is calculated , the calculation expression is: ,The local gradient amplitude reflects the amplitude of the image brightness change, and represents the degree of local texture change on the solder spot surface; The local gradient amplitude is quantified using variance calculation to obtain the local roughness index of the solder joint surface roughness. The calculation expression of the local roughness index is: , where N is the number of pixels contained in the local area, i represents the index of the pixel in the local neighborhood, represents the local roughness index of the jth local area; The surface roughness reference value of the entire solder joint is obtained by weighted averaging all local roughness indices. The surface roughness reference value is used to represent the roughness of the entire solder joint. The calculation expression is: ,in, is the weight of the jth local region, M represents the total number of local regions, Indicates the reference value of surface roughness.
5. The abnormal defect detection method for PCB intelligent welding according to claim 1 is characterized in that: The specific steps to generate a reference value of temperature distribution difference after analyzing the temperature distribution around the solder joint are as follows: Extract the temperature distribution of the soldering point area and its surroundings from the temperature image around the soldering point; In each divided block, the local temperature difference in the block is calculated, and the local temperature difference is introduced The temperature difference of each small block k is measured, and the specific calculation method is: For each small block k, by comparing the temperature of each pixel in the small block The local temperature difference is calculated by the temperature difference of its neighboring blocks. The calculation expression of the local temperature difference is: ,in, is the temperature value of the adjacent area, indicating the temperature difference of the area adjacent to the small block k at the same position, Represents the kth small area; By integrating the local temperature differences of all small blocks, a reference value of the temperature distribution difference of the entire solder joint area is generated. The temperature distribution difference reference value quantifies the non-uniformity of the overall temperature distribution around the solder joint, reflecting the degree of temperature fluctuation or uneven heating. The generation expression of the temperature distribution difference reference value is: , where m represents the number of small blocks divided into regions. is the local temperature difference of the kth patch.
6. The abnormal defect detection method for PCB intelligent welding according to claim 3 is characterized in that: For the potential solder joints marked, the resolution is reallocated according to the obviousness of the solder joint signs. The specific steps are as follows: For each potential solder joint marked, the difference between its solder joint quantitative index and the reference threshold of the solder joint quantitative index is first calculated. , as a standard for judging the obvious degree of false soldering, the difference The calculation expression is: ,in, It is a quantitative index of cold solder joints generated by analyzing the characteristics of solder joints through a deep learning model; It is a preset reference threshold value of the cold solder joint quantitative index, which is used to judge whether there are obvious signs of cold solder joint; Difference according to the signs of poor soldering To calculate the required resolution increment, the resolution increment The calculation formula is: ,in, is the resolution increment factor, which is used to control the resolution increment; It is the maximum value of the quantitative index of cold solder joint in the system, which is used for normalization; Based on the initial expected resolution and resolution increments , calculate the final detection resolution of the solder joint To ensure the fine detection of the details of the cold solder joint, the calculation formula for the final detection resolution is: , represents the final detection resolution after redistribution, is the expected resolution set initially; At the final detection resolution, the solder joints are inspected in detail to ensure accurate identification of cold solder joints.
7. An abnormal defect detection system applied to PCB board intelligent welding, used to implement the abnormal defect detection method applied to PCB board intelligent welding as described in any one of claims 1 to 6, characterized in that: It includes solder joint location module, preliminary screening module, feature extraction and prediction module, solder joint classification module and fine detection module; The solder joint positioning module uses a high-definition camera to capture images of the entire PCB board and uses image segmentation technology to identify and locate all solder joints on the PCB board; The preliminary screening module detects each solder joint at the initially set expected resolution, identifies the solder joints with obvious soldering problems and removes them; The feature extraction and prediction module establishes a solder joint analysis set for the solder joints that have not been screened out on the PCB board. For all solder joints in the solder joint analysis set, key features reflecting signs of poor solder joints are extracted. After feature extraction, the extracted features are analyzed and input into the pre-trained deep learning model to predict the solder joints with poor solder joints. The solder joint classification module divides the solder joints into obvious non-cold solder joints and potential cold solder joints according to the prediction results of the deep learning model, and marks the potential cold solder joints. The fine inspection module reallocates the resolution of the marked potential cold solder joints according to the obviousness of their cold solder joint signs, and uses the reallocated high resolution for more detailed inspection, ensuring a comprehensive inspection of the details of the solder joints at high resolution and accurate identification of cold solder joints.
Citation Information
Patent Citations
Defect detection method and device, defect detection system, equipment and medium
CN115035059A
Cited By
PCB welding spot defect intelligent analysis system and method
CN120765608A
PCB welding spot defect detection method and system
CN122265282A
A method and system for detecting PCB solder joint defects
CN122265282B