Image recognition based automatic calibration system for solder paste printer
An automatic calibration system for solder paste printers based on image recognition is used to generate a non-rigid spatial transformation matrix by employing bi-branch feature extraction and deformable convolution processing. This achieves full-area alignment between the printed circuit board and the stencil, solves the printing offset problem caused by local non-rigid deformation, and improves calibration accuracy and stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIAXING BOVI ELECTRONIC TECH CO LTD
- Filing Date
- 2026-05-07
- Publication Date
- 2026-07-31
AI Technical Summary
Existing automatic calibration systems for solder paste printers cannot effectively handle localized non-rigid deformation between the printed circuit board and the stencil, resulting in misalignment between the stencil openings and pads in edge areas and locally warped areas, leading to printing misalignment defects.
An automatic calibration system for solder paste printers based on image recognition is adopted. The system acquires the original images of the printed circuit board and stencil through the image acquisition module, extracts the coordinates of global marker points and local texture features using the dual-branch feature extraction module, generates an offset field by combining the deformable convolution processing module, constructs a non-rigid spatial transformation matrix containing local deformation parameters, and drives the motor through the motion control module to perform gridded regional compensation calibration.
It achieves point-to-point alignment between the stencil openings and the pads in physical space, eliminating printing offset caused by PCB warpage and local deformation of the stencil. The calibration accuracy and stability are improved through closed-loop control and frequency domain filtering preprocessing.
Smart Images

Figure CN122492771A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition technology and discloses an automatic calibration system for solder paste printers based on image recognition. Background Technology
[0002] Solder paste printers are responsible for applying solder paste to the pads of printed circuit boards (PCBs) in surface mount technology (SMT) processes. Existing automated calibration systems typically use machine vision technology to identify reference points on the PCB and stencil. By calculating the positional deviation of these reference points in the image coordinate system, a rigid affine transformation matrix is established. The control system then uses this matrix to drive a motor that moves the stencil or PCB stage in a translational and rotational motion until the coordinate deviation of the reference points falls within the allowable range, completing the calibration process.
[0003] In actual manufacturing, printed circuit boards (PCBs) can warp due to processing stress, and stencils can also deform due to uneven local tension during the stretching process. The conventional calibration scheme based on rigid affine transformation can only correct overall translation and rotation deviations, and cannot handle local non-rigid deformations between the PCB and the stencil. This results in misalignment between the stencil openings and pads in edge areas and locally warped areas, leading to printing misalignment defects. Summary of the Invention
[0004] The purpose of this invention is to provide an automatic calibration system for solder paste printers based on image recognition, which can effectively solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: An automatic calibration system for solder paste printers based on image recognition includes an image acquisition module, a dual-branch feature extraction module, a deformable convolution processing module, a spatial transformation matrix construction module, and a motion control module. The image acquisition module is used to acquire the original images of the printed circuit board and stencil to be calibrated; The dual-branch feature extraction module is used to extract global marker point coordinates after downsampling the original image, and to extract local texture features of the pad region at the original resolution of the original image. The deformable convolution processing module is used to input the local texture features into the deformable convolution layer to generate an offset field. The spatial transformation matrix construction module is used to jointly encode the global marker point coordinates and the offset field to construct a non-rigid spatial transformation matrix containing local deformation parameters. The motion control module is used to drive the motor to perform a gridded regional compensation calibration system for the steel mesh based on the non-rigid spatial transformation matrix.
[0006] Preferably, the dual-branch feature extraction module includes a global branch network and a local branch network; The global branch network performs three convolution operations with a stride of two and one global average pooling operation on the original image in sequence, outputting a global feature vector, and inputting the global feature vector into a fully connected layer to regress and generate the coordinates of the global marker points; The local branch network preserves the spatial resolution of the original image and extracts local texture features of the pad region through a residual network containing dilated convolutions. The local texture features are multi-channel feature maps containing the gradient direction of the pad edge and the texture density.
[0007] Preferably, the local branch network includes a first residual block and a second residual block connected in series. The first residual block contains a first dilated convolutional layer and a second dilated convolutional layer connected in parallel. The dilation rate of the first dilated convolutional layer is set to 1, and the dilation rate of the second dilated convolutional layer is set to 2. The local branch network concatenates the first local feature map output by the first dilated convolutional layer and the second local feature map output by the second dilated convolutional layer in the channel dimension. The concatenated feature map is then passed through a batch normalization layer and input into a 1x3 convolutional layer for dimensionality reduction. The output of the dimensionality reduction operation is then passed as the output of the first residual block to the second residual block, and finally the second residual block outputs the local texture features.
[0008] Preferably, the deformable convolution processing module includes an offset prediction convolutional layer; The offset prediction convolutional layer receives the local texture features and outputs a two-dimensional coordinate offset for each pad pixel in the local texture features. The deformable convolution processing module combines the two-dimensional coordinate offsets corresponding to all pad pixels into an offset field that is consistent with the size of the local texture feature space. The deformable convolutional layer spatially relocates the sampling point positions in the local texture features based on the two-dimensional coordinate offset in the offset field, and outputs a deformation feature map.
[0009] Preferably, the spatial transformation matrix construction module includes a cross-attention fusion layer; The cross-attention fusion layer converts the global marker point coordinates into a one-dimensional query vector and flattens the offset field into a one-dimensional key vector and a one-dimensional value vector. The cross-attention fusion layer calculates the dot product attention weight of the one-dimensional query vector and the one-dimensional key vector, and multiplies the dot product attention weight by the one-dimensional value vector to obtain the fused feature vector. The spatial transformation matrix construction module inputs the fused feature vector into the multilayer perceptron and outputs the non-rigid spatial transformation matrix.
[0010] Preferably, the non-rigid spatial transformation matrix is composed of the deformation matrix of the grid control points; The fused feature vector output by the multilayer perceptron is reshaped into a set of two-dimensional grid node offset vectors; The spatial transformation matrix construction module uses the coordinates of the global marker points as anchor points and performs spatial interpolation calculations on the set of offset vectors of the two-dimensional grid nodes using a thin plate spline interpolation algorithm to generate the grid control point deformation matrix covering the entire area of the printed circuit board to be calibrated. The dimension of the grid control point deformation matrix is consistent with the physical grid division dimension of the printed circuit board to be calibrated.
[0011] Preferably, the motion control module includes a mesh mapping submodule and a multi-axis driver array; The mesh mapping submodule maps the offset of each two-dimensional mesh node in the mesh control point deformation matrix to the corresponding number of motor pulses. The multi-axis driver array includes several micro servo motors distributed around the steel mesh and in the central area. The multi-axis driver array receives the number of motor pulses and drives the several micro servo motors to perform stretching or lifting actions, so that the steel mesh produces local physical deformation that matches the deformation matrix of the mesh control points.
[0012] Preferably, after the multi-axis driver array has completed the stretching or lifting action, the image acquisition module acquires a second inspection image of the alignment area between the steel mesh and the printed circuit board to be calibrated; The dual-branch feature extraction module receives the re-examination image and extracts the global re-examination marker coordinates and re-examination local texture features corresponding to the re-examination image. The deformable convolution processing module and the spatial transformation matrix construction module output a non-rigid spatial transformation matrix for re-examination based on the re-examination local texture features and the coordinates of the global re-examination marker points.
[0013] Preferably, the motion control module includes a residual calculation submodule and a pulse superposition submodule; The residual calculation submodule performs an element-wise subtraction operation between the re-examined non-rigid space transformation matrix and the non-rigid space transformation matrix to generate a residual deformation matrix. When the maximum absolute value in the residual deformation matrix is greater than a preset pixel threshold, the pulse superposition submodule maps the residual deformation matrix into a number of compensation pulses, and superimposes the number of compensation pulses into the number of motor pulses and resends it to the multi-axis driver array.
[0014] Preferably, the image acquisition module performs frequency domain filtering preprocessing on the re-examination image before outputting the re-examination image; The image acquisition module performs a two-dimensional Fourier transform on the re-examination image to generate a spectrum. In the spectrum, high-frequency noise bands with the same operating frequency as the multi-axis driver array are shielded. The shielded spectrum is then subjected to a two-dimensional inverse Fourier transform to generate a filtered re-examination image. The dual-branch feature extraction module receives the filtered re-examination image as input and performs subsequent coordinate extraction and feature extraction operations.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention synchronously extracts global marker coordinates and local pad texture features through a dual-branch network. A deformable convolutional layer generates an offset field based on the local texture features. The global marker coordinates and the offset field are jointly encoded to construct a non-rigid spatial transformation matrix containing local deformation parameters. The control system uses this matrix to drive a motor to perform gridded regional compensation calibration of the stencil. This scheme directly couples image recognition features with physical gridded compensation actions, overcoming the inability of rigid affine transformations to handle local non-rigid deformations. This ensures that the stencil windows and pads are physically aligned point-by-point, eliminating printing offsets caused by PCB warpage and local stencil deformation.
[0016] 2. In the joint encoding stage, this invention employs a cross-attention fusion layer to calculate the dot product attention weights of the query vector and the key vector. This is combined with a thin-plate spline interpolation algorithm to generate a deformation matrix for the grid control points. This matrix, along with a multi-axis actuator array distributed around and in the center of the steel mesh, performs stretching or lifting actions, achieving precise matching of local physical deformations. By generating a residual deformation matrix from secondary acquired and re-examined images and superimposing compensation pulses, a closed-loop control is formed, suppressing errors from single mechanical actions. Simultaneously, frequency domain filtering preprocessing is introduced before re-examined image processing to shield the high-frequency noise band corresponding to the operating frequency of the multi-axis actuators, ensuring the stability of feature extraction during the closed-loop feedback process. Attached Figure Description
[0017] Figure 1 This is an overall flowchart of the present invention; Figure 2 This is a flowchart of the parallel processing of the dual-branch feature extraction module of the present invention; Figure 3 This is a flowchart illustrating the offset field generation and application of the deformable convolution processing module of the present invention. Figure 4 This is a flowchart of the joint encoding process for the spatial transformation matrix construction module of this invention; Figure 5 This is a flowchart of the mesh-based regional compensation process for the motion control module of the present invention. Figure 6This is a flowchart of the closed-loop re-examination and frequency domain filtering preprocessing of the present invention. Detailed Implementation
[0018] Please refer to the attached document. Figure 1 This embodiment provides an image recognition-based automatic calibration system for a solder paste printer, deployed at the solder paste printing station in a surface mount process. The system operates within the embedded control unit of the solder paste printer, interacting with the mechanical transmission mechanism and image acquisition hardware of the printer. The printed circuit board to be calibrated is fixed to the worktable of the printing station, and a stencil is fixed directly above the printed circuit board via a stencil tensioning mechanism. A preset alignment reference exists between the windowed area of the stencil and the pad area of the printed circuit board.
[0019] The image acquisition module acquires raw images of the printed circuit board (PCB) and stencil to be calibrated. During raw image acquisition, the module uses a coaxial illumination unit to uniformly illuminate the alignment areas of the PCB and stencil, avoiding uneven grayscale caused by specular reflections from the metal pads and stencil surfaces. The field of view of the image acquisition module covers the entire effective printed area of the PCB. The raw image includes global reference markers and graphic information of all pad areas on the PCB, as well as reference markers and graphic information of all windowed areas on the stencil. The raw image is stored and processed in a single-channel grayscale image format, with a grayscale value range of 0 to 255. The pad areas and windowed areas correspond to the high grayscale value range, while the substrate area and the non-windowed areas of the stencil correspond to the low grayscale value range.
[0020] In this embodiment, the dual-branch feature extraction module receives the original image output by the image acquisition module and performs two parallel processing steps: global feature extraction and local feature extraction. One processing step downsamples the original image to extract global marker coordinates in a low-resolution feature space; the other processing step preserves the original resolution of the original image and extracts local texture features of the pad region in a high-resolution feature space. The global marker coordinates contain the two-dimensional coordinate values of the PCB reference marker and the stencil reference marker in the image coordinate system, used to characterize the overall alignment deviation between the PCB and the stencil. The local texture features contain edge information, gradient distribution information, and texture density information of the pad region, used to characterize the non-rigid deformation of local areas of the PCB and the stencil. The two parallel processing steps are executed synchronously in the same computing unit, with consistent processing cycles, ensuring the temporal synchronization of global and local features and avoiding feature fusion errors caused by temporal differences.
[0021] Furthermore, the deformable convolutional processing module receives the local texture features output by the dual-branch feature extraction module and inputs these features into the deformable convolutional layer to generate an offset field. The offset field is a two-dimensional feature map with the same spatial dimensions as the original image. The value of each pixel in the offset field corresponds to the two-dimensional coordinate offset of the sampling point at that location. The coordinate offset is used to characterize the local deformation direction and deformation amount of the physical region corresponding to that pixel. The deformable convolutional layer learns the positional deviation between the pad edges and the stencil window edges in the local texture features, generating a coordinate offset adapted to the local deformation for each sampling point. This allows the sampling area to adaptively adjust to follow the local deformation, outputting a feature representation that matches the local deformation. The sampling process of the deformable convolutional layer preserves the spatial resolution of the original image, ensuring that the offset field corresponds to each pixel position in the original image.
[0022] In this embodiment, the spatial transformation matrix construction module receives the global marker point coordinates output by the dual-branch feature extraction module and the offset field output by the deformable convolution processing module. It then jointly encodes the global marker point coordinates and the offset field to construct a non-rigid spatial transformation matrix containing local deformation parameters. The joint encoding process fuses the overall alignment deviation represented by the global marker point coordinates with the local deformation information represented by the offset field, ensuring that the generated non-rigid spatial transformation matrix simultaneously contains both overall rigid transformation parameters and local non-rigid deformation parameters. The non-rigid spatial transformation matrix describes the coordinate transformation required for each windowed area of the steel mesh in the image coordinate system to achieve complete alignment with the corresponding printed circuit board (PCB) pad area. The dimension of the non-rigid spatial transformation matrix matches the physical grid division dimension of the PCB, with each matrix element corresponding to the transformation parameters of a grid region, providing a data foundation for subsequent regional compensation.
[0023] The motion control module receives the non-rigid spatial transformation matrix output by the spatial transformation matrix construction module and drives the motor to perform gridded regional compensation calibration of the stencil based on the non-rigid spatial transformation matrix. During the gridded regional compensation calibration process, the motion control module divides the effective printed area of the printed circuit board into several non-overlapping grid cells, each corresponding to independent compensation calibration parameters. Based on the local deformation parameters in the non-rigid spatial transformation matrix, the motion control module generates a corresponding motor drive signal for each grid cell, driving the motor at the corresponding position to perform the corresponding mechanical action, so that the stencil produces physical deformation in the corresponding grid cell area that matches the local deformation parameters, achieving region-by-region alignment between the stencil openings and the printed circuit board pads. The granularity of the grid cell division matches the size of the printed circuit board and the pad distribution density to ensure uniform deformation within each grid cell and that the accuracy of the compensation action meets the alignment requirements.
[0024] Table 1. Input and output parameter definitions for each core module of the automatic calibration system.
[0025] Table 1 clarifies the physical meaning and correspondence of the input and output parameters of each core module of the system in this embodiment, enabling those skilled in the art to clearly understand the data flow logic and signal transmission relationship between the modules of the system, and ensuring the full disclosure of the technical solution.
[0026] In this embodiment, by using a dual-branch parallel processing approach, the overall alignment deviation information and local deformation information of the printed circuit board and the stencil are acquired simultaneously. Combined with the adaptive offset field generated by deformable convolution, a non-rigid spatial transformation matrix containing both overall and local transformation parameters is constructed. Finally, through meshed regional compensation calibration, the full-area alignment of the stencil and the printed circuit board is achieved, solving the problem of local non-rigid deformation that rigid transformation cannot handle.
[0027] Please refer to the attached document. Figure 2 In a preferred embodiment, the dual-branch feature extraction module includes a global branch network and a local branch network. The global branch network and the local branch network receive the same original image as input and perform feature extraction operations in parallel. The two processing processes are independent of each other and there is no intermediate data interaction.
[0028] The global branch network sequentially performs three convolution operations with a stride of 2 and one global average pooling operation on the original image, outputting a global feature vector. This global feature vector is then input into a fully connected layer to regress and generate global marker point coordinates. Each convolution operation with a stride of 2 uses a 3×3 kernel, and the boundary padding for the convolution operation is set to 1 to ensure that edge information of the feature map is not lost after the convolution operation. The calculation formula for the convolution operation is as follows: in, The nth convolution operation outputs the pixel value of the feature map at coordinates (x, y). Let be the input feature map for the nth convolution operation, and k be half the size of the convolution kernel. In this embodiment, the kernel size is 3×3, so k is set to 1. The weight parameters of the convolution kernel in the nth convolution operation are... represents the bias parameter for the nth convolution operation.
[0029] Three convolutional operations with a stride of 2 are performed. After each convolution, the spatial size of the feature map becomes half that of the input feature map. After three convolutional operations, the spatial size of the feature map is 1 / 8 of the original image. The 2-stride convolutional operation performs downsampling simultaneously with the convolution operation, eliminating the need for additional pooling layers and avoiding the loss of feature information during downsampling. After each convolutional operation, a batch normalization layer and a ReLU activation function are applied. The batch normalization layer normalizes the feature map output by channel dimension, while the ReLU activation function introduces a non-linear transformation into the network, improving its feature fitting ability. The formula for batch normalization is as follows: Where BN(F) is the batch-normalized feature map, and F is the input feature map. This represents the mean of the feature maps in the current batch across the channel dimension. This represents the variance of the current batch of feature maps in the channel dimension. To prevent tiny constants with a denominator of zero, For scaling parameters, The offset parameter is the scaling parameter, which, along with the offset parameter, are learnable parameters of the network.
[0030] The formula for calculating the ReLU activation function is as follows: Where x is the input value of the activation function. The ReLU activation function sets all input values less than 0 to 0, while keeping input values greater than or equal to 0 unchanged. It is used to introduce non-linear transformations into the network and improve the feature representation ability.
[0031] After the three convolution operations are completed, the global branch network performs a global average pooling operation on the output feature map. The formula for calculating the global average pooling operation is as follows: in, Let H be the value of the c-th channel in the global feature vector output by global average pooling, and let H and W be the height and width of the feature map output by the third convolution operation, respectively. The third convolution operation outputs the pixel value of the c-th channel at coordinates (x, y) in the feature map. Global average pooling transforms the 3D feature map into a 1D global feature vector, with the same dimension as the number of channels in the feature map output by the third convolution operation. Global average pooling requires no additional learnable parameters, reducing the computational cost of the network and avoiding the overfitting problem caused by fully connected layers directly processing 3D feature maps.
[0032] The global feature vector output by global average pooling is input into the fully connected layer. The fully connected layer regresses to generate the coordinates of the global marker points, calculated as follows: in, The output is the coordinates of the global marker points, which is a one-dimensional vector with a length twice the number of global marker points. Each marker point corresponds to two coordinate values, x and y. This is the weight matrix of the fully connected layer. This is the bias vector of the fully connected layer. The fully connected layer learns the mapping relationship between the global feature vector and the coordinates of the marker points, and regresses to obtain the two-dimensional coordinates of all reference marker points in the image coordinate system. The output dimension of the fully connected layer matches the number of reference marker points, which must include at least the four corner marker points of the printed circuit board and the stencil, ensuring the accuracy of the overall alignment deviation calculation.
[0033] Furthermore, the local branch network preserves the spatial resolution of the original image and extracts local texture features of the pad region through a residual network containing dilated convolutions. These local texture features are multi-channel feature maps containing the gradient direction of the pad edges and the texture density. The local branch network does not perform downsampling during the entire feature extraction process, and the stride of all convolutional layers is set to 1 to ensure that the output local texture features are completely consistent with the spatial resolution of the original image, preserving the fine edges and texture information of the pad region. The input to the local branch network is a single-channel original image. After multi-layer feature extraction, it outputs multi-channel local texture features, with each channel corresponding to different dimensions of texture information, providing multi-dimensional feature input for subsequent offset field generation.
[0034] In this embodiment, the local branch network includes a first residual block and a second residual block connected in series. The first residual block contains a first dilated convolutional layer and a second dilated convolutional layer connected in parallel. The dilation rate of the first dilated convolutional layer is set to 1, and the dilation rate of the second dilated convolutional layer is set to 2. Dilated convolution expands the receptive field of the convolutional layer by inserting holes between the sampling points of the convolutional kernel, without increasing the number of kernel parameters or reducing the spatial resolution of the feature map, thus achieving multi-scale feature extraction. The calculation formula for dilated convolution is as follows: in, The dilated convolution outputs the pixel value of the feature map at coordinates (x, y). The input feature map for dilated convolution is denoted as , k is the half-size of the convolution kernel (in this embodiment, the kernel size is 3×3, k is 1), r is the dilation rate of the dilated convolution, W(i,j) is the kernel weight parameter, and b is the bias parameter. When the dilation rate is 1, the dilated convolution is equivalent to a standard convolution with a receptive field of 3×3; when the dilation rate is 2, the receptive field of the dilated convolution expands to 5×5, while maintaining the same number of kernel parameters and not reducing the spatial resolution of the feature map.
[0035] The first and second dilated convolutional layers receive the same input feature map and perform dilated convolution operations in parallel, outputting a first local feature map and a second local feature map, respectively. The first local feature map captures the fine edge details of the pad region, while the second local feature map captures the neighborhood texture information of the pad region. The two feature maps form a complementary multi-scale feature representation. The local branch network concatenates the first local feature map output by the first dilated convolutional layer and the second local feature map output by the second dilated convolutional layer along the channel dimension. This concatenation operation merges the number of channels in the two feature maps, forming a concatenated feature map with double the number of channels. The concatenated feature map is then normalized by a batch normalization layer to adjust the distribution of feature values and accelerate network convergence.
[0036] The normalized feature map is input into a 1×3 convolutional layer for dimensionality reduction. The kernel size of the 1×3 convolutional layer is 1×3, the stride is set to 1, and the boundary padding is set to 1 to ensure that the spatial dimensions of the output feature map are consistent with those of the input feature map. Figure 1 The 1x3 convolutional layer performs a linear transformation on the feature map along the channel dimension, reducing the dimensionality of the concatenated high-channel feature map to the original channel number. This preserves key feature information while reducing the computational cost of subsequent processing. The output of the dimensionality reduction operation is then element-wise added to the input feature map of the first residual block to form a residual connection. This avoids the gradient vanishing problem caused by increasing network depth, improving the network's training stability and feature extraction capability. The output of the residual connection is then passed as the output of the first residual block to the second residual block.
[0037] The internal structure of the second residual block is completely identical to that of the first residual block, containing two parallel dilated convolutional layers with different dilation rates, channel concatenation operations, batch normalization layers, dimensionality reduction convolutional layers, and residual connections. After processing by the second residual block, the output local texture features are multi-channel feature maps. The spatial dimensions of the feature maps are completely identical to those of the original image. Each channel corresponds to different dimensions of texture features such as edge gradient direction, gradient magnitude, and texture density of the pad region, accurately representing the local deformation information of the pad region.
[0038] Table 2. Correspondence between computational parameters and output feature dimensions of each layer in the local branch network.
[0039] Table 2 details the input and output dimensions, core operations, and key parameter settings for each level in the local branch network, clarifies the internal structure and data flow process of the two residual blocks, and enables those skilled in the art to fully reproduce the feature extraction process of the local branch network, ensuring the full disclosure of the technical solution.
[0040] In this embodiment, the global branch network efficiently extracts global features and regresses the coordinates of the marker points in the low-resolution space through three convolution operations with a stride of 2 and global average pooling, thereby achieving rapid calculation of the overall alignment deviation. The local branch network extracts multi-scale local texture features while preserving the original resolution by paralleling dilated convolution residual blocks with different dilation rates, accurately capturing the local deformation information of the pad area, and providing a reliable feature basis for subsequent offset field generation.
[0041] Please refer to the attached document. Figure 3 In a preferred embodiment, the deformable convolutional processing module includes an offset prediction convolutional layer; the offset prediction convolutional layer receives local texture features and outputs a two-dimensional coordinate offset for each pad pixel in the local texture features; the deformable convolutional processing module combines the two-dimensional coordinate offsets corresponding to all pad pixels into an offset field with the same spatial size as the local texture features; the deformable convolutional layer spatially relocates the sampling point positions in the local texture features based on the two-dimensional coordinate offsets in the offset field and outputs a deformable feature map.
[0042] The offset prediction convolutional layer is a standard 3×3 convolutional layer with a stride of 1 and boundary padding of 1, ensuring that the spatial dimensions of the output feature map are completely consistent with the local texture features of the input. The offset prediction convolutional layer has two output channels, corresponding to the x-axis and y-axis coordinate offsets of each pixel. By learning the positional deviations between the pad edges and the stencil window edges in the local texture features, the offset prediction convolutional layer predicts the corresponding coordinate offset for each pixel. The offset values cover the maximum possible range of local deformation, ensuring a complete representation of the local non-rigid deformation of the printed circuit board and the stencil. The formula for generating the offset field is as follows: in, Let be the two-dimensional coordinate offset of the offset field at coordinates (x, y). This represents the coordinate offset in the x-direction. This represents the coordinate offset in the y-direction. The spatial dimensions of the offset field O are H×W×2, which perfectly matches the spatial dimensions H×W of the local texture features, where H is the height of the original image and W is the width of the original image. Each pixel position in the offset field corresponds to a pixel position in the original image, achieving pixel-by-pixel precise representation of local deformations.
[0043] Deformable convolutional layers offset the regular sampling grid of conventional convolutions based on the 2D coordinate offset in the offset field, generating adaptive sampling positions. They then sample and weight the local texture features of the input, outputting a deformation feature map. Conventional convolutions use a regular rectangular grid with fixed sampling point positions, which cannot adapt to local non-rigid deformations. Deformable convolutions adaptively adjust the position of each sampling point through the offset field, allowing the sampling area to change with the deformation of pads and windows, extracting feature information that matches the deformation. The sampling calculation formula for deformable convolutions is as follows: in, Let N be the pixel value of the deformable feature map output by the deformable convolution at coordinates (x, y), and let N be the number of sampling points of the convolution kernel. In this embodiment, the kernel size is 3×3, so N is set to 9. The weights of the convolution kernel corresponding to the nth sampling point are: The input is local texture features. This represents the regular grid offset of the nth sampling point in a regular convolution. For a 3×3 convolution kernel, The values are {(-1,-1),(-1,0),(-1,1),(0,-1),(0,0),(0,1),(1,-1),(1,0),(1,1)}. This is the coordinate offset corresponding to the nth sampling point, obtained from the value of the offset field O at the corresponding position.
[0044] For sampling locations with floating-point coordinates, bilinear interpolation is used to calculate the corresponding feature values. Bilinear interpolation obtains the feature values for the floating-point coordinate locations by weighted summing of the gray values of the four integer-coordinate pixels surrounding the sampling point. This ensures the differentiability and computational accuracy of the sampling process, enabling parameter learning through backpropagation throughout the deformable convolution process. The deformation feature map output by the deformable convolutional layer fully preserves the feature information of local deformation, providing a data foundation for subsequent global and local feature fusion.
[0045] Please refer to the attached document. Figure 4 In this embodiment, the spatial transformation matrix construction module includes a cross-attention fusion layer; the cross-attention fusion layer converts the global marker point coordinates into a one-dimensional query vector and flattens the offset field into a one-dimensional key vector and a one-dimensional value vector; the cross-attention fusion layer calculates the dot product attention weight of the one-dimensional query vector and the one-dimensional key vector, and multiplies the dot product attention weight with the one-dimensional value vector to obtain the fused feature vector; the spatial transformation matrix construction module inputs the fused feature vector into the multilayer perceptron and outputs a non-rigid spatial transformation matrix.
[0046] The global marker coordinates are represented by a one-dimensional vector of length 2M, where M is the number of global baseline markers. Each marker corresponds to two coordinate values, x and y. This one-dimensional vector is directly used as the one-dimensional query vector Q of the cross-attention fusion layer, with a length of 2M. The offset field has a size of H×W×2. The offset field is flattened in both the spatial and channel dimensions to generate a one-dimensional vector of length 2×H×W. This one-dimensional vector is used as the one-dimensional key vector K and one-dimensional value vector V of the cross-attention fusion layer, both with a length of 2×H×W. The flattening operation preserves the offset information of all pixel positions in the offset field, ensuring that the complete information of local deformations can participate in the feature fusion process.
[0047] The cross-attention fusion layer uses a dot-product attention mechanism to calculate the similarity between the query vector and the key vector, generating attention weights. These attention weights are then used to perform a weighted summation of the value vectors, achieving deep fusion of global marker coordinates and local offset fields. The formula for calculating dot-product attention is as follows: in, The dimension of the key vector K is 2×H×W. The dot product of the query vector Q and the transpose of the key vector K is used to calculate the similarity between the query vector and each key vector. The Softmax function normalizes the result of the dot product operation, generating attention weights with values ranging from 0 to 1. These attention weights characterize the importance of local deformation information at different locations in the offset field to the global marker coordinates. Finally, the attention weights are weighted and summed with the value vector V to obtain the fused feature vector. fusion of feature vectors The length of is the same as the length of the query vector Q, which is 2M.
[0048] Through a cross-attention fusion layer, the global marker point coordinates can adaptively focus on local deformation regions in the offset field that are more correlated with the overall alignment deviation, suppressing noise information in irrelevant regions. This achieves effective fusion of global and local features, avoiding feature redundancy and information interference caused by simple splicing fusion. The fused feature vector simultaneously contains information on the overall alignment deviation and local deformation information of key regions, providing complete feature input for the subsequent construction of non-rigid spatial transformation matrices.
[0049] The fused feature vector is input into a multilayer perceptron, which contains three fully connected layers. A ReLU activation function is applied between adjacent fully connected layers to introduce a non-linear transformation into the network, improving feature fitting ability. The first fully connected layer increases the dimensionality of the fused feature vector, extracting high-dimensional fused features. The second fully connected layer performs a non-linear transformation on the high-dimensional features, learning the mapping relationship between features and deformation parameters. The third fully connected layer reduces the feature dimension to the target dimension, outputting a one-dimensional vector of length 2×10⁻⁶. ,in This represents the number of grid control points, with each grid control point corresponding to the offset in both the x and y directions.
[0050] Furthermore, the non-rigid spatial transformation matrix is composed of the mesh control point deformation matrix; the fused feature vector output by the multilayer perceptron is reshaped into a set of two-dimensional mesh node offset vectors; the spatial transformation matrix construction module uses the coordinates of the global marker point as anchor points and uses the thin plate spline interpolation algorithm to perform spatial interpolation calculation on the set of two-dimensional mesh node offset vectors to generate a mesh control point deformation matrix covering the entire area of the printed circuit board to be calibrated. The dimension of the mesh control point deformation matrix is consistent with the physical mesh division dimension of the printed circuit board to be calibrated.
[0051] The length of the one-dimensional vector output by the multilayer perceptron is 2× Reshape it into A 2×2 two-dimensional matrix, where each row corresponds to a two-dimensional offset vector of a grid node, forming a set of two-dimensional grid node offset vectors. },in Let be the offset vector of the i-th grid node. The distribution of grid nodes is completely consistent with the physical grid division of the printed circuit board. Each grid node corresponds to a control point of a physical grid cell, ensuring that the offset vector corresponds to the physical grid cell.
[0052] The thin-plate spline interpolation algorithm uses the coordinates of globally marked points as anchor points to perform spatial interpolation calculations on the set of mesh node offset vectors. This yields the offset at any spatial location within the entire printed circuit board (PCB) domain, generating a deformation matrix for the mesh control points covering the entire domain. By minimizing the bending energy function, the algorithm generates a smooth spatial deformation field, avoiding abrupt deformation changes during interpolation and ensuring continuous and smooth physical deformation of the steel mesh, preventing localized stress concentrations. The calculation formula for thin-plate spline interpolation is as follows: Where f(p) is the interpolation offset at the spatial location p=(x,y). These are the affine transformation coefficients, used to characterize the overall rigid transformation. Let be the weight coefficient corresponding to the i-th anchor point, c_i be the coordinates of the i-th anchor point (i.e., the coordinates of the global marker point), M be the number of anchor points, and φ(r) be the kernel function of the thin plate spline. The expression of the kernel function is: , where r is the Euclidean distance between two spatial points.
[0053] By solving the system of linear equations, the affine transformation coefficients and weighting coefficients are obtained. Then, the offset corresponding to each grid control point within the entire printed circuit board is calculated, generating the grid control point deformation matrix. Deformation matrix of grid control points The dimension is ,in The number of grid cells in the height direction of the physical grid. The width direction is the number of grids, which is completely consistent with the physical grid division dimension of the printed circuit board to be calibrated. Each element in the matrix corresponds to the x and y direction offset of a grid control point, which is used to characterize the amount of deformation compensation required for the grid area.
[0054] Please refer to the attached document. Figure 5 In this embodiment, the motion control module includes a mesh mapping submodule and a multi-axis driver array. The mesh mapping submodule maps the offset of each two-dimensional mesh node in the mesh control point deformation matrix to the corresponding number of motor pulses. The multi-axis driver array includes several micro servo motors distributed around the steel mesh and in the central area. The multi-axis driver array receives the number of motor pulses and drives the several micro servo motors to perform stretching or lifting actions, so that the steel mesh produces a local physical deformation that matches the mesh control point deformation matrix.
[0055] The mesh mapping submodule pre-stores mapping ratio coefficients between the image coordinate system and the physical coordinate system. These ratios characterize the physical space size corresponding to a single pixel in the image coordinate system, measured in millimeters per pixel. The mapping ratio coefficients are pre-determined during the camera calibration process, which uses a standard calibration board to ensure the accuracy of the mapping relationship. The mesh mapping submodule first converts the pixel offsets in the deformation matrix of the mesh control points into physical space displacements using the mapping ratio coefficients, and then maps these physical displacements to the corresponding motor pulse count. The formula for calculating the pulse count is as follows: in, This represents the number of motor pulses output, and `round` is the rounding function. This represents the physical displacement corresponding to the mesh node offset, in millimeters. This refers to the step distance of the motor, which is the physical displacement of the motor output shaft corresponding to a single pulse, measured in millimeters per pulse. For stretching actions in the x and y directions, the sign of the pulse count corresponds to the direction of motor rotation, thus controlling the direction of the stretching action; for lifting actions in the z direction, the sign of the pulse count corresponds to the upward and downward direction of the lifting action.
[0056] The micro servo motors in the multi-axis driver array are divided into edge drive motors and center drive motors. The edge drive motors are distributed along the four sides and four corners of the steel mesh, and are fixedly connected to the edges of the steel mesh via tension clamps. They are used to drive the steel mesh to produce in-plane tensile deformation, corresponding to offset compensation in the x and y directions. The center drive motors are distributed in the central area of the steel mesh, and contact the lower surface of the steel mesh via a lifting rod. They are used to drive the steel mesh to produce vertical warping deformation, corresponding to offset compensation in the z direction. Each micro servo motor corresponds to one or more adjacent mesh cells. The motor's action directly acts on the steel mesh in the corresponding mesh cell area, causing that area to produce physical deformation matching the deformation matrix of the mesh control points. Each motor in the multi-axis driver array independently receives drive signals and independently executes actions, achieving independent compensation of the meshed, regionalized areas.
[0057] Table 3. Mapping Relationship between Deformation Matrix of Grid Control Points and Motor Action
[0058] Table 3 clarifies the correspondence between the offset vector in the deformation matrix of the grid control points and the corresponding motor action type and pulse mapping logic. It defines in detail how the offset of the grid nodes at different positions is converted into the corresponding motor drive signal, enabling those skilled in the art to clearly understand the conversion process from deformation matrix to mechanical action and ensuring the full disclosure of the technical solution.
[0059] In this embodiment, an offset field matching local texture features is generated by an offset prediction convolutional layer. Deformable convolution is used to achieve adaptive feature extraction of local deformation. A cross-attention fusion layer is used to achieve deep fusion of global marker point coordinates and local offset field. A thin plate spline interpolation algorithm is combined to generate a global grid control point deformation matrix. Finally, the deformation matrix is converted into corresponding motor actions through a grid mapping submodule and a multi-axis driver array, so that the physical deformation of the steel mesh is accurately matched with the local non-rigid deformation of the printed circuit board.
[0060] Please refer to the attached document. Figure 6In a preferred embodiment, after the multi-axis driver array completes the stretching or lifting action, the image acquisition module acquires a second image of the alignment area between the steel mesh and the printed circuit board to be calibrated; the dual-branch feature extraction module receives the re-inspection image and extracts the coordinates of the global re-inspection marker points and the local re-inspection texture features corresponding to the re-inspection image; the deformable convolution processing module and the spatial transformation matrix construction module output the non-rigid spatial transformation matrix for re-inspection based on the local re-inspection texture features and the coordinates of the global re-inspection marker points.
[0061] After the multi-axis driver array completes the execution of all motor movements, the stencil undergoes its first compensation calibration. At this point, the image acquisition module, under identical lighting conditions, camera parameters, and field of view as the original image acquisition, acquires a second image of the alignment area between the stencil and the printed circuit board to be calibrated. This ensures the acquisition conditions of the second image are consistent with the original image, avoiding feature extraction errors caused by differences in acquisition conditions. The second image contains graphic information of the stencil window area and the printed circuit board pad area after compensation calibration, as well as the position information of the reference markers, used to characterize the actual alignment effect after the first compensation calibration.
[0062] The dual-branch feature extraction module receives the re-examined image and performs the same two-way parallel feature extraction operation as the original image. The global branch network sequentially performs three convolution operations with a stride of 2, a global average pooling operation, and a fully connected layer regression on the re-examined image to generate global re-examined marker coordinates. The local branch network extracts the re-examined local texture features through a residual network containing dilated convolutions. The dimensions and structure of the re-examined local texture features are completely consistent with those of the original local texture features. The deformable convolution processing module receives the re-examined local texture features and generates a re-examined offset field through an offset prediction convolutional layer. The deformable convolutional layer outputs the re-examined deformable feature map. The spatial transformation matrix construction module jointly encodes the global re-examined marker coordinates and the re-examined offset field through a cross-attention fusion layer. It inputs the data into a multilayer perceptron and a thin-plate spline interpolation algorithm to construct the re-examined non-rigid spatial transformation matrix. The dimensions and structure of the re-examined non-rigid spatial transformation matrix are completely consistent with those of the first generated non-rigid spatial transformation matrix.
[0063] In this embodiment, the motion control module includes a residual calculation submodule and a pulse superposition submodule. The residual calculation submodule performs element-wise subtraction between the re-examined non-rigid spatial transformation matrix and the non-rigid spatial transformation matrix to generate a residual deformation matrix. When the maximum absolute value in the residual deformation matrix is greater than a preset pixel threshold, the pulse superposition submodule maps the residual deformation matrix into a number of compensation pulses and superimposes the number of compensation pulses into the number of motor pulses and resends it to the multi-axis driver array.
[0064] During the generation of the residual deformation matrix, the residual calculation submodule performs an element-wise subtraction operation between the verified non-rigid spatial transformation matrix and the first generated non-rigid spatial transformation matrix. It subtracts the x and y offsets of each grid control point in the matrix to obtain the remaining deformation deviation for each grid control point. The formula for calculating the residual deformation matrix is as follows: in, The residual deformation matrix is... To re-examine the transformation matrix in a non-rigid space, The first non-rigid spatial transformation matrix is generated. The dimensions and structure of the residual deformation matrix are completely consistent with the original transformation matrix. Each element in the matrix corresponds to the remaining deformation deviation of the corresponding grid control point, which is used to characterize the alignment deviation that still exists after the first compensation calibration.
[0065] The preset pixel threshold is the pixel value corresponding to the maximum allowable alignment deviation set in advance. The value of the preset pixel threshold is matched with the process accuracy requirements of solder paste printing. When the maximum absolute value in the residual deformation matrix is greater than the preset pixel threshold, it indicates that there is still an alignment deviation exceeding the allowable range after the first compensation calibration, and a second compensation calibration needs to be performed; when the maximum absolute value in the residual deformation matrix is less than or equal to the preset pixel threshold, it indicates that the alignment deviation has fallen within the allowable range, and the calibration process is complete.
[0066] When secondary compensation calibration is required, the pulse superposition submodule converts the remaining deformation deviation in the residual deformation matrix into the remaining displacement in physical space using the same mapping logic as the original offset. This is then converted into the corresponding number of compensation pulses. The mapping logic for the compensation pulses is identical to that of the original motor pulses, ensuring the accuracy of the compensation action. The pulse superposition submodule then superimposes the compensation pulses onto the original motor pulse count previously sent to the corresponding motor, generating an updated motor pulse count, which is resent to the multi-axis driver array to drive the corresponding motor to perform supplementary mechanical actions, completing the secondary compensation calibration. After the secondary compensation calibration is completed, the image acquisition module can acquire a re-inspection image again, repeating the above closed-loop process until the alignment deviation falls within the allowable range, forming a complete closed-loop calibration control.
[0067] Furthermore, before outputting the re-examination image, the image acquisition module performs frequency domain filtering preprocessing on the re-examination image; the image acquisition module performs a two-dimensional Fourier transform on the re-examination image to generate a spectrum, and masks the high-frequency noise band with the same operating frequency as the multi-axis driver array in the spectrum, and performs a two-dimensional inverse Fourier transform on the masked spectrum to generate a filtered re-examination image; the dual-branch feature extraction module receives the filtered re-examination image as input to perform subsequent coordinate extraction and feature extraction operations.
[0068] The miniature servo motors in the multi-axis driver array generate electromagnetic interference (EMI) at a fixed frequency during operation. This EMI couples into the signal link of the image acquisition module, producing periodic high-frequency noise in the re-examined image at the same frequency as the motor's operation. This noise affects the accuracy and stability of subsequent feature extraction, leading to errors in coordinate regression and feature extraction. Frequency domain filtering preprocessing uses a two-dimensional Fourier transform to convert the re-examined image to the frequency domain, shielding the corresponding frequency noise band, and then converts it back to the spatial domain to remove the periodic high-frequency noise generated by the motor operation, thus improving the quality of the re-examined image.
[0069] The two-dimensional Fourier transform converts the re-examined image in the spatial domain into a spectrum in the frequency domain. The calculation formula is as follows: Where f(x,y) is the gray value of the input re-examined image at coordinates (x,y) in the spatial domain, H and W are the height and width of the re-examined image, respectively, and F(u,v) is the spectral value at coordinates (u,v) in the frequency domain, where u is the x-axis coordinate in the frequency domain, v is the y-axis coordinate in the frequency domain, and j is the imaginary unit. The two-dimensional Fourier transform converts the spatial domain re-examined image into a frequency domain spectrogram. The spectrogram contains different frequency components of the re-examined image; low-frequency components correspond to the overall contour information of the image, while high-frequency components correspond to the edge details and noise information of the image.
[0070] The image acquisition module pre-stores the frequency domain coordinate range corresponding to the operating frequencies of each motor in the multi-axis driver array. This coordinate range is determined through pre-testing noise. During the test, images of the motors operating are acquired, and the frequency band corresponding to the noise is analyzed using Fourier transform. In the spectrum diagram, the image acquisition module sets the spectral values within the coordinate range corresponding to the motor operating frequency to zero, thus shielding the corresponding high-frequency noise band. For random high-frequency noise, a Gaussian low-pass filter is used for attenuation, preserving effective low-frequency image information while attenuating high-frequency random noise.
[0071] The spectrum after masking the noise band is transformed back to the spatial domain using a two-dimensional inverse Fourier transform to generate a filtered re-examination image. The calculation formula for the two-dimensional inverse Fourier transform is as follows: Where F'(u,v) is the spectrum after the noise band is shielded, and f'(x,y) is the gray value of the filtered re-examination image generated after the inverse transform at the spatial domain coordinates (x,y). The two-dimensional inverse Fourier transform converts the noise-shielded frequency domain signal back to the spatial domain, generating the filtered re-examination image. The filtered re-examination image removes the periodic high-frequency noise generated by the motor operation, while retaining the effective graphic information of the pads, windows, and reference markers, thus improving the image quality.
[0072] The dual-branch feature extraction module receives the filtered re-examination image as input and performs subsequent global re-examination marker coordinate extraction and re-examination local texture feature extraction operations. This avoids high-frequency noise interference in the feature extraction process, improves the accuracy and stability of coordinate regression and feature extraction, and ensures the reliability of the closed-loop feedback process.
[0073] Table 4. Correspondence between frequency band shielding rules and processing effects in frequency domain filtering preprocessing
[0074] Table 4 details the sources, corresponding frequencies, shielding rules, and processing effects of different types of noise during the frequency domain filtering preprocessing process. It clarifies the specific operation methods of frequency band shielding and its impact on the subsequent feature extraction process, enabling those skilled in the art to fully reproduce the complete process of frequency domain filtering preprocessing and ensuring the full disclosure of the technical solution.
[0075] In this embodiment, a non-rigid spatial transformation matrix for re-inspection is generated by acquiring re-inspection images twice, the residual deformation matrix is calculated, and secondary compensation calibration is performed, forming a complete closed-loop control process. This suppresses the execution error of a single mechanical action and improves the calibration accuracy. By introducing frequency domain filtering preprocessing before re-inspection image processing, high-frequency noise generated by motor operation is shielded, improving the stability of feature extraction during closed-loop feedback and ensuring the reliability of the calibration process.
Claims
1. An automatic calibration system for solder paste printing machines based on image recognition, characterized in that, It includes an image acquisition module, a dual-branch feature extraction module, a deformable convolution processing module, a spatial transformation matrix construction module, and a motion control module; The image acquisition module is used to acquire the original images of the printed circuit board and stencil to be calibrated; The dual-branch feature extraction module is used to extract global marker point coordinates after downsampling the original image, and to extract local texture features of the pad region at the original resolution of the original image. The deformable convolution processing module is used to input the local texture features into the deformable convolution layer to generate an offset field. The spatial transformation matrix construction module is used to jointly encode the global marker point coordinates and the offset field to construct a non-rigid spatial transformation matrix containing local deformation parameters. The motion control module is used to drive the motor to perform a gridded regional compensation calibration system for the steel mesh based on the non-rigid spatial transformation matrix.
2. The automatic calibration system for solder paste printers based on image recognition according to claim 1, characterized in that, The dual-branch feature extraction module includes a global branch network and a local branch network; The global branch network performs three convolution operations with a stride of two and one global average pooling operation on the original image in sequence, outputting a global feature vector, and inputting the global feature vector into a fully connected layer to regress and generate the coordinates of the global marker points; The local branch network preserves the spatial resolution of the original image and extracts local texture features of the pad region through a residual network containing dilated convolutions. The local texture features are multi-channel feature maps containing the gradient direction of the pad edge and the texture density.
3. The automatic calibration system for solder paste printing machines based on image recognition according to claim 2, characterized in that, The local branch network includes a first residual block and a second residual block connected in series. The first residual block contains a first dilated convolutional layer and a second dilated convolutional layer connected in parallel. The dilation rate of the first dilated convolutional layer is set to 1, and the dilation rate of the second dilated convolutional layer is set to 2. The local branch network concatenates the first local feature map output by the first dilated convolutional layer and the second local feature map output by the second dilated convolutional layer in the channel dimension. The concatenated feature map is then passed through a batch normalization layer and input into a 1x3 convolutional layer for dimensionality reduction. The output of the dimensionality reduction operation is then passed as the output of the first residual block to the second residual block, and finally the second residual block outputs the local texture features.
4. The automatic calibration system for solder paste printers based on image recognition according to claim 1, characterized in that, The deformable convolution processing module includes an offset prediction convolutional layer; The offset prediction convolutional layer receives the local texture features and outputs a two-dimensional coordinate offset for each pad pixel in the local texture features. The deformable convolution processing module combines the two-dimensional coordinate offsets corresponding to all pad pixels into an offset field that is consistent with the size of the local texture feature space. The deformable convolutional layer spatially relocates the sampling point positions in the local texture features based on the two-dimensional coordinate offset in the offset field, and outputs a deformation feature map.
5. The automatic calibration system for solder paste printing machines based on image recognition according to claim 4, characterized in that, The spatial transformation matrix construction module includes a cross-attention fusion layer; The cross-attention fusion layer converts the global marker point coordinates into a one-dimensional query vector and flattens the offset field into a one-dimensional key vector and a one-dimensional value vector. The cross-attention fusion layer calculates the dot product attention weight of the one-dimensional query vector and the one-dimensional key vector, and multiplies the dot product attention weight by the one-dimensional value vector to obtain the fused feature vector. The spatial transformation matrix construction module inputs the fused feature vector into the multilayer perceptron and outputs the non-rigid spatial transformation matrix.
6. The automatic calibration system for solder paste printing machines based on image recognition according to claim 5, characterized in that, The non-rigid spatial transformation matrix is composed of the mesh control point deformation matrix; The fused feature vector output by the multilayer perceptron is reshaped into a set of two-dimensional grid node offset vectors; The spatial transformation matrix construction module uses the coordinates of the global marker points as anchor points and performs spatial interpolation calculations on the set of offset vectors of the two-dimensional grid nodes using a thin plate spline interpolation algorithm to generate the grid control point deformation matrix covering the entire area of the printed circuit board to be calibrated. The dimension of the grid control point deformation matrix is consistent with the physical grid division dimension of the printed circuit board to be calibrated.
7. The automatic calibration system for solder paste printers based on image recognition according to claim 6, characterized in that, The motion control module includes a mesh mapping submodule and a multi-axis driver array; The mesh mapping submodule maps the offset of each two-dimensional mesh node in the mesh control point deformation matrix to the corresponding number of motor pulses. The multi-axis driver array includes several micro servo motors distributed around the steel mesh and in the central area. The multi-axis driver array receives the number of motor pulses and drives the several micro servo motors to perform stretching or lifting actions, so that the steel mesh produces local physical deformation that matches the deformation matrix of the mesh control points.
8. The automatic calibration system for solder paste printers based on image recognition according to claim 7, characterized in that, After the multi-axis driver array completes the stretching or lifting action, the image acquisition module acquires a second inspection image of the alignment area between the steel mesh and the printed circuit board to be calibrated. The dual-branch feature extraction module receives the re-examination image and extracts the global re-examination marker coordinates and re-examination local texture features corresponding to the re-examination image. The deformable convolution processing module and the spatial transformation matrix construction module output a non-rigid spatial transformation matrix for re-examination based on the re-examination local texture features and the coordinates of the global re-examination marker points.
9. The automatic calibration system for solder paste printing machines based on image recognition according to claim 8, characterized in that, The motion control module includes a residual calculation submodule and a pulse superposition submodule; The residual calculation submodule performs an element-wise subtraction operation between the re-examined non-rigid space transformation matrix and the non-rigid space transformation matrix to generate a residual deformation matrix. When the maximum absolute value in the residual deformation matrix is greater than a preset pixel threshold, the pulse superposition submodule maps the residual deformation matrix into a number of compensation pulses, and superimposes the number of compensation pulses into the number of motor pulses and resends it to the multi-axis driver array.
10. The automatic calibration system for solder paste printers based on image recognition according to claim 9, characterized in that, Before outputting the re-examination image, the image acquisition module performs frequency domain filtering preprocessing on the re-examination image; The image acquisition module performs a two-dimensional Fourier transform on the re-examination image to generate a spectrum. In the spectrum, high-frequency noise bands with the same operating frequency as the multi-axis driver array are shielded. The shielded spectrum is then subjected to a two-dimensional inverse Fourier transform to generate a filtered re-examination image. The dual-branch feature extraction module receives the filtered re-examination image as input and performs subsequent coordinate extraction and feature extraction operations.