Methods, equipment, and storage media for estimating the positional deviation between solder paste printing screen and PCB.

CN117474980BActive Publication Date: 2026-09-18HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311395673.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-25
Publication Date
2026-09-18
Estimated Expiration
2043-10-25

AI Technical Summary

Technical Problem

这种方法需要借助专用标定板标定,过程复杂,运行维护不便,而且是一种间接的配准方法,精度不高且容错性差

Benefits of technology

[0057]Beneficial Effects: This invention has the following significant effects: 1. High Calculation Speed: Modifying SIFT to form an improved algorithm eliminates all multiplication operations and most addition operations, thereby reducing the time and space complexity of transform space calculation; at the same time, the binary images of the printed screen and the PCB are in the form of sparse matrices, saving storage space, resulting in high calculation speed and short time consumption; 2. High Estimation Accuracy: First, an image acquisition system with the same optical path characteristics is used to acquire the PCB image to be printed and the printed screen image, overcoming the influence of optical distortion; in the position estimation of the entity, the influence of interference factors such as the silkscreen layer and solder mask layer is removed, and the estimation accuracy of the position deviation can be further improved; the printed screen image and the PCB retained image are binarized to eliminate interference caused by illumination and other reasons; 3. Strong Fault Tolerance: The position deviation is calculated directly from the PCB image to be printed and the printed screen image, and the geometric distortion caused by the image acquisition system is the same, resulting in strong fault tolerance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117474980B_ABST
    Figure CN117474980B_ABST
Patent Text Reader

Abstract

This invention discloses a method, device, and storage medium for estimating the positional deviation between solder paste printing screen and PCB. First, an image of the PCB to be printed and an image of the printing screen are acquired. The images of the main entities in the PCB image are identified and located to form a retained PCB image. The retained PCB image and the printing screen image are binarized to obtain a binarized PCB image and a binarized printing screen image. A feature extraction algorithm is used to process the binarized PCB image and the binarized printing screen image, extracting the description vectors of key points of the main entities to form PCB features, and extracting the description vectors of key points of printing screen openings to form printing screen features. The positional deviation of the PCB features and the printing screen features is calculated, and the deviation result is output. Compared with existing technologies, this invention has the characteristics of strong fault tolerance, fast calculation speed, and high estimation accuracy.
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 for solder paste printing, and specifically to a method, device, and storage medium for estimating the positional deviation between the solder paste printing screen and the PCB. Background Technology

[0002] Solder paste printing machines generally include a PCB clamping and motion system, a stencil clamping and motion system, a solder paste supply system, a squeegee control system, a stencil cleaning system, and an image vision system. The solder paste printing stencil is usually a stencil. The PCB clamping and motion system transports the PCB to be printed to a set position and clamps it in place; the stencil clamping and motion system controls the stencil to move closer to and away from the PCB; the image vision system acquires images of the PCB and the stencil, calculates the deviation between the PCB and the stencil, and controls the platform calibration and registration system or performs manual PCB position calibration to achieve registration between the stencil and the PCB; the cleaning system is used to clean excess solder paste from the stencil.

[0003] Registration between the solder paste printing stencil and the PCB to be printed is a crucial step in solder paste printing. With the miniaturization of SMT packaged devices, manual registration is not only time-consuming and labor-intensive, but also difficult to guarantee accuracy. Furthermore, in addition to surface mount pads and markers, the PCB image contains other patterns, including solder mask layers, silkscreen layers, through-hole pads, vias, interconnects, and copper pours. This interference can affect the accuracy of positional deviation estimation. Moreover, uneven lighting can also affect the registration accuracy between the stencil and the PCB.

[0004] Automatic registration methods are currently widely used. Existing automatic registration methods involve setting standard alignment marks on both the stencil and the PCB to be printed. To reduce the impact of nonlinear distortion from the camera, the camera must be moved during registration to align the lens optical axis as closely as possible to the center of the marks on the PCB and stencil. This type of registration system places the camera between the stencil and the PCB, requiring images to be taken from both directions. During registration, the PCB must be moved down or the stencil up; during printing, the PCB must be lifted. This complex structure is inconvenient to operate.

[0005] The invention with patent number 201310367282.4 provides a solder paste printing machine and its visual alignment method. This method acquires image data of a specified area from a PCB design image, obtains an actual image from a specified position on the PCB image to be printed, and compares the two. In this method, the silkscreen layer and solder mask layer on the PCB act as interference signals, affecting alignment accuracy. Due to camera lens distortion, there is a certain deviation between the standard PCB design and the actual PCB image. If the optical axis is not perpendicular to the PCB plane, the magnification and clarity of the images at different positions will also differ, further increasing the difference and resulting in low accuracy.

[0006] The registration method provided by the invention with application number 201810465547.7 first uses a calibration board to calibrate the image acquisition system to eliminate geometric distortion of the image acquisition system. During registration, PCB and stencil images are acquired separately for distortion correction, and then the offset between the two corrected images is estimated. This method requires calibration with a dedicated calibration board, the process is complex, operation and maintenance are inconvenient, and it is an indirect registration method with low accuracy and poor fault tolerance. Summary of the Invention

[0007] Purpose of the invention: The purpose of this invention is to provide a method, device, and storage medium for estimating the positional deviation of solder paste printing screens and PCBs that features fast calculation speed, high estimation accuracy, and strong fault tolerance.

[0008] Technical solution: The method for estimating the positional deviation between the solder paste printing screen and the PCB as described in this invention includes the following steps:

[0009] Obtain a PCB to be printed and a printing screen for the PCB. The PCB surface has several solids, including a main solid, a silkscreen, and a solder mask layer. The printing screen has several openings, the positions of which correspond one-to-one with the positions of the main solids. The estimation method includes the following steps:

[0010] S1. Use an image acquisition system to acquire images of the PCB to be printed and the printing screen;

[0011] S2. Identify and locate the images of the main entities in the PCB image, remove the silkscreen and solder mask, select and retain some of the main entities to form a retained PCB image;

[0012] S3. Perform binarization processing on the PCB retained image and the printed screen image to obtain a PCB binarized image and a printed screen binarized image;

[0013] S4. The PCB binarized image and the printed mesh binarized image are processed using a feature extraction algorithm. The description vectors of the key points of the main entities are extracted to form PCB features, and the description vectors of the key points of the printed mesh openings are extracted to form printed mesh features. The positional deviation of the PCB features and the printed mesh features is calculated, and the deviation results are output.

[0014] Furthermore, the main entities include surface mount pads and / or positioning marks.

[0015] Furthermore, when the main entity is a surface mount pad, in step S2, surface mount pads at the center, edge, and corner of the PCB are selected and retained.

[0016] Furthermore, the feature extraction algorithm includes SIFT, Harris, SURF, FAST, ORB, or an improved algorithm.

[0017] Furthermore, when the feature extraction algorithm is an improved algorithm, an optimized Gaussian pyramid algorithm is used to improve the SIFT; when the improved algorithm processes a binary image I(x,y)∈[0,1], x=0,1,…,X-1,y=0,1,…,Y-1, the following process occurs:

[0018] S41. Calculate the Gaussian operator:

[0019] The binarized image is transformed into a Gaussian pyramid, which consists of multiple consecutive layers, each layer corresponding to a specific Gaussian operator; every S layers are set as a group, and there are a total of O groups. The Gaussian operator of the k-th group and the s-th layer is:

[0020]

[0021] In the formula, σ0 is the standard deviation of the Gaussian function distribution of the 0th group and the 0th layer; k is the number of groups of the Gaussian pyramid; s is the number of layers of the Gaussian pyramid; S is the total number of layers of each group of Gaussian pyramids; x is the horizontal coordinate of the image in pixels; y is the vertical coordinate of the image in pixels; X is the number of horizontal pixels of the image; Y is the number of vertical pixels of the image.

[0022] All Gaussian operators within the calculated Gaussian pyramid are saved to a data lookup table for easy subsequent calculations.

[0023] S42. Within each Gaussian convolution kernel scale, calculate the Gaussian convolution and perform a Gaussian space transformation:

[0024] S4201, k = 0;

[0025] S4202, s = 0;

[0026] S4203, x = 0;

[0027] S4204, y = 0;

[0028] S4205, m=0;

[0029] S4206, n=0;

[0030] S4207, when pixel I(x+m,y+n)==1, then L(x,y,k,s)=L(x,y,k,s)+G(m,n,k,s);

[0031] S4208, n = n + 1, if n < 2W then go to S4207, otherwise S4209;

[0032] S4209, m = m + 1, if m < 2W then go to S4206, otherwise go to S4210;

[0033] S4210, y = y + 2 k , if y < Y, go to S4205, otherwise go to S4211;

[0034] S4211, x = x + 2 k , if x < X, go to S4204, otherwise go to S4212;

[0035] S4212, s = s + 1, if s < S, go to S4203, otherwise go to S4213;

[0036] S4213, k = k + 1, if k < O, go to S4202, otherwise go to S4214;

[0037] S4214, end;

[0038] S43. Calculating difference-of-Gaussian convolution by Gaussian space transformation:

[0039] D(x,y,k,s) = L(x,y,k,s+1)-L(x,y,k,s), k = 0,1,…,O-1, s = 0,1,…,S-2,

[0040] x = 0, 2 k -1, 2 k+1 -1, …, y = 0, 2 k -1, 2 k+1 -1, …

[0041] wherein, L(x,y,k,s) is Gaussian convolution; G(m,n,k,s) is Gaussian convolution kernel; m is the horizontal coordinate of the Gaussian convolution kernel; n is the vertical coordinate of the Gaussian convolution kernel; D(x,y,k,s) is difference-of-Gaussian convolution;

[0042] S44. Processing difference-of-Gaussian transformation to locate key point P k,s (x i , y i ) and calculating features related to the key point, and exporting the features as a description vector, the specific process is as follows:

[0043] S441. In the coordinate system of Gaussian space, with key point P k,s (x i , y i ) as the center, defining the neighborhood of the key point:

[0044]

[0045] wherein, C > 1 is a coefficient; is a positive integer; i is the serial number of the key point; J k,s,i is the total number of neighboring points in the neighborhood; N k,s,i (xj ,y j ) is P k,s (x i ,y i The j-th neighbor in the neighborhood, j = 0, 1, ..., J k,s,i -1;

[0046] S442. Calculate and process the features of each neighboring point in the neighborhood to obtain the main direction of the key point.

[0047] S443. Rotate the coordinate system around the key points along the principal direction, and derive the descriptive vector through vector synthesis and statistical analysis. This gives the i-th key point P in the k-th group, layer s. k,s (x i ,y i The description vector is as follows:

[0048]

[0049] In the formula, des i,d It is a Q'×1 dimensional subvector obtained statistically from the d-th subdomain of the neighborhood of the i-th keypoint, where T represents the transpose and Q' is the quantization range of the gradient direction of each neighboring point.

[0050] Furthermore, step S2 is implemented by the target identification locator, and the process of obtaining the target identification locator is as follows;

[0051] S21. Establish a sample library, which includes basic samples. The basic samples include the several entities and the corresponding annotation information of the entities. The annotation information includes location and name.

[0052] S22. Design a target recognition and locator model based on sample training;

[0053] S23. The target recognition and locator model is trained using the sample library until the accuracy requirements are met, thus forming a target recognition and locator.

[0054] Furthermore, the target recognition and localization model is a neural network-based recognition and localization model or a support vector machine model.

[0055] The computer device of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method.

[0056] The computer-readable storage medium of the present invention stores a computer program thereon, which, when executed by a processor, implements the steps of the method described herein.

[0057] Beneficial Effects: This invention has the following significant effects: 1. High Calculation Speed: Modifying SIFT to form an improved algorithm eliminates all multiplication operations and most addition operations, thereby reducing the time and space complexity of transform space calculation; at the same time, the binary images of the printed screen and the PCB are in the form of sparse matrices, saving storage space, resulting in high calculation speed and short time consumption; 2. High Estimation Accuracy: First, an image acquisition system with the same optical path characteristics is used to acquire the PCB image to be printed and the printed screen image, overcoming the influence of optical distortion; in the position estimation of the entity, the influence of interference factors such as the silkscreen layer and solder mask layer is removed, and the estimation accuracy of the position deviation can be further improved; the printed screen image and the PCB retained image are binarized to eliminate interference caused by illumination and other reasons; 3. Strong Fault Tolerance: The position deviation is calculated directly from the PCB image to be printed and the printed screen image, and the geometric distortion caused by the image acquisition system is the same, resulting in strong fault tolerance. Attached Figure Description

[0058] Figure 1 This is a flowchart of the position deviation estimation method of the present invention;

[0059] Figure 2 This is a flowchart for calculating positional deviation based on the improved SIFT algorithm;

[0060] Figure 3 This is a flowchart of the process for extracting descriptive vectors based on the improved SIFT algorithm;

[0061] Figure 4 This is a pseudo-language program diagram of the SIFT improved algorithm used in this invention;

[0062] Figure 5 This is a pseudo-language program diagram of the SIFT improved algorithm with Gaussian convolution kernel invariant. Detailed Implementation

[0063] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments.

[0064] Please see Figures 1 to 2 As shown, this invention discloses a method for estimating the positional deviation between a solder paste printing stencil and a PCB. The PCB to be printed and the matching printing stencil are obtained from a solder paste printer; in this embodiment, a stencil is used. The PCB surface has several solids, including main solids, silkscreen printing, and a solder resist layer. The printing stencil has several openings, the positions of which correspond one-to-one with the positions of the main solids. The estimation method includes the following steps:

[0065] S1. Use an image acquisition system to acquire images of the PCB and stencil to be printed. Using an image acquisition system with the same optical path characteristics can reduce position estimation errors caused by system distortion and scaling errors.

[0066] S2. Identify and locate the images of the main entities in the PCB image, remove the silkscreen and solder mask layers, select and retain some of the main entities to form a retained PCB image. This retained PCB image eliminates interference from silkscreen layers, solder mask layers, etc., which affect the extraction of the main entity images, thus improving detection accuracy.

[0067] S3. Binarize the PCB retained image and the stencil image to obtain a binarized PCB image and a binarized stencil image. Binarizing the PCB retained image can reduce the impact of uneven illumination on the accuracy of position deviation estimation, while also reducing the computational complexity of position estimation. When binarizing the surface mount pads, the correlation between surface mount pads in the same device package is utilized to improve the accuracy of the edge and center positions of the surface mount pads.

[0068] S4. The PCB binarized image and stencil binarized image are processed using a feature extraction algorithm. Description vectors of key points of major entities are extracted to form PCB features, and description vectors of key points of stencil openings are extracted to form stencil features. Positional deviations are calculated between the PCB features and stencil features, and the deviation results are output. These deviation results include angular deviations and coordinate deviations. The final output deviation results can be used for subsequent PCB and stencil registration, improving registration accuracy.

[0069] The estimation method will be further explained below:

[0070] In step S2, the main entities include surface mount pads and / or positioning marks. When the main entity is a surface mount pad, the surface mount pads at the center, edges, and corners of the PCB are selected and retained to form a retained PCB image. Step S2 is implemented by a target recognition locator. This target recognition locator can be based on traditional recognition methods, such as reason extraction and similarity calculation, or it can be trained using a sample-based recognition and positioning model. The process of designing and training a sample-based recognition and positioning model to obtain the target recognition locator is as follows:

[0071] S21. Establish a sample library. The sample library is open source and its content can be continuously improved to design the sample library. This sample library includes basic samples, constructed samples, and enhanced samples.

[0072] The basic sample includes several entities and their corresponding annotation information, including location and name. The process of constructing the basic sample is as follows: Collect traditional positioning mark graphics used for location, and annotate the geometric features, location, and name of the positioning mark graphics. Simultaneously, collect surface mount device packages with surface mount pads and their corresponding pads from various package libraries, and annotate the package library information, package name, names of each pad in the package, pad name, pad number, and pad position to establish the basic sample. In this embodiment, some surface mount device package libraries provided by PCB design software such as Altium, Proteus, and LCEDA are collected, and identical surface mount device packages are integrated.

[0073] The sample construction includes PCB images and their annotations. The PCB images can be simulation images from PCB design software, or scans or photographs of actual PCBs.

[0074] The enhanced sample is an enhancement of the basic sample and the constructed sample, which is achieved by means of translation, rotation, scaling, lens distortion, blurring, lighting with different brightness, color and angle, glare, adding various noises, and slight changes in the size of the surface mount pads within the specified error range.

[0075] S22. Design a sample-trained identification and localization model. During the identification process, this model utilizes the correlation between various surface mount pads stored in the sample library to improve the accuracy and precision of identification. This sample-trained identification and localization model is based on a neural network identification and localization model or a Support Vector Machine (SVM) model. When using a neural network-based identification and localization model, a convolutional neural network target recognition algorithm or a region-based convolutional neural network target recognition algorithm is employed. In this embodiment, a target identification and localization model is designed based on the convolutional neural network target recognition algorithm, namely the YOLO algorithm (You Only Look Once).

[0076] S23. Train the target recognition and locator model using the sample library until the accuracy requirements are met, thus forming a target recognition and locator. For the training algorithm, a two-stage deep learning-based regression method, such as R-CNN, Fast-RCNN, or Faster-RCNN, can be selected, or a one-stage deep learning-based classification method, such as the YOLO algorithm or the SSD algorithm, can be chosen. During training, the sample library is divided into three sets of operational samples for training, testing, and validation of the target recognition and localization model. Each set of operational samples includes a basic sample, a constructed sample, and an augmented sample. Of these three sets of operational samples, one set is used as the training sample, another as the test sample, and the remaining set as the result validation sample. In this embodiment, the YOLO algorithm is selected as the training algorithm. The target recognition and localization model is trained in a Python environment using the YOLO module.

[0077] The trained recognition unit is embedded into the solder paste stencil and PCB registration system. The processor of the registration system can be a central processing unit (CPU), a parallel processor, or a hybrid of both. The processor can be implemented using an application-specific integrated circuit (ASIC) or a programmable logic array (PLA).

[0078] Please see Figures 3 to 5 As shown, in step S4, the feature extraction algorithm includes SIFT, Harris, SURF, FAST, ORB, or an improved algorithm. Specifically, it includes Scale-Invariant Feature Transform (SIFT), Harris, SURF (Speeded-Up Robust Features), FAST (Features from Accelerated Segment Test), and ORB (Oriented FAST and Rotated BRIEF). When the feature extraction algorithm is an improved algorithm, an optimized Gaussian pyramid algorithm is used to improve SIFT. In the original SIFT, the Gaussian convolution formula includes L(x,y,k,s)=I(x,y)*G(x,y,k,s), k=0,1,…,K-1, s=0,1,…,S-1. After improvement, most of the multiplication and addition operations are eliminated, making the calculation faster.

[0079] When the improved algorithm processes a binary image I(x,y)∈[0,1], x=0,1,…,X-1,y=0,1,…,Y-1, the following process occurs:

[0080] S41. Calculate the Gaussian operator:

[0081] The binarized image is transformed into a Gaussian pyramid, wherein the Gaussian pyramid comprises a plurality of consecutive pyramid layers, each pyramid layer corresponds to a determined Gaussian operator; every S pyramid layers are set as one group, and there are O groups in total, and the Gaussian operator of the s-th layer in the k-th group is:

[0082]

[0083] In the formula, σ0 is the standard deviation of the Gaussian function distribution of the 0-th layer in the 0-th group; k is the number of groups of the Gaussian pyramid; s is the number of layers of the Gaussian pyramid; S is the total number of layers of each group of Gaussian pyramid; x is the horizontal coordinate of the image in pixels; y is the vertical coordinate of the image in pixels; X is the number of horizontal pixels of the image; Y is the number of vertical pixels of the image.

[0084] All the calculated Gaussian operators in the Gaussian pyramid are saved into a data lookup table for subsequent calculation;

[0085] S42, within each Gaussian convolution kernel scale, perform Gaussian convolution to implement Gaussian space transformation:

[0086] S4201, k=0;

[0087] S4202, s=0;

[0088] S4203, x=0;

[0089] S4204, y=0;

[0090] S4205, m=0;

[0091] S4206, n=0;

[0092] S4207, when pixel I(x+m,y+n)==1, then L(x,y,k,s)=L(x,y,k,s)+G(m,n,k,s);

[0093] S4208, n=n+1, if n<2W then go to S4207, otherwise go to S4209;

[0094] S4209, m=m+1, if m<2W then go to S4206, otherwise go to S4210;

[0095] S4210,y=y+2 k , if y<Y then go to S4205, otherwise go to S4211;

[0096] S4211,x=x+2 k , if x<X then go to S4204, otherwise go to S4212;

[0097] S4212, s = s + 1, if s < S, go to step S4203, otherwise go to step S4213;

[0098] S4213, k = k + 1, if k < O, go to step S4202, otherwise go to step S4214;

[0099] S4214, end;

[0100] S43, calculating difference-of-Gaussian convolution by Gaussian space transformation:

[0101] D(x,y,k,s)=L(x,y,k,s+1)-L(x,y,k,s),k=0,1,…,O-1,s=0,1,…,S-2,

[0102] x=0,2 k -1,2 k+1 -1,…,y=0,2 k -1,2 k+1 -1,…

[0103] wherein, L(x,y,k,s) is Gaussian convolution; G(m,n,k,s) is Gaussian convolution kernel; m is the horizontal coordinate of the Gaussian convolution kernel; n is the vertical coordinate of the Gaussian convolution kernel; D(x,y,k,s) is difference-of-Gaussian convolution;

[0104] S44, processing difference-of-Gaussian transformation, locating key point P k,s (x i ,y i ) and calculating features related to the key point, exporting as a description vector, the process is as follows:

[0105] S441, in the coordinate system of Gaussian space, with key point P k,s (x i ,y i ) as the center, defining the neighborhood of the key point:

[0106]

[0107] wherein, C>1 is a coefficient; is a positive integer; i is the sequence number of the key point; J k,s,i is the total number of adjacent points in the neighborhood; N k,s,i (x j ,y j ) is the j-th adjacent point in the neighborhood of P k,s (x i ,y i ), j=0,1,…,J k,s,i -1.

[0108] S442, calculating and processing features of each adjacent point in the neighborhood to obtain the main orientation of the key point The specific process is as follows.

[0109] S4421. The neighboring point features include gradient value and gradient direction. Calculate the gradient value A of each neighboring point in the neighborhood. k,s,i,j and gradient direction θ k,s,i,j as follows:

[0110]

[0111]

[0112] j = 0, 1, ..., J k,s,i -1.

[0113] S4422, Set the gradient values ​​A of each neighboring point. k,s,i,j The weighting process is performed using a weighting function, which is the following Gaussian function:

[0114]

[0115] S4423, Set the gradient direction θ of each neighboring point k,s,i,j Equal-interval quantization, where the quantization interval is Δ = 360° / Q, then θ k,s,i,j The quantification result is q∈{0,1,…,Q-1}. Where w k,s,i,j θ is the weighting coefficient of the j-th neighbor of the i-th key point; Q is the weighting coefficient of θ. k,s,i,j The quantization range; q is the quantization value.

[0116] S4424, θ with the same quantization result k,s,i,j After windowing the magnitude of the corresponding gradient vector, vector synthesis and accumulation are performed. The result of this vector synthesis and accumulation is B(k,s,i,q) (q=0,1,…,Q-1), and the specific formula is as follows:

[0117]

[0118] q = 0, 1, ..., Q-1.

[0119] 4425. Based on the cumulative result B(k,s,i,q) of the vector synthesis, calculate the estimated extreme points and secondary extreme points of the synthesized gradient value with respect to q, and determine P. k,s (x i ,y i The main direction

[0120] S443. Rotate the coordinate system around the key point along the principal direction. After rotation, each neighboring point is N'. k,s,i (x' j ,y' j Its gradient direction is θ'k,s,i,j The specific process of using vector synthesis statistics to describe vectors and derive them is as follows:

[0121] S4431, for N' k,s,i (x' j ,y' j The gradient value of ) is applied to a Gaussian window, and the Gaussian window function is:

[0122]

[0123] S4432. Determine the descriptor computation region and compute the descriptor: Within the neighborhood of the rotated coordinate system, divide the neighborhood into equal parts using an inscribed square region D. 2 Each subregion contains θ'. k,s,i,j Equal-interval quantization, where the quantization interval is Δ' = 360° / Q', and Q' is a positive integer, then θ k,s,i,j' The quantification result is q'∈{0,1,…,Q'-1},j'=0,1,…,J k,s,i,d -1, J k,s,i,d Let d be the number of pixels in the d-th sub-region.

[0124] S4433, θ' with the same quantization result k,s,i,j The corresponding gradient vector A k,s,i,j' Perform vector composition and accumulation, and denote the accumulation result as B'(k,s,i,d,q), where d=0,1,…,D 2 -1, q' = 0, 1, ..., Q'-1 then

[0125]

[0126] In the d-th subregion, there is a corresponding Q'×1 vector constructed using B'(k,s,i,d,q).

[0127] des i,d =(B'(k,s,i,d,0),B'(k,s,i,d,1),...,B'(k,s,i,d,Q'-1)) T d = 0, 1, ..., D 2 -1.

[0128] S4434, the i-th key point P in the k-th group of s-layers k,s (x i ,y i The description vector is as follows:

[0129]

[0130] In the formula, des i,dIt is a Q'×1 dimensional subvector obtained statistically from the d-th subdomain of the neighborhood of the i-th keypoint; T represents the transpose; Q' is the quantization range of the gradient direction of each neighboring point.

[0131] S444. Calculate the description vectors of all key points and construct a set of description vectors for the entire graphic, forming the graphic feature. The set of description vectors for the PCB is the PCB feature R. S The descriptive vector set of the solder paste printing screen is the stencil feature R. M .

[0132] S445, in PCB feature R S Steel mesh features R M The similarity of each description vector is compared sequentially, and keypoint matching is performed on the corresponding description vectors. Keypoints with high similarity are selected, and positional deviations are calculated based on the keypoint information. These positional deviations include angular deviations and Cartesian coordinate deviations. When there are many keypoints with high similarity, the existing SIFT algorithm's positional deviation method and process are used to output the positional deviation results.

[0133] In this embodiment, in step S1, to avoid the impact of optical distortion and scaling errors on the estimation accuracy, the image acquisition system uses the same camera and the same optical path parameters to acquire images of the stencil and the PCB to be printed. The acquired PCB image is a grayscale image P(x,y), x=0,1,…,X-1, y=0,1,…Y-1. If it were a color image, it would need to be converted to grayscale first. In step S3, the binarized image of the stencil is obtained as M(x,y)∈[0,1], x=0,1,…,X-1, y=0,1,…Y-1, and the binarized image of the PCB is S(x,y). In step S4, the number of Gaussian pyramid groups of the image is... The number of layers in each group is S, and can be selected as needed. As the Gaussian convolution kernel size increases, the sampling frequency decreases, and L(x,y,k,s) and D(x,y,k,s) become sparse matrices, which are then stored in a compressed format. This improved algorithm is used to process the binarized PCB image S(x,y), extracting the descriptive vector to form the PCB feature R. s The improved algorithm is used to process the binarized image M(x,y) of the steel mesh, extract the descriptive vector, and form the steel mesh feature R. M The improved algorithm described above can be implemented in the hardware and software environment of industrial control computers or embedded control systems used in solder paste printers.

[0134] The present invention also discloses a computer device, including a memory and a processor. The memory stores a computer program that can run on the processor. The processor executes steps of the method for estimating the positional deviation between the solder paste printing screen and the PCB. The memory stores the computer program running on the processor, a training sample library, and data generated during and at the end of the calculation process. The processor executes the aforementioned recognizer training program while running the computer program. The processor may be a central processing unit, a parallel processor, or a combination of both.

[0135] This invention also discloses a computer-readable storage medium storing a computer program that, when executed by at least one processor, implements steps for estimating the positional deviation between the solder paste printing screen and the PCB. The processor can be a central processing unit, a parallel processor, or a combination of both. The processor can be implemented using an application-specific integrated circuit (ASIC) or a programmable logic array (PLA).

[0136] In summary, the method, equipment, and storage medium for estimating the positional deviation between the solder paste printing screen and the PCB of this invention have the characteristics of fast calculation speed, high estimation accuracy, and strong fault tolerance.

Claims

1. A method for estimating the positional deviation between a solder paste printing screen and a PCB, comprising obtaining a PCB to be printed and a printing screen for the PCB, wherein the PCB surface has a plurality of solids, the plurality of solids including a main solid, a silkscreen, and a solder mask layer; the printing screen has a plurality of openings, the positions of the openings corresponding one-to-one with the positions of the main solids, characterized in that, The estimation method includes the following steps: S1. Use an image acquisition system to acquire images of the PCB to be printed and the printing screen; S2. Identify and locate the images of the main entities in the PCB image, remove the silkscreen and solder mask, select and retain some of the main entities to form a retained PCB image; S3. Perform binarization processing on the PCB retained image and the printed screen image to obtain a PCB binarized image and a printed screen binarized image; S4. The PCB binarized image and the printed mesh binarized image are processed using a feature extraction algorithm. The description vectors of the key points of the main entities are extracted to form PCB features, and the description vectors of the key points of the printed mesh openings are extracted to form printed mesh features. The positional deviation of the PCB features and the printed mesh features is calculated, and the deviation results are output. When the feature extraction algorithm is an improved algorithm, an optimized Gaussian pyramid algorithm is used to improve SIFT; when the improved algorithm processes binary images... , At that time, the following process occurs: S41. Calculate the Gaussian operator: The binarized image is transformed into a Gaussian pyramid, which comprises multiple consecutive layers, each corresponding to a specific Gaussian operator; each The tower is set up as a group, and has a total of 100 tower floors. Group, No. Group 1 The Gaussian operator is: , , ; In the formula, The standard deviation of the Gaussian function distribution of group 0, layer 0; The number of groups in the Gaussian pyramid; This represents the number of levels in the Gaussian pyramid. This represents the total number of layers in each Gaussian pyramid. The horizontal coordinates of the image in pixels; The vertical coordinate of the image in pixels; The number of pixels horizontally in an image; This represents the number of vertical pixels in the image. All Gaussian operators within the calculated Gaussian pyramid are saved to a data lookup table for easy subsequent calculations. S42. Within each Gaussian convolution kernel scale, calculate the Gaussian convolution and perform a Gaussian space transformation: S4201, ; S4202, ; S4203, ; S4204, ; S4205, ; S4206, ; S4207, when pixel ,but ; S4208, ,if Then proceed to S4207; otherwise, proceed to S4209. S4209, ,if Then proceed to S4206; otherwise proceed to S4210. S4210, ,if Then proceed to S4205; otherwise, proceed to S4211. S4211, ,if Then switch to S4204; otherwise switch to S4212. S4212, ,if Then switch to S4203; otherwise switch to S4213. S4213, ,if Then proceed to S4202; otherwise proceed to S4214. S4214, End; S43. Calculate the difference Gaussian convolution using Gaussian space transformation: , , , , In the formula, Gaussian convolution; Use a Gaussian convolution kernel; The modal coordinates of the Gaussian convolution kernel; represents the vertical coordinate of the Gaussian convolution kernel; It is a difference Gaussian convolution; S44. Process the difference Gaussian transform to locate key points. The keypoint-related features are calculated and exported as descriptive vectors.

2. The method for estimating the positional deviation of solder paste printing screen and PCB according to claim 1, characterized in that, The main entities include surface mount pads and / or positioning marks.

3. The method for estimating the positional deviation of solder paste printing screen and PCB according to claim 2, characterized in that, When the main entity is a surface mount pad, in step S2, the surface mount pads at the center, edge, and corner of the PCB are selected and retained.

4. The method for estimating the positional deviation of solder paste printing screen and PCB according to claim 3, characterized in that, The specific process of step S44 is as follows: S441. In the coordinate system of Gaussian space, with key points... Define the neighborhood of the key point centered on it: In the formula, For coefficients; It is a positive integer; The key point number; This represents the total number of neighboring points within the neighborhood. for Within the neighborhood Neighboring points, ; S442. Calculate and process the features of each neighboring point in the neighborhood to obtain the main direction of the key point. : S443. Rotate the coordinate system around the key points along the principal direction, synthesize and statistically convert it into a descriptive vector, and derive the result. Group Layer Key points The description vector is as follows: ; In the formula, It is the first The first key point neighborhood Statistical data obtained from each subdomain Sub-vectors, Indicates transpose. It represents the quantization range of the gradient directions of each neighboring point.

5. The method for estimating the positional deviation of solder paste printing screen and PCB according to claim 1, characterized in that, Step S2 is implemented by the target identification and locator. The process of obtaining the target identification and locator is as follows: S21. Establish a sample library, which includes basic samples. The basic samples include the several entities and the corresponding annotation information of the entities. The annotation information includes location and name. S22. Design a target recognition and locator model based on sample training; S23. The target recognition and locator model is trained using the sample library until the accuracy requirements are met, thus forming a target recognition and locator.

6. The method for estimating the positional deviation of solder paste printing screen and PCB according to claim 5, characterized in that, The target recognition and localization model is either a neural network-based recognition and localization model or a support vector machine model.

7. A computer device, characterized in that, The invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method for estimating the positional deviation of the solder paste printing screen and the PCB as described in any one of claims 1-6.

8. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the steps of the method for estimating the positional deviation of the solder paste printing screen and the PCB as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Solder paste printing press and vision aligning method thereof

    CN103407283A

  • Solder paste printing machine calibrating and aligning method

    CN108955535A

  • Steel mesh image automatic registration method and steel mesh image automatic registration system of surface mounting technology

    CN106815832A

  • Lithium battery surface silk-screen printing image registration method and device

    CN116071405A