A method and device for detecting defects in inkjet printing, a terminal device and a storage medium
By constructing an ideal printed image and combining it with the operating and environmental parameters of the inkjet printer, a pyramid structure and CNN model are used for defect detection. This solves the problem of high false detection rate in existing technologies, achieves high-precision and adaptive defect recognition, and improves the reliability and efficiency of inkjet printing quality control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU LONGLUO ELECTRONIC TECHNOLOGY CO LTD
- Filing Date
- 2025-10-14
- Publication Date
- 2026-06-26
AI Technical Summary
Existing inkjet printing defect detection technologies cannot dynamically adjust detection strategies, making it difficult to distinguish between environmental interference and actual defects, resulting in a high false detection rate and failing to meet the demands of high-speed, high-precision industrial applications.
By constructing an ideal printed image and combining the inkjet printer's operating parameters and environmental parameters, a pyramid structure and CNN model are used for defect detection to achieve adaptive and high-precision defect recognition.
It significantly reduces the false alarm rate, improves the ability to detect critical defects, especially the ability to identify minute defects, maintains stable performance in complex environments, and provides reliable quality assurance.
Smart Images

Figure CN121353111B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of print inspection, and more particularly to a method, apparatus, terminal device, and storage medium for detecting defects in inkjet printing. Background Technology
[0002] As inkjet technology advances towards higher speeds, higher precision, and greater functionality, print quality control faces unprecedented challenges. Especially in industrial applications (such as textile printing lines with speeds reaching 100 m / min and PCB inkjet printing requiring resolutions above 2000 dpi), automated detection of printing defects has become a crucial element in ensuring product quality and production efficiency.
[0003] Various defects can occur during inkjet printing, and their causes are closely related to inkjet process parameters, equipment status, and environmental conditions. Existing detection technologies have the following systemic defects: First, there is a disconnect between process and vision: the printer's operating parameters are not linked to the image processing flow, making it impossible to dynamically adjust the detection strategy according to the current process status.
[0004] Second, it lacks environmental adaptability: it cannot dynamically adjust according to environmental fluctuations, making it difficult to distinguish between environmental interference and actual defects, resulting in false detections. Summary of the Invention
[0005] This invention provides a method, apparatus, terminal device, and storage medium for defect detection in inkjet printing. By deeply integrating printer operating parameters and environmental parameters into the entire detection process, it achieves adaptive, high-precision, and low-false-report defect detection.
[0006] To achieve the above objectives, a first aspect of this application provides a defect detection method for inkjet printing, comprising:
[0007] Construct an ideal printing image, print the ideal printing image, and acquire the printed image;
[0008] The printed image is denoised according to the operating parameters of the inkjet printer;
[0009] The printed image is light-effect corrected according to the environmental parameters of the inkjet printer;
[0010] A pyramid structure is used to generate a first multi-scale image corresponding to the ideal printed image and a second multi-scale image corresponding to the printed image.
[0011] Calculate the residual between the first multi-scale image and the second multi-scale image, and segment based on the residual and a dynamic threshold to obtain the defect region;
[0012] The defective region is input into a preset CNN model to obtain the defect detection result.
[0013] In one possible implementation of the first aspect, constructing the ideal printed image specifically includes:
[0014] Select several inkjet printer printouts and their corresponding original images from the memory bank, wherein the printouts contain at least one type of defect;
[0015] Based on the type of defects present in the printed result images, the original images corresponding to all printed result images are divided into multiple sets of original images, each set of original images corresponding to a type of defect.
[0016] Several original images are selected from each set of original images and stitched together to form a horizontal strip of original images;
[0017] By stitching together all the original image strips, the ideal printed image is obtained.
[0018] In one possible implementation of the first aspect, before dividing the original images corresponding to all printed result images according to the defect types present in the printed result images, the method includes:
[0019] K-means clustering is performed on all printed images containing two or more defects, and the defect type of the printed image is determined based on the clustering results; the initial center vector of each cluster is a random image feature vector corresponding to a printed image containing only one type of defect.
[0020] In one possible implementation of the first aspect, the denoising of the printed image based on the operating parameters of the inkjet printer specifically includes:
[0021] If the printing speed parameter in the operating parameters is greater than the preset speed threshold, directional filtering is performed;
[0022] If the resolution parameter in the running parameters is greater than the preset resolution threshold, perform morphological opening or nonlocal mean filtering.
[0023] If there are non-zero multi-pass printing parameters in the operating parameters, perform FFT on the printed image in the frequency domain to reduce the periodic frequency peaks in the vertical direction; perform sliding window mean filtering along the stripe direction in the spatial domain, and the width of the sliding window is positively correlated with the pixel corresponding to the nozzle spacing.
[0024] In one possible implementation of the first aspect, the step of performing light effect correction on the printed image based on the environmental parameters of the inkjet printer specifically includes:
[0025] A background image is obtained by modeling a reference background based on the location of each light sensor of the inkjet printer; the radius of the structural element used in the modeling is equal to the distance between each light sensor.
[0026] The printed image is corrected by dividing it by the background image and then normalized.
[0027] In one possible implementation of the first aspect, the generation of a first multi-scale image corresponding to the ideal printed image and a second multi-scale image corresponding to the printed image using a pyramid structure specifically includes:
[0028] Establish a pyramid structure with the number of layers equal to the number of preset defect types;
[0029] Based on the pyramid structure, a first multi-scale image corresponding to the ideal printed image and a second multi-scale image corresponding to the printed image are generated.
[0030] In one possible implementation of the first aspect, calculating the residual between the first multi-scale image and the second multi-scale image, and segmenting based on the residual and a dynamic threshold to obtain the defect region, specifically includes:
[0031] At each scale, the residual between the first multi-scale image and the second multi-scale image is calculated;
[0032] At each scale, a dynamic threshold is obtained by weighting the residual mean and residual standard deviation; the weighting coefficient of the residual standard deviation is obtained based on the printed content mapping value, the substrate type mapping value, and the ink droplet volume value.
[0033] Based on the residual and dynamic threshold segmentation, the defect region is obtained.
[0034] A second aspect of this application provides a defect detection device for inkjet printing, comprising:
[0035] The printing module is used to construct an ideal printing image, print the ideal printing image, and acquire the printed image.
[0036] A noise reduction module is used to reduce noise in the printed image based on the operating parameters of the inkjet printer.
[0037] The calibration module is used to perform light effect correction on the printed image based on the environmental parameters of the inkjet printer;
[0038] The generation module is used to generate a first multi-scale image corresponding to the ideal printed image and a second multi-scale image corresponding to the printed image using a pyramid structure.
[0039] The segmentation module is used to calculate the residual between the first multi-scale image and the second multi-scale image, and to segment based on the residual and a dynamic threshold to obtain the defect region;
[0040] The detection module is used to input the defective region into a preset CNN model to obtain the defect detection result.
[0041] A third aspect of this application provides a terminal device including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the inkjet printing defect detection method as described above.
[0042] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the inkjet printing defect detection method described above.
[0043] Compared with existing technologies, this invention first constructs an ideal printed image based on historical data, which is sensitive to various defects, significantly improving the detection capability of key defects. It can also accurately reflect the characteristics of the substrate and the ink diffusion law, effectively avoiding misjudging normal process fluctuations as defects and greatly reducing the false alarm rate of the system.
[0044] Intelligent noise reduction based on operating parameters automatically selects the optimal processing strategy according to printing conditions, significantly improving the detection capability of critical defects such as broken lines, especially the identification of minute defects. Light efficiency correction technology based on environmental parameter perception ensures stable performance under complex lighting conditions, effectively suppressing the impact of environmental fluctuations on detection results. The combination of a multi-scale pyramid structure and process-mapped dynamic thresholds achieves comprehensive coverage of defects of various sizes, significantly improving the completeness and accuracy of detection. The introduction of a CNN model enables the system to accurately classify various defects, providing data support for process optimization. The entire inspection process adapts to different printing conditions and environmental changes without manual intervention, greatly reducing downtime due to misjudgments and significantly improving product yield.
[0045] In summary, this invention solves the industry challenge of balancing detection accuracy and environmental adaptability in traditional technologies, transforming inkjet printing quality control from experience-based judgment to scientific quantification. The technical solution possesses excellent process awareness capabilities, automatically adapting to changes in production line conditions, providing reliable quality assurance for high-speed, high-precision inkjet printing. Attached Figure Description
[0046] Figure 1 This is a flowchart illustrating a defect detection method for inkjet printing according to an embodiment of the present invention.
[0047] Figure 2 This is a schematic diagram of the structure of an inkjet printing defect detection device provided in an embodiment of the present invention. Detailed Implementation
[0048] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0049] To resolve the above issues, please refer to [link / reference]. Figure 1 An embodiment of the present invention provides a defect detection method for inkjet printing, comprising:
[0050] S10. Construct an ideal printing image, print the ideal printing image, and acquire the printed image.
[0051] S11. Denoise the printed image according to the operating parameters of the inkjet printer.
[0052] S12. Perform light effect correction on the printed image based on the environmental parameters of the inkjet printer.
[0053] S13. Generate a first multi-scale image corresponding to the ideal printed image and a second multi-scale image corresponding to the printed image using a pyramid structure.
[0054] S14. Calculate the residual between the first multi-scale image and the second multi-scale image, and perform segmentation based on the residual and a dynamic threshold to obtain the defect region.
[0055] S15. Input the defect region into a preset CNN model to obtain the defect detection result.
[0056] S10 constructs a realistic reference benchmark for the process by replacing the original printed image in traditional methods with a specially designed test image. This ideal image can be constructed from historical data and incorporates physical factors such as substrate characteristics and ink diffusion patterns, accurately reflecting "the effect that should be presented under current process conditions." Compared with traditional methods, this step effectively avoids misjudging normal process fluctuations as defects and significantly reduces systematic false alarms.
[0057] S11 dynamically selects the optimal denoising strategy based on operating parameters such as printing speed, resolution, and multi-pass mode. This parameter-adaptive denoising method enables the system to provide the best image quality under different printing conditions, solving the problem of poor adaptability of traditional fixed-parameter denoising methods under different operating conditions. It significantly improves the detection capability of key defects such as broken lines, especially the recognition effect of small defects. S12 can adjust the background modeling parameters based on environmental parameters. Compared with traditional fixed-parameter correction methods, this technology enables the system to maintain stable performance under complex lighting conditions. Especially during periods of periodic change in natural light, it can effectively avoid misjudging illumination gradients as defects, greatly reducing the false alarm rate caused by environmental factors, and achieving true environmentally adaptable detection.
[0058] S13 constructs a multi-scale representation that matches the defect type, enabling defects of different sizes to be detected at the most suitable scale. High-level (small-scale) images effectively capture defects such as large-area ink gaps and ink bleeding, while low-level (large-scale) images accurately identify fine breaks and micro-droplets. This multi-scale analysis architecture avoids the limitations of single-scale detection. S14 achieves accurate defect region localization by calculating multi-scale residuals and applying dynamic thresholds mapped from process parameters for segmentation. The dynamic threshold coefficients adaptively adjust based on the complexity of the printed content, substrate type, and droplet volume, enabling the system to distinguish between "normal fluctuations allowed by the process" and "true defects." Compared to traditional fixed-threshold methods, this technology significantly reduces the false alarm rate while improving the detection rate of critical defects.
[0059] S15 inputs the segmented defect region into a pre-trained CNN model to achieve accurate defect classification and identification. Unlike traditional methods that can only determine "whether a defect exists," this step can accurately distinguish defect types such as broken lines, color spots, stripes, and ink splatter, providing detailed data support for process optimization. The lightweight CNN model ensures real-time processing capabilities, meeting the needs of high-speed production lines.
[0060] The above method solves the industry problem of traditional technologies struggling to balance detection accuracy and environmental adaptability, transforming inkjet printing quality control from experience-based judgment to scientific quantification. Furthermore, the method described in the examples possesses excellent process awareness, automatically adapting to changes in production line conditions, providing reliable quality assurance for high-speed, high-precision inkjet printing.
[0061] For example, constructing the ideal printed image specifically includes:
[0062] Select several inkjet printer printouts and their corresponding original images from the memory bank, wherein the printouts contain at least one type of defect.
[0063] Based on the type of defects present in the printed result images, the original images corresponding to all printed result images are divided into multiple sets of original images, each set of original images corresponding to a type of defect.
[0064] Several original images are selected from each set of original images and stitched together to form a horizontal strip of original images.
[0065] By stitching together all the original image strips, the ideal printed image is obtained.
[0066] For example, the detection system has historical data from the past 6 months, including 2000 sets of printed result images and their corresponding original design drawings. Each set of images is marked with the type of defect (the system automatically records the relationship between printer operating parameters and defects). The defect types include five categories: broken lines, color spots, streaks, ink splatter, and ink bleeding.
[0067] Image ID#1035: The printed result has a "broken line" defect, corresponding to a solid color stripe pattern in the original image;
[0068] Image ID#2187: The printed result has an "ink bleeding" defect, corresponding to an array of small dots in the original image;
[0069] Image ID#3021: The printed result contains both "color spots" and "ink splatter", corresponding to the original image as a gradient grayscale block;
[0070] After classifying the original images by defect type, 15 original images can be randomly selected from each set and horizontally stitched together into strips:
[0071] Broken lines: Arrange 15 different width line patterns horizontally to form a horizontal strip 3000 pixels wide and 200 pixels high;
[0072] Colored stripes: Fifteen different sized dot patterns are pieced together to form a test dot matrix area;
[0073] Striped stripes: Combining 15 parallel lines with different spacings to form a striped test strip;
[0074] Ink dot strips: Combining 15 different ink dot distribution patterns to form an ink dot test area;
[0075] Ink Bleeding Strips: Fifteen gradient patterns are pieced together to form an ink bleeding test area;
[0076] The five test strips are vertically spliced together to form the final ideal printed image, which, from top to bottom, consists of: an ink bleeding test area, an ink splatter test area, a stripe test area, a color spot test area, and a broken line test area. Each area is 200 pixels high and 3000 pixels wide, and includes positioning marks and calibration patterns to facilitate subsequent image registration. After printing this ideal image, it can effectively expose potential problems in different aspects of the printer: if a broken line appears in the broken line test area, it indicates nozzle clogging; if the ink bleeding test area is blurry, it indicates poor ink absorption of the substrate. This targeted design allows the detection system to accurately identify defect types, providing a clear direction for process improvement, while avoiding misjudging normal process fluctuations as defects.
[0077] For example, before dividing the original images corresponding to all printed result images according to the defect types present in the printed result images, the process includes:
[0078] K-means clustering is performed on all printed images containing two or more defects, and the defect type of the printed image is determined based on the clustering results; the initial center vector of each cluster is a random image feature vector corresponding to a printed image containing only one type of defect.
[0079] For example, randomly select 5 images containing only a single defect as the initial centers:
[0080] Image #1102: Contains only "ink bleeding", feature vector [0.85, 0.12, ..., 0.03]
[0081] Image #2307: Contains only "broken lines", feature vector [0.15, 0.92, ..., 0.01]
[0082] Image #3541: Contains only "color spots", feature vector [0.23, 0.08, ..., 0.87]
[0083] Image #4129: Contains only "ink dots", feature vector [0.08, 0.05, ..., 0.93]
[0084] Image #5087: Contains only "stripes", feature vector [0.12, 0.85, ..., 0.07]
[0085] Clustering process: Assign 200 multi-defect images to the nearest centers, recalculate the center of each cluster, and repeat the iteration until convergence. After clustering, 5 clusters are obtained, each cluster corresponding to a major defect type.
[0086] For example, the step of denoising the printed image based on the inkjet printer's operating parameters specifically includes:
[0087] If the printing speed parameter in the running parameters is greater than the preset speed threshold, directional filtering is performed.
[0088] If the resolution parameter in the running parameters is greater than the preset resolution threshold, perform morphological opening operation or nonlocal mean filtering.
[0089] If there are non-zero multi-pass printing parameters in the operating parameters, perform FFT on the printed image in the frequency domain to reduce the periodic frequency peaks in the vertical direction; perform sliding window mean filtering along the stripe direction in the spatial domain, and the width of the sliding window is positively correlated with the pixel corresponding to the nozzle spacing.
[0090] Directional filtering can suppress motion blur caused by high-speed printing, making broken line defects clear and distinguishable; morphological opening operation can eliminate salt-and-pepper noise in high-resolution printing and preserve the integrity of fine lines; multi-pass printing stripe suppression eliminates periodic stripes generated by multi-pass printing, maintains the detail integrity of the pattern, reduces false alarm rate, and avoids unnecessary downtime for inspection.
[0091] This adaptive denoising method selects the optimal processing strategy for different operating parameters, enabling the system to provide high-quality input images under various printing conditions, laying a solid foundation for subsequent defect detection. Compared with traditional fixed-parameter methods, this approach improves the overall defect detection rate and reduces the false alarm rate, significantly enhancing the reliability and efficiency of inkjet printing quality control.
[0092] For example, the step of performing light effect correction on the printed image based on the environmental parameters of the inkjet printer specifically includes:
[0093] A background image is obtained by modeling a reference background based on the location of each light sensor of the inkjet printer; the radius of the structural element used in the modeling is equal to the distance between each light sensor.
[0094] The printed image is corrected by dividing it by the background image and then normalized.
[0095] Taking a 300-meter-long high-speed production line in a textile digital printing factory as an example, it is equipped with the following: 6 light sensors: evenly distributed along the printing width direction, with a spacing of 33.3 cm; sensor data: collected once per second, recording the illuminance value (lux) and color temperature (K) at each point. Current environment: 10:30 am, natural light in the workshop shines through the skylight, resulting in uneven illuminance (850 lux on the left, 1150 lux on the right).
[0096] The structural element parameters are then determined as follows: sensor spacing = 33.3 cm; print resolution = 600 dpi; structural element radius = (33.3 cm × 600 dpi) / 25.4 = 785 pixels; select an elliptical structural element (width 1570 pixels, height 785 pixels).
[0097] The above method achieves ambient light effect correction by precisely linking light sensor data with image processing algorithms, enabling the system to provide reliable defect detection results even under complex lighting conditions, thus solving a key problem in inkjet printing quality control.
[0098] For example, the step of generating a first multi-scale image corresponding to the ideal printed image and a second multi-scale image corresponding to the printed image using a pyramid structure specifically includes:
[0099] Establish a pyramid structure with the number of layers equal to the number of preset defect types;
[0100] Based on the pyramid structure, a first multi-scale image corresponding to the ideal printed image and a second multi-scale image corresponding to the printed image are generated.
[0101] For example, the step of calculating the residual between the first multi-scale image and the second multi-scale image, and segmenting based on the residual and a dynamic threshold to obtain the defect region, specifically includes:
[0102] At each scale, the residual between the first multi-scale image and the second multi-scale image is calculated;
[0103] At each scale, a dynamic threshold is obtained by weighting the residual mean and residual standard deviation; the weighting coefficient of the residual standard deviation is obtained based on the printed content mapping value, the substrate type mapping value, and the ink droplet volume value.
[0104] Based on the residual and dynamic threshold segmentation, the defect region is obtained.
[0105] Based on five preset defect types, the system constructs a five-layer pyramid structure, with each layer corresponding to a specific type of defect detection:
[0106] Layer 0 (bottom layer): Preserves high-resolution details of the original image and is specifically designed to detect tiny ink splatter defects;
[0107] Layer 1: Medium resolution, suitable for detecting medium-sized defects such as broken lines and discoloration spots;
[0108] Layer 2: Lower resolution, optimized for periodic stripe defects;
[0109] Layer 3: Further reduces resolution to specifically address large-area diffusion defects such as ink bleeding;
[0110] Layer 4 (topmost layer): Lowest resolution, used to identify global issues such as large areas of ink deficiency;
[0111] The pyramid generation process involves first applying Gaussian blur to the ideal printed image, then downsampling it to half the size of the original image each time, and then processing the actual printed image in the same way to ensure that the two sets of image pyramids remain strictly aligned at each layer. This structure enables the detection of each defect at the most appropriate scale, avoiding the limitations of single-scale analysis.
[0112] At each pyramid level, the system dynamically calculates the threshold. The core formula is: Dynamic threshold = Local residual mean + α × Local residual standard deviation, where the key parameter α is dynamically determined according to the process conditions.
[0113] Example of threshold calculation for Level 1:
[0114] Printing content: High-precision pixel pattern (content complexity 0.9 / 1.0); Substrate type: Glass substrate (mapping value 0.7 / 1.0, lower than PET, higher than paper); Droplet volume: 15 pL;
[0115] Calculation of α coefficient:
[0116] Baseline value: 3.0;
[0117] Content complexity contribution: 0.9 × 0.5 = 0.45;
[0118] Substrate type contribution: 0.7 × 0.6 = 0.42;
[0119] Ink droplet volume contribution: 15 × 0.01 = 0.15;
[0120] Finally, α = 3.0 + 0.45 + 0.42 + 0.15 = 4.02;
[0121] This dynamic calculation ensures that a higher threshold is used in complex pattern areas (allowing for more normal fluctuations), while a lower threshold is used in simple areas (increasing sensitivity to minor defects).
[0122] Taking a 4-layer pyramid as an example, layer 0 (speck detection): α = 3.8 (content complexity 0.95 due to high-precision printing); dynamic threshold = 5 + 3.8 × 2 = 12.6; areas with residuals > 12.6 are marked as potential specks;
[0123] Three tiny ink droplets were detected (two actual defects and one normal process fluctuation).
[0124] Layer 1 (Disconnection Detection): α = 4.02 (calculated as above); Dynamic threshold = 8 + 4.02 × 3 = 20.06;
[0125] Two possible broken wires were identified, but the system further analyzed the length and location of the broken wires;
[0126] Only broken lines with a length > 0.1 mm are marked as genuine defects;
[0127] Layer 2 (stripe detection): α = 3.5 (simple pattern, content complexity 0.5); dynamic threshold = 6 + 3.5 × 2 = 13;
[0128] Periodic stripes were detected, but the system analyzed whether the stripe frequency matched the nozzle spacing; pseudo-stripes caused by substrate texture were ruled out.
[0129] Layer 3 (large areas lacking ink):
[0130] α = 3.2 (simple content, uniform substrate); dynamic threshold = 10 + 3.2 × 5 = 26;
[0131] A large area of ink deficiency was identified and matched with historical data on printhead clogging.
[0132] Ultimately, two real ink spot defects (6μm and 8μm in diameter) were confirmed, one 0.15mm long broken line defect was confirmed, and no stripes or large-area ink shortage defects were confirmed (which were judged by the system as normal process fluctuations).
[0133] The above embodiments, through dynamic thresholding, prevent the system from misjudging normal process fluctuations as defects; multi-scale analysis ensures comprehensive coverage of defects from the micrometer to the millimeter level; and the correlation between threshold parameters and the printing process allows the system to automatically adapt to different production conditions. Compared with traditional fixed threshold methods, the false alarm rate is reduced and the detection rate of critical defects is improved. This method achieves "process-aware" defect detection, enabling the system to distinguish between "acceptable process fluctuations" and "real defects requiring intervention," significantly improving the scientific nature and reliability of inkjet printing quality control.
[0134] Compared with the prior art, the above embodiments first construct ideal printed images based on historical data, which are sensitive to various defects, significantly improving the detection capability of key defects. They can also accurately reflect the characteristics of the substrate and the ink diffusion law, effectively avoiding misjudging normal process fluctuations as defects and greatly reducing the false alarm rate of the system.
[0135] Intelligent noise reduction based on operating parameters automatically selects the optimal processing strategy according to printing conditions, significantly improving the detection capability of critical defects such as broken lines, especially the identification of minute defects. Light efficiency correction technology based on environmental parameter perception ensures stable performance under complex lighting conditions, effectively suppressing the impact of environmental fluctuations on detection results. The combination of a multi-scale pyramid structure and process-mapped dynamic thresholds achieves comprehensive coverage of defects of various sizes, significantly improving the completeness and accuracy of detection. The introduction of a CNN model enables the system to accurately classify various defects, providing data support for process optimization. The entire inspection process adapts to different printing conditions and environmental changes without manual intervention, greatly reducing downtime due to misjudgments and significantly improving product yield.
[0136] In summary, this invention solves the industry challenge of balancing detection accuracy and environmental adaptability in traditional technologies, transforming inkjet printing quality control from experience-based judgment to scientific quantification. The technical solution possesses excellent process awareness capabilities, automatically adapting to changes in production line conditions, providing reliable quality assurance for high-speed, high-precision inkjet printing.
[0137] Please see Figure 2 One embodiment of this application provides a defect detection device for inkjet printing, including: a printing module 20, a noise reduction module 21, a correction module 22, a generation module 23, a segmentation module 24, and a detection module 25.
[0138] The printing module 20 is used to construct an ideal printing image, print the ideal printing image, and acquire the printing image.
[0139] The noise reduction module 21 is used to reduce noise in the printed image according to the operating parameters of the inkjet printer.
[0140] The calibration module 22 is used to perform light effect correction on the printed image based on the environmental parameters of the inkjet printer.
[0141] The generation module 23 is used to generate a first multi-scale image corresponding to the ideal printed image and a second multi-scale image corresponding to the printed image using a pyramid structure.
[0142] The segmentation module 24 is used to calculate the residual between the first multi-scale image and the second multi-scale image, and to obtain the defect region based on the residual and dynamic threshold segmentation.
[0143] The detection module 25 is used to input the defect area into a preset CNN model to obtain the defect detection result.
[0144] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the drug storage management device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0145] One embodiment of this application provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the inkjet printing defect detection method as described above.
[0146] One embodiment of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the inkjet printing defect detection method described above.
[0147] The computer device may be a smartphone, tablet, desktop computer, or cloud server, among other computing devices. This computer device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the figures are merely examples of computer devices and do not constitute a limitation on the computer device. It may include more or fewer components than illustrated, or a combination of certain components, or different components, such as input / output devices, network access devices, etc.
[0148] The processor referred to can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0149] In some embodiments, the memory may be an internal storage unit of the computer device, such as a hard drive or RAM. In other embodiments, the memory may be an external storage device of the computer device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory may include both internal and external storage units of the computer device. The memory is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory can also be used to temporarily store data that has been output or will be output.
[0150] This application provides a computer program product that, when run on a computer device, enables the computer device to execute the steps described in the various method embodiments above.
[0151] In the several embodiments provided in this application, it will be understood that each block in the flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the figures. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved.
[0152] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0153] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A defect detection method for inkjet printing, characterized in that, include: Construct an ideal printing image, print the ideal printing image, and acquire the printed image; The construction of the ideal printed image specifically includes: selecting several printed images from an inkjet printer and corresponding original images from a memory bank, wherein each printed image contains at least one type of defect; performing K-means clustering on all printed images containing two or more defects, and determining the defect type of the printed image based on the clustering results; the initial center vector of each cluster is a random image feature vector corresponding to a printed image containing only one type of defect; dividing the original images corresponding to all printed images into multiple sets of original images based on the defect types present in the printed images, each set of original images corresponding to one type of defect; selecting several original images from each set of original images and stitching them together into horizontal strips of original images; and stitching all the original image strips together to obtain the ideal printed image. The printed image is denoised according to the operating parameters of the inkjet printer; The printed image is light-effect corrected according to the environmental parameters of the inkjet printer; A pyramid structure is used to generate a first multi-scale image corresponding to the ideal printed image and a second multi-scale image corresponding to the printed image. Calculate the residual between the first multi-scale image and the second multi-scale image, and segment based on the residual and a dynamic threshold to obtain the defect region; The defective region is input into a preset CNN model to obtain the defect detection result.
2. The defect detection method for inkjet printing as described in claim 1, characterized in that, The step of denoising the printed image based on the inkjet printer's operating parameters specifically includes: If the printing speed parameter in the operating parameters is greater than the preset speed threshold, directional filtering is performed; If the resolution parameter in the running parameters is greater than the preset resolution threshold, perform morphological opening or nonlocal mean filtering. If there are non-zero multi-pass printing parameters in the operating parameters, perform FFT on the printed image in the frequency domain to reduce the periodic frequency peaks in the vertical direction; perform sliding window mean filtering along the stripe direction in the spatial domain, and the width of the sliding window is positively correlated with the pixel corresponding to the nozzle spacing.
3. The defect detection method for inkjet printing as described in claim 1, characterized in that, The step of performing light effect correction on the printed image based on the environmental parameters of the inkjet printer specifically includes: A background image is obtained by modeling a reference background based on the location of each light sensor of the inkjet printer; the radius of the structural element used in the modeling is equal to the distance between each light sensor. The printed image is corrected by dividing it by the background image and then normalized.
4. The defect detection method for inkjet printing as described in claim 1, characterized in that, The process of generating a first multi-scale image corresponding to the ideal printed image and a second multi-scale image corresponding to the printed image using a pyramid structure specifically includes: Establish a pyramid structure with the number of layers equal to the number of preset defect types; Based on the pyramid structure, a first multi-scale image corresponding to the ideal printed image and a second multi-scale image corresponding to the printed image are generated.
5. The defect detection method for inkjet printing as described in claim 1, characterized in that, The step of calculating the residual between the first multi-scale image and the second multi-scale image, and segmenting based on the residual and a dynamic threshold to obtain the defect region, specifically includes: At each scale, the residual between the first multi-scale image and the second multi-scale image is calculated; At each scale, a dynamic threshold is obtained by weighting the residual mean and residual standard deviation; the weighting coefficient of the residual standard deviation is obtained based on the printed content mapping value, the substrate type mapping value, and the ink droplet volume value. The defect region is obtained by segmentation based on the residual and dynamic threshold.
6. A defect detection device for inkjet printing, characterized in that, include: The printing module is used to construct an ideal printing image, print the ideal printing image, and acquire the printed image. The construction of the ideal printed image specifically includes: selecting several printed images from an inkjet printer and corresponding original images from a memory bank, wherein each printed image contains at least one type of defect; performing K-means clustering on all printed images containing two or more defects, and determining the defect type of the printed image based on the clustering results; the initial center vector of each cluster is a random image feature vector corresponding to a printed image containing only one type of defect; dividing the original images corresponding to all printed images into multiple sets of original images based on the defect types present in the printed images, each set of original images corresponding to one type of defect; selecting several original images from each set of original images and stitching them together into horizontal strips of original images; and stitching all the original image strips together to obtain the ideal printed image. A noise reduction module is used to reduce noise in the printed image based on the operating parameters of the inkjet printer. The calibration module is used to perform light effect correction on the printed image based on the environmental parameters of the inkjet printer; The generation module is used to generate a first multi-scale image corresponding to the ideal printed image and a second multi-scale image corresponding to the printed image using a pyramid structure. The segmentation module is used to calculate the residual between the first multi-scale image and the second multi-scale image, and to segment based on the residual and a dynamic threshold to obtain the defect region; The detection module is used to input the defective region into a preset CNN model to obtain the defect detection result.
7. A terminal device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements a defect detection method for inkjet printing as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements a defect detection method for inkjet printing as described in any one of claims 1 to 5.