An online defect detection method and device for screen-printed products

By extracting subpixel-level microgroove features through the SBIH index and angular disorder, and combining them with a convolutional neural network, the problem of identifying edge ink fading defects in FPC silver paste screen printing was solved, improving the accuracy and robustness of the detection system.

CN120931592BActive Publication Date: 2026-03-13JIANGSU GEQU INTELLIGENT TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing FPC silver paste screen printing defect detection systems have difficulty identifying subpixel-level edge ink fading defects, especially in high-speed screen printing processes. Traditional image algorithms have high false detection and false negative rates and lack a modeling method for the continuity of the silver paste edge orientation field and subpixel-level perturbations.

Method used

The SBIH index and angular disorder are used to extract subpixel-level microgroove features. Combined with convolutional neural networks for deep modeling, the model is trained by generating feature images to identify ink removal defects.

Benefits of technology

It significantly improves the sensitivity and generalization ability to minor structural defects, reduces the false detection rate and false negative rate, and achieves efficient identification of edge ink fading defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120931592B_ABST
    Figure CN120931592B_ABST
Patent Text Reader

Abstract

This invention provides an online defect detection method and apparatus for screen-printed products, relating to the field of image processing technology. The invention acquires online inspection images of screen-printed products, converts them to grayscale images, and extracts edge pixels. These edge pixels are analyzed to obtain features reflecting ink fading defects. Based on these features, the online inspection image is reconstructed to obtain a feature image. Using ink fading defects as labels, a convolutional neural network is trained using historical feature images. The trained convolutional neural network is then used to identify whether ink fading defects appear in the feature image. This invention transforms sub-pixel-level edge retraction and groove structures, which are difficult to recognize by traditional algorithms, into learnable image depth features with numerical abrupt changes. Based on these features, the image is reconstructed, and a convolutional neural network under the feature image is constructed, significantly improving the model's sensitivity and generalization ability to minor structural defects.
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, specifically to an online defect detection method and apparatus for screen-printed products. Background Technology

[0002] In the manufacturing of flexible printed circuits (FPCs), the screen printing of conductive silver paste is a crucial process for forming conductive patterns, directly affecting electrical performance and dimensional accuracy. The quality of the silver paste boundary formation significantly impacts subsequent mounting, soldering, and resistance stability. However, in actual high-speed screen printing processes, a defect called "edge ink fading" often occurs. This means that the conductive silver paste retracts, separates, or undergoes localized trench-like fractures near the pattern boundary, forming an extremely narrow but conductive aberration. These structural disturbances are extremely subtle, often located within a few pixels of the outer edge of the pattern's normal direction, making them difficult to detect with the naked eye and challenging for stable detection by traditional image processing algorithms.

[0003] Existing FPC silver paste screen printing defect detection systems mostly rely on image features such as edge contour contrast or edge integrity for judgment. However, in actual production, ink fading defects often do not cause obvious grayscale texture anomalies, especially in areas with relatively smooth screen printing boundaries or repetitive structures, where conventional methods have high false positive and false negative rates. More importantly, there is currently a lack of modeling methods for the continuity of the silver paste edge orientation field and sub-pixel level perturbations, making it difficult to convert them into depth features for intelligent defect recognition.

[0004] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] The purpose of this invention is to provide an online defect detection method and apparatus for screen-printed products to solve the problems mentioned in the background art.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] An online defect detection method for screen-printed products, comprising the following steps:

[0008] Step 1: Obtain the online inspection image of the screen-printed product to be analyzed, convert it to a grayscale image, and then extract the edge pixels of the screen print;

[0009] Step 2: Analyze the pixels in the normal direction of the edge pixels to generate the SBIH index, which reflects whether sub-pixel-level micro-grooves appear around the edge pixels. Select each edge pixel as the center and analyze the orientation disorder of the edge pixels in each window to obtain the angular disorder of each edge pixel.

[0010] Step 3: Obtain historical online detection images of multiple known ink removal defects, calculate the SBIH index and angular disorder of the edge pixels of each historical online detection image, and reconstruct each historical online detection image into a historical feature image based on the SBIH index and angular disorder.

[0011] Step 4: Using ink removal defects as labels, train a convolutional neural network using historical feature images;

[0012] Step 5: Reconstruct the online detection image of the screen-printed product to be analyzed into a feature image, and use the trained convolutional neural network to identify whether the screen-printed product to be analyzed has ink fading defects.

[0013] Furthermore, the Sobel operator is used to calculate the horizontal and vertical gradient values ​​of each pixel in the online detection image, and a first gradient magnitude data set including the gradient magnitude data of all pixels is generated. The error rate between the gradient magnitude of the current pixel and the gradient magnitude of the adjacent pixels is determined. If the error rate is less than the set error rate threshold, the current pixel is determined to be an edge pixel of the silkscreen.

[0014] Furthermore, from all the pixels through which the edge pixel's normal passes, the 10 pixels closest to the edge pixel are selected as reference pixels. The second derivative of grayscale value in the normal direction of each reference pixel is calculated, which is used to reflect the brightness backlash phenomenon of sub-pixel level micro-grooves, and the maximum value is used as the SBIH index of the edge pixel.

[0015] Furthermore, the orientation angle of each edge pixel within the window is calculated based on the arctangent values ​​of the horizontal and vertical gradient values. The global azimuth angle of the window is obtained by performing a weighted average operation on the orientation angle of each pixel within the window using Gaussian weights. The difference between the orientation angle of each edge pixel within the window and the global azimuth angle is calculated and is called the in-window angle offset value. The variance of the in-window angle offset value is called the angle disorder.

[0016] Furthermore, the ink removal defect includes both ink removal defects and non-ink removal defects.

[0017] Furthermore, the logic for reconstructing historical online detection images into historical feature images is as follows: Mark the position information (x, y) and attribute information of each pixel in the historical online detection images. S is the SBIH index, and P is the angular misalignment; if the pixel is not an edge pixel, then the values ​​of S and P are set to 0.

[0018] The historical feature image is a dual-channel image. The first channel is the first historical feature image reconstructed using S, and the second channel is the second historical feature image reconstructed using P. Specifically, the S and P values ​​are normalized by minimax, and the normalized S and P values ​​are mapped to the grayscale space [0, 255] to obtain the corresponding grayscale values. The first historical feature image and the second historical feature image are obtained based on the corresponding grayscale values.

[0019] Furthermore, the VGG16 convolutional neural network was selected, and the Binary CrossEntropy loss function was chosen.

[0020] The present invention further provides an online defect detection device for screen-printed products, the device being used to perform the above-described online defect detection method for screen-printed products, specifically including:

[0021] The edge recognition module is used to acquire online detection images of the screen-printed products to be analyzed, convert them into grayscale images, and then extract the edge pixels of the screen print.

[0022] The feature analysis module is used to analyze pixels in the normal direction of edge pixels, generate the SBIH index which reflects whether sub-pixel level micro-grooves appear around the edge pixels, select each edge pixel as the center of the window, analyze the orientation disorder of the edge pixels in each window, and obtain the angular disorder of each edge pixel.

[0023] The image processing module is used to acquire historical online detection images of multiple known ink removal defects, calculate the SBIH index and angular disorder of the edge pixels of each historical online detection image, and reconstruct each historical online detection image into a historical feature image based on the SBIH index and angular disorder.

[0024] The model training module is used to train a convolutional neural network using historical feature images, with ink removal defects as labels.

[0025] The defect detection module is used to reconstruct the online inspection image of the screen-printed product to be analyzed into a feature image, and use a trained convolutional neural network to identify whether the screen-printed product to be analyzed has ink fading defects.

[0026] Compared with the prior art, the beneficial effects of the present invention are:

[0027] This invention addresses the common edge ink fading defects in FPC conductive silver paste screen printing by proposing a depth modeling method that combines boundary normal brightness structure changes with orientation field phase perturbations. By extracting the SBIH exponent and angular misalignment, sub-pixel-level edge retraction and groove structures, which are difficult to recognize by traditional algorithms, are transformed into learnable image depth features with numerical abrupt changes. The image is then reconstructed based on these features to obtain a feature image. During the model training phase, a convolutional neural network based on the feature image is constructed using historical defect-annotated images, significantly improving the model's sensitivity to and generalization ability for minor structural defects.

[0028] This invention does not rely on overall brightness changes, but rather on the brightness second derivative characteristics and directional field perturbation energy in the edge normal direction, enabling the detection system to maintain high-speed response while possessing a deep understanding of "boundary continuity anomalies". Attached Figure Description

[0029] Figure 1 This is a schematic diagram of the overall method flow of the present invention;

[0030] Figure 2 This is a comparison chart of the recognition performance of the convolutional neural network before and after the improvement of this invention;

[0031] Figure 3 This is a schematic diagram of the overall device structure of the present invention. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.

[0033] It should be noted that, unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0034] Example:

[0035] Please see Figure 1 The present invention provides a technical solution:

[0036] An online defect detection method for screen-printed products, comprising the following steps:

[0037] Step 1: Obtain the online inspection image of the screen-printed product to be analyzed, convert it to a grayscale image, and then extract the edge pixels of the screen print;

[0038] For ease of processing, the scale of the line detection images is uniformly scaled to 224*224.

[0039] The Sobel operator is used to calculate the horizontal and vertical gradient values ​​of each pixel in the online detection image, and a first gradient magnitude data set including the gradient magnitude data of all pixels is generated. The error rate between the gradient magnitude of the current pixel and the gradient magnitude of the adjacent pixels is determined. If the error rate is less than the set error rate threshold, the current pixel is determined to be an edge pixel of the silkscreen.

[0040] The error rate threshold is determined by experts in the field based on specific circumstances. The error rate of online inspection images of historical screen-printed products is calculated using the following method. Experts in the field are then invited to verify the error rate of online inspection images of historical screen-printed products in order to determine the error rate threshold. This is existing technology and will not be elaborated here.

[0041] To calculate the horizontal and vertical gradient values ​​for each pixel, the grayscale value of the pixel and its neighboring pixels are multiplied by the horizontal gradient template of the Sobel operator, and the results of all multiplications are summed to obtain the horizontal gradient value of the pixel. Similarly, the grayscale value of the pixel and its neighboring pixels are multiplied by the vertical gradient template of the Sobel operator, and the results of all multiplications are summed to obtain the vertical gradient value of the pixel. The formulas used to calculate the horizontal and vertical gradient values ​​are as follows:

[0042]

[0043] Where S(l,m) and G(l,m) are the horizontal and vertical gradient values ​​of the pixel in the l-th row and m-th column, respectively; H(l,m) is the gray value of the pixel in the l-th row and m-th column, and l and m are the row and column indices of the pixel in the online detection image;

[0044] The formula used to generate the gradient magnitude of a pixel is:

[0045]

[0046] Where T(l,m) is the gradient magnitude of the pixel in the l-th row and m-th column.

[0047] The formula used to calculate the error rate between the gradient magnitude of the current pixel and the gradient magnitudes of its neighboring pixels is as follows:

[0048]

[0049] in, E(l,m) represents the average gradient magnitude of all pixels adjacent to the pixel in row l and column m, and E(l,m) represents the error rate between the gradient magnitude of the current pixel and the gradient magnitudes of its neighboring pixels.

[0050] Step 2: Analyze the pixels in the normal direction of the edge pixels to generate the SBIH index, which reflects whether sub-pixel-level micro-grooves appear around the edge pixels. Select each edge pixel as the center and analyze the orientation disorder of the edge pixels in each window to obtain the angular disorder of each edge pixel.

[0051] From all the pixels through which the edge pixel's normal passes, select the 10 pixels closest to the edge pixel as reference pixels, calculate the grayscale second derivative value in the direction of the normal of each reference pixel, which is used to reflect the brightness backlash phenomenon of the sub-pixel level micro-groove, and take the maximum value as the SBIH index of the edge pixel.

[0052] In FPC screen printing, "ink fading" often doesn't manifest as a clear boundary break. Instead, it involves a slight retraction or incomplete transfer of ink at the edge towards the non-screening direction, resulting in a structural outline of "gradual brightness change—rapid rebound—gradual change again" around the normal direction. This phenomenon appears in grayscale space as an "S-shaped" or "hooked" brightness curve, with its second derivative reaching a maximum at the groove edge. Therefore, a larger SBIH value indicates a stronger and more abrupt brightness dip in the normal direction, likely corresponding to sub-pixel-level localized ink fading.

[0053] One specific calculation method includes: determining the unit vector of the normal to the analyzed edge pixels. The unit vectors of the normal line are used to construct the standard matrix of the normal line, n = |n x ,n y The calculation formula is:

[0054]

[0055] S = max{S k |k∈[1,10]}

[0056] Where S is the SBIH index, S k Let I be the second grayscale derivative of the k-th reference pixel along the normal direction of the corresponding edge pixel. kLet n be the grayscale value of the k-th reference pixel, where k is the index of the reference pixel, and n is the grayscale value of the reference pixel. T It is the transpose of n.

[0057] The orientation angle of each edge pixel within the window is calculated based on the arctangent values ​​of the horizontal and vertical gradients. The global azimuth angle of the window is obtained by weighted averaging of the orientation angles of each pixel within the window using Gaussian weights. The difference between the orientation angle of each edge pixel within the window and the global azimuth angle is called the in-window angle offset value. The variance of the in-window angle offset value is called the angle disorder.

[0058] The Gaussian weights are represented as follows:

[0059]

[0060] Among them, w i Let (x0, y0) be the Gaussian weight of the i-th edge pixel within the window, and (x0, y0) be the coordinates of the edge pixel at the center of the window. i y i Let be the coordinates of the i-th edge pixel within the window. in, Let θ be the global azimuth angle, i be the index of the edge pixel within the window, N be the number of edge pixels within the window, the distance between the edge pixel within the window and the edge pixel at the center of the window is called the center distance, σ be the standard deviation of the center distance, and θ be the global azimuth angle. i Let be the orientation angle of the i-th edge pixel within the window.

[0061] At the point where ink fading occurs, ink retraction causes the boundary to lose its smooth continuity, resulting in abrupt changes in orientation angle or accumulation of local disturbances, leading to a discontinuity in the orientation field. These disturbances manifest as: a "twisting" of the local boundary orientation relative to the overall trend of its neighborhood; directional jumps in some pixels, even reverse fluctuations; and overall orientation distortion, creating a spatial "directional discontinuity" that cannot be described by a single dominant direction. Angular distortion reflects whether the continuity of the orientation field at the screen printing edge is disrupted in a local area. It is a sensitive measure of edge structural disturbances caused by ink fading defects and can be used to accurately identify edge microstructure collapse. A larger value indicates a more discontinuous and unstable edge, and a more severe local orientation distortion, meaning the current edge pixel's orientation differs greatly from the average direction of its neighborhood, and this difference changes drastically. This is precisely the core characteristic of "edge orientation flow interruption" and "orientation collapse" most commonly exhibited by ink fading defects.

[0062] Step 3: Obtain historical online detection images of multiple known ink removal defects, calculate the SBIH index and angular disorder of the edge pixels of each historical online detection image, and reconstruct each historical online detection image into a historical feature image based on the SBIH index and angular disorder.

[0063] The definition of ink fading defects includes both actual ink fading defects and non-ink fading defects. The logic for reconstructing historical online detection images into historical feature images is as follows: Mark the position information (x, y) and attribute information of each pixel in the historical online detection images. S is the SBIH index, and P is the angular misalignment; if the pixel is not an edge pixel, then the values ​​of S and P are set to 0.

[0064] The historical feature image is a dual-channel image. The first channel is the first historical feature image reconstructed using S, and the second channel is the second historical feature image reconstructed using P. Specifically, the S and P values ​​are normalized by minimax, and the normalized S and P values ​​are mapped to the grayscale space [0, 255] to obtain the corresponding grayscale values. The first historical feature image and the second historical feature image are obtained based on the corresponding grayscale values.

[0065] Specifically, the process is as follows: First, create a blank grayscale image with the same scale as the historical online detection images. Then, perform maximum and minimum normalization on the S value of each pixel in the historical online detection images and multiply it by 255 to obtain the corresponding grayscale value. Finally, assign the corresponding grayscale value to the pixels in the blank grayscale image one by one according to the position to obtain the first historical feature image.

[0066] First, create a blank grayscale image with the same scale as the historical online detection images. Then, perform max-min normalization on the P value of each pixel in the historical online detection images and multiply it by 255 to obtain the corresponding grayscale value. Finally, assign the corresponding grayscale value to the pixels in the blank grayscale image one by one according to the position to obtain the second historical feature image.

[0067] It should be noted that a blank grayscale image can be constructed using the PIL library in Python. The grayscale value of any pixel in a blank grayscale image is initialized to 0.

[0068] By reconstructing the SBIH index (S) and angular disorder (P) into dual-channel feature images, this method transforms sub-pixel-level edge retraction and orientation field perturbations, which are originally difficult to observe directly, into visualized grayscale features. The S channel amplifies the second-order luminance derivative features of the microgrooves through normalization, making subtle ink fading defects exhibit obvious grayscale contrast; the P channel quantifies the degree of edge orientation disorder, highlighting geometric anomalies. This reconstruction method not only preserves the precise spatial location of defects but also enhances the defect features with different physical properties through dual-channel separation, enabling convolutional neural networks to more effectively extract deep patterns of edge ink fading.

[0069] Step 4: Using ink removal defects as labels, train a convolutional neural network using historical feature images;

[0070] Furthermore, the VGG16 convolutional neural network was selected, and the Binary CrossEntropy loss function was chosen.

[0071] Step 3 processes the historical online detection images to obtain historical feature images. 80% of these historical feature images are used as the training set for training, and 20% are used as the validation set for validation.

[0072] The convolutional neural network selected is the VGG16 convolutional neural network. Historical feature images are used as input, and the ink fading defect is used as the label for training the convolutional neural network, which can be done using existing techniques. Specifically, it includes: an input layer, two convolutional layers with 64 3x3 kernels each, one 2x2 max pooling layer, two convolutional layers with 128 3x3 kernels each, one 2x2 max pooling layer, three convolutional layers with 256 3x3 kernels each, one 2x2 max pooling layer, three convolutional layers with 512 3x3 kernels each, one 2x2 max pooling layer, three convolutional layers with 512 3x3 kernels each, one 2x2 max pooling layer, one flattening layer, and three fully connected layers (the last fully connected layer is the output layer), finally connected to a Softmax function; the technical configuration is shown in Table 1.

[0073] During training, the optimizer uses Adam to achieve adaptive gradient updates, with an initial learning rate set to 1e-4. Combined with the ReduceLROnPlateau strategy, the learning rate is automatically reduced to 0.1 times its original value if the validation set loss does not decrease within five consecutive epochs, thus avoiding gradient oscillations caused by an excessively large learning rate. The network weights are initialized using the He method, ensuring a stable activation distribution in deep convolutional structures from the early stages of training, enhancing feature convergence efficiency. To address the issues of sparse and blurred boundaries in ink removal defect regions, a weighted Binary Cross Entropy loss function is used, assigning higher weights to positive classes (i.e., defect regions) to enhance the model's sensitivity to local structural perturbations. Considering the limited number of training samples and the low proportion of defect samples, a Dropout ratio of 0.5 is set in the fully connected layers, and an L2 regularization term (weight decay coefficient 1e-5) is introduced into the convolutional layer weights to effectively suppress overfitting and ensure the network still possesses strong defect recognition capabilities for unseen patterns. The synergistic effect of the above optimization strategies enables the VGG16 model to stably and efficiently learn ink removal defect patterns under structural feature input, and to accurately identify sub-pixel level edge perturbations.

[0074] It should be noted that the "16" in VGG16 convolutional neural network strictly refers to the number of layers with trainable weights (parameters). Input layers and pooling layers do not involve weight parameter calculations, and although they are called layers, they are not included in the layer count.

[0075] Table 1: VGG16 Convolutional Neural Network Technology Configuration Table

[0076]

[0077] Step 5: Reconstruct the online detection image of the screen-printed product to be analyzed into a feature image, and use the trained convolutional neural network to identify whether the screen-printed product to be analyzed has ink fading defects.

[0078] Please see Figure 2 , Figure 2 This is a comparison chart of the accuracy of a conventional convolutional neural network and the improved convolutional neural network of this embodiment; the conventional convolutional neural network is a convolutional neural network obtained by directly inputting the line detection image into the convolutional neural network for training.

[0079] Table 2 shows the accuracy of online detection images of multiple sets of screen-printed products in conventional convolutional neural networks and the improved convolutional neural network of this embodiment;

[0080] Table 2. Statistical table of recognition accuracy of conventional convolutional neural networks and the improved convolutional neural network in this embodiment.

[0081]

[0082] These data show that the improved CNN method enhances model performance in most cases, with an average improvement of 7.3% and a maximum improvement of 18.7%. Accuracy improvements were achieved in 11 out of 15 experiments, with 5 of these exceeding 15%, and the highest performance leap reaching 18.7%. Particularly when conventional CNNs perform moderately (68%-74% accuracy), the improved method demonstrates a stable and significant enhancement, achieving noticeable improvements of 12%-15% in multiple experiments, proving its reliable advantages in the application scenario of this embodiment.

[0083] Please see Figure 3 The present invention further provides an online defect detection device for screen-printed products, the device being used in the online defect detection method for screen-printed products, specifically including:

[0084] The edge recognition module is used to acquire online detection images of the screen-printed products to be analyzed, convert them into grayscale images, and then extract the edge pixels of the screen print.

[0085] The feature analysis module is used to analyze pixels in the normal direction of edge pixels, generate the SBIH index which reflects whether sub-pixel level micro-grooves appear around the edge pixels, select each edge pixel as the center of the window, analyze the orientation disorder of the edge pixels in each window, and obtain the angular disorder of each edge pixel.

[0086] The image processing module is used to acquire historical online detection images of multiple known ink removal defects, calculate the SBIH index and angular disorder of the edge pixels of each historical online detection image, and reconstruct each historical online detection image into a historical feature image based on the SBIH index and angular disorder.

[0087] The model training module is used to train a convolutional neural network using historical feature images, with ink removal defects as labels.

[0088] The defect detection module is used to reconstruct the online inspection image of the screen-printed product to be analyzed into a feature image, and use a trained convolutional neural network to identify whether the screen-printed product to be analyzed has ink fading defects.

[0089] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0090] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.

[0091] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0092] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that cannot be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. An online defect detection method for screen-printed products, characterized in that, The specific steps include: Step 1: Obtain the online inspection image of the screen-printed product to be analyzed, convert it to a grayscale image, and then extract the edge pixels of the screen print; Step 2: Analyze the pixels in the normal direction of the edge pixels to generate the SBIH index, which reflects whether sub-pixel-level micro-grooves appear around the edge pixels. Select each edge pixel as the center and analyze the orientation disorder of the edge pixels in each window to obtain the angular disorder of each edge pixel. Step 3: Obtain historical online detection images of multiple known ink removal defects, calculate the SBIH index and angular disorder of the edge pixels of each historical online detection image, and reconstruct each historical online detection image into a historical feature image based on the SBIH index and angular disorder. Step 4: Using ink removal defects as labels, train a convolutional neural network using historical feature images; Step 5: Reconstruct the online detection image of the screen-printed product to be analyzed into a feature image, and use the trained convolutional neural network to identify whether the screen-printed product to be analyzed has ink removal defects; From all the pixels that the edge pixel normal passes through, select the 10 pixels closest to the edge pixel as reference pixels, calculate the gray level second derivative value of each reference pixel in the normal direction, which is used to reflect the brightness backlash phenomenon of sub-pixel level micro-grooves, and take the maximum value as the SBIH index of the edge pixel. The orientation angle of each edge pixel within the window is calculated based on the arctangent values ​​of the horizontal and vertical gradients. The global azimuth angle of the window is obtained by weighted averaging of the orientation angles of each pixel within the window using Gaussian weights. The difference between the orientation angle of each edge pixel within the window and the global azimuth angle is called the in-window angle offset value. The variance of the in-window angle offset value is called the angle disorder.

2. The online defect detection method for screen-printed products according to claim 1, characterized in that: The Sobel operator is used to calculate the horizontal and vertical gradient values ​​of each pixel in the online detection image, and a first gradient magnitude data set including the gradient magnitude data of all pixels is generated. The error rate between the gradient magnitude of the current pixel and the gradient magnitude of the adjacent pixels is determined. If the error rate is less than the set error rate threshold, the current pixel is determined to be an edge pixel of the silkscreen.

3. The online defect detection method for screen-printed products according to claim 1, characterized in that: The types of ink removal defects include both ink removal defects and non-ink removal defects.

4. The online defect detection method for screen-printed products according to claim 3, characterized in that: The logic for reconstructing historical online detection images into historical feature images is as follows: Mark the position information of each pixel in the historical online detection images. and attribute information , For SBIH index, For angular misalignment; if a pixel is not an edge pixel, then... , Set the value to 0; The historical feature image is a two-channel image, the first channel being used for... The reconstructed first historical feature image, the second channel is used The reconstructed second historical feature image, specifically for... , Perform min-max normalization on the value, and then normalize the value. , Value mapping to The corresponding gray values ​​are obtained in the gray space, and the first historical feature image and the second historical feature image are obtained based on the corresponding gray values.

5. The online defect detection method for screen-printed products according to claim 4, characterized in that: The VGG16 convolutional neural network was selected, and the Binary Cross Entropy loss function was chosen.

6. An online defect detection device for screen-printed products, characterized in that: The device is used to implement the online defect detection method for screen-printed products according to any one of claims 1-5, specifically including: The edge recognition module is used to acquire online detection images of the screen-printed products to be analyzed, convert them into grayscale images, and then extract the edge pixels of the screen print. The feature analysis module is used to analyze pixels in the normal direction of edge pixels, generate the SBIH index which reflects whether sub-pixel level micro-grooves appear around the edge pixels, select each edge pixel as the center of the window, analyze the orientation disorder of the edge pixels in each window, and obtain the angular disorder of each edge pixel. The image processing module is used to acquire historical online detection images of multiple known ink removal defects, calculate the SBIH index and angular disorder of the edge pixels of each historical online detection image, and reconstruct each historical online detection image into a historical feature image based on the SBIH index and angular disorder. The model training module is used to train a convolutional neural network using historical feature images, with ink removal defects as labels. The defect detection module is used to reconstruct the online detection image of the screen-printed product to be analyzed into a feature image, and use a trained convolutional neural network to identify whether the screen-printed product to be analyzed has ink fading defects. From all the pixels that the edge pixel normal passes through, select the 10 pixels closest to the edge pixel as reference pixels, calculate the gray level second derivative value of each reference pixel in the normal direction, which is used to reflect the brightness backlash phenomenon of sub-pixel level micro-grooves, and take the maximum value as the SBIH index of the edge pixel. The orientation angle of each edge pixel within the window is calculated based on the arctangent values ​​of the horizontal and vertical gradients. The global azimuth angle of the window is obtained by weighted averaging of the orientation angles of each pixel within the window using Gaussian weights. The difference between the orientation angle of each edge pixel within the window and the global azimuth angle is called the in-window angle offset value. The variance of the in-window angle offset value is called the angle disorder.

Citation Information

Patent Citations

  • Defect detection method and device, computer device and storage medium

    CN113554649A

  • Screen printing defect detection method and device based on image analysis

    CN115439476A