A carton printing quality detection method and system based on industrial vision

By employing an industrial vision-based method for inspecting the printing quality of cartons, utilizing color space conversion and adaptive filtering techniques, and combining color difference and morphological features for comprehensive measurement, the method solves the problem of balancing accuracy and speed in the printing quality inspection of cartons on high-speed production lines, achieving efficient defect identification and full-process management.

CN120318187BActive Publication Date: 2025-11-28YICHANG CHANGSHENG PACKAGING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510425930.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-11-28
Estimated Expiration
2045-04-07

AI Technical Summary

Technical Problem

In existing technologies, it is difficult to balance detection accuracy and response speed in high-speed production lines for carton printing quality inspection, and it is prone to missed or false detections, especially when faced with interference from carton surface reflections and local shadows.

Method used

An industrial vision-based method for inspecting the printing quality of cardboard boxes is adopted. Through color space conversion, adaptive filtering, and comprehensive measurement of color difference and morphological features, combined with an adaptive filtering kernel and a vector machine multi-classification model, the method achieves accurate processing and defect classification of cardboard box printing images.

Benefits of technology

It improves the efficiency and accuracy of carton printing quality inspection, can quickly identify printing defects, and generate targeted repair suggestions, enabling full-process management and optimization, and reducing defect rate and rework costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120318187B_ABST
    Figure CN120318187B_ABST
Patent Text Reader

Abstract

The application provides a carton printing quality detection method and system based on industrial vision, and belongs to the field of printing quality detection, and comprises the following steps: S1, obtaining a carton printing image, performing reflection interference suppression based on color space conversion, and performing printing feature enhancement to obtain a to-be-detected image; S2, performing printing quality detection on the to-be-detected image to determine defect area distribution characteristics and defect types of carton printing; S3, performing quality grading on the carton printing quality based on the defect area distribution characteristics of the carton printing, and generating a repair suggestion; S4, associating and analyzing the carton printing quality grade and the repair suggestion with production process data of carton printing, generating a quality traceability record, and storing the quality traceability record in a quality management database; and S5, optimizing the carton printing quality detection method. The application can quickly identify printing defects in a high-speed production line environment and manage and optimize the whole process of printing quality problems.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of printing quality detection, and particularly relates to a carton printing quality detection method and system based on industrial vision. BACKGROUND

[0002] As a printing process for producing packaging boxes, the main process flow of carton printing includes printing, coating and drying of carton, and the printing pattern as an intuitive expression of packaging design is directly related to the appearance of packaging and brand image. In mass printing production, the traditional manual detection method is not only time-consuming and laborious, but also subjective, which is easy to cause missed detection, so the industrial vision technology is widely used in this field.

[0003] However, in the prior art, due to the special material characteristics of the surface of the carton, uneven reflection and local shadow are easily generated in the visual acquisition process, which affects the detection accuracy, and the existing carton printing quality detection method is often limited by the capture of printing details and noise interference. For the slight color difference generated in the printing process and the local difference caused by the fine adjustment of the printing machine unit, the response is often insufficient, and there are missed detection or false detection phenomena. At the same time, because the production line speed of carton printing is fast, detection and judgment need to be completed in a very short time, which often makes it difficult to balance detection accuracy and response speed at the same time.

[0004] Therefore, it is a technical problem to be solved by those skilled in the art to find a method that can accurately detect printing defects and manage carton printing quality. SUMMARY

[0005] The present application provides a carton printing quality detection method and system based on industrial vision, which solves the defect of low accuracy of printing quality detection in the prior art, realizes fast identification of printing defects in a high-speed production line environment, and manages and optimizes the whole process of printing quality problems.

[0006] The present application provides a carton printing quality detection method based on industrial vision, comprising the following steps:

[0007] S1, obtaining a carton printing image, suppressing reflection interference of the carton printing image based on color space conversion to obtain a suppressed printing image, and enhancing printing features of the suppressed printing image to obtain a to-be-detected image;

[0008] S2, performing printing quality detection on the to-be-detected image, calculating a comprehensive measure of color difference components and morphological feature components, and determining defect area distribution characteristics and defect types of carton printing;

[0009] S3, grading the carton printing quality based on the defect area distribution characteristics of the carton printing to obtain a carton printing quality grade, and generating a repair suggestion based on the defect type according to the carton printing quality grade;

[0010] S4, correlating and analyzing the carton printing quality grade and the repair suggestion with production process data of the carton printing to generate a quality trace record, and storing the quality trace record in a quality management database;

[0011] S5, optimizing the detection method of the carton printing quality based on the historical record of the quality management database.

[0012] According to the paper box printing quality detection method based on industrial vision provided by the application, step S1 specifically comprises:

[0013] Converting the carton printing image to a CIELab color space to obtain a first color image;

[0014] Using an adaptive chrominance-brightness evaluation function to measure the chrominance deviation of the first color image to obtain a chrominance-brightness deviation value;

[0015] Based on the chrominance-brightness deviation value, an adaptive filtering kernel is constructed, and the first color image is adaptively filtered using the adaptive filtering kernel to obtain a filtered image;

[0016] The filtered image is enhanced, and the enhanced image is subjected to printing area segmentation and contour extraction to obtain a to-be-detected image.

[0017] According to the paper box printing quality detection method based on industrial vision provided by the application, the printing area segmentation and contour extraction of the enhanced image specifically comprises:

[0018] Setting a local similarity threshold and a color brightness anomaly threshold;

[0019] The color space distance of the adjacent two pixel points in the enhanced image is calculated, and the color space distance of the adjacent two pixel points and the color brightness difference value of the adjacent two pixel points are compared with the local similarity threshold and the color brightness anomaly threshold, respectively:

[0020] If the color space distance of the adjacent two pixel points is not greater than the local similarity threshold, and the color brightness anomaly degree difference value of the adjacent two pixel points is not greater than the color brightness anomaly threshold, then the two adjacent pixel points are included in the printing area;

[0021] Based on the printing area, the edge of the printing area is detected and extracted to obtain a to-be-detected image.

[0022] According to the paper box printing quality detection method based on industrial vision provided by the application, step S2 specifically comprises:

[0023] The color difference and morphological features of the to-be-detected image are calculated, and the comprehensive metric of each pixel point in the to-be-detected image is calculated based on the color difference and morphological features;

[0024] A comprehensive metric threshold is set, and the comprehensive metric of each image in the to-be-detected image is compared with the comprehensive metric threshold respectively:

[0025] If the comprehensive metric exceeds the threshold, the pixel point exceeding the threshold is marked as a suspicious defect pixel point;

[0026] A defect region is formed based on the suspicious defect pixel points, and shape analysis is performed on the defect region based on the color difference and morphological features to determine the defect region distribution feature and defect type.

[0027] According to the paper box printing quality detection method based on industrial vision provided by the application, the shape analysis specifically comprises:

[0028] The area of the defect region is determined according to the total number of suspicious defect pixel points, the boundary contour and shape index of each defect region are calculated, the shape of the defect region is obtained, and the position of the defect region is determined by calculating the centroid coordinates; wherein the shape index includes the aspect ratio, the compactness and the circularity;

[0029] The area, shape and position of the defect region are compared with the area, shape and position of the paper box printing standard template respectively to determine the defect region distribution feature;

[0030] The color difference amplitude of the suspicious defect pixel points is calculated, and a paper box printing defect feature set is constructed based on the color difference amplitude of the suspicious defect pixel points, the position of the defect region and the defect region distribution feature;

[0031] The paper box printing defect feature set is input into a vector machine multi-classification model to obtain a defect type set, wherein the defect type set includes overprint deviation, ink missing, plate blurring and misprinting.

[0032] According to the paper box printing quality detection method based on industrial vision provided by the application, the correlation analysis specifically comprises:

[0033] The defect type and defect region distribution feature of the paper box printing are determined according to the paper box printing quality grade and repair suggestion;

[0034] The defect type, defect region distribution feature and paper box printing grade of the paper box printing are time-sequentially compared with the production data of the paper box printing to establish a data mapping relationship based on a time axis;

[0035] Calculate the deviation between each parameter in the production data of the carton printing and the standard value of the carton printing production, and determine the abnormal parameter of the carton printing;

[0036] Analyze the correlation between the abnormal parameter of the carton printing and the defect type of the carton printing, and establish a mapping relationship between the parameter abnormal mode and the defect type;

[0037] According to the mapping relationship based on the time axis and the mapping relationship between the parameter abnormal mode and the defect type, the relationship between the abnormal parameter of the carton printing production and the carton printing quality and the carton printing defect is determined.

[0038] According to the paper box printing quality detection method based on industrial vision provided by the application, the self-adaptive chrominance-brightness evaluation function is:

[0039] ;

[0040] Wherein, The chrominance brightness deviation value of the pixel point (x, y) is represented, x represents the horizontal coordinate of the pixel point in the first color image, y represents the vertical coordinate of the pixel point in the first color image, The chrominance brightness balance coefficient is represented, The chrominance intensity of the pixel point (x, y) is represented, The brightness value of the pixel point (x, y) is represented, The stability factor is represented, The local area average brightness of the first color image is represented, The image maximum brightness value of the first color image is represented.

[0041] The application also provides a paper box printing quality detection system based on industrial vision, which realizes the paper box printing quality detection method as described above, comprising:

[0042] The image processing module is used for acquiring the carton printing image, suppressing the reflection interference of the carton printing image based on color space conversion to obtain the suppressed printing image, and enhancing the printing features of the suppressed printing image to obtain the to-be-detected image;

[0043] The quality detection module is used for detecting the printing quality of the to-be-detected image, calculating the comprehensive measurement of the color difference component and the morphological feature component, determining the defect area distribution characteristics and the defect type of the carton printing;

[0044] The quality grading module is used for grading the quality of the carton printing based on the defect area distribution characteristics of the carton printing to obtain the carton printing quality grade, and generating a repair suggestion based on the defect type according to the carton printing quality grade;

[0045] a data management module for correlating and analyzing the carton printing quality grade and repair suggestion with production process data of carton printing, generating a quality trace record, and storing the quality trace record into a quality management database;

[0046] a quality optimization module for optimizing the detection method of carton printing quality based on historical records of the quality management database.

[0047] The application further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the carton printing quality detection method when executing the program.

[0048] The application further provides a non-transitory computer readable storage medium, which stores a computer program, and the computer program is executable on a processor to implement the carton printing quality detection method.

[0049] The application provides a carton printing quality detection method and system based on industrial vision, which introduces industrial vision technology, combines color space conversion, adaptive filtering, color difference and morphological feature comprehensive measurement to process and classify defects of carton printing images, improves the efficiency and accuracy of carton printing quality detection, can quickly identify carton printing defects in a high-speed production line environment, and generates targeted repair suggestions according to the defect types, meanwhile, through correlation analysis with production process data and generation of quality trace records, the full-process management and optimization of carton printing quality are realized, and the rate of defective products and rework cost are reduced. BRIEF DESCRIPTION OF DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the application or prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor.

[0051] Figure 1 is a flowchart of the carton printing quality detection method based on industrial vision provided by the application;

[0052] Figure 2 is a flowchart of reflection suppression and feature enhancement of the carton printing quality detection method based on industrial vision provided by the application;

[0053] Figure 3 is a flowchart of color brightness abnormality calculation of the carton printing quality detection method based on industrial vision provided by the application;

[0054] Figure 4It is a structural schematic diagram of the electronic device provided by the application. DETAILED DESCRIPTION

[0055] To make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below with reference to the drawings in the present application. Obviously, the described embodiments are some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0056] As shown in Figure 1 and Figure 2 The present application provides an industrial vision-based carton printing quality detection method, comprising the following steps:

[0057] S1, obtaining a carton printing image, suppressing reflection interference on the carton printing image based on color space conversion to obtain a suppressed printing image, and enhancing printing features of the suppressed printing image to obtain a to-be-detected image.

[0058] It can be understood that a high-resolution industrial camera is used in cooperation with a light source system to collect the carton printing image.

[0059] In an embodiment of the present application, a planar array camera or a linear array camera is used in cooperation with an LED planar light source or a ring light source to ensure that a clear and stable carton surface printing image is obtained.

[0060] In an embodiment of the present application, a transition roller or a vacuum suction platform is additionally arranged on a conveying belt of the carton printing quality detection device, so that the carton is transported from the printing machine to the detection area of the camera and light source system after being output from the printing machine, and the carton is ensured to pass through the detection position in a stable and uniform state, so that the picture captured by the industrial camera has consistent distance and angle.

[0061] The present application suppresses the distortion of chrominance information in a high-brightness area by performing reflection suppression processing on the carton printing image, and enhances the chrominance information in a dark area, thereby significantly improving the quality and stability of the printing image.

[0062] Specifically, step S1 specifically comprises:

[0063] converting the carton printing image to a CIELab color space to obtain a first color image;

[0064] using an adaptive chrominance-brightness evaluation function to measure chrominance deviation of the first color image to obtain a chrominance-brightness deviation value; wherein the adaptive chrominance-brightness evaluation function is:

[0065] ;

[0066] wherein, represents the chrominance-brightness deviation value of the pixel point (x, y), x represents the horizontal coordinate of the pixel point in the first color image, and y represents the vertical coordinate of the pixel point in the first color image, represents the chrominance-brightness balance coefficient, represents the chrominance intensity of the pixel point (x, y), represents the brightness value of the pixel point (x, y), represents the stabilization factor, represents the local area average brightness of the first color image, represents the image maximum brightness value of the first color image;

[0067] constructing an adaptive filter kernel based on the chrominance-brightness deviation value, and performing adaptive filtering on the first color image using the adaptive filter kernel to obtain a filtered image;

[0068] performing image enhancement on the filtered image, performing printing area segmentation and contour extraction on the enhanced image, and obtaining a to-be-detected image.

[0069] It can be understood that in the carton printing quality detection, the reflection of the surface of the carton will affect the detection effect. For example, overexposure or underexposure phenomenon occurs in the local area of the printed image, and the color of the printed image is distorted in the strong reflection area. Therefore, it is necessary to suppress the reflection of the surface of the carton. reflects the coupling relationship between chrominance and brightness, and the chrominance intensity directly reflects the purity of the color, and is taken as the denominator, wherein the stabilization factor can prevent the denominator from being zero. When the brightness is large, the coupling relationship between chrominance and brightness is small, indicating that the suppression effect on chrominance in the high brightness area is small. When the brightness is small, the coupling relationship between chrominance and brightness is large, which enhances the chrominance information in the dark area. balances the deviation degree of the local brightness, and the local area average brightness provides a local reference basis, as a normalization factor, ensures the comparability between different areas, reflects the difference degree of the brightness of the pixel point and the surrounding environment. The balance coefficient has a value range of [0, 1]. When the balance coefficient is close to 1, the adaptive chrominance-brightness evaluation function pays more attention to the preservation of chrominance information. When the balance coefficient is close to 0, the adaptive chrominance-brightness evaluation function pays more attention to the uniformity of brightness. By adjusting the balance coefficient The chroma retention and brightness uniformity can be balanced according to different printing varieties and detection requirements.

[0070] In the formula, the specific construction of the filter kernel can be set according to actual use, and the present application does not make a specific limitation on this.

[0071] The present application calculates the chroma brightness deviation value of each pixel point of the carton printed image through the adaptive chroma-brightness evaluation function, and constructs an adaptive filter kernel according to the chroma brightness deviation value, thereby realizing the differential processing of different regions in the carton printed image, automatically applying a filter kernel with a larger size to the region with serious reflection for high-intensity filtering, effectively inhibiting the color distortion caused by reflection; and applying a filter kernel with a smaller size to the normal printing region for light filtering, thereby maximizing the preservation of original printing details. The present application realizes the accurate identification and targeted processing of the reflection region, and inhibits the reflection interference while maximizing the preservation of printing details.

[0072] Further, the printing region segmentation and contour extraction of the enhanced image specifically include:

[0073] setting a local similarity threshold and a color brightness abnormality threshold;

[0074] calculating the color space distance of two adjacent pixel points in the enhanced image, and comparing the color space distance of the two adjacent pixel points and the color brightness difference value of the two adjacent pixel points with the local similarity threshold and the color brightness abnormality threshold, respectively;

[0075] if the color space distance of the two adjacent pixel points is not greater than the local similarity threshold, and the color brightness abnormality difference value of the two adjacent pixel points is not greater than the color brightness abnormality threshold, then the two adjacent pixel points are counted into the printing region; the calculation formula is:

[0076] ;

[0077] ;

[0078] ;

[0079] ;

[0080] ;

[0081] ;

[0082] wherein, the color brightness abnormality degree of the pixel point p is represented by a chroma intensity of the pixel point p, a luminance value of the pixel point p, a local region average luminance centered at the pixel point p, N represents the total number of pixel points in the window, represents a luminance value (L channel value) of a pixel point with coordinates (i, j), i represents a row coordinate of a pixel point in a local window, and j represents a column coordinate of a pixel point in the local window, represents a color space distance between two adjacent pixel points p and q, p represents any pixel point of the enhanced image, and q represents an adjacent pixel point of the pixel point p, represents a local similarity threshold, represents a color luminance abnormality degree of the pixel point p, represents a color luminance abnormality degree of the pixel point q, represents a color luminance abnormality threshold, represents a luminance component of the pixel point p, represents a luminance component of the pixel point q, represents a chroma a component of the pixel point p, represents a chroma a component of the pixel point q, represents a chroma b component of the pixel point p, represents a chroma b component of the pixel point q;

[0083] Edge detection is performed based on the printing area, and a boundary of the printing area is extracted to obtain the to-be-detected image.

[0084] It can be understood that, in the carton printing process, due to ink diffusion and penetration and other characteristics, even in the same color block region, there is a slight color difference between adjacent pixel points. It is generally believed that a color difference with a color difference value less than 2.0 is difficult to distinguish visually, and therefore, the local similarity threshold can be adjusted according to an actual use scenario. The color luminance abnormality threshold needs to be set considering the influence of the lighting condition and the printing material characteristics.

[0085] In the CIELab color space, the chroma a component represents a red-green chroma channel, a positive value of the chroma a component represents a red tendency, and a negative value of the chroma a component represents a green tendency. The greater the absolute value of the chroma a component is, the stronger the color tendency in the direction is. The chroma b component represents a yellow-blue channel, a positive value of the chroma b component represents a yellow tendency, and a negative value of the chroma b component represents a blue tendency. The greater the absolute value of the chroma b component is, the stronger the color tendency in the direction is.

[0086] In an embodiment of the present application, edge detection is performed based on the printing area, and a boundary of the printing area is extracted to obtain the to-be-detected image, and the specific process includes:

[0087] The Sobel operator is applied to each pixel in the printed area image to calculate the horizontal and vertical gradient components of each pixel.

[0088] Calculate the total gradient magnitude and gradient direction angle for each pixel based on the gradient components in the horizontal and vertical directions, respectively.

[0089] Non-maximum suppression is applied to the gradient magnitude of each pixel along the gradient direction;

[0090] Set high and low thresholds for the edge image, and perform adaptive thresholding on the suppressed image:

[0091] If the total gradient magnitude of a pixel is greater than the high threshold, then the pixel is an edge point;

[0092] If the total gradient magnitude of a pixel is less than the low threshold, then the pixel is a non-edge point.

[0093] If the total gradient magnitude of a pixel is within the range of the high threshold and the low threshold, then it is further determined whether the pixel is connected to an edge point. If it is, the pixel is also determined to be an edge point. If not, the pixel is a non-edge point.

[0094] By connecting the edge points and removing excessively short contour segments, the broken contours are connected to obtain a sequence of contour points, which is denoted as the boundary of the printing area. Each contour point in the sequence contains position and orientation information.

[0095] S2. Perform printing quality inspection on the image to be detected, calculate the comprehensive measurement of color difference component and morphological feature component, and determine the distribution characteristics and defect types of the defect area in the carton printing.

[0096] like Figure 3 As shown, specifically, step S2 includes:

[0097] Calculate the color difference and morphological features of the image to be detected, and then calculate a comprehensive metric for each pixel in the image based on the color difference and morphological features; the calculation formula is as follows:

[0098] ;

[0099] ;

[0100] in, A comprehensive metric representing a pixel (x, y). Indicates color difference weight. This represents the color difference of a pixel (x, y). Represents the weight of morphological features. This represents the morphological feature deviation of a pixel (x, y). denotes the gradient feature weight, denotes the gradient feature bias, denotes the texture feature weight, denotes the texture feature bias, denotes the shape feature weight, denotes the shape feature bias;

[0101] a comprehensive metric threshold is set, and the comprehensive metric of each image in the image to be detected is compared with the comprehensive metric threshold respectively:

[0102] If the comprehensive metric exceeds the threshold, the pixel point exceeding the threshold is marked as a suspicious defect pixel point;

[0103] Based on the suspicious defect pixel points, a defect region is formed, and shape analysis is performed on the defect region based on the color difference and the morphological feature to determine the defect region distribution feature and the defect type.

[0104] The gradient feature bias is calculated according to the weighted sum of the gradient amplitude bias and the gradient direction bias. The calculation process is: using a differential operator (such as a Sobel operator) to perform convolution operation on the image to be detected and the carton printing standard template image, extracting the gradient components in the horizontal direction and the vertical direction, and then calculating the gradient amplitude and the gradient direction. The gradient amplitude bias is obtained by calculating the absolute difference of the gradient amplitudes of the image to be detected and the carton printing standard template image at the corresponding positions, and then dividing by a normalization factor (usually the maximum gradient amplitude in the image). The gradient direction bias considers the cyclic nature of the angle, and is obtained by calculating the minimum angle difference (ensuring not to exceed 180 degrees) of the gradient directions of the image to be detected and the carton printing standard template image at the corresponding positions, and then dividing by π for normalization.

[0105] The texture feature bias is a comprehensive metric based on the difference of multiple texture descriptors. The calculation process is: extracting texture features from the image to be detected and the carton printing standard template image. These features may include statistics based on the gray level co-occurrence matrix (GLCM) (such as energy, contrast, uniformity, correlation, etc.), local binary pattern (LBP) features, Gabor filter responses or wavelet transform coefficients, etc. Then, the absolute difference of each texture descriptor of the image to be detected and the carton printing standard template image at the corresponding positions is calculated, and then divided by the maximum possible value of the descriptor for normalization.

[0106] The calculation process of the shape feature deviation is: shape descriptors are extracted from the to-be-detected image and the carton printing standard template image, which can include moment features (ordinary moments, central moments, Hu invariant moments, etc.), edge contour features (perimeter, area, circularity, rectangularity, etc.), skeleton features (branch point distribution, end point number, skeleton length, etc.), etc. Then, the absolute difference of each shape descriptor at the corresponding position of the to-be-detected image and the carton printing standard template image is calculated, and is divided by the maximum possible value of the descriptor for normalization.

[0107] It can be understood that the defects in the existing carton printing process are often abnormal in multiple features, for example, the ink spot defect is not only a local color difference anomaly, but also a possible change in morphological features; the scratch defect has not only a linear anomaly in morphological features, but also a possible color difference fluctuation, so it is necessary to use a comprehensive metric to determine the defect area distribution features and the defect type of the carton printing to improve the accuracy of detection. Among them, the color difference is based on the Euclidean distance of the CIELab color space, and the morphological feature deviation reflects the morphological features and can capture the comprehensive changes in the local area. The color difference weight and the morphological feature weight can be set according to actual use requirements, for example, if the color reproduction degree of the carton printing is required, the color difference weight takes a higher value (such as 0.7 or more), and the morphological feature weight takes a smaller value (such as 0.3 or less), and the present application does not make specific limitations on this.

[0108] The comprehensive metric threshold can be set according to the carton printing process specification and material characteristics, and the present application does not make specific limitations on this.

[0109] The present application can accurately identify the defect area in the printed image by calculating the comprehensive weight based on the color difference and the morphological features, and determine the defect type according to the distribution features and shape index of the defect area, which can not only detect obvious printing defects (such as ink missing and plate sticking), but also capture slight color difference and morphological changes, avoiding the problems of missed detection or false detection in traditional methods.

[0110] Further, the shape analysis specifically includes:

[0111] The area of the defect area is determined according to the total number of suspicious defect pixel points, the boundary contour and shape index of each defect area are calculated, the shape of the defect area is obtained, and the centroid coordinates of the defect area are calculated to determine the position of the defect area; wherein the shape index includes the aspect ratio, the compactness and the circularity;

[0112] The area, shape and position of the defect area are compared with the area, shape and position of the carton printing standard template respectively to determine the defect area distribution features;

[0113] calculate the color difference amplitude of the suspicious defect pixel points, and construct a carton printing defect feature set based on the color difference amplitude of the suspicious defect pixel points, the position of the defect region and the defect region distribution characteristics;

[0114] input the carton printing defect feature set into a vector machine multi-classification model to obtain a defect type set, wherein the defect type set includes overprint deviation, ink missing, plate blurring and misprint.

[0115] The vector machine multi-classification model is a multi-classification model constructed by using a support vector machine, adopts a radial basis function kernel, maps the feature space to a defect type space by constructing an optimal separation hyperplane, and outputs the probability distribution of each defect region belonging to various defect types, can effectively process the problem of uneven number of carton printing defect samples, and can adapt to the complex distribution of different defect types in the feature space.

[0116] In an embodiment of the present application, if the aspect ratio of the defect region is greater than an aspect ratio threshold, and the position of the defect region is offset relative to the position of the carton printing standard template, then the defect type of the defect region is overprint deviation;

[0117] If the compactness of the defect region is less than a compactness threshold or the circularity is less than a threshold circularity threshold, and the color difference of the defect region is higher than that of the carton printing standard template, then the defect type of the defect region is ink missing;

[0118] If the area of the defect region is greater than the area of the carton printing standard template, and the color difference amplitude is less than a color difference amplitude threshold, then the defect type of the defect region is plate blurring;

[0119] If the centroid position of the defect region deviates from the position of the carton printing standard template, and the average color difference of the defect region is greater than that of the carton printing standard template, then the defect type of the defect region is misprint.

[0120] Specifically, the color difference amplitude threshold can be set according to actual use requirements. The aspect ratio is the ratio of the length to the width of the outer rectangle of the defect region, the compactness is used to measure whether the defect region is regular and compact, i.e. compactness = 4 * π * defect region area / (defect region perimeter * defect region perimeter), and the circularity is used to judge whether the defect region is close to a circle, i.e. circularity = radius of circle / outer circle radius of defect region, wherein the radius of the circle can be set according to the actual use scene size.

[0121] An embodiment is described as follows:

[0122] A dark abnormal area is detected on the printed image of the carton, which is confirmed as a defect area, the area of the printed standard template of the carton is 28 square millimeters, the position is (142, 110), and the average color difference of the printed standard template of the carton is 5;

[0123] The defect area has 3000 pixel points, the area is 30 square millimeters, the length-width ratio of the defect area is 5, the compactness is 0.2, the centroid coordinates are (150, 120), and the average color difference is 3. The centroid position of the defect area deviates from the position of the printed standard template of the carton, and the average color difference of the defect area is greater than the average color difference of the printed standard template of the carton. The defect type of the defect area is misprint.

[0124] S3, based on the defect area distribution characteristics of the carton printing, the quality of the carton printing is classified, and the quality grade of the carton printing is obtained. According to the quality grade of the carton printing and based on the defect type, a repair suggestion is generated;

[0125] Specifically, step S3 specifically includes:

[0126] According to the defect area distribution characteristics of the carton printing, the defect area ratio is calculated:

[0127] When the defect ratio of the carton printing is less than 1%, the defect area of the carton printing is a slight defect; when the defect ratio of the carton printing is more than 1% and less than 5%, the defect area of the carton printing is a moderate defect; when the defect ratio of the carton printing is not less than 5%, the defect area of the carton printing is a serious defect;

[0128] When the defect category of the carton printing is ink leakage:

[0129] If the defect area is a slight defect, the quality grade of the carton printing is A level, and the repair suggestion is local reprinting; if the defect area is a moderate defect, the quality grade of the carton printing is B level, and the repair suggestion is to reprint after making a new plate; if the defect area is a serious defect, the quality grade of the carton printing is C level, and the repair suggestion is to reprint after returning to work and checking the state of the carton printing equipment;

[0130] When the defect category of the carton printing is overprint deviation:

[0131] If the defect area is a slight defect, the quality grade of the carton printing is A level, and the repair suggestion is to adjust the carton printing process and re-align the overprint; if the defect area is a moderate defect, the quality grade of the carton printing is B level, and the repair suggestion is to return to work and adjust the printing process; if the defect area is a serious defect, the quality grade of the carton printing is C level, and the repair suggestion is to return to work and reprint, and check the carton printing mold and plate surface;

[0132] When the defect category of the carton printing is plate sticking:

[0133] If the defect area is a slight defect, the carton printing quality level is B, and the repair suggestion is to adjust the ink control process or local reprinting; if the defect area is a moderate defect, the carton printing quality level is C, and the repair suggestion is to re-adjust the machine parameters and re-print; if the defect area is a serious defect, the carton printing quality level is C, and the repair suggestion is to discard the entire batch of cartons and reprint them;

[0134] When the defect category of carton printing is misprinting:

[0135] If the defect area is a slight defect, the carton printing quality level is C, and the repair suggestion is local coverage or reprinting; if the defect area is a moderate defect, the carton printing quality level is D, and the repair suggestion is to rework and reprint related content; if the defect area is a serious defect, the carton printing quality level is D, and the repair suggestion is to reprint the entire batch of cartons, and the printing template data needs to be checked for correctness.

[0136] It can be understood that when there are multiple defects in carton printing, the serious level should be given, for example, when there are ink leakage (slight) and overprint deviation (moderate defect) in carton printing, the more serious overprint deviation should be handled, and comprehensive inspection should be combined to reduce the possibility of secondary defects.

[0137] The present application can provide different treatment schemes according to the severity of the defect (slight, moderate, serious), effectively reducing the repair cost and the rate of defective products.

[0138] In an embodiment of the present application, when there are multiple defects in carton printing, the defect area with a higher level should be handled first according to the severity level (slight, moderate, serious). For example, if the ink leakage is a moderate defect and the overprint deviation is a slight defect, the ink leakage area should be repaired first.

[0139] In an embodiment of the present application, when the defect area of carton printing has the same serious level, the priority is handled according to the impact of the defect on the functionality of the product, for example, overprint deviation usually has a greater impact on the functionality of packaging design and should be handled first, and although ink leakage affects the appearance, it can be handled later through local repair in some scenarios.

[0140] S4, the carton printing quality level and repair suggestion are analyzed in association with the production process data of carton printing, a quality traceability record is generated, and the quality traceability record is stored in a quality management database;

[0141] The production process data of carton printing includes printing machine parameters (such as pressure, temperature, speed, etc.), ink supply system state (ink amount, balance, etc.), and operation process (such as plate making, printing step time period, etc.).

[0142] Specifically, the correlation analysis includes:

[0143] determining a defect type and defect area distribution feature of the carton printing according to the carton printing quality grade and the repair suggestion;

[0144] time series matching the defect type, the defect area distribution feature, the carton printing grade and production data of the carton printing, and establishing a data mapping relationship based on a time axis;

[0145] calculating a deviation between each parameter in the production data of the carton printing and a standard value of carton printing production, and determining an abnormal parameter of the carton printing;

[0146] analyzing a correlation between the abnormal parameter of the carton printing and the defect type of the carton printing, and establishing a mapping relationship between a parameter abnormality mode and the defect type;

[0147] determining a relationship between an abnormal parameter of carton printing production and carton printing quality and carton printing defects according to the data mapping relationship based on the time axis and the mapping relationship between the parameter abnormality mode and the defect type.

[0148] In a specific embodiment, when the defect category of the carton printing is overprint deviation, and the carton printing quality grade is B:

[0149] extracting production process data: printing speed 200 m / min, plate pressure 0.8 MPa, ink supply amount 0.6 ml / cm2, wherein the printing speed is lower than the normal value (300 m / min), and through comparison with historical data, it is found that frequent fluctuation of the speed is highly correlated with the occurrence of overprint deviation defects;

[0150] determining the printing start time of the batch of products as 9:10 am and the end time as 9:35 am in combination with the process time axis, and tracing back to the production equipment operation data, it is found that the speed fluctuation is concentrated between 9:20 am and 9:25 am, which has significant correlation with the time of defect occurrence;

[0151] generating a quality trace record, recording the defect type as overprint deviation and medium defect, the defect occurrence time as 9:20 am to 9:25 am, and recording the equipment number, the operator's name and the equipment parameter (excessive speed fluctuation), storing this data into a quality management database, and marking the production batch number for rework and the operator for subsequent rectification.

[0152] S5, based on the historical record of the quality management database, optimizing the detection method of the carton printing quality.

[0153] It can be understood that all historical defect data of carton printing is extracted from the quality management database, and is associated with the production process parameters as much as possible to find the regularity of defect occurrence, such as finding that "carton thickness increase + printing speed too fast" is the main cause of overprint deviation, and adjusting the standard of carton printing according to the regularity of defect occurrence, such as reducing color difference to improve the image recognition accuracy of carton printing.

[0154] Specifically, step S5 specifically includes:

[0155] The carton printing defects in the quality management database are analyzed with the production process parameters to determine the root cause of carton printing, wherein the analysis includes determining whether the production process parameters exceed the production process threshold, analyzing whether the carton printing production equipment and operation are abnormal, and analyzing the time correlation of carton printing defects and production line environment;

[0156] According to the root cause of carton printing, the threshold of carton printing process parameters is adjusted, the production line of carton printing is monitored in real time, and the production process parameters of carton printing are adjusted.

[0157] Specifically, a specific embodiment is described:

[0158] All relevant quality traceability records in the database are extracted, including defect information (such as ink leakage, overprint deviation, and plate sticking), corresponding production process parameters (such as speed, ink amount, and pressure), and repair suggestions;

[0159] Based on the statistical analysis of historical record data, the key factors of defect occurrence are analyzed using the corresponding relationship between printing process and defects, such as the specific reasons for production parameter deviation from the normal range, equipment operation abnormality, or operation specification execution not in place;

[0160] According to the key factors analyzed, the optimized detection rules are constructed: set the parameter threshold of carton printing production process, when the carton printing production process parameter exceeds the threshold, the carton printing is monitored in real time, such as: clear the parameter threshold (such as the printing speed fluctuation control in ±5%, the standard range of ink amount and pressure is 0.7ml / square centimeter and 0.8-1.0MPa); increase the real-time monitoring conditions of key processes (such as the definition of overprint accuracy check frequency per second);

[0161] Based on the key factors analyzed and the optimized detection rules, the existing printing detection method is adjusted, for example, the threshold of real-time detection is adjusted, the finished product quality judgment standard is optimized, or the monitoring frequency of specific processes is increased to reduce the occurrence probability of specific defects.

[0162] The application introduces industrial vision technology, combines color space conversion, adaptive filtering, color difference and morphological feature comprehensive measurement to process and classify the carton printing image, improves the carton printing quality detection efficiency and accuracy, can quickly identify the carton printing defects in the high-speed production line environment, and generates targeted repair suggestions according to the defect type, meanwhile, through the correlation analysis with the production process data and the generation of quality traceability record, the full-process management and optimization of the carton printing quality are realized, and the defective rate and rework cost are reduced.

[0163] The application also provides a carton printing quality detection system based on industrial vision, which realizes the carton printing quality detection method described above, and comprises the following modules.

[0164] An image processing module is configured to acquire a carton printing image, suppress reflection interference of the carton printing image based on color space conversion to obtain a suppressed printing image, and enhance printing features of the suppressed printing image to obtain a to-be-detected image.

[0165] A quality detection module is configured to detect the printing quality of the to-be-detected image, calculate a comprehensive measurement of a color difference component and a morphological feature component, determine a defect area distribution feature and a defect type of the carton printing.

[0166] A quality grading module is configured to grade the quality of the carton printing based on the defect area distribution feature of the carton printing to obtain a carton printing quality grade, and generate a repair suggestion based on the carton printing quality grade and the defect type.

[0167] A data management module is configured to perform correlation analysis on the carton printing quality grade and the repair suggestion and production process data of the carton printing, generate a quality traceability record, and store the quality traceability record in a quality management database.

[0168] A quality optimization module is configured to optimize the detection method of the carton printing quality based on historical records of the quality management database.

[0169] The carton printing quality detection device provided by the application is described below, and the carton printing quality detection device described below can be referred to each other corresponding to the carton printing quality detection method described above.

[0170] Figure 4 An example of an electronic device is shown in the schematic diagram of the physical structure, such as Figure 4As shown, the electronic device can include a processor 410, a communications interface 420, a memory 430, and a communications bus 440, wherein the processor 410, the communications interface 420, and the memory 430 complete mutual communication through the communications bus 440. The processor 410 can invoke the logic instructions in the memory 430 to execute the carton printing quality detection method, which includes acquiring a carton printing image, performing anti-glare interference on the carton printing image based on color space conversion to obtain an inhibited printing image, and performing printing feature enhancement on the inhibited printing image to obtain a to-be-detected image; performing printing quality detection on the to-be-detected image, calculating a comprehensive measure of a color difference component and a morphological feature component, determining a defect area distribution feature and a defect type of the carton printing; performing quality grading on the carton printing quality based on the defect area distribution feature of the carton printing to obtain a carton printing quality grade, generating a repair suggestion based on the carton printing quality grade and the defect type; associating and analyzing the carton printing quality grade and the repair suggestion with production process data of the carton printing to generate a quality traceability record, and storing the quality traceability record in a quality management database; and optimizing the carton printing quality detection method based on historical records of the quality management database.

[0171] In addition, the logic instructions in the memory 430 described above can be implemented in the form of a software function unit and sold or used as an independent product, which can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or the part of the technical solutions that essentially contribute to the prior art or the part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in various embodiments of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.

[0172] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program being stored in a non-transitory computer-readable storage medium, and the computer program being executable by a processor to enable a computer to perform the carton printing quality detection method provided by any of the above methods, the method comprising: obtaining a carton printing image, performing specular reflection interference suppression on the carton printing image based on color space conversion to obtain a suppressed printing image, and performing printing feature enhancement on the suppressed printing image to obtain a to-be-detected image; performing printing quality detection on the to-be-detected image, calculating a comprehensive metric of a color difference component and a morphological feature component, determining a defect area distribution feature and a defect type of the carton printing; performing quality grading on the carton printing quality based on the defect area distribution feature of the carton printing to obtain a carton printing quality grade, generating a repair suggestion according to the carton printing quality grade and based on the defect type; performing correlation analysis on the carton printing quality grade and the repair suggestion and production process data of the carton printing to generate a quality traceability record, and storing the quality traceability record in a quality management database; and optimizing the carton printing quality detection method based on historical records of the quality management database.

[0173] In another aspect, the present application also provides a non-transitory computer-readable storage medium, which stores a computer program, the computer program being executable by a processor to implement the carton printing quality detection method provided by any of the above methods, the method comprising: obtaining a carton printing image, performing specular reflection interference suppression on the carton printing image based on color space conversion to obtain a suppressed printing image, and performing printing feature enhancement on the suppressed printing image to obtain a to-be-detected image; performing printing quality detection on the to-be-detected image, calculating a comprehensive metric of a color difference component and a morphological feature component, determining a defect area distribution feature and a defect type of the carton printing; performing quality grading on the carton printing quality based on the defect area distribution feature of the carton printing to obtain a carton printing quality grade, generating a repair suggestion according to the carton printing quality grade and based on the defect type; performing correlation analysis on the carton printing quality grade and the repair suggestion and production process data of the carton printing to generate a quality traceability record, and storing the quality traceability record in a quality management database; and optimizing the carton printing quality detection method based on historical records of the quality management database.

[0174] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0175] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0176] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting the printing quality of a carton based on industrial vision, characterized in that, The method comprises the following steps: S1, obtaining a carton printed image, suppressing reflection interference of the carton printed image based on color space conversion to obtain a suppressed printed image, and enhancing a printed feature of the suppressed printed image to obtain a to-be-detected image; Step S1 specifically comprises: converting the carton printed image to a CIELab color space to obtain a first color image; using an adaptive chrominance-brightness evaluation function to measure chrominance deviation of the first color image to obtain a chrominance-brightness deviation value; constructing an adaptive filter kernel based on the chrominance-brightness deviation value, and using the adaptive filter kernel to perform adaptive filtering on the first color image to obtain a filtered image; performing image enhancement on the filtered image, performing printed region segmentation and contour extraction on the enhanced image to obtain the to-be-detected image; the adaptive chrominance-brightness evaluation function is: ; wherein, represents a chroma brightness deviation value of the pixel point (x, y), x represents the horizontal coordinate of the pixel point in the first color image, and y represents the vertical coordinate of the pixel point in the first color image, represents a chroma brightness balance coefficient, represents a chroma intensity of the pixel point (x, y), represents a brightness value of the pixel point (x, y), represents a stabilization factor, represents a local area average brightness of the first color image, represents an image maximum brightness value of the first color image; S2, performing printed quality detection on the to-be-detected image, calculating a comprehensive measure of a color difference component and a morphological feature component, and determining a defect region distribution feature and a defect type of the carton printing; Step S2 specifically comprises: calculating a color difference and a morphological feature of the to-be-detected image, and calculating a comprehensive measure of each pixel point in the to-be-detected image based on the color difference and the morphological feature; setting a comprehensive measure threshold, and comparing the comprehensive measure of each image in the to-be-detected image with the comprehensive measure threshold respectively: if the comprehensive measure exceeds the threshold, marking the pixel point exceeding the threshold as a suspected defect pixel point; based on the suspected defect pixel point, forming a defect region, and based on the color difference and the morphological feature, performing shape analysis on the defect region to determine a defect region distribution feature and a defect type; S3, performing quality grading on the carton printing quality based on the defect region distribution feature of the carton printing to obtain a carton printing quality grade, and generating a repair suggestion based on the carton printing quality grade and the defect type; S4, associating and analyzing the carton printing quality grade and the repair suggestion with production process data of the carton printing to generate a quality traceability record, and storing the quality traceability record in a quality management database; S5, based on historical records of the quality management database, optimizing the detection method of the carton printing quality.

2. The method for detecting the printing quality of carton based on industrial vision according to claim 1, characterized in that, The printed region segmentation and contour extraction on the enhanced image specifically comprises: setting a local similarity threshold and a color brightness anomaly threshold; calculating a color space distance between two adjacent pixel points in the enhanced image, and comparing a difference between the color space distance between the two adjacent pixel points and the chrominance-brightness deviation value of the two adjacent pixel points with the local similarity threshold and the color brightness anomaly threshold respectively: if the color space distance between the two adjacent pixel points is not greater than the local similarity threshold, and the difference between the chrominance-brightness deviation values of the two adjacent pixel points is not greater than the color brightness anomaly threshold, then the two adjacent pixel points are included in the printed region; based on the printed region, performing edge detection and extracting the boundary of the printed region to obtain the to-be-detected image.

3. The method for detecting the printing quality of carton based on industrial vision according to claim 1, characterized in that, The shape analysis specifically comprises: Determine the area of the defect region according to the total number of suspicious defect pixels, calculate the boundary contour and shape index of each defect region to obtain the shape of the defect region, and determine the position of the defect region by calculating the centroid coordinates of the defect region; wherein the shape index includes the aspect ratio, compactness and circularity; Compare the area, shape and position of the defect region with the area, shape and position of the carton printing standard template respectively to determine the defect region distribution characteristics; Calculate the color difference amplitude of the suspicious defect pixels, and construct a carton printing defect feature set based on the color difference amplitude of the suspicious defect pixels, the position of the defect region and the defect region distribution characteristics; Input the carton printing defect feature set into the vector machine multi-classification model to obtain a defect type set, wherein the defect type set includes overprint deviation, ink missing, plate blurring and misprint.

4. The method for detecting the printing quality of carton based on industrial vision according to claim 1, characterized in that, The correlation analysis specifically includes: Determine the defect type and defect region distribution characteristics of the carton printing according to the carton printing quality grade and repair suggestion; Align the defect type, defect region distribution characteristics, carton printing quality grade of the carton printing with the production process data of the carton printing in time sequence to establish a data mapping relationship based on time axis; Calculate the deviation between each parameter in the production process data of the carton printing and the standard value of the carton printing production to determine the abnormal parameter of the carton printing; Analyze the correlation between the abnormal parameter of the carton printing and the defect type of the carton printing to establish a mapping relationship between the parameter abnormal mode and the defect type; Determine the relationship between the abnormal parameter of the carton printing and the carton printing quality, carton printing defect according to the data mapping relationship based on time axis and the mapping relationship between the parameter abnormal mode and the defect type.

5. An industrial vision-based carton print quality detection system, characterized by, The carton printing quality detection method as claimed in any one of claims 1-4 is implemented, comprising: An image processing module for acquiring a carton printing image, suppressing reflection interference based on color space conversion to obtain a suppressed printing image, and enhancing printing features of the suppressed printing image to obtain a to-be-detected image; A quality detection module for detecting the printing quality of the to-be-detected image, calculating the comprehensive measurement of color difference components and morphological feature components, determining the defect region distribution characteristics and defect type of the carton printing; A quality grading module for grading the quality of the carton printing based on the defect region distribution characteristics of the carton printing to obtain a carton printing quality grade, and generating a repair suggestion based on the carton printing quality grade and defect type; A data management module for correlating the carton printing quality grade and repair suggestion with the production process data of the carton printing to generate a quality trace record, and storing the quality trace record in a quality management database; A quality optimization module for optimizing the detection method of the carton printing quality based on the historical records of the quality management database.

6. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the carton printing quality detection method as claimed in any one of claims 1-4.

7. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the carton printing quality detection method as claimed in any one of claims 1-4.

Citation Information

Patent Citations

  • Thin film printing defect detection system and method

    CN109507209A

  • Holographic printing quality detection method and system based on computer vision

    CN118505693A