PCB soldering paste printing quality detection method and system based on image processing

By improving the anisotropic diffusion filtering algorithm and grayscale and size normalization processing, combined with convolutional neural networks, the problem of detection accuracy in PCB solder paste printing quality inspection is solved, and high-precision and automated solder paste offset defect recognition is achieved.

CN120726022AActive Publication Date: 2025-09-30SUZHOU NUODAJIA AUTOMATION TECH CO LTD

Patent Information

Application Number
CN202511148605.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-18
Publication Date
2025-09-30
Estimated Expiration
2045-08-18

AI Technical Summary

Technical Problem

The existing anisotropic diffusion filtering method has the problem of low detection accuracy in PCB solder paste printing quality inspection, especially in the selection of fixed value parameters, it is difficult to take into account the processing requirements of different areas.

Method used

An improved anisotropic diffusion filtering algorithm is adopted, and a dynamic correction coefficient based on local image features is introduced to make the key control parameters adaptively adjusted. Combined with grayscale and size normalization processing, a convolutional neural network is used to identify solder paste offset defects.

Benefits of technology

It improves the quality of image preprocessing and the accuracy of subsequent defect detection, enhances the ability to recognize solder paste edges and contours, and improves the robustness and adaptability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120726022A_ABST
    Figure CN120726022A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image data processing, in particular to a PCB soldering paste printing quality detection method and system based on image processing, and the method comprises the steps: collecting a surface image of a to-be-detected PCB; performing filtering processing on the surface image of the PCB to be detected by using an improved anisotropic diffusion filtering algorithm to obtain a filtered surface image of the PCB, and performing solder paste offset defect identification on the filtered surface image of the PCB based on a convolutional neural network; wherein the improved anisotropic diffusion filtering algorithm comprises a K value, the K value is a product of an initial K value and a correction coefficient, and the correction coefficient is in positive correlation with the noise intensity and the importance degree of each pixel point in the PCB surface image. The problem that an existing filtering algorithm is not high in detection accuracy is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and more particularly to a method and system for detecting the printing quality of solder paste on a PCB based on image processing. Background Art

[0002] With the rapid development of electronic information technology and surface mount technology, the manufacturing quality of PCBs, the core platform for electronic products, directly impacts the performance and stability of the entire device. In the surface mount process, solder paste printing is the first critical step, and its accuracy and consistency are crucial to the quality of subsequent placement and reflow soldering. Especially for high-density, fine-pitch, high-end PCBs, even the slightest deviation in solder paste placement or abnormal printing volume can lead to serious defects such as short circuits, opens, and cold solder joints, causing complete device failure. Therefore, high-precision, automated, and real-time inspection of PCB solder paste printing quality has become a critical issue that needs to be addressed in the electronics manufacturing industry.

[0003] Currently, solder paste print quality inspection methods based on image processing are being applied in industrial production due to their non-contact, fast speed, and strong adaptability. Typical methods typically include image acquisition, image preprocessing, feature extraction, and defect identification. Image preprocessing, as the foundation of the entire inspection process, directly impacts the accuracy of subsequent feature extraction and classification. During the preprocessing stage, effectively removing image noise introduced by factors such as the acquisition environment, equipment noise, and surface contamination, while maintaining the clarity of solder paste edge contours, is key to improving inspection performance.

[0004] The existing anisotropic diffusion filtering method still has prominent technical bottlenecks in practical applications, especially in the case of fixed Problems with value parameter selection. The value is the key parameter that controls the sensitivity of the diffusion function, which determines which areas in the image are considered to be edges and should be protected, and which areas are non-edges and can be smoothed. The value is usually set as a global constant and fixedly applied to the diffusion calculation process of the entire image. However, in actual PCB board images, the density, brightness, texture complexity and local noise level of solder paste distribution vary significantly. A single fixed value is not suitable for the diffusion calculation process of the entire image. It is difficult to take into account the processing requirements of different areas, which leads to the problem of low detection accuracy. Summary of the Invention

[0005] In order to solve the problem of low detection accuracy raised in the above background technology, the present invention provides solutions in the following aspects.

[0006] In a first aspect, the present invention provides a method for inspecting the quality of solder paste printing on a PCB board based on image processing, comprising: acquiring a surface image of a PCB board to be inspected; filtering the surface image of the PCB board to be inspected using an improved anisotropic diffusion filtering algorithm to obtain a filtered surface image of the PCB board; and identifying solder paste offset defects on the filtered surface image of the PCB board based on a convolutional neural network; wherein the improved anisotropic diffusion filtering algorithm includes value, The value is initial The product of the value and the correction coefficient is positively correlated with the noise intensity and importance of each pixel in the PCB board surface image.

[0007] The above technical solution introduces correction coefficients dynamically calculated based on local image features, so that the key control parameters in the anisotropic diffusion filtering algorithm can be adaptively adjusted according to the noise intensity and image structure importance of different regions, thereby achieving more refined diffusion control during the image filtering process, avoiding the problems of insufficient smoothing or blurred edges in traditional fixed parameter models in complex image scenes, and improving detection accuracy.

[0008] Furthermore, the correction coefficient for: , For the The noise intensity of each pixel, For the The importance of each pixel, is the normalization function, is the preset hyperparameter.

[0009] The above technical solution constructs a correction coefficient with adaptive control capability by weightedly fusing the noise intensity of each pixel with its importance in the image structure, and introducing normalization operations and offset adjustment parameters, thereby realizing dynamic adjustment of the diffusion intensity during the anisotropic diffusion process.

[0010] Furthermore, the noise intensity for: , For the first The standard deviation of the grayscale values ​​of all pixels in the set neighborhood with a pixel as the center is For the The gray value of a pixel, The first The gray value of a pixel, is the total number of pixels within the set neighborhood.

[0011] This technical solution combines the grayscale standard deviation of the neighborhood centered on the current pixel with the sum of the grayscale differences between that pixel and all other pixels in the neighborhood to construct a composite measure of noise intensity. This method not only reflects the overall grayscale fluctuations in the local area but also considers the local differences between that pixel and its surrounding pixels, thereby achieving a more sensitive and responsive description of image noise. This method accurately identifies areas with strong noise interference while preserving the image's local structural information. This provides a precise basis for adjusting the diffusion intensity during subsequent filtering, allowing the image to retain key details such as solder paste edges while removing invalid interference, significantly improving the quality of image preprocessing and the accuracy of subsequent defect detection.

[0012] Furthermore, the importance for: , The natural constant The exponential function with base , For the The gray value of a pixel, is the maximum grayscale value in the surface image of the PCB board to be detected, 、 Respectively The maximum and minimum values ​​of the gradient amplitude of all pixels in the set neighborhood range centered on a pixel point.

[0013] This technical solution constructs a pixel importance index by fusing the pixel grayscale value with the range of gradient amplitude variations within its neighborhood. Using a doubly nested exponential function mechanism, regions with higher image brightness and strong local gradient contrast are assigned higher importance assessments, thereby providing greater attention and protection to these areas during subsequent image processing. This method effectively improves responsiveness to regions with clear structures and significant edges, while also rationally suppressing regions with lower brightness or less pronounced texture variations. This helps reduce interference from noise or low-value areas on processing results, allowing the entire image to focus more closely on key areas of practical detection value during feature extraction and defect identification. This enhances the ability to recognize solder paste edges, contours, and offset details, improving detection accuracy and robustness.

[0014] Furthermore, a CCD camera or a CMOS camera is used to capture the surface image of the PCB board to be inspected.

[0015] Furthermore, the set neighborhood range is an 8-neighborhood range.

[0016] Furthermore, the preset hyperparameters is 0.5.

[0017] Furthermore, the surface image of the PCB board to be inspected is grayscaled.

[0018] This technical solution significantly reduces image complexity and data dimensionality by grayscaling the image to be inspected, converting the original color image into a single-channel grayscale image. This reduces the burden of subsequent image processing and model calculations, and improves processing efficiency. Grayscaling preserves brightness and edge information in the image, effectively highlighting the grayscale difference between the solder paste area and the background, enhancing the image's ability to express structural features, and helping to improve the filtering algorithm's performance in edge preservation and noise suppression. It also provides a purer, more discriminative input foundation for subsequent neural network feature extraction, further improving the accuracy and stability of solder paste offset defect detection.

[0019] Furthermore, the method also includes performing size normalization processing on the filtered PCB board surface image before inputting it into the convolutional neural network.

[0020] This technical solution introduces size normalization before filtering the images into the convolutional neural network, ensuring that all images to be detected maintain consistency in spatial dimensions. This effectively addresses issues such as inconsistent feature representation, network adaptation difficulties, and unstable training convergence caused by image size disparity. This process not only improves the model's input standardization and simplifies the design complexity of the network structure, but also enhances the alignment of the feature extraction process and the comparability of recognition results.

[0021] In a second aspect, the present invention provides a PCB board solder paste printing quality detection system based on image processing, comprising a memory and a processor, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, any one of the above-mentioned PCB board solder paste printing quality detection methods based on image processing is implemented.

[0022] The beneficial effects of the present invention are: By constructing importance parameters that fuse image noise and structural features, this method improves the key control mechanisms in the anisotropic diffusion filtering algorithm, achieving adaptive filtering for different image regions. This allows the filtering process to effectively suppress background noise while accurately preserving solder paste edge and contour information, providing a clear, high-quality image foundation for subsequent defect identification. Furthermore, grayscale and size normalization enhance the consistency of image input and the generalization capabilities of the neural network, ensuring stable operation of the recognition system across a variety of image resolutions and lighting conditions. Furthermore, a convolutional neural network is introduced to analyze preprocessed images, automatically learning the complex characteristic patterns of solder paste offset, significantly improving detection accuracy and robustness. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1is a flow chart schematically illustrating a method for detecting solder paste printing quality of a PCB board based on image processing according to an embodiment of the present invention; Figure 2 FIG. 1 is a block diagram schematically illustrating a system for inspecting the quality of solder paste printing on a PCB board based on image processing according to an embodiment of the present invention. DETAILED DESCRIPTION

[0024] An embodiment of a method for detecting PCB solder paste printing quality based on image processing.

[0025] like Figure 1 As shown in FIG, a flow chart of a method for detecting PCB solder paste printing quality based on image processing according to an embodiment of the present invention includes the following steps: S1: Collect the surface image of the PCB to be inspected.

[0026] In a preferred embodiment, a CCD camera or a CMOS camera is used to capture images of the PCB surface to be inspected. CCD cameras offer the advantages of clear imaging and low image noise, making them suitable for inspection scenarios requiring high image quality. CMOS cameras, on the other hand, offer advantages such as low power consumption, high frame rates, and fast response times, making them better suited to the real-time image acquisition requirements of high-speed production lines. Depending on the specific production environment and inspection accuracy requirements, different types of industrial cameras can be selected to achieve optimal image acquisition results. To enhance the stability and robustness of subsequent image processing algorithms, grayscale processing is prioritized after image acquisition. This involves converting the RGB three-channel color image into a single-channel grayscale image. This step effectively reduces the dimensionality of the image data, thereby reducing the computational burden and resource consumption during convolutional neural network training and improving the algorithm's operational efficiency. Furthermore, the solder paste area and the surrounding pad area typically exhibit significant brightness or texture differences in grayscale images. Grayscale processing helps highlight the edge features of the solder paste area, laying the foundation for subsequent filtering and defect identification.

[0027] S2: Filtering the surface image of the PCB to be inspected using an improved anisotropic diffusion filtering algorithm to obtain a filtered surface image of the PCB.

[0028] In a preferred embodiment, the improved anisotropic diffusion filtering algorithm includes value, The value is initial The product of the value and the correction factor; By changing the key control parameters in the anisotropic diffusion filtering algorithm Setting it as the product of the initial value and the dynamic correction coefficient enables adaptive adjustment of the diffusion intensity, allowing each pixel to flexibly adjust its diffusion response according to the image characteristics of its local area during the filtering process, thereby more effectively smoothing noise while preserving edge structure. This design avoids the problem of under- or over-filtering in complex image regions caused by a single global parameter, improves the local sensitivity and overall adaptability of the filtering algorithm when processing non-uniform images, and enhances the accuracy and robustness of image preprocessing in subsequent defect recognition tasks.

[0029] The correction factor for: , For the The noise intensity of each pixel, For the The importance of each pixel, is the normalization function, is a preset hyperparameter. It is 0.5. Of course, it can also be set according to actual conditions.

[0030] By weighting the noise intensity of a pixel and its importance in the image structure, adaptive adjustment of the correction coefficient for each pixel is achieved, effectively improving the sensitivity of the anisotropic diffusion process to local image features. This method not only enhances the dominant role of pixels in high-noise and critical areas in the filtering behavior, but also prevents low-importance areas from interfering with the overall smoothing effect, thereby achieving more accurate edge protection and regional enhancement. The introduction of hyperparameters provides flexibility for overall control, significantly improving the detail preservation and adaptability of the filtering results in complex image scenes.

[0031] The noise intensity for: , For the first The standard deviation of the grayscale values ​​of all pixels in the set neighborhood with a pixel as the center is For the The gray value of a pixel, The first The gray value of a pixel, The set neighborhood range is 8 neighborhood ranges, and of course, it can also be set according to actual conditions.

[0032] By combining the standard deviation of the grayscale values ​​of a pixel's neighborhood with the grayscale differences between that pixel and its neighbors, this method effectively and comprehensively measures the local volatility and grayscale inconsistency of the region where the current pixel resides, thereby more accurately reflecting the noise intensity in that region. This method not only considers the overall discreteness of the grayscale distribution but also incorporates the cumulative characteristics of local grayscale differences, helping to improve the sensitivity and discriminative power of noise intensity estimation. This allows the subsequent filtering process to adaptively adjust the diffusion intensity based on the actual local characteristics of the image, thereby achieving more targeted denoising and edge structure preservation.

[0033] The importance for: , The natural constant The exponential function with base , For the The gray value of a pixel, is the maximum grayscale value in the surface image of the PCB board to be detected, 、 Respectively The maximum and minimum values ​​of the gradient amplitude of all pixels in the set neighborhood range centered on a pixel point.

[0034] By introducing a dual exponential mapping mechanism based on the difference between pixel grayscale values ​​and the gradient amplitude within its neighborhood, this approach measures the importance of pixels. This effectively highlights structural features within the image that are strong in brightness and located in areas with dramatic local gradient variations, enabling highly sensitive recognition of key areas such as solder paste edges and contours. This method not only incorporates the significant role of brightness information in image perception but also leverages local gradient differences to suppress the interference of flat textures or blurred edges in importance assessment. This allows subsequent image processing to more accurately focus on structurally representative areas, improving feature extraction accuracy and the model's ability to identify defects such as solder paste offset.

[0035] S3: Identify solder paste offset defects on the filtered PCB surface image based on a convolutional neural network.

[0036] In a preferred embodiment, by inputting the pre-processed image into a convolutional neural network, automatic feature extraction and intelligent defect identification of the solder paste area can be achieved. In particular, when dealing with complex and subtle solder paste offset problems, it has higher robustness and recognition accuracy than traditional template matching or rule design methods. Furthermore, to enhance the stability and generalization capabilities of convolutional neural networks during feature learning, the filtered PCB surface images are prioritized for resizing before being fed into the neural network. Resizing normalizes the original images to a preset, uniform resolution, ensuring that all input images maintain consistent spatial dimensions. This process not only simplifies the network's adaptation requirements for input size, reducing model design complexity, but also effectively avoids feature scaling distortion and semantic shift issues caused by image size differences.

[0037] The solution of the present invention achieves accurate detection of solder paste printing quality by filtering PCB surface images using an improved anisotropic diffusion filtering algorithm and combining it with solder paste offset defect detection based on a convolutional neural network. Simultaneously, adaptive parameter adjustment in the filtering algorithm enhances the protection of important areas in the image, improving the pertinence and accuracy of the filtering effect, ensuring that key details are not blurred, and thereby improving the accuracy and robustness of defect detection. Furthermore, the combination of grayscale conversion and size normalization effectively standardizes input data, enhancing adaptability to different acquisition devices and image sizes, ultimately achieving efficient, stable, and reliable PCB solder paste printing quality detection.

[0038] Example of PCB solder paste printing quality inspection system based on image processing: like Figure 2 As shown in FIG, a structural block diagram of a PCB solder paste printing quality detection system based on image processing according to an embodiment of the present invention includes a processor and a memory.

[0039] The present invention also provides a PCB board solder paste printing quality detection system based on image processing. Figure 2 As shown, the system includes a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, the above-mentioned PCB board solder paste printing quality detection method based on image processing according to the present invention is implemented.

[0040] The image processing-based PCB board solder paste printing quality detection system also includes other components familiar to those skilled in the art, such as a communication interface. Their settings and functions are known in the art and will not be described in detail here.

[0041] In the present invention, the aforementioned memory can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, the computer-readable storage medium can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc., or any other medium that can be used to store the required information and can be accessed by an application, module, or both. Any such computer storage medium can be part of, accessible to, or connectable to a device. Any application or module described in the present invention can be implemented using computer-readable / executable instructions stored or otherwise maintained by such a computer-readable medium.

[0042] In the description of this specification, "multiple" and "several" mean at least two, such as two, three or more, etc., unless otherwise clearly defined.

[0043] While several embodiments of the present invention have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Numerous modifications, variations, and alternatives will occur to those skilled in the art without departing from the concept and spirit of the present invention. It should be understood that various alternatives to the embodiments of the present invention described herein may be employed in practicing the present invention.

Claims

1. A PCB solder paste printing quality detection method based on image processing, characterized in that: include: Collect the surface image of the PCB board to be inspected; Filtering the surface image of the PCB to be inspected using an improved anisotropic diffusion filtering algorithm to obtain a filtered surface image of the PCB, and identifying solder paste offset defects on the filtered surface image of the PCB based on a convolutional neural network; Among them, the improved anisotropic diffusion filtering algorithm includes value, The value is initial The product of the value and the correction coefficient is positively correlated with the noise intensity and importance of each pixel in the PCB board surface image.

2. The PCB solder paste printing quality detection method based on image processing according to claim 1, wherein: The correction factor for: , For the The noise intensity of each pixel, For the The importance of each pixel, is the normalization function, is the preset hyperparameter.

3. The PCB solder paste printing quality detection method based on image processing according to claim 1, characterized in that: The noise intensity for: , For the first The standard deviation of the grayscale values ​​of all pixels in the set neighborhood with a pixel as the center is For the The gray value of a pixel, The first The gray value of a pixel, is the total number of pixels within the set neighborhood.

4. The PCB solder paste printing quality detection method based on image processing according to claim 1, characterized in that: The importance for: , The natural constant The exponential function with base , For the The gray value of a pixel, is the maximum grayscale value in the surface image of the PCB board to be detected, 、 Respectively The maximum and minimum values ​​of the gradient amplitude of all pixels in the set neighborhood range centered on a pixel point.

5. The PCB solder paste printing quality detection method based on image processing according to claim 1, characterized in that: Use a CCD camera or CMOS camera to capture the surface image of the PCB to be inspected.

6. The PCB solder paste printing quality detection method based on image processing according to claim 3 or 4, characterized in that: The set neighborhood range is an 8-neighborhood range.

7. The PCB solder paste printing quality detection method based on image processing according to claim 2, characterized in that: The preset hyperparameters is 0.

5.

8. The PCB solder paste printing quality detection method based on image processing according to claim 1, characterized in that: Grayscale processing is performed on the surface image of the PCB board to be inspected.

9. The PCB solder paste printing quality detection method based on image processing according to claim 1, characterized in that: It also includes performing size normalization processing on the filtered PCB board surface image before inputting it into the convolutional neural network.

10. PCB board solder paste printing quality inspection system based on image processing, characterized in that: The invention comprises a memory and a processor, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the method for detecting the printing quality of solder paste on a PCB board based on image processing according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • PCB defect detection algorithm based on convolutional neural network

    CN111709910A

  • Automatic PCB soldering paste defect detection method based on machine learning

    CN111899248A

  • System and method for predicting quality of printed circuit board assembly

    CN115908236A

  • PCB solder paste printing quality prediction method based on time reconstruction graph convolution

    CN116796292A

  • SMT production line quality qualified rate prediction method based on transfer learning

    CN116822711A

Cited By

  • Method and system for detecting edge grinding quality of mobile phone glass cover plate

    CN121458653A

  • A method and system for inspecting the edge grinding quality of mobile phone glass covers.

    CN121458653B

  • Impression roller pressure uniformity analysis method based on indentation image features

    CN121544617A