Printing quality detection method and system for carton packaging

By extracting the contour lines and structural similarity analysis of the grayscale map of the carton packaging, combined with principal component analysis and gradient distance, the accuracy of ghost detection in carton packaging printing is solved, achieving more efficient ghost area identification and evaluation, and ensuring product quality.

CN120339223AActive Publication Date: 2025-07-18YUNNAN XINJIA PACKAGING CO LTD

Patent Information

Application Number
CN202510419640.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-07-18
Estimated Expiration
2045-04-03

AI Technical Summary

Technical Problem

The prior art is difficult to accurately identify the complex ghosting areas in carton packaging printing, especially when multiple edges are superimposed or ghosting edges are too weak, which affects the quality and production efficiency of carton packaging.

Method used

By extracting the contour lines of the carton packaging grayscale map, confirming the nearest contour lines, obtaining the target contour lines based on the degree of structural similarity, combining principal component analysis and gradient distance, calculating the overlap probability, obtaining ghost evaluation indicators, and judging printing quality.

Benefits of technology

The ghost detection accuracy during carton packaging printing process is improved, the product quality is ensured, different types of ghost detection can be distinguished in different scenarios, and the detection results are more accurate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120339223A_ABST
    Figure CN120339223A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer vision, in particular to a printing quality detection method and system for carton packaging, and the method comprises the steps: extracting contour lines of a carton packaging grey-scale map, and determining adjacent contour lines of each contour line; obtaining a target contour line of each contour line through the structural similarity between each contour line and the adjacent contour line, and extracting a region of interest of each contour line; extracting a feature direction, equally dividing the region of interest of each contour line, and obtaining the gray level change intensity of each sub-region; obtaining a gradient distance between the two pixel points; and clustering all pixel points in the region of interest of each contour line, comparing the screened clusters with the sub-regions to obtain an overlapping probability, obtaining a ghosting evaluation index of the region of interest of each contour line, and determining a detection result of carton packaging and printing. The invention aims to improve the ghosting detection effect in the carton packaging and printing process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer vision technology, and particularly relates to a method and system for detecting the printing quality of carton packaging. Background Art

[0002] The technology for detecting the printing quality of carton packaging is a core link in the intelligent upgrading of packaging manufacturing, and its development has a profound impact on the accuracy of product identification, the maintenance of brand value, and the efficiency of the supply chain. During the printing of carton packaging, due to the occurrence of overprinting errors in multi-color printing, there may be deviations in the printed area, resulting in text and image ghosting. The occurrence of this situation may affect multiple dimensions such as the quality of carton packaging, production efficiency, and brand reputation.

[0003] The development process of the ghost detection technology in carton packaging printing reflects the technical path from basic optical recognition to intelligent detection. With the improvement of the complexity of printing processes, machine vision technology has gradually become the mainstream. However, relying solely on simple edge detection or brightness differences, it is difficult to accurately identify complex situations where edges overlap in the ghost area, especially in scenarios where multiple edges are superimposed or ghost edges are too weak. Summary of the Invention

[0004] In view of the above, it is necessary to provide a method and system for detecting the printing quality of carton packaging to solve the above problems.

[0005] The first aspect of the present application provides a method for detecting the printing quality of carton packaging, and the method includes:

[0006] Obtain a grayscale image of the carton packaging;

[0007] Extract the contour lines of the grayscale image of the carton packaging, and based on the distances between the pixel points on each contour line and the pixel points on other contour lines, confirm the neighboring contour lines of each contour line; obtain the target contour line of each contour line through the structural similarity degree between each contour line and its neighboring contour line, and extract the region of interest of each contour line;

[0008] Based on the position distribution of all pixel points on each contour line and the target contour line, combined with principal component analysis, extract the feature direction, and equally divide the region of interest of each contour line based on the feature direction to obtain the gray-scale change intensity of each sub-region after equal division;

[0009] According to the difference between the gradient amplitude and the gradient angle between two pixel points, obtain the gradient distance between the two pixel points, cluster all pixel points in the region of interest of each contour line, compare the selected clustering clusters with the sub-region with the largest gray-scale change intensity, obtain the overlap probability of the region of interest of each contour line, and combine the gray-scale change intensity of each sub-region to obtain the ghost evaluation index of the region of interest of each contour line;

[0010] Determine the detection result of carton packaging printing based on the distribution of the ghost evaluation index for all regions of interest in the grayscale image of the carton packaging.

[0011] Among them, the specific method for confirming the neighboring contour lines of each contour line is as follows:

[0012] For any pixel point on each contour line, obtain the pixel point with the smallest Euclidean distance from this pixel point among other contour lines, which is denoted as the nearest neighbor pixel point; the contour line where the nearest neighbor pixel points corresponding to all pixel points on each contour line are located is denoted as the neighboring contour line of each contour line.

[0013] Among them, the process of obtaining the target contour line of each contour line is as follows:

[0014] Extract the connected regions where each contour line and its neighboring contour lines are located in the grayscale image of the carton packaging; calculate the structural similarity degree between the connected region of each contour line and the connected regions of its neighboring contour lines respectively;

[0015] Take the neighboring contour line with the largest structural similarity degree as the target contour line of each contour line.

[0016] Among them, the region of interest is determined by the region composed of the connected regions where each contour line and its target contour line are located.

[0017] Among them, the specific method for obtaining the gray-scale change intensity of each sub-region is the average value of the gradient amplitudes of all pixel points in each sub-region.

[0018] Among them, the specific formula for obtaining the gradient distance between two pixel points is as follows: In the formula, D i,j is the gradient distance between pixel point i and pixel point j; h i , θ i are the gradient amplitude and gradient direction angle of pixel point i respectively; h j , θ j are the gradient amplitude and gradient direction angle of pixel point j respectively.

[0019] Among them, the specific method for obtaining the overlap probability of the region of interest of each contour line is as follows:

[0020] Obtain the intersection and union of the clustering cluster with the largest average gradient amplitude and the sub-region with the largest gray-scale change intensity; calculate the ratio of the number of elements in the intersection to the number of elements in the union to obtain the overlap probability of the region of interest of each contour line.

[0021] Among them, the specific process for obtaining the ghost evaluation index of the region of interest of each contour line is as follows:

[0022] For the region of interest of each contour line, obtain the average value of the gray-scale change intensity of the two side sub-regions in the trisected sub-region, and compare the gray-scale change intensity of the middle sub-region with the average value of the gray-scale change intensity; positively fuse the obtained comparison result with the overlap probability of the corresponding region of interest to obtain the double-image evaluation index of the region of interest of each contour line.

[0023] Among them, the process of determining the detection result of the carton packaging printing is specifically as follows:

[0024] Adopt threshold segmentation for the double-image evaluation indexes of the regions of interest of all contour lines to obtain the optimal threshold;

[0025] Judge the two contour lines in the region of interest where the double-image evaluation index is greater than or equal to the optimal threshold as double-image contour lines;

[0026] If there are double-image contour lines in the gray-scale image of the carton packaging, the corresponding carton packaging printing is unqualified; otherwise, judge that the carton packaging printing is qualified.

[0027] In a second aspect, the embodiments of the present application further provide a printing quality detection system for carton packaging, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of the method described in any one of the above are implemented.

[0028] The present application has at least the following beneficial effects:

[0029] In this application, considering that the same physical edge of the text and pattern with translational ghosting error in printing may be printed repeatedly, resulting in the double-edge superposition in the middle sub-region. Based on this feature, first, based on the distance between the pixel points on each contour line and the pixel points on other contour lines, the neighboring contour lines of each contour line are confirmed, which helps to screen the contour lines with similar structures to each contour line in the subsequent steps; through the structural similarity degree between each contour line and its neighboring contour lines, the target contour line of each contour line is obtained, and the region of interest of each contour line is extracted. The beneficial effect is that by analyzing the features of each contour line, the contour lines that may be caused by the ghosting phenomenon can be identified, providing a strong basis for the subsequent region extraction; then, based on the position distribution of all pixel points on each contour line and the target contour line, combined with the principal component analysis, the feature direction is extracted, and the region of interest of each contour line is equally divided based on the feature direction to obtain the gray-scale change intensity of each sub-region. The beneficial effect is that the morphological features of the contour line can be analyzed more accurately, and then the region of interest can be equally divided reasonably, effectively capturing the gray-scale change intensity of each sub-region and revealing the subtle changes inside the contour line; further, considering that the edge density of the middle sub-region is significantly higher than that of the single-edge region, and the gradient of the ghosted middle sub-region should be significantly higher than that of the two sides. According to the difference between the gradient amplitude and the gradient angle between any two pixel points, the gradient distance between the two pixel points is obtained, and all pixel points in the region of interest of each contour line are clustered. The screened clustering clusters are compared with the middle sub-region to obtain the overlapping probability of the region of interest of each contour line. The beneficial effect is that the possible ghosting regions can be effectively identified, and the region extraction can be further optimized according to the overlapping probability. Through this method, the ghosting evaluation index of the region of interest of each contour line can be obtained, so as to quantify the characteristics of the double-edge superposition and be used to judge the lateral ghosting region in the printing process. This method can ensure that different types of ghosting can be distinguished in different scenarios, and the detection result is more accurate, thus improving the ghosting detection effect in the carton packaging printing process and ensuring the product quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 FIG. is a flowchart of the steps of a printing quality detection method for carton packaging provided by an embodiment of the present application;

[0031] Figure 2 FIG. is a flowchart for obtaining the ghosting evaluation index provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0032] In the description of the embodiments of the present application, words such as "exemplary", "or", "for example", etc. are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary", "or", "for example" is intended to present relevant concepts in a specific manner.

[0033] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0034] In addition, it should be noted that the terms "first" and "second" in this application and the accompanying drawings are used to distinguish similar objects and are not used to describe a specific order or sequence. For the method disclosed in the embodiments of this application or the method shown in the flowchart, which includes one or more steps for implementing the method, without departing from the scope of protection of this application, the execution order of multiple steps can be interchanged with each other, and some steps can also be deleted.

[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs.

[0036] The following specifically describes the specific solutions of a method and system for detecting the printing quality of carton packaging provided by this application in conjunction with the accompanying drawings.

[0037] Please refer to Figure 1 , which shows a flowchart of the steps of a method for detecting the printing quality of carton packaging provided by an embodiment of this application. The method includes the following steps:

[0038] The first step: Obtain the grayscale image of the carton packaging.

[0039] Place the carton packaging with printed pattern characters on the platform under the industrial camera, take a picture to obtain the carton packaging image, and use a ring-shaped LED light source to provide a shadowless lighting environment to reduce the influence of light in the subsequent detection process. The obtained image is subjected to grayscale processing using the weighted average method, and then the output single-channel grayscale image is subjected to median filtering noise reduction processing to output the grayscale image of the carton packaging after noise reduction processing.

[0040] The second step: Extract the contour lines of the grayscale image of the carton packaging, and confirm the neighboring contour lines of each contour line based on the distance between the pixel points on each contour line and the pixel points on other contour lines; obtain the target contour line of each contour line through the structural similarity degree between each contour line and its neighboring contour line, and extract the region of interest of each contour line.

[0041] During the printing process of carton packaging, there are often phenomena of text and pattern translation ghosting caused by deviations in the printing area. Compared with the text and patterns under normal printing, the same physical edge of the text and patterns with translation ghosting errors in printing may be printed repeatedly, resulting in double-edge superposition in the middle sub-region of the ghosting. The edge density of the superposition region is significantly higher than that of the single-edge region, and at the same time, the gradient of the middle sub-region of the ghosting should be significantly higher than that of the two sides.

[0042] In order to more accurately determine whether there is font and pattern ghosting in carton packaging and whether there are printing quality problems, in this application, the grayscale image of the carton packaging is first used with OpenCV technology to extract the text and pattern contour lines, and a unique identification ID is assigned to all contour lines. Since the analysis method for each contour line is the same, in this embodiment, the a-th contour line is taken as an example for analysis.

[0043] Specifically, for any pixel point on the a-th contour line, obtain its nearest neighbor pixel point on other contour lines. The nearest neighbor pixel point refers to the pixel point on other contour lines with the smallest Euclidean distance from the any pixel point; obtain the contour line ID where the nearest neighbor pixel point is located, and record the contour lines where the nearest neighbor pixel points corresponding to all pixel points on the a-th contour line are located as the neighboring contour lines of the a-th contour line.

[0044] If the a-th contour line is caused by the ghosting phenomenon, then there must be a contour line with a similar structure around it. The connected component extraction algorithm is used to obtain the connected components where the a-th contour line and each of its neighboring contour lines are located in the grayscale image of the carton packaging, input these obtained connected components, and calculate the structure similarity (Structure Similarity Index Measure, SSIM) between the a-th contour line and each of its neighboring contour lines respectively. It should be noted that during the calculation of the SSIM value between two connected components, obtain the minimum bounding rectangle of the connected component of the a-th contour line and the connected component of its neighboring contour line, and scale the corresponding minimum bounding rectangle of its neighboring contour line to be the same shape and size as the corresponding minimum bounding rectangle of the a-th contour line, and perform SSIM calculation based on these two minimum bounding rectangles with the same shape and size; in one embodiment, after aligning the centers of the minimum bounding rectangle corresponding to the a-th contour line and the minimum bounding rectangle corresponding to its neighboring contour line, perform the scaling operation. If the SSIM value is closer to 1, the two contour lines are more likely to be caused by ghosting, and the neighboring contour line with the largest SSIM value is used as the target contour line of the a-th contour line. The connected components where the a-th contour line and its target contour line are located in the grayscale image of the carton packaging are segmented and extracted as the region of interest.

[0045] The third step: Based on the position distribution of each contour line and all pixel points on the target contour line, combined with principal component analysis, extract the feature direction, divide the region of interest of each contour line equally based on the feature direction, and obtain the gray-scale change intensity of each sub-region.

[0046] Based on the analysis of the region of interest, if the corresponding two contour lines are caused by double images, the gradient distribution within their connected regions should satisfy that the gradient amplitude in the middle is relatively high, that is, the color mutation is obvious, the color is relatively dark, and the gradient amplitude near the edge of the contour line region is relatively low, and the color is relatively light. Take the coordinates of all pixel points on the two corresponding contour lines in the region of interest as input, and use principal component analysis (PCA) to first de-mean the pixel point coordinates of these two contour lines, calculate the covariance matrix and obtain its maximum eigenvalue and the corresponding eigenvector. Principal component analysis (PCA) is a well-known technology, and the specific implementation process will not be elaborated here. The direction of the eigenvector corresponding to the obtained maximum eigenvalue is the main direction of the connected region after the combination of the connected regions of the above two contour lines. Then divide the combined connected region into three equally wide sub-regions along the main direction; take the sub-region with the largest average gray-scale change intensity as the middle sub-region.

[0047] According to the characteristic that double images will cause the color of the overlapping part of the image to deepen and the color of the two sides to be lighter, it is expected that the gradient amplitude of the middle sub-region in all the sub-regions obtained by segmentation is relatively high, and the gradient amplitude of the two side sub-regions is relatively low. Calculate the average gradient amplitude of all pixel points in each sub-region to measure the gray-scale change intensity of each sub-region.

[0048] The fourth step: According to the difference between the gradient amplitudes and gradient angles between two pixel points, obtain the gradient distance between the two pixel points, cluster all pixel points in the region of interest of each contour line, compare the selected clustering clusters with the middle sub-region, obtain the overlapping probability of the region of interest of each contour line, and combine the gray-scale change intensity of each sub-region to obtain the double-image evaluation index of the region of interest of each contour line.

[0049] When the edge superposition situation caused by double images appears, the edge density of the superposition region is significantly higher than that of a single-edge region. Considering the consistency of the gradient amplitude and gradient direction of edge pixel points within the superposition region, use the Sobel operator to obtain the gradient amplitude and gradient direction of pixel points in the gray-scale image of the carton packaging, and use the gradient amplitude and gradient direction to construct the metric distance D for clustering. Regard the gradient amplitude h and gradient direction θ of a pixel point as a two-dimensional vector (hcosθ, hsinθ), and the calculation method of the gradient distance D between pixel point i and pixel point j is: In the formula, D i,j is the gradient distance between pixel point i and pixel point j; h i , θ iThey are the gradient magnitude and the gradient direction angle of pixel point i; h j , θ j They are the gradient magnitude and the gradient direction angle of pixel point j respectively; in this embodiment, the spatial vector method can naturally balance the influence of the magnitude and the direction, and is applicable to edge-sensitive scenarios such as ghost edge contours.

[0050] Based on the calculated gradient distance D, hierarchical clustering is performed on all pixel points in the region of interest, and the overlapping probability between the clustering cluster with the largest average gradient magnitude in the clustering result and the segmented middle sub-region is calculated: the intersection and union of the clustering cluster with the largest average gradient magnitude and the middle sub-region are obtained; the ratio of the number of elements in the intersection to the number of elements in the union is calculated to obtain the overlapping probability of the region of interest of each contour line.

[0051] According to the ghost characteristics, a ghost is an offset copy of the same contour, resulting in double-edge superposition in the middle sub-region. The edge density of the superposition region is significantly higher than that of the single-edge region. At the same time, the gradient of the middle sub-region of the ghost should be significantly higher than that of the two sides. Therefore, a ghost evaluation index is set to evaluate each region of interest, so as to determine whether the two contour lines forming the connected domain are caused by ghosts.

[0052] Specifically, for the region of interest of each contour line, the average value of the gray-scale change intensity of the two side sub-regions in the three equal sub-regions is obtained, and the gray-scale change intensity of the middle sub-region is compared with the average value of the gray-scale change intensity; the obtained comparison result is positively fused with the overlapping probability of the corresponding region of interest to obtain the ghost evaluation index of the region of interest of each contour line. In this embodiment, the comparison of multiple variables is performed by calculating a ratio, that is, the ratio of the gray-scale change intensity of the middle sub-region to the average value of the gray-scale change intensity. It should be noted that to avoid the denominator being 0 when calculating the ratio, a preset parameter needs to be added to the denominator. In this embodiment, the parameter value is 10 -6 ; The method of multiplication is used to positively fuse multiple variables.

[0053] It should be understood that the larger the value of the ghost evaluation index, the greater the possibility that the two edge lines forming the connected domain are defects caused by ghosts; on the contrary, the smaller the value of the ghost evaluation index, the smaller the possibility that the two edge lines forming the connected domain are defects caused by ghosts.

[0054] Among them, the flowchart for obtaining the ghost evaluation index is as Figure 2 shown.

[0055] The fifth step: Based on the distribution of the ghost evaluation indexes of all regions of interest in the gray-scale image of the carton packaging, determine the detection result of the carton packaging printing.

[0056] Calculate the ghost evaluation index for the regions of interest of all contour lines, and use the Otsu threshold algorithm to obtain the optimal threshold. Determine two contour lines in the region of interest where the ghost evaluation index is greater than or equal to the optimal threshold as ghost contour lines; otherwise, there is no ghost for the two contour lines in the region of interest.

[0057] Further, if there are ghost contour lines in the grayscale image of the carton packaging, the corresponding carton packaging printing is unqualified; otherwise, it is determined that the carton packaging printing is qualified.

[0058] Based on the same inventive concept as the above method, an embodiment of the present application further provides a printing quality detection system for carton packaging, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of any one of the above methods for detecting the printing quality of a carton packaging.

[0059] In summary, this application takes into account that for the text and patterns with translational ghosting errors in printing, the same physical edge may be printed repeatedly, which may lead to the superposition of double edges in the middle sub-region. Based on this feature, first, the neighboring contour lines of each contour line are confirmed based on the distances between the pixel points on each contour line and the pixel points on other contour lines, which helps to screen the contour lines with similar structures to each contour line in the subsequent process; by the degree of structural similarity between each contour line and its neighboring contour lines, the target contour line of each contour line is obtained, and the region of interest of each contour line is extracted. The beneficial effect is that by analyzing the features of each contour line, the contour lines that may be caused by the ghosting phenomenon can be identified, thus providing a strong basis for the subsequent region extraction; then, based on the position distribution of all pixel points on each contour line and the target contour line, combined with the principal component analysis, the feature direction is extracted, and the region of interest of each contour line is equally divided based on the feature direction to obtain the gray-scale change intensity of each sub-region. The beneficial effect is that the morphological features of the contour line can be analyzed more accurately, and then the region of interest can be equally divided reasonably, effectively capturing the gray-scale change intensity of each sub-region and revealing the subtle changes inside the contour line; further, considering that the edge density of the middle sub-region is significantly higher than that of the single-edge region, and at the same time, the gradient of the ghosted middle sub-region should be significantly higher than that of the two sides, according to the difference between the gradient amplitude and the gradient angle between any two pixel points, the gradient distance between the two pixel points is obtained, and all pixel points in the region of interest of each contour line are clustered. The screened clustering clusters are compared with the middle sub-region to obtain the overlapping probability of the region of interest of each contour line. The beneficial effect is that the possible ghosting regions can be effectively identified, and the region extraction can be further optimized according to the overlapping probability. Through this method, the ghosting evaluation index of the region of interest of each contour line can be obtained, so as to quantify the characteristics of the double-edge superposition and be used to judge the lateral ghosting region in the printing process. This method can ensure that different types of ghosting can be distinguished in different scenarios, and the detection result is more accurate, thus improving the ghosting detection effect in the carton packaging printing process and ensuring the product quality.

[0060] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code that contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0061] For those skilled in the art, it is obvious that the present application is not limited to the details of the above-described exemplary embodiments, and without departing from the basic characteristics of the present application, the present application can be implemented in other specific forms. Therefore, from any point of view, the above-described embodiments of the present application should be regarded as exemplary and non-limiting; modifying the technical solutions recorded in the foregoing embodiments, or equivalently replacing some of the technical features, does not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for detecting the printing quality of carton packaging, characterized in that, The method includes the following steps: Obtain the grayscale image of the carton packaging; Extract the contour lines of the grayscale image of the carton packaging. Based on the distances between the pixel points on each contour line and the pixel points on other contour lines, confirm the neighboring contour lines of each contour line; obtain the target contour line of each contour line through the structural similarity degree between each contour line and its neighboring contour lines, and extract the region of interest of each contour line; Based on the position distribution of all pixel points on each contour line and the target contour line, combined with principal component analysis, extract the feature direction, and equally divide the region of interest of each contour line based on the feature direction to obtain the gray level change intensity of each sub-region after equal division; According to the difference between the gradient magnitude and the gradient angle between two pixel points, obtain the gradient distance between the two pixel points, cluster all pixel points in the region of interest of each contour line, compare the filtered clustering clusters with the sub-region with the largest gray level change intensity, obtain the overlapping probability of the region of interest of each contour line, and combine the gray level change intensity of each sub-region to obtain the ghosting evaluation index of the region of interest of each contour line; Based on the distribution of the ghosting evaluation indexes of all regions of interest of the grayscale image of the carton packaging, determine the detection result of the carton packaging printing.

2. The printing quality detection method of a carton packaging according to claim 1, wherein The specific method for confirming the neighboring contour line of each contour line is as follows: For any pixel point on each contour line, obtain the pixel point with the smallest Euclidean distance from the any pixel point among other contour lines, and record it as the nearest neighbor pixel point; record the contour line where the nearest neighbor pixel points corresponding to all pixel points on each contour line are located as the neighboring contour line of each contour line.

3. A method for detecting the printing quality of a carton package according to claim 1, characterized in that, The process of obtaining the target contour line of each contour line is as follows: Extract the connected domains where each contour line and its each neighboring contour line are located in the grayscale image of the carton packaging; calculate the structural similarity degree between the connected domain of each contour line and the connected domain of its each neighboring contour line respectively; Take the neighboring contour line with the largest structural similarity degree as the target contour line of each contour line.

4. The printing quality detection method for carton packaging according to claim 1, characterized in that, The region of interest is extracted and determined by the region composed of the connected domains where each contour line and its target contour line are located.

5. The printing quality detection method for carton packaging according to claim 1, characterized in that, The specific method for obtaining the gray level change intensity of each sub-region is the average value of the gradient magnitudes of all pixel points in each sub-region.

6. The printing quality detection method for carton packaging according to claim 1, characterized in that, The gradient distance between two pixel points is obtained, and the specific formula is as follows: In the formula, D i,j is the gradient distance between pixel point i and pixel point j; h i , θ i are respectively the gradient amplitude and gradient direction angle of pixel point i; h j , θ j are respectively the gradient amplitude and gradient direction angle of pixel point j.

7. The printing quality detection method for carton packaging according to claim 1, characterized in that, The specific method for obtaining the overlapping probability of the region of interest of each contour line is as follows: Obtain the intersection and union of the clustering cluster with the largest average gradient magnitude and the sub-region with the largest gray level change intensity; calculate the ratio of the number of elements in the intersection to the number of elements in the union to obtain the overlapping probability of the region of interest of each contour line.

8. A method for detecting the printing quality of a carton package according to claim 1, characterized in that, The specific process for obtaining the ghosting evaluation index of the region of interest of each contour line is as follows: For the region of interest of each contour line, obtain the average value of the gray level change intensities of the two side sub-regions in the equally divided three sub-regions, and compare the gray level change intensity of the middle sub-region with the average value of the gray level change intensities; Positively fuse the obtained comparison result with the overlapping probability of the corresponding region of interest to obtain the ghosting evaluation index of the region of interest of each contour line.

9. The printing quality detection method for carton packaging according to claim 1, characterized in that, The specific process for determining the detection result of the carton packaging printing is as follows: The ghosting evaluation index for the region of interest of all contour lines uses threshold segmentation to obtain the optimal threshold; Determine the two contour lines in the region of interest where the ghosting evaluation index is greater than or equal to the optimal threshold as ghosting contour lines; If there are ghosting contour lines in the cardboard box packaging grayscale image, the corresponding cardboard box packaging printing is unqualified; Otherwise, it is determined that the cardboard box packaging printing is qualified.

10. A printing quality detection system for carton packaging, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Printed matter ghosting detection method and system based on computer vision

    CN113888536A

  • Glass defect detection method

    CN115049657A

  • Paper product printing defect detection method

    CN117541588A

  • Ink printing defect detection method based on image processing

    CN117830318A

  • Bridge detection image recognition method and system based on artificial intelligence

    CN118823481A

Cited By

  • Packaging piece detection method and system

    CN120912614A

  • A package detection method and system

    CN120912614B