A method for matching multi-sheet flexographic label design draft with the first printing draft

Through the matching method from coarse to fine, combined with SURF and RANSAC algorithms, the problems of low efficiency and insufficient accuracy in flexographic label detection are solved, and efficient and accurate detection in multi-table production is achieved.

CN113888487BInactive Publication Date: 2025-08-08NANCHANG XINLI TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111117588.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-23
Publication Date
2025-08-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art has problems such as low detection efficiency, insufficient accuracy and high false detection rate in the production of flexographic labels, especially in multi-meter production, which is difficult to meet the requirements of production speed and accuracy.

Method used

The matching method from coarse to fine is adopted, including image preprocessing, two simple coarse matches and one fine match, combined with the SURF algorithm and the RANSAC algorithm, and efficient detection of multi-table flexographic labels is achieved by setting thresholds.

Benefits of technology

It improves the accuracy and production speed of flexographic label detection, meets the speed requirements of multi-meter production, and reduces the false detection rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113888487B_ABST
    Figure CN113888487B_ABST
Patent Text Reader

Abstract

The present invention provides a matching method for a multi-table flexographic label design draft and a first printing draft. The method adopts a coarse-to-fine matching method to avoid the problem that a Speeded Up Robust Features (SURF) algorithm alone performs poorly when matching areas with weak or repeated textures. At the same time, a simple coarse matching algorithm is used to ensure the matching efficiency of the SURF algorithm. Two simple coarse matches and one fine match are used to enable the algorithm to be compatible with solving single-table and multi-table problems, while ensuring the detection accuracy and speed of the algorithm, so that in an actual production process, the matching accuracy is improved while meeting production speed requirements. The algorithm makes an image to be tested roughly close to a template through two simple coarse matches, and then eliminates some erroneous matches caused by repeated textures by setting a row difference threshold between matching point pairs during the fine matching process, so that the algorithm is compatible with solving single-table and multi-table problems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of textile industry testing, and more particularly to a method for matching a multi-sheet flexographic label design draft with a first printing draft. Background Art

[0002] Flexographic labels are a type of textile printed product, and similar to the production process of most printed products, their primary ingredient is ink. During the flexographic label production process, customer orders are archived in PDF format. Film templates are then created and installed in designated locations on the printing equipment. Once the equipment is commissioned, mass production can begin. However, uncontrollable factors can arise during film production and installation, such as missing characters in certain areas of the film, discrepancies between the content and the PDF, and the presence of dust during film installation. Failure to verify the print quality before printing can easily lead to large quantities of defective products, resulting in significant losses for the factory. Currently, flexographic printing workshops generally employ a double-check process, requiring operators to conduct spot checks. Each machine is assigned a QA inspector to oversee the printing results. Despite this, printed labels are printed in over 5,000 languages worldwide, with labels made of varying materials and colors, numerous fonts and designs, and densely packed characters. This densely packed document requires manual verification of thousands of characters printed in non-native languages for accuracy, making inspections challenging for quality control personnel. Even if labels are inspected every five minutes, batches of printed labels can still be misprinted due to improper inspections, leading to the scrapping of entire products. This also results in nearly one customer complaint per quarter. The dense, often small, character density of labels creates a degree of subjectivity in manual inspections. This long inspection process can lead to eye fatigue, resulting in some defective products being passed to later stages of production. Furthermore, manual inspections are extremely inefficient, making them impractical for companies seeking to implement assembly line production models. Therefore, sound inspection methods are crucial.

[0003] CN201911165609.3 A machine vision-based flexographic label printing first draft detection system and its implementation method. This method establishes a PDF template for the flexographic label, performs binarization on the template image, and determines the content area of the drawing to be tested; collects images of the object to be tested during linear motion; uses the SURF algorithm and the RANSAC algorithm to perform splicing processing on the collected images to be tested; then matches the spliced images to the content area of the drawing to be tested, thereby determining the printed drawing of the object to be tested; finally, based on the printed drawing, performs defect detection on the drawing to be tested to determine the defect location; in order to save costs, this patent uses a camera to capture images, resulting in the inability to capture all images at once, thus requiring the images to be spliced. The splicing process is not only time-consuming, but also such rough splicing will have a certain impact on the accuracy of the subsequent matching algorithm, thereby reducing the accuracy of defect detection; the matching process only uses the SURF algorithm, so the algorithm will make errors when facing repeated textures, resulting in single-point and multi-point pairing. In actual production, multiple tables are produced at once for smaller labels to improve production efficiency. Therefore, SURF must be preprocessed before use to allow the algorithm to remove some duplicate matching pairs. CN201910105678.9 An efficient dense matching method for image pairs with repetitive textures and non-rigid deformations. This method downsamples the image pairs to be matched to obtain a sparse set of matching points. It then uses a consistent random sampling method to remove outliers from the set. The matching results from the previous step are used to estimate the camera pose and scale, determine the neighborhood for each point pair during the densification process, extract the HOG descriptors of the neighborhood where the inliers are located, and convolve them to obtain a score matrix. Finally, the normalized score matrix is used to filter the relative coordinates of the newly added matching point set and restore them to absolute coordinates on the matching image pairs to achieve dense matching. This patented algorithm densifies the matching point set based on DM and reduces the time cost through downsampling. However, in actual production, the time cost of this algorithm is still unacceptable, and dense matching of the template and the image to be tested is not necessary in actual production. The algorithm obtains the neighborhood of each point pair from the initial sparse matching point set, which is of certain reference value for solving repeated texture matching. However, the subsequent densification processing, such as calculating the HOG descriptors and score matrix, consumes a lot of time, making this method unsuitable for actual production compared to our algorithm. Summary of the Invention

[0004] The present invention provides a method for matching a multi-sheet flexographic label design draft with a first printing draft. The method can improve the accuracy of matching while meeting production speed requirements.

[0005] In order to achieve the above technical effects, the technical solutions of the present invention are as follows:

[0006] A method for matching a multi-sheet flexographic label design draft with a first printing draft comprises the following steps:

[0007] S1: Collect the drawing and the image to be tested and perform image preprocessing;

[0008] S2: Perform the first matching between the drawing and the image to be tested;

[0009] S3: Perform a second match between the drawing and the image to be tested;

[0010] S4: Perform a third match between the drawing and the image to be tested;

[0011] S5: Perform defect detection on the drawing and the image to be tested.

[0012] Furthermore, in step S1, the drawing image and the image to be tested are obtained by screenshot and scanner acquisition respectively. First, the drawing image and the image to be tested are binarized, and their content areas are changed to white and the background is changed to black; then the two images are closed using a circular structural element to find the content areas of the two images.

[0013] Furthermore, in step S2, the minimum enclosing rectangle of the drawing image and the content area of the image to be tested is first found, a transformation matrix is constructed based on the four points of the minimum enclosing rectangle, and then the content area of the image to be tested is transformed according to this transformation matrix so that the shape and size of the content area of the image to be tested are consistent with the content area of the drawing image.

[0014] Furthermore, in step S3, the projections of the image to be tested and the draft image in the vertical and horizontal directions after the first matching are calculated, and then the vertical and horizontal offsets are obtained according to the function. Finally, the image to be tested is corrected again according to the offset to make the two closer.

[0015] Furthermore, in step S4, the accelerated robust feature algorithm SURF is used to calculate the feature points and feature vectors of the image to be tested and the draft image after the first two matches; then the fast nearest neighbor search package FLANN is used to calculate the matching point pairs of the two; due to the multi-table situation, repeated textures will exist in the image, because the matching point pairs will appear one-to-many; a threshold is introduced, and due to the previous two matches, the image to be tested and the draft image are very close, so when the row difference between the matching point pairs exceeds this threshold, it is considered to be a false match and is eliminated; finally, the random sampling consensus algorithm RANSAC is used to calculate the transformation matrix for the remaining matching point pairs, and the image to be tested is transformed to obtain an accurate matching result.

[0016] Furthermore, in step S5, a difference method is used to detect printing defects in the image to be tested and the template image after matching.

[0017] Furthermore, the specific process of step S1 is:

[0018] First, the draft drawing is denoted as Figure P ori It is a black and white picture. The image is 8-bit, so we can directly use the middle gray value 128 as the threshold to convert the drawing into a binary drawing and record it as Figure P Bin , change the content area to white grayscale value 255, and the background to black grayscale value 0. Then, according to the result of the drawing binarization, search for a certain area between 70-150 with a grayscale threshold interval of 5, and find the binary image to be tested. Note that the original image to be tested is Figure S ori The value with the smallest difference from the binary drawing content is used as the binary threshold of the image to be tested, and the value of the image to be tested is obtained by using this threshold. Figure 2 The value graph is denoted as graph S Bin .

[0019] Furthermore, the specific process of step S2 is:

[0020] Use a circle structure element with a diameter greater than the line and font spacing to perform a closing operation on the binary drawing and the binary image to be tested, and connect the content area into one area recorded as a block. p and image blocks s ; Simultaneously calculate the graph Block p and image blocks s Minimum rotated bounding rectangle Rect p and Rect s , and construct the transformation matrix based on the four points of the two pairs of rectangles, and block the image s Become the same as the diagram Block p The image with the same vertex position is matched for the first time, and the image to be tested after the first transformation is recorded as image S oricg1 .

[0021] Furthermore, the specific process of step S3 is:

[0022] Simultaneously compute graph P ori and Figure S oricg1 The vertical and horizontal projections are denoted as V P and V S , H P and H S , according to the optimization objective function formulas (1) and (2), the offsets ΔV and ΔH are obtained respectively, and the graph S is corrected according to the offsets oricg1 To Figure P ori A closer posture, the result of the second matching is recorded as S oricg2 :

[0023]

[0024] Among them, V P and V S , H P and H S Figure P ori and Figure S oricg1 The vertical and horizontal projections, ΔV and ΔH are shown in Figure S oricg1 Relative Graph P ori The vertical and horizontal offsets, N and M are the width and height of the image respectively.

[0025] Furthermore, the specific process of step S4 is:

[0026] Simultaneously compute graph P ori and Figure S oricg2 SURF feature points and feature vectors are used to calculate matching point pairs through FLANN, and the wrong matching points are eliminated according to the position offset of the point pairs. The specific implementation method is as follows: find the matching point pair S P and S S If the row difference is greater than 5 pixels, the pair of matching points is eliminated because the matching point pair may be a false matching point caused by repeated textures; the RANSAC method is used on the remaining inliers to obtain the final transformation matrix, and finally the multi-table accurate matching result is obtained.

[0027] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:

[0028] The present invention adopts a coarse-to-fine matching method to avoid the problem of poor performance of the SURF algorithm when matching areas with weak textures or repeated textures when used alone. At the same time, a simple coarse matching algorithm can also ensure the matching efficiency of the SURF algorithm. Two simple coarse matches and one fine match enable the algorithm to be compatible with solving single-table and multi-table problems, while ensuring the detection accuracy and speed of the algorithm, so that in the actual production process, the matching accuracy is improved while meeting the production speed requirements. The algorithm makes the image to be tested roughly close to the template through two simple coarse matches, and then eliminates some false matches caused by repeated textures by setting a row difference threshold between matching point pairs in the fine matching process, so that the algorithm can be compatible with solving single-table and multi-table problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 is a flow chart of the method of the present invention;

[0030] Figure 2 (a) is the drawing obtained after PDF conversion, Figure 2 (b) is the first sample drawing after matching. DETAILED DESCRIPTION

[0031] The accompanying drawings are for illustrative purposes only and are not to be construed as limiting this patent;

[0032] In order to better illustrate this embodiment, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product size;

[0033] It is understandable to those skilled in the art that some well-known structures and descriptions thereof may be omitted in the drawings.

[0034] The technical solution of the present invention is further described below with reference to the accompanying drawings and embodiments.

[0035] like Figure 1 As shown, a method for matching a multi-sheet flexographic label design draft with a first printing draft includes the following steps:

[0036] S1: Collect the drawing and the image to be tested and perform image preprocessing;

[0037] S2: Perform the first matching between the drawing and the image to be tested;

[0038] S3: Perform a second match between the drawing and the image to be tested;

[0039] S4: Perform a third match between the drawing and the image to be tested;

[0040] S5: Perform defect detection on the drawing and the image to be tested.

[0041] Furthermore, in step S1, the drawing image and the image to be tested are obtained by screenshot and scanner acquisition respectively. First, the drawing image and the image to be tested are binarized, and their content areas are changed to white and the background is changed to black; then the two images are closed using a circular structural element to find the content areas of the two images.

[0042] In step S2, first find the minimum enclosing rectangle of the drawing image and the content area of the image to be tested, construct a transformation matrix based on the four points of the minimum enclosing rectangle, and then transform the content area of the image to be tested based on this transformation matrix so that the shape and size of the content area of the image to be tested are consistent with the content area of the drawing image.

[0043] In step S3, the projections of the image to be tested and the draft image in the vertical and horizontal directions after the first matching are calculated, and then the vertical and horizontal offsets are obtained according to the function. Finally, the image to be tested is corrected again according to the offset to make the two closer.

[0044] In step S4, the accelerated robust feature algorithm SURF is used to calculate the feature points and feature vectors of the image to be tested and the draft image after the first two matches; then the fast nearest neighbor search package FLANN is used to calculate the matching point pairs of the two; due to the multi-table situation, repeated textures will exist in the image, because the matching point pairs will appear one-to-many; a threshold is introduced, and due to the previous two matches, the image to be tested and the draft image are very close, so when the row difference between the matching point pairs exceeds this threshold, it is considered to be a false match and is eliminated; finally, the random sampling consensus algorithm RANSAC is used to calculate the transformation matrix for the remaining matching point pairs, and the image to be tested is transformed to obtain an accurate matching result.

[0045] In step S5, the printing defects in the image to be tested are detected by using a difference method on the matched image to be tested and the template image.

[0046] The specific process of step S1 is:

[0047] First, the draft drawing is denoted as Figure P ori It is a black and white picture. The image is 8-bit, so we can directly use the middle gray value 128 as the threshold to convert the drawing into a binary drawing and record it as Figure P Bin , change the content area to white grayscale value 255, and the background to black grayscale value 0. Then, according to the result of the drawing binarization, search for a certain area between 70-150 with a grayscale threshold interval of 5, and find the binary image to be tested. Note that the original image to be tested is Figure S ori The value with the smallest difference from the binary drawing content is used as the binary threshold of the image to be tested, and the value of the image to be tested is obtained by using this threshold. Figure 2 The value graph is denoted as graph S Bin .

[0048] The specific process of step S2 is:

[0049] A circle structure element with a diameter greater than the line and font spacing is used to perform a closing operation on the binary drawing image and the binary image to be tested, and the content area is connected into one area and recorded as a block. p and image blocks s ; Simultaneously calculate the graph Block p and image blocks s Minimum rotated bounding rectangle Rect p and Rect s , and construct the transformation matrix based on the four points of the two pairs of rectangles, and block the image s Become the same as the diagram Block p The image with the same vertex position is matched for the first time, and the image to be tested after the first transformation is recorded as image S oricg1 .

[0050] The specific process of step S3 is:

[0051] Simultaneously compute graph P ori and Figure S oricg1 The vertical and horizontal projections are denoted as V P and V S , H P and H S , according to the optimization objective function formulas (1) and (2), the offsets ΔV and ΔH are obtained respectively, and the graph S is corrected according to the offsets oricg1 To Figure P ori A closer posture, the result of the second matching is recorded as S oricg2 :

[0052]

[0053] Among them, V P and V S , H P and H S Figure P ori and Figure S oricg1 The vertical and horizontal projections, ΔV and ΔH are shown in Figure S oricg1 Relative Graph P ori The vertical and horizontal offsets, N and M are the width and height of the image respectively.

[0054] The specific process of step S4 is:

[0055] Simultaneously compute graph P ori and Figure S oricg2 SURF feature points and feature vectors are used to calculate matching point pairs through FLANN, and the wrong matching points are eliminated according to the position offset of the point pairs. The specific implementation method is as follows: find the matching point pair S P and S S If the row difference is greater than 5 pixels, the pair of matching points is eliminated because the matching point pair may be a false matching point caused by repeated textures; the RANSAC method is used to obtain the final transformation matrix for the remaining inliers, and finally the multi-table exact matching result is obtained. The matching result is as follows Figure 2 shown.

[0056] The same or similar reference numerals correspond to the same or similar components;

[0057] The positional relationships described in the drawings are for illustrative purposes only and should not be construed as limiting this patent.

[0058] Obviously, the above embodiments of the present invention are merely examples for the purpose of clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Those skilled in the art will appreciate that other variations or modifications can be made based on the above description. It is not necessary and impossible to enumerate all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the claims of the present invention.

Claims

1. A method for matching a multi-sheet flexographic label design draft with a first printing draft, characterized in that: The following steps are involved: S1: Collect the drawing and the image to be tested and perform image preprocessing; S2: Perform the first matching of the draft image and the image to be tested. The process includes: first, finding the minimum bounding rectangle of the content area of the draft image and the image to be tested, constructing a transformation matrix based on the four points of the minimum bounding rectangle, and then transforming the content area of the image to be tested based on this transformation matrix so that the shape and size of the content area of the image to be tested are consistent with those of the draft image; S3: Perform a second match between the draft image and the image to be tested. The process includes: calculating the vertical and horizontal projections of the image to be tested and the draft image after the first match, and then using the optimization function based on the projections in the two directions to obtain the vertical and horizontal offsets. Finally, based on the offsets, the image to be tested is corrected again to make the two closer. S4: Perform a third match on the draft image and the image to be tested. The process includes: using the accelerated robust feature algorithm SURF on the image to be tested and the draft image after the first two matches to calculate feature points and feature vectors; then using the fast nearest neighbor search package FLANN to calculate the matching point pairs between the two; due to the multi-table situation, repeated textures will exist in the image, which will cause one-to-many matching point pairs; introducing a threshold. Due to the previous two matches, the image to be tested and the draft image are very close, so when the row difference between the matching point pairs exceeds this threshold, it is considered a false match and is eliminated; finally, the random sampling consensus algorithm RANSAC is used to calculate the transformation matrix for the remaining matching point pairs, and the image to be tested is transformed to obtain an accurate matching result; S5: Perform defect detection on the drawing and the image to be tested.

2. The method for matching a multi-sheet flexographic label design draft with a first printing draft according to claim 1, characterized in that: In step S1, the drawing image and the image to be tested are obtained by screenshot and scanner acquisition respectively. First, the drawing image and the image to be tested are binarized, and their content areas are changed to white and the background is changed to black; then the two images are closed using a circular structure element to find the content areas of the two images.

3. The method for matching a multi-sheet flexographic label design draft with a first printing draft according to claim 2, characterized in that: In step S5, the printing defects in the image to be tested are detected by using a difference method between the matched image to be tested and the template image.

4. The method for matching a multi-sheet flexographic label design draft with a first printing draft according to claim 3, characterized in that: The specific process of step S1 is: First, the draft drawing is denoted as Figure P ori It is a black and white picture. The image is 8-bit, so we can directly use the middle gray value 128 as the threshold to convert the drawing into a binary drawing and record it as Figure P Bin , change the content area to white grayscale value 255, and the background to black grayscale value 0. Then, according to the result of the drawing binarization, search for a certain area between 70-150 with a grayscale threshold interval of 5, and find the binary image to be tested. Note that the original image to be tested is Figure S ori The value with the smallest difference from the binary drawing content is used as the binarization threshold of the image to be tested. The binary image of the image to be tested is obtained by using this threshold and is recorded as image S Bin .

5. The method for matching a multi-sheet flexographic label design draft with a first printing draft according to claim 4, characterized in that: The specific process of step S2 is: A circle structure element with a diameter greater than the line and font spacing is used to perform a closing operation on the binary drawing image and the binary image to be tested, and the content area is connected into one area and recorded as a block. p and image blocks s ; Simultaneously calculate the graph Block p and image blocks s Minimum rotated bounding rectangle Rect p and Rect s , and construct the transformation matrix based on the four points of the two pairs of rectangles, and block the image s Become the same as the diagram Block p The image with the same vertex position is matched for the first time, and the image to be tested after the first transformation is recorded as image S oricg1 .

6. The method for matching a multi-sheet flexographic label design draft with a first printing draft according to claim 5, characterized in that: The specific process of step S3 is: Simultaneously compute graph P ori and Figure S oricg1 The vertical and horizontal projections are denoted as V P and V S , H P and H S , according to the optimization objective function formulas (1) and (2), the offsets ΔV and ΔH are obtained respectively, and the graph S is corrected according to the offsets oricg1 To Figure P ori A closer posture, the result of the second matching is recorded as S oricg2 : Among them, V P and V S , H P and H S Figure P ori and Figure S oricg1 The vertical and horizontal projections, ΔV and ΔH are shown in Figure S oricg1 Relative Figure P ori The vertical and horizontal offsets, N and M are the width and height of the image respectively.

7. The method for matching a multi-sheet flexographic label design draft with a first printing draft according to claim 6, characterized in that: The specific process of step S4 is: Simultaneously compute graph P ori and Figure S oricg2 SURF feature points and feature vectors are used to calculate matching point pairs through FLANN, and the wrong matching points are eliminated according to the position offset of the point pairs. The specific implementation method is as follows: find the matching point pair S P and S S If the row difference is greater than 5 pixels, the matching point pair is eliminated because it may be a false matching point caused by repeated textures; the RANSAC method is used on the remaining inliers to obtain the final transformation matrix, and finally the multi-table accurate matching result is obtained.

Citation Information

Patent Citations

  • Image pair efficient dense matching method for repeated texture and non-rigid deformation

    CN109829502A

  • Flexographic label printing first draft detection system based on machine vision and implementation method thereof

    CN110940670A