PCB board solder 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 low detection accuracy in PCB solder paste printing quality inspection is solved, and efficient and stable solder paste offset defect identification is achieved.

CN120726022BActive Publication Date: 2025-11-11SUZHOU NUODAJIA AUTOMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing anisotropic diffusion filtering methods suffer from low accuracy in PCB solder paste printing quality inspection, especially in the selection of fixed parameters, which makes it difficult to meet the processing needs of different areas.

Method used

An improved anisotropic diffusion filtering algorithm is adopted, which introduces dynamic correction coefficients based on local image features to enable key control parameters to be 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 accuracy and robustness of detection, effectively removes noise, preserves solder paste edge and contour information, and enhances the quality of image preprocessing and the accuracy of subsequent defect identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120726022B_ABST
    Figure CN120726022B_ABST
Patent Text Reader

Abstract

This invention relates to the field of image data processing technology, specifically to a method and system for detecting solder paste printing quality on PCB boards based on image processing. The method includes: acquiring an image of the surface of a PCB board to be inspected; filtering the image using an improved anisotropic diffusion filtering algorithm to obtain a filtered image of the PCB board surface; and identifying solder paste misalignment defects in the filtered image using a convolutional neural network. The improved anisotropic diffusion filtering algorithm includes a K value, which is the product of an initial K value and a correction coefficient. The correction coefficient is positively correlated with the noise intensity and importance of each pixel in the PCB board surface image. This invention solves the problem of low detection accuracy in existing filtering algorithms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology. More specifically, this invention relates to a method and system for inspecting the solder paste printing quality of PCB boards based on image processing. Background Technology

[0002] With the rapid development of electronic information technology and surface mount technology, the PCB board, as the core platform for electronic products, directly affects the overall performance and stability of the device through its manufacturing quality. In the surface mount process, solder paste printing is the first critical step, and its accuracy and consistency play a decisive role in the quality of subsequent component placement and reflow soldering. Especially for high-density, micro-pitch high-end PCBs, even slight deviations in solder paste placement or abnormal printing amounts can lead to serious defects such as short circuits, open circuits, and poor solder joints, resulting in overall device malfunction. Therefore, how to perform high-precision, automated, and real-time detection of PCB solder paste printing quality has become a crucial problem that the electronics manufacturing industry urgently needs to solve.

[0003] Currently, image processing-based solder paste printing quality inspection methods are widely used in industrial production due to their advantages such as non-contact operation, high speed, and strong adaptability. Typical methods usually include image acquisition, image preprocessing, feature extraction, and defect identification. Among these, image preprocessing, as the foundation of the entire inspection process, directly affects the accuracy of subsequent feature extraction and classification. In the preprocessing stage, effectively removing noise introduced by factors such as the acquisition environment, equipment noise, or surface contamination while maintaining the clarity of the solder paste edge contours is crucial for improving inspection performance.

[0004] Existing anisotropic diffusion filtering methods still face significant technical bottlenecks in practical applications, especially in fixed-position applications. Issues related to the selection of value parameters. The value, as a key parameter controlling the sensitivity of the spread function, determines which regions in the image are considered edges and should be protected, and which regions are non-edges and can be smoothed. In traditional methods, The value is typically set as a global constant and fixedly applied to the diffusion calculation process across the entire image. However, in actual PCB board images, the density, brightness, texture complexity, and local noise level of solder paste distribution vary significantly, making a single, fixed value inappropriate. The problem is that it is difficult to meet the processing needs of different regions, which leads to low detection accuracy. Summary of the Invention

[0005] To address the problem of low detection accuracy mentioned in the background art, the present invention provides solutions in the following aspects.

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

[0007] The above technical solution introduces a correction coefficient based on dynamic calculation of local image features, enabling the key control parameters in the anisotropic diffusion filtering algorithm to be adaptively adjusted according to the noise intensity and image structure importance of different regions. This achieves more refined diffusion control during image filtering, avoids the problems of insufficient smoothness or edge blurring in complex image scenes caused by traditional fixed parameter models, and improves detection accuracy.

[0008] Furthermore, the correction coefficient for: , For the first Noise intensity per pixel For the first The importance of each pixel For normalization function, These are the preset hyperparameters.

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

[0010] Furthermore, the noise intensity for: , For the first The standard deviation of the gray values ​​of all pixels within a neighborhood centered on a given pixel is set. For the first The grayscale value of each pixel For the first term within the defined neighborhood range The grayscale value of each pixel The total number of pixels within the defined neighborhood.

[0011] The aforementioned technical solution constructs a composite metric for noise intensity by combining the standard deviation of the grayscale of the neighborhood centered on the current pixel with the sum of the grayscale differences between that pixel and all pixels in its neighborhood. This reflects both the overall grayscale fluctuation of a local area and the local differences between the current pixel and its surrounding pixels, thus achieving a more sensitive and refined description of image noise. This method can accurately identify areas heavily affected by noise while preserving the local structural information of the image, providing a precise basis for adjusting the diffusion intensity during subsequent filtering. This allows the image to retain key details such as solder paste edges to the greatest extent possible while removing invalid interference, significantly improving image preprocessing quality and the accuracy of subsequent defect detection.

[0012] Furthermore, the degree of importance for: , For the natural constant An exponential function with base 0. For the first The grayscale value of each pixel The maximum grayscale value is the value in the image of the PCB board surface to be inspected. , The first The maximum and minimum values ​​of the gradient magnitude of all pixels within a neighborhood centered on a given pixel are set.

[0013] The aforementioned technical solution constructs a pixel importance index by fusing pixel grayscale values ​​with the range of gradient magnitude changes in their neighborhoods. Utilizing a double-nested exponential function mechanism, regions with high brightness and strong local gradient contrast are assigned higher importance evaluation values, thus receiving greater attention and protection for these regions during subsequent image processing. This method effectively improves the response capability to structurally clear and edge-prominent regions, while reasonably suppressing regions with low brightness or weak texture changes. This helps reduce the interference of noise or low-value regions on the processing results, allowing the entire image to focus more on key regions with practical detection value during feature extraction and defect identification. This enhances the ability to identify solder paste edges, contours, and offset details, improving detection accuracy and robustness.

[0014] Furthermore, CCD or CMOS cameras are used to acquire images of the surface of the PCB board to be inspected.

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

[0016] Furthermore, the preset hyperparameters It is 0.5.

[0017] Furthermore, the image of the PCB board surface to be detected is converted to grayscale.

[0018] The aforementioned technical solution converts the original color image into a single-channel grayscale image by performing grayscale processing on the image to be inspected. This significantly reduces the complexity and dimensionality of the image, thereby reducing the burden on subsequent image processing and model computation, and improving processing efficiency. Grayscale conversion can preserve the brightness and edge information in the image, effectively highlighting the grayscale difference between the solder paste area and the background, enhancing the structural feature expression capability of the image, helping to improve the performance of filtering algorithms in edge preservation and noise suppression, and providing a cleaner and more discriminative input basis for subsequent feature extraction by neural networks, further improving the accuracy and stability of solder paste offset defect identification.

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

[0020] The aforementioned technical solution introduces size normalization processing before inputting the filtered image into the convolutional neural network, ensuring that all images to be detected maintain spatial consistency. This effectively solves problems such as inconsistent feature representation, difficulty in network adaptation, and unstable training convergence caused by inconsistent image sizes. This processing not only improves the model's standardization at the input end and simplifies the design complexity of the network structure, but also enhances the alignment of the feature extraction process and the comparability of the recognition results.

[0021] In a second aspect, the present invention provides a PCB board solder paste printing quality inspection system based on image processing, including a memory and a processor. The memory stores computer program instructions, which, when executed by the processor, implement the PCB board solder paste printing quality inspection method based on image processing described above.

[0022] The beneficial effects of this invention are as follows:

[0023] This invention improves the key control mechanism in the anisotropic diffusion filtering algorithm by constructing important parameters that integrate image noise characteristics and structural features. This enables adaptive filtering of different regions in the image, effectively suppressing background noise while accurately preserving solder paste edge and contour information, thus providing a clear and high-quality image foundation for subsequent defect identification. Simultaneously, grayscale and size normalization enhance the consistency of image input and the generalization ability of the neural network, ensuring stable operation of the recognition system under various image resolutions and lighting conditions. Furthermore, the introduction of a convolutional neural network to analyze the preprocessed image allows for automatic learning of complex feature patterns of solder paste shift, significantly improving detection accuracy and robustness. Attached Figure Description

[0024] Figure 1This is a flowchart illustrating an image processing-based PCB solder paste printing quality inspection method according to an embodiment of the present invention;

[0025] Figure 2 This is a schematic block diagram illustrating the structure of an image processing-based PCB solder paste printing quality inspection system according to an embodiment of the present invention. Detailed Implementation

[0026] Example of a PCB board solder paste printing quality inspection method based on image processing.

[0027] like Figure 1 As shown in the flowchart of the PCB board solder paste printing quality inspection method based on image processing according to an embodiment of the present invention, the method includes the following steps:

[0028] S1: Acquire an image of the surface of the PCB board to be inspected.

[0029] In a preferred embodiment, an image of the PCB board surface to be inspected is acquired using a CCD camera or a CMOS camera. CCD cameras offer advantages such as clear imaging and low image noise, making them suitable for inspection scenarios with high image quality requirements. CMOS cameras, on the other hand, offer advantages such as low power consumption, high frame rate, and fast response speed, better meeting the real-time image acquisition needs of high-speed production lines. Depending on the specific production environment and required inspection accuracy, different types of industrial cameras can be selected to achieve the best image acquisition effect.

[0030] To enhance the stability and robustness of subsequent image processing algorithms, the original color image is first converted to grayscale after image acquisition, that is, the RGB three-channel color image is converted 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 the training of the convolutional neural network and improving the efficiency of the algorithm. On the other hand, the solder paste area and the surrounding pad area usually have obvious differences in brightness or texture in the grayscale image. Grayscale processing helps to highlight the edge features of the solder paste area, laying the foundation for subsequent filtering and defect identification.

[0031] S2: The surface image of the PCB board to be detected is filtered using an improved anisotropic diffusion filtering algorithm to obtain a filtered surface image of the PCB board.

[0032] In a preferred embodiment, the improved anisotropic diffusion filtering algorithm includes: Value, the The value is the initial value. The product of the value and the correction factor;

[0033] By controlling the key parameters in the anisotropic diffusion filtering algorithm By setting the value as the product of the initial value and the dynamic correction coefficient, adaptive adjustment of the diffusion intensity is achieved. This allows each pixel to flexibly adjust its diffusion response according to the image characteristics of its local region during the filtering process, thus more effectively smoothing noise while preserving edge structure. This design avoids the problem of insufficient or excessive filtering caused by a single global parameter in complex image regions, 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.

[0034] The correction coefficient for: , For the first Noise intensity per pixel For the first The importance of each pixel For normalization function, These are preset hyperparameters. It is set to 0.5, but of course, it can be set according to the actual situation.

[0035] By weighting and fusing the noise intensity of pixels with their importance in the image structure, adaptive adjustment of the correction coefficients for each pixel is achieved, effectively improving the response sensitivity to local image features during anisotropic diffusion. This method not only enhances the dominant role of pixels in high-noise and critical regions in the filtering behavior but also avoids interference from low-importance regions on the overall smoothing effect, thus achieving more precise edge protection and region 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.

[0036] The noise intensity for: , For the first The standard deviation of the gray values ​​of all pixels within a neighborhood centered on a given pixel is set. For the first The grayscale value of each pixel For the first term within the defined neighborhood range The grayscale value of each pixel This refers to the total number of pixels within the defined neighborhood range. The defined neighborhood range is an 8-neighbor range, but it can also be set according to the actual situation.

[0037] By combining the standard deviation of the grayscale values ​​in the neighborhood of a pixel with the grayscale differences between that pixel and its neighbors, the system effectively and comprehensively measures the local volatility and grayscale inconsistency of the region where the current pixel is located, thus more accurately reflecting the noise intensity of the region. It not only considers the overall dispersion of the grayscale distribution but also introduces the cumulative characteristics of local grayscale differences, which helps improve the sensitivity and discriminative ability of noise intensity estimation. This allows subsequent filtering processes to adaptively adjust the diffusion intensity based on the actual local characteristics of the image, thereby achieving more targeted denoising and edge structure protection.

[0038] The importance for: , For the natural constant An exponential function with base 0. For the first The grayscale value of each pixel The maximum grayscale value is the value in the image of the PCB board surface to be inspected. , The first The maximum and minimum values ​​of the gradient magnitude of all pixels within a neighborhood centered on a given pixel are set.

[0039] By introducing a dual exponential mapping mechanism that compares pixel grayscale values ​​with the gradient magnitude differences in their neighborhoods, the importance of pixels is measured. This effectively highlights structural feature points in the image that are bright and located in areas of dramatic local gradient changes, thereby achieving highly sensitive recognition of key areas such as solder paste edges and contours. This method not only integrates the significant role of brightness information in image perception but also fully utilizes local gradient differences to suppress the interference of flat textures or blurred edges on importance assessment. This allows the entire image to more accurately focus on structurally representative regions during subsequent processing, thereby improving the accuracy of feature extraction and the model's ability to identify defects such as solder paste misalignment.

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

[0041] In a preferred embodiment, by inputting the preprocessed image into a convolutional neural network, automatic feature extraction and intelligent defect identification of the solder paste region can be achieved. Especially when dealing with complex and minute solder paste misalignment problems, it has higher robustness and recognition accuracy compared with traditional template matching or rule design methods.

[0042] Furthermore, to improve the stability and generalization ability of the convolutional neural network during feature learning, the filtered PCB board surface image undergoes size normalization before being input into the neural network. Size normalization adjusts the original image to a preset uniform resolution, ensuring that all input images maintain a consistent spatial size. This process not only simplifies the network structure's adaptation requirements to input sizes and reduces model design complexity, but also effectively avoids feature scaling distortion and semantic shift issues caused by differences in image size.

[0043] This invention employs an improved anisotropic diffusion filtering algorithm to filter PCB board surface images, combined with solder paste offset defect identification based on a convolutional neural network, achieving accurate detection of solder paste printing quality. Simultaneously, adaptive parameter adjustment in the filtering algorithm enhances the protection of important areas in the image, improving the targeting and accuracy of the filtering effect, ensuring that key details are not blurred, thereby improving the accuracy and robustness of defect identification. Furthermore, by combining grayscale and size normalization processing, the input data is effectively standardized, enhancing adaptability to different acquisition devices and image sizes, ultimately achieving efficient, stable, and reliable PCB board solder paste printing quality detection.

[0044] Example of an image processing-based PCB solder paste printing quality inspection system:

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

[0046] This invention also provides a PCB board solder paste printing quality inspection system based on image processing. For example... Figure 2 As shown, the system includes a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement the image processing-based PCB solder paste printing quality inspection method according to the present invention.

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

[0048] In this invention, the aforementioned memory can be any tangible medium containing or storing a program that can be used or combined with an instruction execution system, apparatus, or device. For example, a 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 desired information and can be accessed by an application, module, or both. Any such computer storage medium can be part of a device or accessible to or connected to a device. Any application or module described in this invention can be implemented using computer-readable / executable instructions stored or otherwise maintained by such a computer-readable medium.

[0049] In the description of this specification, "multiple" or "several" means at least two, such as two, three or more, unless otherwise explicitly specified.

[0050] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.

Claims

1. A method for inspecting the solder paste printing quality of PCB boards based on image processing, characterized in that, include: Acquire images of the surface of the PCB board to be inspected; An improved anisotropic diffusion filtering algorithm is used to filter the surface image of the PCB board to be detected to obtain a filtered PCB board surface image. A convolutional neural network is then used to identify solder paste offset defects in the filtered PCB board surface image. Among them, the improved anisotropic diffusion filtering algorithm includes Value, the The value is the initial value. The product of the value and the correction factor, wherein the correction factor is positively correlated with the noise intensity and importance of each pixel in the PCB board surface image; The correction coefficient for: , For the first Noise intensity per pixel For the first The importance of each pixel For normalization function, These are preset hyperparameters; The noise intensity for: , For the first The standard deviation of the gray values ​​of all pixels within a neighborhood centered on a given pixel is set. For the first The grayscale value of each pixel For the first term within the defined neighborhood range The grayscale value of each pixel The total number of pixels within the defined neighborhood; The importance for: , For the natural constant An exponential function with base 0. The maximum grayscale value is the value in the image of the PCB board surface to be inspected. , The first The maximum and minimum values ​​of the gradient magnitude of all pixels within a neighborhood centered on a given pixel are set.

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

3. The PCB board solder paste printing quality inspection method based on image processing according to claim 1, characterized in that, The set neighborhood range is an 8-neighbor range.

4. The PCB board solder paste printing quality inspection method based on image processing according to claim 1, characterized in that, The preset hyperparameters It is 0.

5.

5. The PCB board solder paste printing quality inspection method based on image processing according to claim 1, characterized in that, The image of the PCB board surface to be inspected is converted to grayscale.

6. The PCB board solder paste printing quality inspection 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.

7. A PCB board solder paste printing quality inspection system based on image processing, characterized in that, The method includes a memory and a processor. The memory stores computer program instructions, which, when executed by the processor, implement the image processing-based PCB solder paste printing quality inspection method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • PCB defect detection algorithm based on convolutional neural network

    CN111709910A

  • Follicle region image segmentation method for ovarian tissue analysis

    CN119205820A