A method and system for detecting printing overprint defects

By converting the template image and the image to be tested to the CMYK mode, clustering and linear spatial transformation processing are performed, and combining small-block matching and clustering center statistics, the problem of difficult to detect printing overprint defects in the prior art is solved, and a fast and accurate detection effect is achieved.

CN119784711APending Publication Date: 2025-04-08HANGZHOU ZHIGAN TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411865836.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The prior art is difficult to effectively detect printing overprint defects, especially because the overprint width is small, and it cannot be accurately detected directly by the usual defect detection algorithm, and may lead to false detection.

Method used

By converting the template image and the image to be tested to the CMYK mode, clustering processing is performed, and the clustering center distance is maximized through linear spatial transformation. Combined with small block matching and clustering center statistics, it is determined whether the detection conditions for overprinting defects are met.

Benefits of technology

Fast and robust printing overprint defect detection is achieved, which can accurately identify overprint defects and reduce error detection rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119784711A_ABST
    Figure CN119784711A_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for detecting printing overprint defects, belonging to the field of image processing technology. According to the distance threshold, the number of cluster centers and the number of points contained in the third small block are counted; whether the following first condition is met: the number of cluster centers is inconsistent, and the number of points contained in the inconsistent centers is greater than the third threshold; if it is met, the image to be tested has an overprint defect; if it is not met, the image to be tested has no overprint defect. The template image and the image to be tested are transformed into CMYK space, the template image is automatically clustered and generated in the CMYK space, and the cluster center distance is maximized through a linear transformation matrix to obtain the optimal color space of the template; the template and the image to be tested are evenly divided into blocks in the XY direction, the number of cluster centers and the number of points in each center of each small block are compared and counted, and whether there is an overprint defect according to the first condition; the detection speed is fast and the robustness is strong.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method and system for detecting printing overprint defects. Background Art

[0002] Overprinting (color printing) is a complex, highly precise printing technique. When printing, one color is first printed on paper through a plate; then the paper is covered on another plate, so that the plate frames are completely and precisely matched with each other, and then another color is printed to form a two-color overprint.

[0003] Overprint defects are a very important type of printing defects and are required to be detected in almost all scenarios. However, in many cases, the overprint width is very small and cannot be effectively detected directly by conventional defect detection algorithms. Even if it is detected, it may cause many false detections. Summary of the invention

[0004] In view of the above technical problems existing in the prior art, the present invention provides a method and system for detecting printing overprint defects, which performs printing overprint defect detection based on CMYK spatial clustering of template images and images to be tested, and has fast detection speed and strong robustness.

[0005] The invention discloses a method for detecting printing overprint defects, comprising the following steps: converting a template image and an image to be tested into a CMYK mode to obtain a first template and a first image to be tested; clustering the first template through a distance threshold to obtain a plurality of clusters and corresponding cluster centers; performing linear space transformation on the first template and the first image to be tested respectively to obtain a second template and a second image to be tested; evenly dividing the second template and the second image to be tested into a plurality of small blocks respectively to obtain a first small block and a second small block; matching the second small block of the second image to be tested with the first small block of the second template to obtain a third small block; counting the number of cluster centers and the number of points contained in the clusters according to the distance threshold; judging whether the following first condition is met: the number of cluster centers is inconsistent, and the number of points contained in the inconsistent centers is greater than a third threshold; if so, the image to be tested has an overprint defect; if not, the image to be tested has no overprint defect.

[0006] Preferably, after clustering, clusters with points less than a first threshold are removed.

[0007] Preferably, the method for optimizing the distance threshold of clustering includes:

[0008] comparing the number of cluster centers with a valid interval;

[0009] If the number is greater than the upper limit of the valid interval, clustering is performed again after increasing the distance threshold;

[0010] If the number is less than the lower limit of the valid interval, reduce the distance threshold and cluster again.

[0011] Preferably, if the number is within a valid range, the clustering effect meets the preset requirements.

[0012] Preferably, the clustering algorithm is an unsupervised clustering algorithm selected from K-means, Hierarchical, GMM, a density-based clustering algorithm and a grid-based clustering algorithm.

[0013] Preferably, the distance between adjacent cluster centers of the second template is greater than the second threshold and the distances are equal.

[0014] Preferably, the second small block is matched with the first small block by the similarity between them, and the largest small block with the similarity greater than the matching threshold is selected from the plurality of first small blocks as the third small block.

[0015] The present invention also provides a system for implementing the above detection method, a mode conversion module, a clustering module, a linear space conversion module, a partitioning module and a detection module;

[0016] The mode conversion module is used to convert the template image and the image to be tested into CMYK mode to obtain a first template and a first image to be tested;

[0017] The clustering module is used to perform unsupervised clustering on the first template through a distance threshold to obtain multiple clusters and corresponding cluster centers;

[0018] The linear space transformation module is used to perform linear space transformation on the first template and the first image to be tested respectively to obtain the second template and the second image to be tested;

[0019] The division module is used to evenly divide the second template and the second image to be tested into a plurality of small blocks respectively to obtain a first small block and a second small block, and match the second small block of the second image to be tested with the first small block of the second template to obtain a third small block;

[0020] The detection module counts the number of cluster centers and points contained in the third small block according to the distance threshold; if the first condition is met, the image to be tested has an overprint defect; if the first condition is not met, the image to be tested has no overprint defect.

[0021] Preferably, the clustering module is also used for distance threshold optimization.

[0022] Preferably, the linear space conversion module is used to make the distance between adjacent cluster centers of the second template greater than a second threshold and equal.

[0023] Compared with the prior art, the beneficial effects of the present invention are as follows: by transforming the template image and the image to be tested into the CMYK space, automatically clustering the template image in the CMYK space, and maximizing the cluster center distance through a linear transformation matrix to obtain the optimal color space of the template; the template and the image to be tested are evenly divided into blocks in the XY direction, the number of cluster centers and the number of each center point in each small block are compared and counted, and whether there is an overprint defect is determined according to the first condition; the detection speed is fast and the robustness is strong. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 is a flow chart of a method for detecting printing overprint defects of the present invention;

[0025] Figure 2 It is a system logic block diagram of the present invention;

[0026] Figure 3 It is a schematic diagram of cluster center statistics;

[0027] Figure 4A is a color bar under a distance threshold;

[0028] Figure 4B This is a clustering diagram under a distance threshold;

[0029] Figure 4C is the color bar under another distance threshold;

[0030] Figure 4D This is a clustering diagram under another distance threshold. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0032] In this specification, it should be understood that terms such as "include" or "have" are intended to indicate the presence of features, numbers, steps, behaviors, components, parts, or a combination thereof disclosed in this specification, and do not exclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or a combination thereof exist or are added.

[0033] In some of the processes described in the specification and claims of this application and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence, nor do they limit "first" and "second" to be different types.

[0034] It should also be noted that, in the absence of conflict, the embodiments and features in the embodiments disclosed in this specification may be combined with each other.

[0035] The present invention is further described in detail below in conjunction with the accompanying drawings:

[0036] Overview: RGB mode is a color mode based on the three primary colors of light, and is commonly used by cameras and monitors. CMYK, a four-color printing mode, is a color mode used in printing and is used in the design of printed products.

[0037] The present invention provides a method for detecting printing overprint defects, such as Figure 1 As shown, the following steps are included:

[0038] Step 101: converting the template image and the image to be tested into CMYK mode to obtain a first template and a first image to be tested.

[0039] Step 102: Perform unsupervised clustering on the first template using a distance threshold to obtain multiple clusters and corresponding cluster centers.

[0040] Among them, clustering algorithms are often used for unsupervised learning, that is, processing data that is not labeled in advance. The clustering algorithms that can be used are: K-means, Hierarchical, GMM, DBSCAN (density-based clustering algorithm), and grid-based clustering algorithms.

[0041] Step 103: performing linear space transformation on the first template and the first image to be tested respectively to obtain a second template and a second image to be tested, wherein the distance between adjacent cluster centers of the second template is greater than a second threshold and the distances are equal.

[0042] The cluster center distance is maximized through the linear transformation matrix to obtain the optimal color space of the template. Image linear transformation refers to the process of linear transformation of the pixel values ​​of the image, such as the function value of y=k x+b, the process of changing k or b, without changing the properties of the line, only the position of the line; there is a linear transformation between the pixels of the processed image and the original image that correspond one to one, and the pixels after processing are obtained by the above-mentioned linear method.

[0043] Step 104: Evenly divide the second template and the second image to be tested into a plurality of small blocks respectively to obtain a first small block and a second small block.

[0044] Specifically, the second template and the second image to be tested are evenly divided into MN blocks in the XY direction.

[0045] Step 105: Match the second small block of the second image to be tested with the first small block of the second template to obtain a third small block.

[0046] The second small block may be matched with the first small block by the similarity between them, and the largest first small block with a similarity greater than a matching threshold may be selected from the plurality of first small blocks as the third small block.

[0047] Step 106: According to the distance threshold, count the number of cluster centers contained in the third small block and the number of points contained in the cluster.

[0048] Figure 3 The situation of the third small block is shown, wherein white numbers mark the number of cluster centers in part of the third small block, wherein some small blocks are ignored due to small number of points (such as less than 1%), that is, not included in the statistics.

[0049] Step 107: Determine whether the following first condition is met: the number of cluster centers is inconsistent, and the number of points contained in the inconsistent centers is greater than a third threshold.

[0050] If the conditions are met, step 108 is executed: the image to be tested has an overprint defect.

[0051] If not, step 109 is executed: the image to be tested has no overprint defect.

[0052] The template image and the image to be tested are transformed into CMYK space, the template image is automatically clustered in CMYK space, and the cluster center distance is maximized through the linear transformation matrix to obtain the optimal color space of the template; the template and the image to be tested are evenly divided into blocks in the XY direction, the number of cluster centers and the number of each center point in each small block are compared and counted, and it is determined whether there is an overprint defect based on the first condition; it has the characteristics of fast detection speed and strong robustness.

[0053] Step 102 also includes a method for optimizing the distance threshold of clustering:

[0054] Step 201: After clustering, clusters with points less than a first threshold are removed, and the number of cluster centers is counted, for example, clusters with points less than 1% are removed.

[0055] Step 202: Compare the number of cluster centers with the valid interval.

[0056] If the number is within the valid range, the clustering effect meets the preset requirements, and step 103 is executed.

[0057] If the number is greater than the upper limit of the valid interval, the distance threshold is increased, clustering is performed again, and step 201 is executed.

[0058] If the number is less than the lower limit of the valid interval, reduce the distance threshold, cluster again, and execute step 201.

[0059] Ensure that the number of cluster centers remains within the valid range to meet the prior knowledge of the printing industry. At a distance threshold, such as Figure 4A , there are two color bars, correspondingly, Figure 4B , three categories can be clustered; when the distance threshold is reduced, such as Figure 4C , a color bar can be added, accordingly, such as Figure 4D , more categories can be clustered and the number of cluster centers can be increased. Through the clustering algorithm, multiple categories (clusters) are clustered, each category has at least one cluster center, and each category has multiple points (pixels).

[0060] The present invention detects overprint defects of an image to be tested based on a clustering algorithm. When an overprint defect exists, a portion of the image is offset, causing the clusters and cluster centers to change, and the number of points of the corresponding portion of the clusters to change. The present invention can improve the speed, stability and reliability of detection by comparing the number of cluster centers and the number of points of small blocks.

[0061] In step 108, if the number of cluster centers and the number of points contained in the clusters satisfied by the first small block and the corresponding third small block do not satisfy the first condition, it is determined that the third small block has an overprint defect.

[0062] Optionally, when the number of third small blocks with overprint defects exceeds a fourth threshold, it is determined that the image to be tested has overprint defects, for example, there are 1-10 third small blocks with overprint defects, or the proportion of third small blocks with overprint defects exceeds 0.1%.

[0063] A second aspect of the present invention provides a detection system for implementing the above detection method, such as Figure 2 As shown, it includes a mode conversion module 1, a clustering module 2, a linear space conversion module 3, a division module 4 and a detection module 5;

[0064] The mode conversion module 1 is used to convert the template image and the image to be tested into CMYK mode to obtain a first template and a first image to be tested;

[0065] The clustering module 2 is used to perform unsupervised clustering on the first template through a distance threshold to obtain multiple clusters and corresponding cluster centers;

[0066] The linear space transformation module 3 is used to perform linear space transformation on the first template and the first image to be tested respectively to obtain the second template and the second image to be tested, wherein the distance between adjacent cluster centers of the second template is greater than the second threshold value and the distance is equal;

[0067] The division module 4 is used to evenly divide the second template and the second image to be tested into a plurality of small blocks respectively to obtain a first small block and a second small block, and match the second small block of the second image to be tested with the first small block of the second template to obtain a third small block;

[0068] The detection module 5 counts the number of cluster centers and points contained in the third small block according to the distance threshold; if the first condition is met, the image to be tested has an overprint defect; if the first condition is not met, the image to be tested has no overprint defect.

[0069] The clustering module 2 is also used for distance threshold optimization.

[0070] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for detecting printing overprint defects, characterized in that: The following steps are involved: Convert the template image and the image to be tested into CMYK mode to obtain a first template and a first image to be tested; Clustering the first template by using a distance threshold to obtain multiple clusters and corresponding cluster centers; Performing linear space transformation on the first template and the first image to be tested respectively to obtain a second template and a second image to be tested; Evenly divide the second template and the second image to be tested into a plurality of small blocks respectively, to obtain a first small block and a second small block; Matching the second small block of the second image to be tested with the first small block of the second template to obtain a third small block; According to the distance threshold, count the number of cluster centers and points contained in the third small block; Determine whether the following first condition is met: the number of cluster centers is inconsistent, and the number of points contained in the inconsistent centers is greater than a third threshold; If the condition is satisfied, the image to be tested has an overprint defect; If not, the image to be tested has no overprint defect.

2. The detection method according to claim 1, characterized in that: After clustering, clusters with points less than the first threshold are removed.

3. The detection method according to claim 2, characterized in that: Methods for optimizing the distance threshold for clustering include: comparing the number of cluster centers with a valid interval; If the number is greater than the upper limit of the valid interval, clustering is performed again after increasing the distance threshold; If the number is less than the lower limit of the valid interval, reduce the distance threshold and cluster again.

4. The detection method according to claim 3, characterized in that: If the number is within the valid range, the clustering effect meets the preset requirements.

5. The detection method according to claim 1, characterized in that: The clustering algorithm is an unsupervised clustering algorithm selected from K-means, Hierarch i cal, GMM, density-based clustering algorithm and grid-based clustering algorithm.

6. The detection method according to claim 1, characterized in that: The distances between adjacent cluster centers of the second template are greater than a second threshold and are equal.

7. The detection method according to claim 1, characterized in that: Matching is performed based on the similarity between the second small block and the first small block, and a largest first small block having a similarity greater than a matching threshold is selected from the plurality of first small blocks as the third small block.

8. A system, characterized in that: Used to implement the detection method according to any one of claims 1 to 7, the system comprises: a pattern transformation module, a clustering module, a linear space conversion module, a partitioning module and a detection module; The mode conversion module is used to convert the template image and the image to be tested into CMYK mode to obtain a first template and a first image to be tested; The clustering module is used to perform unsupervised clustering on the first template through a distance threshold to obtain multiple clusters and corresponding cluster centers; The linear space transformation module is used to perform linear space transformation on the first template and the first image to be tested respectively to obtain the second template and the second image to be tested; The division module is used to evenly divide the second template and the second image to be tested into a plurality of small blocks respectively to obtain a first small block and a second small block, and match the second small block of the second image to be tested with the first small block of the second template to obtain a third small block; The detection module counts the number of cluster centers and points contained in the third small block according to the distance threshold; if the first condition is met, the image to be tested has an overprint defect; if the first condition is not met, the image to be tested has no overprint defect.

9. The system according to claim 8, characterized in that The clustering module is also used for distance threshold optimization.

10. The system according to claim 9, characterized in that The linear space conversion module is used to make the distance between adjacent cluster centers of the second template greater than a second threshold and equal to each other.