A flexographic first-piece inspection method based on electronic proofs
By using the matching method of SuperPoint and GNN networks in the first piece detection of flexographic labels, combined with constraint clustering and defect evaluation, the problems of high missed detection rates and false detection rates in the existing technology are solved, and high-precision and efficient detection effects are achieved.
Patent Information
- Application Number
- CN202210279030.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-21
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2042-03-21
AI Technical Summary
The prior art has high missed detection and missed detection rates in the first piece detection of flexographic labels, especially when processing multilingual and large characters printed content, artificial quality inspection is time-consuming and labor-intensive and prone to missed detection, resulting in economic losses.
High-precision detection method based on electronic sample scripts is adopted, and superpoint and GNN network are extracted through SuperPoint self-supervised network for rough matching and fine matching, combining attention mechanism and allocation optimization solution methods to reduce matching redundancy, and defect detection is performed through constraint clustering and defect evaluation.
It realizes high-precision flexographic first-piece detection, reduces the missed detection rate and false detection rate, improves the accuracy and speed of detection, meets the production speed requirements, and controls the false detection rate within 1.6% in actual applications.
Smart Images

Figure CN114612458B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of textile industry detection, and more specifically, to a flexographic first-piece detection method based on an electronic proof sheet. Background Art
[0002] Flexographic printing refers to a printing method that uses a flexible plate to transfer ink through an anilox roll. Currently, the water-based ink and UV ink used in flexographic printing do not contain benzene, esters, and ketones with strong toxicity, nor do they contain heavy metals harmful to the human body. The ink layer thickness of flexographic printing is only about half of that of gravure printing, and the ink consumption per unit area is much less than that of gravure printing. In addition, flexographic printing belongs to light-pressure printing, with low equipment energy consumption, little harm to the environment during the plate-making process, and a printing resistance of over one million impressions reduces the material loss caused by downtime and plate change for long-run orders. Therefore, flexographic printing has become one of the recognized green printing methods in the industry.
[0003] Due to its significant environmental protection characteristics, flexographic printing accounts for more than 70% of the packaging printing market in the United States and about 50% in Western European countries. In the 1980s, with the entry of more and more foreign-funded enterprises in fields such as fast food and cosmetics into China, flexographic printing was also introduced into the country and gradually developed. Currently, flexographic printing in China has been quite widely applied in fields such as corrugated cartons, labels, aseptic liquid packaging, paper cups and paper bags, and paper napkins, and has gradually taken the leading position. In the fields of flexible packaging printing and book printing, flexographic printing has also started to gain a foothold, showing strong growth momentum and development potential. For enterprise manufacturers, product quality is the cornerstone of enterprise development and competition, and improving printing quality is very important for the flexographic printing industry.
[0004] Before the batch production of flexographic labels, every time workers change shifts, change products, and after equipment installation and adjustment, they must go through the flexographic first-piece inspection process, that is, the first or the first few flexographic products printed must be compared and inspected with the electronic proof sheet to detect printing quality problems as early as possible. The flexographic label process flow is as Figure 1 shown. Currently, the flexographic first-piece inspection adopts the manual three-inspection system: self-inspection, mutual inspection, and special inspection. However, the printed content on flexographic labels involves languages from all over the world (more than 5,000 kinds of characters), and there are many printed character contents, with an average of more than 200 characters per label. This results in a large labor intensity for manual quality inspection, time-consuming and laborious, and is extremely prone to missed inspections, which in turn leads to batches of flexographic labels being out of tolerance, repaired, and scrapped, causing serious economic losses. Therefore, a high-precision flexographic first-piece automatic detection method has important practical significance for the flexographic printing process.
[0005] Although machine vision has been widely used in the detection of printed content on fabrics, previous studies have more often used printed genuine products as templates to check for printing defects generated during the batch printing process, aiming at the characteristics that no genuine product image can be provided for the flexographic first-piece.
[0006] In the prior art, a patent for a flexographic label printing proof detection system based on machine vision and its implementation method is disclosed. The method establishes a PDF template for flexographic labels, uses binarization processing to determine the content area of the flexographic first piece to be measured; collects the measured images of the object to be measured during linear motion; uses the Surf algorithm and the RANSAC algorithm to splice and process the collected images; then uses the fast dictionary search method of approximate nearest neighbor, sorts the feature point pairs and selects several groups of feature point pairs to calculate their transformation matrices, and performs mapping transformation on the measured images after splicing processing to obtain the first-piece image; finally, uses the method of gray-scale template matching to fine-tune the character positions of the electronic proof, calculates the difference between the electronic proof and the binary image of the flexographic first piece to be measured, and determines the defect position from the distance map; however, the thickness and fineness of the content of the electronic proof and the flexographic first piece are different, the gray-scale characteristics are quite different, and there are a large number of repeated textures, and the features extracted by the Surf algorithm cannot be accurately described, resulting in a large number of false matching cases, and thus a very high missed detection rate and false detection rate. Summary of the Invention
[0007] The present invention provides a flexographic first-piece detection method based on an electronic proof with relatively high accuracy.
[0008] In order to achieve the above technical effects, the technical solution of the present invention is as follows:
[0009] A flexographic first-piece detection method based on an electronic proof includes the following steps:
[0010] S1: Extract the super points of the electronic proof and the flexographic first piece to obtain the key point positions and visual feature descriptors of the two, and complete the rough matching of the electronic proof and the flexographic first piece;
[0011] S2: Perform fine matching on the electronic proof and the flexographic first piece that have completed the rough matching in step S1;
[0012] S3: Perform defect detection on the flexographic first piece that has completed the fine matching in step S2.
[0013] Further, the SuperPoint self-supervised network is used to extract the super points of the electronic proof and the flexographic first piece. Among them, the training process of the SuperPoint self-supervised network is as follows:
[0014] S11: Pre-train the basic detector. Since the corner points of the virtual geometric shapes of the electronic proof and the flexographic first piece are known, they are directly used as the labeled data set to train the basic detector. Therefore, VGG16 is used as the basic detector to train the network parameters to extract the geometric shape corner points;
[0015] S12: Interest point annotation. Use the basic detection network pre-trained in step S11 to extract the corner points of the flexographic first piece and the electronic proof respectively, and perform interest point annotation;
[0016] S13: Perform N homography transformations on the flexographic first piece and the electronic proof in step S12 respectively, and mark the interest points of each transformed image through the basic detector; randomly select images each time. Each time, construct a loss function from the interest points of two different poses. Use the self-labeling of the interest points of one pose as the ground truth, and the other pose as the observation result to construct an interest point loss function and a descriptor loss function. The training objective is to make the distance between matching points small and the distance between non-matching points large. After joint training, obtain the SuperPoint detection network and complete the SuperPoint detection.
[0017] Furthermore, since there is a large amount of repeated content information between the electronic proof and the flexographic first piece, which will cause a large amount of matching redundancy, use the GNN network with an attention mechanism combined with an assignment optimization solution method to solve the matching redundancy. The GNN network adopts an end-to-end training method and completes the matching through the following steps:
[0018] 1), Input the I-th visual feature descriptors corresponding to the electronic proof and the flexographic first piece respectively and as well as the coordinate positions and
[0019] 2), The GNN network first uses the Keypoint encoder to map the key point positions and as well as the visual descriptors and to the node information in the graph, and then uses self and cross attention as edges to aggregate the node information of the layers to obtain the super features and
[0020] 3), Finally, calculate the score matrix according to the super features, and output the row and column normalized assignment matrix after iterative optimization by the Sinkhorn algorithm. Take the feature point pairs corresponding to the horizontal and vertical coordinates of the maximum value in each column of the assignment matrix as the matching point pairs for affine transformation to complete the rough matching of the electronic proof and the flexographic first piece.
[0021] Furthermore, the specific process of step S2 is:
[0022] The content of the electronic proof is clear and black and white are distinct. Use a fixed threshold to extract the sub-content blocks F of different texts or patterns of the electronic proof s , Let the center point coordinates of the sub-content block be (X s , Y s ), and the size be (W s , H s ), with F sIt is a template diagram. NCC search and matching are performed within the corresponding area in the flexographic first-piece image R. Let the variable δ be the search expansion base. The NCC calculation for each search point (x, y) is as follows:
[0023]
[0024] Among them, f(x + m, y + n) is the gray value of the pixel point (x + m, y + n) in the electronic proof F, and r(m, n) is the gray value of the pixel point (m, n) in the flexographic first-piece image R. An ncc(x, y) similarity matrix of (2δ + 1)×(2δ + 1) is obtained. The pixel point corresponding to the maximum value of ncc(x, y) is denoted as:
[0025] P(X max , Y max ) = argmax[ncc(x, y)] (5)
[0026] According to P(X max , Y max ), the offset Δp is obtained by comparing it with the center point coordinates (X s , Y s );
[0027] ΔP = (X max - X s , Y max - Y s ) (6)
[0028] The sub-content block F s is translated by ΔP, and all sub-blocks are operated according to formulas (1)-(6) to complete the precise matching between the flexographic first-piece and the electronic proof.
[0029] Furthermore, 128 is used as a fixed threshold to extract the sub-content block F s of different texts or patterns in the electronic proof.
[0030] Furthermore, the step S3 includes constrained clustering: converting the flexographic first-piece image segmentation problem into an optimization problem with the smallest difference from the sample file segmentation diagram, that is:
[0031]
[0032]
[0033]
[0034] T ∈ [min(c1, c2), max(c1, c2)] (10)
[0035] Among them, F and R are the electronic proof and the flexographic first-piece image after "coarse - fine" matching respectively. Solve the clustering image R that satisfies (7)t This is the optimal segmentation result for the first flexographic printing piece. In order to reduce the solution time of the optimization algorithm, the K-means clustering method is used to obtain the cluster centers c1 and c2 to complete the initialization of the image segmentation of the first flexographic printing piece. In addition, (c1+c2) / 2 is used as one of the seeds for initializing the genetic algorithm, and the genetic algorithm is used to solve the optimization problem (7).
[0036] Furthermore, the step S3 also includes defect detection:
[0037] The first flexographic printing piece may cause burrs due to the disconnection of content strokes or local diffusion of ink. Constrained clustering segmentation is difficult to suppress this error, which affects subsequent defect detection. Therefore, the distance transformation method is proposed for defect assessment, and the edge distance function is defined as:
[0038]
[0039] in, is the pixel coordinate of the jth edge point of the i-th target in the electronic manuscript after thresholding, and the minimum bounding rectangle area of the target is δ F ,but is the first flexographic piece corresponding to δ after constrained clustering F The following strategy is used to evaluate a certain edge pixel point in the contour point set E in the region:
[0040]
[0041] Among them, T d The threshold parameter is set to 1.0, and (12) is used to evaluate the corresponding flexographic first piece of all target edge points of the electronic sample point by point. When the matching distance is greater than the set defect evaluation threshold parameter T d If it is found, it will be marked as a defect, otherwise it is a genuine printed product, thus completing the defect detection of the first flexographic printing piece.
[0042] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:
[0043] (1) The "coarse-fine" matching method is used to avoid the problem that the global matching algorithm alone performs poorly when matching areas with weak or repeated textures. The coarse matching combines the SuperPoint and GNN methods. Since the attention mechanism refers to the idea of people comparing two images, it aggregates self-attention and cross-attention, making the matching accuracy far higher than the brute force matching and fast nearest neighbor search algorithms. At the same time, the fine matching completes the fine-tuning of the local area content, which can achieve a complete match between the electronic sample and the flexographic first piece, thereby achieving pixel-level detection accuracy, and even subtle defects can be detected.
[0044] (2) Defect detection is carried out by proposing constrained clustering and defect evaluation, which not only solves the problem of difficult segmentation caused by the phenomenon of the first-piece label being transparent to the bottom, but also avoids the situation of false detection and over-killing caused by burrs due to local ink diffusion; it ensures the detection accuracy and speed of the algorithm, so that in the actual production process, the detection accuracy can be improved on the premise of meeting the production speed requirements;
[0045] (3) The method of this paper can complete the first-piece detection within a reasonable time. On the basis of ensuring that the missed detection rate is 0%, the false detection rate can be controlled within 1.6%. The average Dice coefficient of defect detection is as high as 0.924, and the detection time is only 2.774 s / pcs, which is in the same order of magnitude as the traditional algorithm and meets the requirements of actual engineering; therefore, the method of this paper is the optimal way among the existing fabric defect detection methods in the field of flexographic first-piece defect detection. Brief Description of the Drawings
[0046] Figure 1 is the flow chart of the method of the present invention;
[0047] Figure 2 is the specific processing procedure diagram of the method of the present invention;
[0048] Figure 3 is the schematic diagram of the SuperPoint training process. Detailed Embodiments
[0049] The drawings are only for illustrative purposes and should not be construed as a limitation of this patent;
[0050] In order to better illustrate this embodiment, some components in the drawings will be omitted, enlarged or reduced, which do not represent the dimensions of the actual product;
[0051] For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.
[0052] The technical solutions of the present invention will be further described below with reference to the drawings and embodiments.
[0053] Embodiment 1
[0054] As Figure 1 shown, a flexographic first-piece detection method based on an electronic proof includes the following steps:
[0055] S1: Extract the superpoints of the electronic proof and the flexographic first-piece to obtain the key point positions and visual feature descriptors of both, and complete the rough matching of the electronic proof and the flexographic first-piece;
[0056] S2: Perform fine matching on the electronic proof and the flexographic first-piece that have completed the rough matching in step S1;
[0057] S3: Perform defect detection on the first flexographic printing piece that has completed the fine matching in step S2.
[0058] Use the SuperPoint self-supervised network to extract superpoints of the electronic proof and the first flexographic printing piece. Among them, the training process of the SuperPoint self-supervised network is as follows:
[0059] S11: Pre-train the basic detector. Since the corner points of the virtual geometries of the electronic proof and the first flexographic printing piece are known, directly use them as the labeled dataset to train the basic detector. Therefore, use VGG16 as the basic detector and train the network parameters to extract the corner points of the geometry.
[0060] S12: Interest point annotation. Use the basic detection network pre-trained in step S11 to extract the corner points of the first flexographic printing piece and the electronic proof respectively, and perform interest point annotation.
[0061] S13: Perform N homography transformations on the first flexographic printing piece and the electronic proof in step S12 respectively, and use the basic detector to label the interest points of each transformed image respectively; randomly select images. Each time, construct a loss function from the interest points of two different poses. Use the interest points of one pose as the ground truth for self-annotation, and the other pose as the observation result to construct an interest point loss function and a descriptor loss function. The training objective is to make the distance between matching points small and the distance between non-matching points large. After joint training, obtain the SuperPoint detection network and complete the SuperPoint detection.
[0062] Since there is a large amount of duplicate content information between the electronic proof and the first flexographic printing piece, which will cause a large amount of matching redundancy, use the GNN network with an attention mechanism and combine the assignment optimization solution method to solve the matching redundancy. The GNN network uses an end-to-end training method to complete the matching through the following steps:
[0063] 1), Input the first visual feature descriptors and corresponding to the electronic proof and the first flexographic printing piece respectively and
[0064] 2), The GNN network first uses the Keypoint encoder to map the key point positions and as well as the visual descriptors and into the node information in the graph, and then uses self- and cross-attention as edges to aggregate the node information of the layers to obtain the super features and
[0065] 3) Finally, calculate the score matrix based on the super features, and after iterative optimization by the Sinkhorn algorithm, output the row and column normalized assignment matrix. Take the feature point pairs corresponding to the maximum values in each column of the assignment matrix in the horizontal and vertical coordinates as the matching point pairs for affine transformation to complete the rough matching between the electronic proof and the first flexographic printing piece.
[0066] Example 2
[0067] As Figure 1-2 shown, a method for detecting the first flexographic printing piece based on an electronic proof includes the following steps:
[0068] S1: Extract the super points of the electronic proof and the first flexographic printing piece to obtain the key point positions and visual feature descriptors of both, and complete the rough matching between the electronic proof and the first flexographic printing piece;
[0069] S2: Perform fine matching on the electronic proof and the first flexographic printing piece that have completed the rough matching in step S1;
[0070] S3: Perform defect detection on the first flexographic printing piece that has completed the fine matching in step S2.
[0071] Use the SuperPoint self-supervised network to extract the super points of the electronic proof and the first flexographic printing piece. Among them, the training process of the SuperPoint self-supervised network is as follows:
[0072] S11: Pre-train the basic detector. Since the corner points of the virtual geometries of the electronic proof and the first flexographic printing piece are known, directly use them as the labeled data set to train the basic detector. Therefore, use VGG16 as the basic detector to train the network parameters to extract the corner points of the geometry;
[0073] S12: Label the interest points. Use the basic detection network pre-trained in step S11 to extract the corner points of the first flexographic printing piece and the electronic proof respectively for interest point labeling;
[0074] S13: Perform N homography transformations on the first flexographic printing piece and the electronic proof in step S12 respectively, and label the interest points of each transformed image through the basic detector; Randomly select times of images. Each time, construct a loss function from the interest points of two different poses. Use the self-labeling of the interest points of one pose as the ground truth and the other pose as the observation result to construct an interest point loss function and a descriptor loss function. The training objective is to make the distance between matching points small and the distance between non-matching points large. After joint training, obtain the SuperPoint detection network and complete the SuperPoint detection.
[0075] Since there is a large amount of duplicate content information between the electronic proof and the first flexographic print, which will cause a large amount of matching redundancy, a GNN network with an attention mechanism is used and combined with an assignment optimization solution method to solve the matching redundancy. The GNN network adopts an end-to-end training method and completes the matching through the following steps:
[0076] 1), Input the first visual feature descriptors corresponding to the electronic proof and the first flexographic print respectively and as well as the coordinate positions and
[0077] 2), The GNN network first uses the Keypoint encoder to map the keypoint positions and as well as the visual descriptors and to the node information in the graph, and then uses self-attention and cross-attention as edges to aggregate the node information of the layers to obtain the super features and
[0078] 3), Finally, calculate the score matrix according to the super features, and output the row-column normalized assignment matrix after iterative optimization by the Sinkhorn algorithm. The feature point pairs corresponding to the maximum values in each column of the assignment matrix in the horizontal and vertical coordinates are used as the matching point pairs for affine transformation to complete the rough matching of the electronic proof and the first flexographic print.
[0079] The specific process of step S2 is as follows:
[0080] The content of the electronic proof is clear and the black and white are distinct. A fixed threshold (the fixed threshold is 128) is used to extract the sub-content blocks F of different texts or patterns of the electronic proof s , Let the center point coordinates of the sub-content block be (X s , Y s ), and the size be (W s , H s ). Taking F s as the template image, perform NCC search and matching in the corresponding area of the first flexographic print image R. Let the variable δ be the search expansion base, and the NCC calculation for each search point (x, y) is as follows:
[0081]
[0082] Among them, f(x + m, y + n) is the gray value of the pixel point (x + m, y + n) of the electronic proof F, and r(m, n) is the gray value of the pixel point (m, n) of the first flexographic print image R, obtaining an ncc(x, y) similarity matrix of (2δ + 1)×(2δ + 1). The pixel point corresponding to the maximum value of ncc(x, y) is denoted as:
[0083] P(X max ,Y max ) = argmax[ncc(x, y)] (5)
[0084] According to P(X max ,Y max ) and the center point coordinates (X s ,Y s ), the offset ΔP is obtained;
[0085] ΔP = (X max - X s ,Y max - Y s ) (6)
[0086] Translate the sub - content block F s by ΔP, and all sub - blocks can complete the precise matching between the first flexographic print and the electronic proof according to formulas (1) - (6).
[0087] Step S3 includes constrained clustering: converting the problem of segmenting the first flexographic print image into an optimization problem with the smallest difference from the segmentation map of the proof file, that is:
[0088]
[0089]
[0090]
[0091] T ∈ [min(c1, c2), max(c1, c2)] (10)
[0092] where F and R are the electronic proof and the first flexographic print image after "coarse - fine" matching respectively. Solving the clustering image R that satisfies (7) t is the best segmentation result of the first flexographic print. To reduce the solution time of the optimization algorithm, the K - means clustering method is used to obtain the clustering centers c1 and c2, complete the initialization of the first flexographic print image segmentation, and use (c1 + c2) / 2 as one of the seeds for the initialization of the genetic algorithm, and use the genetic algorithm to solve the optimization problem (7).
[0093] Step S3 also includes defect detection:
[0094] The first flexographic print may have burrs due to broken content strokes or local ink diffusion and protrusion. Constrained clustering segmentation is difficult to suppress this error, affecting subsequent defect detection. Therefore, the distance transformation method is proposed for defect evaluation, and the edge distance function is defined as:
[0095]
[0096] where, is the pixel coordinate of the j-th edge point of the i-th target in the thresholded electronic proof. Let the minimum circumscribed rectangle region of this target be δ F , then is a certain edge pixel point in the set E of contour points corresponding to δ within the region of the flexographic first-piece after constrained clustering, and the following strategy is used for evaluation: F Among them, T
[0097]
[0098] where the threshold parameter T d is set to 1.0. Using (12) to evaluate each point of all target edge points of the electronic proof for the corresponding flexographic first-piece, when the matching distance is greater than the set defect evaluation threshold parameter T d , it is marked as a defect, otherwise it belongs to printed genuine products, that is, the defect detection of the flexographic first-piece is completed.
[0099] Embodiment 3
[0100] As Figure 1-2 shown, this patent proposes a flexographic first-piece detection method based on an electronic proof, which is used to solve the defect detection problem of flexographic labels. The specific steps are as follows:
[0101] (1) Coarse matching
[0102] Since the content of the electronic proof and the flexographic first-piece varies in thickness and has a large difference in gray-scale characteristics, the features extracted by traditional methods cannot accurately describe the electronic proof and the flexographic first-piece. And SuperPoint uses a deep learning network and a pose calculation loss function, so it can better represent the common features between the two images. Therefore, the SuperPoint self-supervised network is used to extract the superpoints of the electronic proof and the flexographic first-piece. To improve the generalization ability, the pictures are randomly scaled and rotated during the training stage for data augmentation. The training of the SuperPoint self-supervised network is divided into three steps (as Figure 3 shown):
[0103] A. Pre-training of the basic detector. Since the corner points of the virtual geometric shapes of the electronic proof and the flexographic first-piece are known, they are directly used as the labeled data set to train the basic detector. Using VGG16 as the basic detector, the network parameters are trained to extract the geometric shape corner points.
[0104] B. Interest point annotation. The corner points of the flexographic first-piece and the electronic proof are respectively extracted using the pre-trained basic detection network in step A for interest point annotation.
[0105] C. SuperPoint detection:
[0106] ①To enhance the generalization ability of the network, perform N homography transformations on the first flexographic print and the electronic proof respectively in step B, and mark the interest points of each transformed image through the basic detector respectively.
[0107] ②Joint training. Randomly select images. Each time, construct a loss function from the interest points of two different poses extracted. Use the self-annotation of the interest points of one pose as the ground truth, and the other pose as the observation result to construct an interest point loss function and a descriptor loss function. The training objective is to make the distance between matching points small and the distance between non-matching points large. After joint training, the SuperPoint detection network is obtained.
[0108] Since there is a large amount of repetitive content information between the electronic proof and the first flexographic print, and the traditional matching method only matches based on the similarity of each group of feature descriptors, a large amount of matching redundancy may be caused. Using the GNN network with an attention mechanism and combining with the distributed optimization solution method can solve the complex feature matching problem. The GNN network adopts an end-to-end training method and completes the matching through the following steps:
[0109] ①Input the I-th visual feature descriptors corresponding to the electronic proof and the first flexographic print respectively and as well as the coordinate positions and
[0110] ②The GNN network first uses the Keypoint encoder to map the key point positions and as well as the visual descriptors and to the node information in the graph, and then uses self and cross attention as edges to aggregate the node information of the layers to obtain the super features and
[0111] ③Finally, calculate the score matrix based on the super features, and output the row and column normalized assignment matrix after iterative optimization by the Sinkhorn algorithm. Use the feature point pairs corresponding to the horizontal and vertical coordinates of the maximum value in each column of the assignment matrix as the matching point pairs for affine transformation to complete the rough matching of the electronic proof and the first flexographic print.
[0112] (2) Fine matching
[0113] After rough matching, the electronic proof and the first flexographic print images are basically aligned. However, due to the local relative offset of the plate during the flexographic process, there is always a local deviation between the content of the first flexographic print and the electronic proof, making it difficult to achieve complete content alignment with global affine transformation or perspective transformation.
[0114] The electronic proof is clear with distinct black and white. The sub-content blocks F of different texts or patterns in the electronic proof are extracted using a fixed threshold (the fixed threshold is 128). s , and let the center point coordinates of the sub-content block be (X s , Y s ), and the size be (W s , H s ). Taking F s as the template image, NCC search and matching are performed in the corresponding area of the first flexographic print image R. Let the variable δ be the search expansion base, and the NCC calculation for each search point (x, y) is as follows:
[0115]
[0116] x ∈ [x s - δ: X s + δ], y ∈ [Y s - δ: Y s + δ] (2)
[0117]
[0118]
[0119] Among them, f(x + m, y + n) is the gray value of the pixel point (x + m, y + n) in the electronic proof F, and r(m, n) is the gray value of the pixel point (m, n) in the first flexographic print image R, obtaining an ncc(x, y) similarity matrix of (2δ + 1) × (2δ + 1). The pixel point corresponding to the maximum value of ncc(x, y) is denoted as:
[0120] P(X max , Y max ) = argmax[ncc(x, y)] (5)
[0121] According to P(X max , Y max ) and the center point coordinates (X s , Y s ), the offset ΔP is obtained;
[0122] ΔP = (X max - X s , Y max - Y s ) (6)
[0123] Translate the sub-content block F s by ΔP, and all sub-blocks can complete the precise matching between the first flexographic print and the electronic proof according to the formulas (1) - (6).
[0124] (3) Defect detection
[0125] ① Constrained clustering
[0126] The uneven color and thickness of the fabric substrate may cause the phenomenon of ink showing through, resulting in possible errors in the segmentation of the first-piece content of flexographic printing. Therefore, a constrained clustering method is proposed to accurately extract the first-piece content of flexographic printing with the thresholding result of the fine-tuned electronic proof as the constraint condition. The problem of segmenting the first-piece image of flexographic printing is transformed into an optimization problem with the smallest difference from the segmentation map of the proof file, that is:
[0127]
[0128]
[0129]
[0130] T ∈ [min(c1, c2), max(c1, c2)] (10)
[0131] where F and R are the electronic proof and the first-piece image of flexographic printing after "coarse-fine" matching respectively, and solve the clustering image R that satisfies (7) t which is the best segmentation result of the first-piece of flexographic printing. To reduce the solution time of the optimization algorithm, the K-means clustering method is used to obtain the clustering centers c1 and c2, complete the initialization of the segmentation of the first-piece image of flexographic printing, and use (c1 + c2) / 2 as one of the seeds for the initialization of the genetic algorithm, and use the genetic algorithm to solve the optimization problem (7).
[0132] ② Defect assessment
[0133] The first-piece of flexographic printing may have burrs due to broken strokes of the content or local diffusion and protrusion of the ink. Constrained clustering segmentation is difficult to suppress this error, which affects subsequent defect detection. Therefore, a distance transformation method is proposed for defect assessment. Define the edge distance function as:
[0134]
[0135] where is the pixel coordinate of the j-th edge point of the i-th target in the thresholded electronic proof, and let its minimum bounding rectangle region of this target be δ F , then is a certain edge pixel point in the set E of contour points in the corresponding δ F region of the first-piece of flexographic printing after constrained clustering, and the following strategy is used for assessment:
[0136]
[0137] where T d is the threshold parameter. Since there are slight thickness deviations between the first-piece of flexographic printing and the content of the electronic proof, and the enterprise's actual production requirement is to give an early warning when the defect exceeds 0.3 square millimeters, so set Td is 1.0, and (12) is used to evaluate each target edge point of the electronic proof sample for the corresponding flexographic first article. When the matching distance is greater than the set defect evaluation threshold parameter T d , it is marked as a defect; otherwise, it belongs to a printed genuine product, and the defect detection of the flexographic first article can be completed.
[0138] The same or similar reference numerals correspond to the same or similar components;
[0139] The description of the positional relationship in the drawings is for illustrative purposes only and should not be construed as a limitation of this patent;
[0140] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention and are not limitations on the implementation manners of the present invention. For those of ordinary skill in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to enumerate all the implementation manners here. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the claims of the present invention.
Claims
1. A flexographic printing first-piece detection method based on an electronic proof, characterized in that, it includes the following steps: S1: Extract the superpoints of the electronic proof and the flexographic printing first-piece to obtain the key point positions and visual feature descriptors of both, and complete the rough matching of the electronic proof and the flexographic printing first-piece; In the step S1, the SuperPoint self-supervised network is used to extract the superpoints of the electronic proof and the flexographic printing first-piece; S2: Perform fine matching on the electronic proof and the flexographic printing first-piece that have completed the rough matching in step S1; S3: Perform defect detection on the flexographic printing first-piece that has completed the fine matching in step S2; The training process of the SuperPoint self-supervised network is as follows: S11: Use VGG16 as the basic detector to train the network parameters to extract the corner points of geometric shapes; S12: Interest point annotation, use the pre-trained basic detection network in step S11 to extract the corner points of the flexographic printing first-piece and the electronic proof respectively, and perform interest point annotation; S13: Perform N homography transformations on the first flexographic print and the electronic proof in step S12 respectively, and mark the interest points of each transformed image through the basic detector; randomly select times of images. Each time, construct a loss function from the interest points of two different poses. Use the self-annotation of the interest points of one pose as the ground truth, and the other pose as the observation result to construct an interest point loss function and a descriptor loss function. The training objective is to make the distance between matching points small and the distance between non-matching points large. After joint training, obtain the SuperPoint detection network and complete the SuperPoint detection; Since there is a large amount of duplicate content information between the electronic proof and the flexographic printing first-piece, which will cause a large amount of matching redundancy, the GNN network with an attention mechanism is used and combined with the assignment optimization solution method to solve the matching redundancy. The GNN network uses an end-to-end training method to complete the matching through the following steps: 1), the I-th visual feature descriptor corresponding to the input electronic proof and the first flexographic sample respectively and and the coordinate position and 2) The GNN network first uses the Keypoint encoder to map the keypoint positions and as well as the visual descriptors and to the node information in the graph, and then uses self- and cross-attention as edges to aggregate the node information of the layers to obtain the hyper features f l F and f l R ; 3), Finally, calculate the score matrix according to the super features, and output the row-column normalized assignment matrix after iterative optimization by the Sinkhorn algorithm; use the feature point pairs corresponding to the horizontal and vertical coordinates of the maximum value in each column of the assignment matrix as the matching point pairs for affine transformation to complete the rough matching of the electronic proof and the flexographic printing first-piece; The specific process of the step S2 is: The electronic proof is clear and has distinct black and white. The sub-content blocks F of different texts or patterns of the electronic proof are extracted using a fixed threshold. s , and let the center point coordinates of the sub-content block be (X s , Y s ), and the size be (W s , H s ). Using F s as the template image, NCC search and matching are performed within the corresponding region in the flexographic first-piece image R.
2. The flexographic printing first-piece detection method based on an electronic proof according to claim 1, characterized in that, Since the corner points of the virtual geometric shapes of the electronic proof and the flexographic printing first-piece are known, they are directly used as the labeled data set to train the basic detector.
3. The flexographic printing first-piece detection method based on an electronic proof according to claim 2, characterized in that, Let the variable δ be the search expansion base number, and the NCC calculation corresponding to each search point (x, y) is as follows: x ∈ [X s −δ : X s +δ], y ∈ [Y s −δ : Y s +δ](2) Among them, f(x + m, y + n) is the gray value of the pixel point (x + m, y + n) of the electronic proof F, and r(m, n) is the gray value of the pixel point (m, n) of the flexographic printing first-piece image R, to obtain the ncc(x, y) similarity matrix of (2δ + 1)×(2δ + 1), and the pixel point corresponding to the maximum value of ncc(x, y) is denoted as: P(X max ,Y max ) = argmax[ncc(x,y)] (5) According to P(X max , Y max ) and the center point coordinates (X s , Y s ), the offset ΔP is obtained; ΔP = (X max - X s , Y max - Y s ) (6) Translate the sub-content block F s Translate by ΔP, and all sub-blocks can complete the precise matching between the first flexographic print and the electronic proof according to formulas (1)-(6).
4. The flexographic printing first-piece detection method based on an electronic proof according to claim 3, characterized in that, Use 128 as a fixed threshold to extract the sub-content blocks F of different texts or patterns in the electronic proof s .
5. The flexographic printing first-piece detection method based on an electronic proof according to claim 4, characterized in that, The step S3 includes constrained clustering: converting the flexographic printing first-piece image segmentation problem into an optimization problem with the smallest difference from the sample file segmentation map, that is: T ∈ [min(c1, c2), max(c1, c2)](10) Among them, F and R are respectively the electronic proof and the first flexographic print image after "coarse - fine" matching, and the clustering image R that satisfies (7) is solved t That is the best segmentation result of the first flexographic print. To reduce the solution time of the optimization algorithm, the K - means clustering method is used to obtain the clustering centers c1 and c2, complete the initialization of the first flexographic print image segmentation, and use (c1 + c2) / 2 as one of the seeds for the initialization of the genetic algorithm. The genetic algorithm is used to solve the optimization problem (7).
6. The flexographic printing first-piece detection method based on an electronic proof according to claim 5, characterized in that, The step S3 further includes defect detection: The first flexographic printing piece may have burrs due to broken strokes in the content or local ink diffusion and protrusion. It is difficult for constrained clustering segmentation to suppress this kind of error, which affects subsequent defect detection. Therefore, a distance transformation method is proposed for defect evaluation, and the edge distance function is defined as: Among them, is the pixel coordinate of the j-th edge point of the i-th target in the thresholded electronic proof. Let the minimum circumscribed rectangle area of this target be δ F , then is a certain edge pixel point in the set E of contour points corresponding to the first flexographic piece after constrained clustering within the δ F area. The following strategy is used for evaluation: Among them, T d is a threshold parameter. The flexographic first article corresponding to all target edge points of the electronic proof is evaluated point by point using (12). When the matching distance is greater than the set defect evaluation threshold parameter T d it is marked as a defect; otherwise, it belongs to the printed genuine product, that is, the defect detection of the flexographic first article is completed.
7. The flexographic printing first-piece detection method based on an electronic proof according to claim 6, characterized in that The said T d is set to 1.0.
Citation Information
Patent Citations
Flexographic label printing first draft detection system based on machine vision and implementation method thereof
CN110940670A
Method for matching design draft and first print draft of multi-table flexographic label
CN113888487A