A method and system for detecting the printing quality of carton packages
By acquiring grayscale images of cardboard packaging, extracting contour lines and identifying nearest-neighbor contour lines, and combining principal component analysis and gradient distance for clustering, the ghosting evaluation index is calculated, thus solving the accuracy problem of ghosting detection in cardboard packaging printing and improving detection precision and product quality.
Patent Information
- Application Number
- CN202510419640.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-04-03
AI Technical Summary
Existing technologies struggle to accurately identify complex ghosting areas in cardboard packaging printing, especially when multiple edges overlap or the ghosting edges are too weak, affecting cardboard packaging quality and production efficiency.
By acquiring grayscale images of cardboard packaging, extracting contour lines and identifying nearest-neighbor contour lines, determining target contour lines based on structural similarity, and performing clustering using principal component analysis and gradient distance, the overlap probability is calculated, ghosting evaluation indicators are obtained, and printing quality is judged.
It improves the accuracy of ghosting detection in the cardboard packaging printing process, ensures product quality, and can distinguish different types of ghosting in different scenarios, thereby improving the accuracy of detection results.
Smart Images

Figure CN120339223B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer vision, in particular to a carton packaging printing quality detection method and system. BACKGROUND
[0002] The printing quality detection technology of carton packaging is the core link of the intelligent upgrading of packaging manufacturing, and its development deeply affects product identification accuracy, brand value maintenance and supply chain efficiency. Due to the occurrence of overprint error in multi-color printing during carton packaging printing, printing area deviation may occur, resulting in ghosting phenomenon of text and images, which may affect carton packaging quality, production efficiency, brand reputation and other dimensions.
[0003] The development history of ghosting detection technology in carton packaging printing reflects the technical path from basic optical recognition to intelligent detection. With the increasing complexity of printing process, machine vision technology has gradually become the mainstream, but relying only on simple edge detection or brightness difference cannot accurately identify the complex situation of edge overlap in ghosting area, especially in the scene of multiple edge superposition or very weak ghosting edge. SUMMARY
[0004] In view of the above, it is necessary to provide a carton packaging printing quality detection method and system to solve the above problems.
[0005] The first aspect of the present application provides a carton packaging printing quality detection method, the method comprising:
[0006] Obtaining a carton packaging gray scale image;
[0007] Extracting the contour line of the carton packaging gray scale image, confirming the near neighbor contour line of each contour line based on the distance between the pixel points on each contour line and the pixel points on other contour lines, obtaining the target contour line of each contour line through the structural similarity between each contour line and its near neighbor contour line, and extracting 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, combining principal component analysis, extracting the feature direction, equally dividing the region of interest of each contour line based on the feature direction, and obtaining 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, the gradient distance between the two pixel points is obtained, all pixel points in the region of interest of each contour line are clustered, the screened cluster is compared with the sub-region with the maximum gray scale change intensity, the overlap probability of the region of interest of each contour line is obtained, and the ghosting evaluation index of the region of interest of each contour line is obtained combined with the gray scale change intensity of each sub-region.
[0010] Determine the detection result of the carton package printing based on the distribution of the ghosting evaluation index of all the regions of interest of the carton package grayscale image.
[0011] The near neighbor contour line of each contour line is determined, and specifically, the near neighbor contour line of each contour line is determined by:
[0012] For any pixel point of each contour line, the pixel point with the minimum Euclidean distance between the any pixel point and the other contour lines is obtained, which is recorded as the nearest neighbor pixel point; the contour line where the nearest neighbor pixel point corresponding to all the pixel points on each contour line is located is recorded as the near neighbor contour line of each contour line.
[0013] The process of obtaining the target contour line of each contour line is:
[0014] The connected domain of each contour line and each near neighbor contour line in the carton package grayscale image is extracted; the structural similarity degree between the connected domain of each contour line and the connected domain of each near neighbor contour line is calculated respectively.
[0015] The near neighbor contour line with the maximum structural similarity degree is taken as the target contour line of each contour line.
[0016] The region of interest is determined by the region composed of the connected domain of each contour line and the connected domain of the target contour line thereof.
[0017] The gray level change intensity of each sub-region is specifically the mean gradient amplitude of all the pixel points in each sub-region.
[0018] The gradient distance between two pixel points is obtained, and the specific formula is: 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] The overlap probability of the region of interest of each contour line is obtained, and specifically, the overlap probability of the region of interest of each contour line is obtained by:
[0020] The intersection and union of the cluster with the maximum mean gradient amplitude and the sub-region with the maximum gray level change intensity 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 overlap probability of the region of interest of each contour line.
[0021] The specific process of obtaining the ghosting evaluation index of the region of interest of each contour line is:
[0022] For each contour line, the average of the gray scale change intensity of the two sub-regions in the three-equal sub-region is obtained, and the gray scale change intensity of the middle sub-region is compared with the average of the gray scale change intensity; the comparison result is fused with the overlap probability of the corresponding region of interest in a forward direction to obtain a ghosting evaluation index of each contour line.
[0023] The process of determining the detection result of the carton packaging printing is specifically:
[0024] The ghosting evaluation index of the region of interest of all contour lines is segmented by a threshold to obtain an optimal threshold;
[0025] Two contour lines in the region of interest with the ghosting evaluation index greater than or equal to the optimal threshold are determined as ghost contour lines;
[0026] If the ghost contour lines exist in the carton packaging gray scale image, the corresponding carton packaging printing is unqualified; otherwise, the carton packaging printing is determined as qualified.
[0027] In a second aspect, the embodiments of the present application further provide a carton packaging printing quality detection system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements the steps of the method in any of the above aspects when executing the computer program.
[0028] The present application has at least the following beneficial effects:
[0029] The present application considers that the same physical edge of the text and pattern appearing the translation ghosting error may be repeatedly printed, and then the double edge superposition appears in the intermediate sub-region. Based on this feature, first, the near neighbor contour line of each contour line is confirmed based on the distance between the pixel points on each contour line and the pixel points on other contour lines, which is helpful for subsequent screening of contour lines similar to the structure of each contour line. The target contour line of each contour line is obtained through the structural similarity between each contour line and its near neighbor contour line, and the region of interest of each contour line is extracted, which has the beneficial effect that by analyzing the features of each contour line, the contour line that may be generated due to ghosting phenomenon can be identified, thereby providing a strong basis for subsequent region extraction. Then, based on the position distribution of all pixel points on each contour line and the target contour line, the feature direction is extracted by combining principal component analysis, and the region of interest of each contour line is equally divided based on the feature direction to obtain the gray level change intensity of each sub-region, which has the beneficial effect that the morphological features of the contour line can be more accurately analyzed, and then the region of interest is reasonably divided and processed, and the gray level change intensity of each sub-region is effectively captured, revealing the subtle changes inside the contour line. Further, considering that the edge density of the intermediate sub-region is significantly higher than that of the single edge region, and the gradient of the intermediate sub-region of the ghosting should be significantly higher than that of the two sides, the gradient distance between any two pixel points is obtained according to the difference between the gradient amplitude and the gradient angle between any two pixel points, and all pixel points in the region of interest of each contour line are clustered. The screened cluster is compared with the intermediate sub-region to obtain the overlap probability of the region of interest of each contour line, which has the beneficial effect that the possible ghosting region can be effectively identified, and the region extraction is further optimized according to the overlap probability. Through this method, the ghosting evaluation index of the region of interest of each contour line can be obtained, thereby quantifying the features of double edge superposition for judging the transverse ghosting region in the printing process. The method can ensure that different types of ghosting can be distinguished in different scenarios, and the detection result is more accurate, thereby improving the ghosting detection effect in the carton packaging printing process and ensuring product quality. BRIEF DESCRIPTION OF DRAWINGS
[0030] Figure 1 A step flow chart of a carton packaging printing quality detection method provided by an embodiment of the present application;
[0031] Figure 2 A flow chart of obtaining a ghosting evaluation index provided by an embodiment of the present application. DETAILED DESCRIPTION
[0032] In the description of the present embodiments, the words "example" and "exemplary" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "example" or "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the words "example" and "exemplary" is intended to present concepts in a concrete manner. As used in this description, the terms "include” and "comprise” and their derivatives mean "including but not limited to”. Any process described herein as comprising one or more steps can include additional steps not mentioned in the description of that process.
[0033] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the application herein is for describing particular embodiments only and is not intended to be limiting of the application.
[0034] It is further noted that the terms "first", "second", and the like in the description and in the claims do not denote any order, quantity, or importance, but are used to distinguish one element from another, and the terms "comprises", "comprising", "includes", "including" and the like are inclusive or open-ended and do not exclude additional, unrecited elements or method steps. The methods disclosed in the present embodiments, or the methods shown in the flowcharts, include one or more steps for implementing the methods, and the execution order of the steps can be interchanged with each other without departing from the scope of the present application, 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 one of ordinary skill in the art to which this application belongs.
[0036] The specific scheme of the paper box packaging printing quality detection method and system provided by the present application is specifically described below in combination with the accompanying drawings.
[0037] Please refer to Figure 1 which shows the step flowchart of a paper box packaging printing quality detection method provided by an embodiment of the present application, and the method comprises the following steps:
[0038] The first step is to obtain a paper box packaging gray scale image.
[0039] The paper box packaging with printed patterns and characters is placed on a platform under an industrial camera to take a picture and obtain a paper box packaging image. A ring-shaped LED light source is used to provide a shadowless lighting environment to reduce the impact of light on the subsequent detection process. The obtained image is subjected to weighted average gray scale processing, and then the output single-channel gray scale image is subjected to median filter noise reduction processing to output a paper box packaging gray scale image after noise reduction processing.
[0040] The second step is to extract the contour line of the paper box packaging gray scale image, 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 between each contour line and its neighboring contour line, and extract the region of interest of each contour line.
[0041] The phenomenon of text and pattern translation ghosting often occurs in carton packaging during printing due to deviation in the printing area. Compared with the text and pattern under normal printing, the text and pattern with translation ghosting error may be repeatedly printed on the same physical edge, resulting in double edge superposition in the middle sub-area of the ghosting, and the edge density of the superposition area is significantly higher than that of the single edge area, and the gradient of the middle sub-area of the ghosting should be significantly higher than that of the two sides.
[0042] In order to more accurately determine whether the carton packaging produces font and pattern ghosting and printing quality problems, the present application first extracts the text and pattern contour line of the carton packaging gray scale image using OpenCV technology, and assigns a unique identification ID to all contour lines. Since the analysis method of each contour line is the same, the present embodiment takes the a-th contour line as an example for analysis.
[0043] Specifically, for any pixel point of the a-th contour line, the nearest neighbor pixel point in other contour lines is obtained, which refers to the pixel point on other contour lines with the smallest Euclidean distance between the any pixel point; the contour line ID where the nearest neighbor pixel point is located is obtained, and the contour line where all the nearest neighbor pixel points corresponding to all the pixel points on the a-th contour line are located is recorded as the a-th contour line neighbor contour line.
[0044] If the a-th contour line is caused by ghosting, there must be a contour line similar in structure around it. The connected domain extraction algorithm is used to obtain the connected domain of the a-th contour line and each of its neighbor contour lines in the carton packaging gray scale image, and the obtained connected domains are input and the structure similarity index measure (SSIM) between the a-th contour line and each of its neighbor contour lines is calculated. It should be noted that in the process of calculating the SSIM value between the two connected domains, the minimum circumscribed rectangle of the connected domain of the a-th contour line and the connected domain of its neighbor contour line is obtained, and the minimum circumscribed rectangle corresponding to its neighbor contour line is enlarged or reduced to the same size as the corresponding minimum circumscribed rectangle of the a-th contour line, and the SSIM is calculated based on the two minimum circumscribed rectangles with the same size. In one embodiment, the centers of the minimum circumscribed rectangles corresponding to the a-th contour line and its neighbor contour line are aligned before the enlargement and reduction operation. If the value of SSIM tends to 1, the two contours are more likely to be ghosting. The neighbor contour line with the maximum SSIM value is taken as the target contour line of the a-th contour line. The connected domains of the a-th contour line and its target contour line in the carton packaging gray scale image are segmented and extracted as the region of interest.
[0045] 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, the feature direction is extracted, the region of interest of each contour line is equally divided based on the feature direction, and the gray level change intensity of each sub-region is obtained.
[0046] Based on the analysis of the region of interest, if the corresponding two contour lines are ghost, the gradient distribution in the connected domain should satisfy that the middle gradient amplitude is high, that is, the color mutation is obvious, the color is deep, the edge near the contour line region has low gradient amplitude, and the color is light. The coordinates of all pixel points on the two contour lines corresponding to the region of interest are used as input, and the pixel point coordinates of the two contour lines are processed by using principal component analysis PCA to remove mean value, the covariance matrix is calculated, and the maximum eigenvalue and the corresponding eigenvector are obtained. Principal component analysis PCA is a known technology, and the specific implementation process will not be described here. The direction of the maximum eigenvalue corresponding to the eigenvector is the main direction of the connected domain after the merging of the two contour lines. Then, the merged connected domain is divided into three equal-width sub-regions along the main direction; the sub-region with the maximum mean gray level change intensity is taken as the middle sub-region.
[0047] According to the characteristics that ghosting will cause the color of the overlapped part of the image to deepen and the color of the two sides to be light, the middle sub-region in all sub-regions obtained by segmentation is expected to have a high gradient amplitude, and the two side sub-regions are expected to have a low gradient amplitude. The mean value of the gradient amplitude of all pixel points in each sub-region is calculated to measure the gray level change intensity of each sub-region.
[0048] Fourth step: according to the difference between the gradient amplitude and the gradient angle between two pixel points, the gradient distance between two pixel points is obtained, all pixel points in the region of interest of each contour line are clustered, the screened cluster is compared with the middle sub-region, the overlap probability of the region of interest of each contour line is obtained, and the ghosting evaluation index of the region of interest of each contour line is obtained combined with the gray level change intensity of each sub-region.
[0049] When the edge superposition caused by ghosting occurs, the edge density of the superposition region is significantly higher than that of the single edge region. Considering the consistency of the gradient amplitude and the gradient direction of the edge pixel points in the superposition region, the gradient amplitude and the gradient direction of the pixel points in the carton packaging gray scale image are obtained using the Sober operator, and the measurement distance D is constructed when clustering is performed using the gradient amplitude and the gradient direction. The gradient amplitude h and the gradient direction θ of a pixel point are regarded as a two-dimensional vector (hcosθ,hsinθ), and the gradient distance D between pixel point i and pixel point j is calculated as follows: In the formula, D i,j is the gradient distance between pixel point i and pixel point j; h i , θ irespectively are gradient magnitude, gradient direction angle of pixel point i; h j , θ j respectively are gradient magnitude, gradient direction angle of pixel point j; this embodiment uses the space vector method to naturally balance the influence of magnitude and direction, and is suitable for edge-sensitive scenes such as ghost edge profile.
[0050] Based on the gradient distance D calculated, hierarchical clustering is performed on all pixel points in the region of interest, and the cluster with the maximum average gradient magnitude is overlapped with the intermediate sub-region to calculate the overlap probability: the intersection and union of the cluster with the maximum average gradient magnitude and the intermediate 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 overlap probability of the region of interest of each contour line.
[0051] According to the ghost characteristics, the ghost is an offset copy of the same contour, which causes double edge superposition in the intermediate sub-region, and the edge density of the superposition region is significantly higher than that of the single edge region, and the gradient of the intermediate sub-region of the ghost should be significantly higher than that of the two sides, so a ghost evaluation index is set to evaluate each region of interest, and whether the two contour lines constituting the connected domain are generated by the ghost is judged.
[0052] Specifically, for the region of interest of each contour line, the average gray value of the gray change intensity of the two side sub-regions in the three equal sub-regions is obtained, and the gray change intensity of the intermediate sub-region is compared with the average gray value of the gray change intensity; the comparison result obtained is forward fused with the overlap 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 realized by calculating the ratio, that is, the ratio of the gray change intensity of the intermediate sub-region to the average gray value of the gray change intensity. It should be noted that, in order to avoid the denominator being 0 when calculating the ratio, a preset parameter is added to the denominator, and the parameter value is 10 in this embodiment. -6 The multiplication method is used to forward fuse multiple variables.
[0053] It should be understood that the greater the value of the ghost evaluation index, the greater the possibility that the two edge lines generating the connected domain are caused by the ghost defect; on the contrary, the smaller the value of the ghost evaluation index, the smaller the possibility that the two edge lines generating the connected domain are caused by the ghost defect.
[0054] The flowchart of obtaining the ghost evaluation index is shown in Figure 2 .
[0055] The fifth step: based on the distribution of the ghost evaluation index of all regions of interest of the carton packaging gray scale image, the detection result of the carton packaging printing is determined.
[0056] The ghosting evaluation index of the region of interest of all contour lines is calculated, and the best threshold is obtained by using the Otsu threshold algorithm. Two contour lines in the region of interest with the ghosting evaluation index greater than or equal to the best threshold are determined as ghost contour lines; otherwise, there are no ghost contour lines in the two contour lines in the region of interest.
[0057] Further, if there are ghost contour lines in the gray-scale image of the carton package, the corresponding carton package printing is unqualified; otherwise, it is determined that the carton package printing is qualified.
[0058] Based on the same inventive concept as the above method, the embodiments of the present application also provide a printing quality detection system of a carton package, which comprises a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements the steps of any one of the above printing quality detection methods of the carton package when executing the computer program.
[0059] In summary, the present application considers that the text and pattern of the printing appear to have a translational ghosting error, and the same physical edge may be repeatedly printed, which may cause double edge superposition in the intermediate sub-region. Based on this feature, first, the near neighbor contour line of each contour line is confirmed based on the distance between the pixel points on each contour line and the pixel points on other contour lines, which is helpful for subsequent screening of contour lines similar to the structure of each contour line. The target contour line of each contour line is obtained through the structural similarity between each contour line and its near neighbor contour line, and the region of interest of each contour line is extracted, which has the beneficial effect that by analyzing the features of each contour line, the contour line that may be caused by ghosting phenomenon can be identified, thereby providing a strong basis for subsequent region extraction. Then, based on the position distribution of all pixel points on each contour line and the target contour line, the feature direction is extracted by combining principal component analysis, 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, which has the beneficial effect that the morphological features of the contour line can be more accurately analyzed, and the region of interest is reasonably divided and processed, and the gray scale change intensity of each sub-region is effectively captured, revealing the subtle changes inside the contour line. Further, considering that the edge density of the intermediate sub-region is significantly higher than that of the single edge region, and the gradient of the intermediate sub-region of the ghosting should be significantly higher than that of the related features on both sides, the gradient distance between any two pixel points is obtained according to the difference between the gradient amplitude and the gradient angle between the two pixel points, and all pixel points in the region of interest of each contour line are clustered. The screened cluster is compared with the intermediate sub-region to obtain the overlap probability of the region of interest of each contour line, which has the beneficial effect that the possible ghosting region can be effectively identified, and the region extraction is further optimized according to the overlap probability. Through this method, the ghosting evaluation index of the region of interest of each contour line can be obtained, thereby quantifying the features of double edge superposition for judging the transverse 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, thereby improving the ghosting detection effect in the carton packaging printing process and ensuring product quality.
[0060] The computer program product of the present application can be a computer program implemented on one or more computers. The program instructions can be stored on a computer-readable medium, such as a floppy disk, CD-ROM, and the like. The computer program product can also include computer programs that are transmitted over a network via, for example, telephone line, LAN, wireless instrument, or others. Accordingly, the computer program product of the present application can be an article of manufacture including a computer usable medium having computer readable program code means distributed therein. The computer readable program code means is means for causing a computer to operate in a specific and predefined manner. The present application can also be embodied in a computer readable medium including transitory signals. Accordingly, the present application can be a product, an article of manufacture, and / or a machine.
[0061] It is apparent that the present application is not limited to the details of the foregoing exemplary embodiments, and thus modifications and / or improvements can be made thereto without departing from the scope of the present application. Accordingly, no matter from which point of view, the foregoing embodiments of the present application should be considered as exemplary and non-limiting; any modification of the technical solutions described in the foregoing embodiments, or equivalent replacement of some of the technical features, without changing the nature of the corresponding technical solutions, should be included in the scope of protection of the present application.
Claims
1. A method of detecting the print quality of a carton package, characterized by, The method comprises the following steps: Obtain a carton package grayscale image; Extract contour lines of the carton package grayscale image, confirm a near contour line of each contour line based on distances between pixel points on each contour line and pixel points on other contour lines, obtain a target contour line of each contour line through a structural similarity degree between each contour line and the target contour line, and extract a region of interest of each contour line; Extract a feature direction based on position distributions of all pixel points on each contour line and the target contour line and principal component analysis, divide the region of interest of each contour line based on the feature direction, and obtain a grayscale variation intensity of each sub-region after the division; Obtain a gradient distance between two pixel points according to a gradient amplitude and a difference between gradient angles between the two pixel points, cluster all pixel points in the region of interest of each contour line, compare a screened cluster to a sub-region with the greatest grayscale variation intensity, obtain an overlap probability of the region of interest of each contour line, and obtain a ghosting evaluation index of the region of interest of each contour line in combination with the grayscale variation intensity of each sub-region; the specific process of obtaining the ghosting evaluation index of the region of interest of each contour line is that, for the region of interest of each contour line, obtaining a grayscale variation intensity average of two side sub-regions in three equal sub-regions, comparing a grayscale variation intensity of a middle sub-region with the grayscale variation intensity average, and obtaining the ghosting evaluation index of the region of interest of each contour line by forward fusion of a comparison result and the overlap probability of the corresponding region of interest; Determine a detection result of carton package printing based on a distribution of the ghosting evaluation index of all regions of interest of the carton package grayscale image.
2. A method of detecting print quality of a carton package according to claim 1, characterized in that, The confirmation of the near contour line of each contour line is specifically as follows: For any pixel point of each contour line, obtain a pixel point with a minimum Euclidean distance between the any pixel point and other pixel points in other contour lines, and record the pixel point as a nearest neighbor pixel point; contour lines in which all nearest neighbor pixel points corresponding to all pixel points of each contour line are located are recorded as the near contour lines of each contour line.
3. A method of detecting print quality of a carton package according to claim 1, wherein The process of obtaining the target contour line of each contour line is as follows: Extract a connected domain of each contour line and each near contour line in the carton package grayscale image; and calculate a structural similarity degree between the connected domain of each contour line and the connected domain of each near contour line; The near contour line with the greatest structural similarity degree is taken as the target contour line of each contour line.
4. A method of detecting print quality of a carton package according to claim 1, wherein The extraction of the region of interest is determined by a region composed of the connected domain of each contour line and the connected domain of the target contour line of each contour line.
5. A method of detecting print quality of a carton package according to claim 1, wherein The grayscale variation intensity of each sub-region is specifically a gradient amplitude average of all pixel points in each sub-region.
6. A method of detecting print quality of a carton package according to claim 1, wherein The gradient distance between the two pixel points is obtained, and a specific formula is as follows: ; in the formula, is the gradient distance between the pixel point i and the pixel point j; , is the gradient amplitude and the gradient direction angle of the pixel point i respectively; , is the gradient amplitude and the gradient direction angle of the pixel point j respectively.
7. A method of detecting print quality of a carton package according to claim 1, wherein The overlap probability of the region of interest of each contour line is specifically as follows: Obtain an intersection and a union of a cluster with the greatest gradient amplitude average and a sub-region with the greatest grayscale variation intensity; calculate a 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.
8. A method of detecting print quality of a carton package according to claim 1, wherein, The process of determining the detection result of carton package printing is specifically as follows: The ghost evaluation index of the region of interest of all contour lines adopts threshold segmentation to obtain an optimal threshold value; Two contour lines in the region of interest with the ghost evaluation index greater than or equal to the optimal threshold value are determined as ghost contour lines; If the ghost contour lines exist in the gray image of the carton package, the carton package printing is unqualified; Otherwise, the carton package printing is qualified.
9. A system for detecting print quality of carton packages, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, The processor executes the computer program to realize the steps of the method of any one of claims 1-8.
Citation Information
Patent Citations
Printed matter ghosting detection method and system based on computer vision
CN113888536A