Carton printing quality detection method and system based on industrial vision

Industrial vision technology with color space conversion and adaptive filtering improves paper box printing quality detection by addressing uneven reflection and shadow issues, enhancing precision and speed, and optimizing quality management.

CN120318187AActive Publication Date: 2025-07-15YICHANG CHANGSHENG PACKAGING CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, carton printing quality inspection is difficult to take into account both the detection accuracy and response speed on high-speed production lines, and is prone to missed or missed inspections, especially when facing reflections on the surface of the carton and local shadow interference.

Method used

Using a carton printing quality detection method based on industrial vision, through color space conversion, adaptive filtering and comprehensive measurement of color difference and morphological characteristics, combined with the adaptive chroma-brightness evaluation function, reflective interference is suppressed, printing characteristics are enhanced, defect areas are identified, and defect type classification is performed through the vector machine multi-classification model.

Benefits of technology

It improves the efficiency and accuracy of carton printing quality inspection, can quickly identify defects on high-speed production lines, and generate targeted repair suggestions, realize full-process management and optimization, and reduce defective rates and rework costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120318187A_ABST
    Figure CN120318187A_ABST
Patent Text Reader

Abstract

The invention provides a carton printing quality detection method and system based on industrial vision, and belongs to the field of printing quality detection.The carton printing quality detection method comprises the steps that S1, a carton printing image is obtained, reflective interference suppression is conducted based on color space conversion, printing feature enhancement is conducted, and a to-be-detected image is obtained; s2, performing printing quality detection on the to-be-detected image, and determining defect area distribution characteristics and defect types of carton printing; s3, quality grading is conducted on the carton printing quality based on the defect area distribution characteristics of carton printing, and repairing suggestions are generated; s4, performing correlation analysis on the carton printing quality grade and the repair suggestion and production process data of carton printing, generating a quality tracing record, and storing the quality tracing record in a quality management database; and S5, optimizing the carton printing quality detection method. According to the invention, the printing defects can be quickly identified in a high-speed production line environment, and the whole-process management and optimization of the printing quality problem can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of printing quality detection, and particularly to a method and system for detecting the printing quality of cartons based on industrial vision. Background Art

[0002] Carton printing, as a printing process for producing packaging boxes, mainly includes processes such as carton printing, coating, and drying. The printed pattern, as an intuitive expression of packaging design, directly affects the packaging aesthetics and brand image. In mass printing production, traditional manual detection methods are not only time-consuming and laborious but also highly subjective, prone to missing detections. Therefore, industrial vision technology has been widely applied in this field recently.

[0003] However, in the prior art, due to the special material characteristics of the carton surface, uneven reflection and local shadows are likely to occur during visual acquisition, which affects the detection accuracy. Moreover, the existing methods for detecting the printing quality of cartons are often limited by the capture of printing details and noise interference in practical applications, and are often insufficient in response to slight color differences generated during the printing process and local differences caused by fine-tuning of printing press units, resulting in missing detections or false detections. At the same time, because the production line speed of carton printing is fast, it is necessary to complete detection and determination in a very short time, making it often difficult to balance detection accuracy and response speed simultaneously.

[0004] Therefore, finding a method that can not only accurately detect printing defects but also manage the printing quality of cartons is a technical problem that needs to be urgently solved by those skilled in the art. Summary of the Invention

[0005] The present invention provides a method and system for detecting the printing quality of cartons based on industrial vision to solve the defect of low accuracy in printing quality detection in the prior art, and to achieve rapid identification of printing defects in a high-speed production line environment and full-process management and optimization of printing quality problems.

[0006] The present invention provides a method for detecting the printing quality of cartons based on industrial vision, including the following steps: S1. Obtain a carton printing image, suppress the reflection interference of the carton printing image based on color space conversion to obtain a suppressed printing image, and enhance the printing features of the suppressed printing image to obtain an image to be detected; S2. Perform printing quality detection on the image to be detected, calculate the comprehensive measure of the color difference component and the morphological feature component, and determine the defect area distribution characteristics and defect types of carton printing; S3. Perform quality grading on the carton printing quality based on the distribution characteristics of the defective areas of the carton printing to obtain the carton printing quality grade, and generate repair suggestions based on the carton printing quality grade and the defect type; S4. Perform correlation analysis on the carton printing quality grade and the repair suggestions with the production process data of the carton printing, generate a quality traceability record, and store the quality traceability record in the quality management database; S5. Optimize the detection method of the carton printing quality based on the historical records of the quality management database.

[0007] According to an industrial vision-based carton printing quality detection method provided by the present invention, step S1 specifically includes: Convert the carton printing image to the CIELab color space to obtain a first color image; Use an adaptive chromaticity-luminance evaluation function to measure the chromaticity deviation of the first color image to obtain a chromaticity-luminance deviation value; Construct an adaptive filter kernel based on the chromaticity-luminance deviation value, and use the adaptive filter kernel to perform adaptive filtering on the first color image to obtain a filtered image; Perform image enhancement on the filtered image, perform printing area segmentation and contour extraction on the enhanced image to obtain an image to be detected.

[0008] According to an industrial vision-based carton printing quality detection method provided by the present invention, the performing printing area segmentation and contour extraction on the enhanced image specifically includes: Set a local similarity threshold and a color-luminance anomaly threshold; Calculate the color space distance between two adjacent pixel points in the enhanced image, and compare the color space distance between the two adjacent pixel points and the color-luminance difference between the two adjacent pixel points with the local similarity threshold and the color-luminance anomaly threshold respectively: If the color space distance between two adjacent pixel points is not greater than the local similarity threshold, and the color-luminance anomaly difference between the two adjacent pixel points is not greater than the color-luminance anomaly threshold, then include the two adjacent pixel points in the printing area; Perform edge detection on the printing area and extract the boundary of the printing area to obtain an image to be detected.

[0009] According to an industrial vision-based carton printing quality detection method provided by the present invention, step S2 specifically includes: Calculate the color difference and morphological features of the image to be detected, and calculate the comprehensive metric of each pixel point in the image to be detected based on the color difference and morphological features; Set a comprehensive metric threshold, and compare the comprehensive metric of each image in the image to be detected with the comprehensive metric threshold respectively: If the comprehensive metric exceeds the threshold, the pixel points exceeding the threshold are marked as suspicious defect pixel points; 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 morphological features to determine the distribution characteristics and defect types of the defect region.

[0010] According to a carton printing quality detection method based on industrial vision provided by the present invention, the shape analysis specifically includes: Determine the area of the defect region according to the total number of the suspicious defect pixel points, calculate the boundary contour and shape index of each defect region to obtain the shape of the defect region, and calculate the centroid coordinates of the defect region to determine the position of the defect region; wherein the shape index includes 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 distribution characteristics of the defect region; 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 distribution characteristics of the defect region; Input the carton printing defect feature set into a multi-classification model of a vector machine to obtain a defect type set, where the defect type set includes overprint deviation, ink leakage, printing smudge and misprint.

[0011] According to a carton printing quality detection method based on industrial vision provided by the present invention, the correlation analysis specifically includes: Determine the defect type and the distribution characteristics of the defect region of the carton printing according to the carton printing quality grade and the repair suggestion; Align the defect type, the distribution characteristics of the defect region, the carton printing grade of the carton printing with the production data of the carton printing in a time series to establish a data mapping relationship based on the time axis; Calculate the deviation between each parameter in the production data of the carton printing and the production standard value of the carton printing to determine the abnormal parameters of the carton printing; Analyze the correlation between the abnormal parameters 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; Determine the relationship between the abnormal production parameters of the carton printing, the carton printing quality and the carton printing defects according to the data mapping relationship based on the time axis and the mapping relationship between the parameter abnormal mode and the defect type.

[0012] According to a carton printing quality detection method based on industrial vision provided by the present invention, the adaptive chromaticity-luminance evaluation function is: ; Wherein, represents the chromaticity and luminance deviation value of the pixel point (x, y), where x represents the abscissa of the pixel point in the first color image, and y represents the ordinate of the pixel point in the first color image. represents the chromaticity and luminance balance coefficient. represents the chromaticity intensity of the pixel point (x, y). represents the luminance value of the pixel point (x, y). represents the stability factor. represents the average luminance of the local area of the first color image. represents the maximum luminance value of the image of the first color image.

[0013] The present invention also provides a carton printing quality detection system based on industrial vision to implement the carton printing quality detection method as described above, including: An image processing module, configured to obtain a carton printing image, suppress the specular interference of the carton printing image based on color space conversion to obtain a suppressed printing image, and enhance the printing features of the suppressed printing image to obtain an image to be detected; A quality detection module, configured to perform printing quality detection on the image to be detected, calculate the comprehensive metric of the color difference component and the morphological feature component, and determine the defect area distribution feature and the defect type of the carton printing; A quality grading module, configured to grade the carton printing quality based on the defect area distribution feature of the carton printing to obtain the carton printing quality grade, and generate a repair suggestion based on the carton printing quality grade and the defect type; A data management module, configured to perform correlation analysis on the carton printing quality grade and the repair suggestion with the production process data of the carton printing, generate a quality traceability record, and store the quality traceability record in a quality management database; A quality optimization module, configured to optimize the detection method of the carton printing quality based on the historical records of the quality management database.

[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the program, it implements the carton printing quality detection method as described above.

[0015] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the carton printing quality detection method as described above.

[0016] A method and system for detecting the printing quality of cartons based on industrial vision provided by the present invention processes and classifies defects in carton printing images by introducing industrial vision technology, combining color space conversion, adaptive filtering, and comprehensive measurement of color difference and morphological features, improving the efficiency and accuracy of carton printing quality detection. It can quickly identify carton printing defects in a high-speed production line environment and generate targeted repair suggestions according to the defect types. At the same time, through the correlation analysis of production process data and the generation of quality traceability records, it realizes the full-process management and optimization of carton printing quality, reducing the defective rate and rework cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] To more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for the implementation examples or the description of the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0018] Figure 1 is a flowchart of the method for detecting the printing quality of cartons based on industrial vision provided by the present invention; Figure 2 is a schematic flowchart of the anti-reflection suppression and feature enhancement of the method for detecting the printing quality of cartons based on industrial vision provided by the present invention; Figure 3 is a flowchart of calculating the color brightness abnormality degree of the method for detecting the printing quality of cartons based on industrial vision provided by the present invention; Figure 4 is a schematic structural diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0019] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention in conjunction with the drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0020] As Figure 1 and Figure 2 shown, the present invention provides a method for detecting the printing quality of cartons based on industrial vision, including the following steps: S1. Obtain a carton printing image, suppress the reflection interference of the carton printing image based on color space conversion to obtain a suppressed printing image, and enhance the printing features of the suppressed printing image to obtain an image to be detected.

[0021] Understandably, a high-resolution industrial camera is used in conjunction with a light source system for collecting carton printing images.

[0022] In an embodiment of the present invention, an area array camera or a line array camera is used, in conjunction with an LED planar light source or a ring light source, to ensure clear and stable printing images on the surface of the carton are obtained.

[0023] In an embodiment of the present invention, by adding a transition roller or a vacuum adsorption platform to the conveyor belt of the carton printing quality detection device, the carton can be transported from the printer output to the detection area of the camera and light source system, and ensure that the carton passes through the detection position in a stable and uniform state, so that the images captured by the industrial camera have a consistent distance and angle.

[0024] The present invention significantly improves the quality and stability of the printing image by performing anti-reflection suppression processing on the carton printing image, suppressing the distortion of chromaticity information in high-brightness areas, and enhancing the chromaticity information in dark areas.

[0025] Specifically, step S1 specifically includes: Converting the carton printing image to the CIELab color space to obtain a first color image; Using an adaptive chromaticity-luminance evaluation function to measure the chromaticity deviation of the first color image to obtain a chromaticity-luminance deviation value; wherein, the adaptive chromaticity-luminance evaluation function is: ; Wherein, represents the chromaticity-luminance deviation value of the pixel point (x, y), x represents the abscissa of the pixel point in the first color image, y represents the ordinate of the pixel point in the first color image, represents the chromaticity-luminance balance coefficient, represents the chromaticity intensity of the pixel point (x, y), represents the luminance value of the pixel point (x, y), represents the stability factor, represents the average luminance of the local area of the first color image, represents the maximum image luminance value of the first color image; Constructing an adaptive filter kernel based on the chromaticity-luminance 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, segmenting the printing area and extracting the contour of the enhanced image to obtain an image to be detected.

[0026] It is understandable that in the quality inspection of carton printing, the surface reflection of the carton will affect the inspection effect. For example, overexposure or underexposure phenomena occur in local areas of the printed image, and the colors of the printed image are distorted in areas with strong reflection. Therefore, it is necessary to suppress the surface reflection of the carton. reflects the coupling relationship between chromaticity and luminance, and the chromaticity intensity directly reflects the purity of the color. Taking as the denominator, where the stability factor can prevent the denominator from being zero. When the luminance is relatively large, the coupling relationship between chromaticity and luminance is relatively small, indicating the inhibitory effect on chromaticity in the high-luminance area. When the luminance is relatively small, the coupling relationship between chromaticity and luminance is relatively large, enhancing the chromaticity information in the dark area. balances the deviation degree of the local luminance. The average luminance of the local area provides a local reference benchmark. As a normalization factor, it ensures the comparability between different regions. reflects the difference degree between the pixel luminance and the surrounding environment. The balance coefficient ranges from [0, 1]. When the balance coefficient is close to 1, the adaptive chromaticity-luminance evaluation function pays more attention to the preservation of chromaticity information. When the balance coefficient is close to 0, the adaptive chromaticity-luminance evaluation function pays more attention to the uniformity of luminance. By adjusting the balance coefficient , the chromaticity preservation and luminance uniformity can be balanced according to different printing varieties and inspection requirements.

[0027] Among them, since there may be significant differences in the carton materials (such as smooth surfaces and rough surfaces), different materials may require different filter kernel parameters. Therefore, the specific construction of the filter kernel can be set according to actual use, and the present invention does not make specific limitations on this.

[0028] The present invention calculates the chromaticity-luminance deviation value of each pixel point in the carton printed image through the adaptive chromaticity-luminance evaluation function, and constructs an adaptive filter kernel according to the chromaticity-luminance deviation value, realizing the differential processing of different regions in the carton printed image. In areas with severe reflection, a larger-size filter kernel is automatically applied for stronger filtering to effectively suppress the color distortion caused by reflection; in normal printing areas, a smaller-size filter kernel is applied for mild filtering to retain the original printing details to the greatest extent. It realizes the accurate identification and targeted processing of the reflection area, while suppressing the reflection interference and retaining the maximum amount of printing details.

[0029] Furthermore, the segmentation and contour extraction of the printed area for the enhanced image specifically include: Set the local similarity threshold and the color brightness anomaly threshold; Calculate the color space distance between two adjacent pixel points in the enhanced image, and compare the color space distance between two adjacent pixel points and the color brightness difference between two adjacent pixel points with the local similarity threshold and the color brightness anomaly threshold respectively: If the color space distance between two adjacent pixel points is not greater than the local similarity threshold, and the color brightness anomaly difference between two adjacent pixel points is not greater than the color brightness anomaly threshold, then the two adjacent pixel points are included in the printed area; the calculation formula is: ; ; ; ; ; ; where, represents the color brightness anomaly of pixel point p, represents the chromaticity intensity of pixel point p, represents the brightness value of pixel point p, represents the average brightness of the local area centered on pixel point p, represents, N represents the total number of pixel points in the window, represents the brightness value (L channel value) of the pixel point with coordinates (i,j), i represents the row coordinate of the pixel point in the local window, and j represents the column coordinate of the pixel point in the local window, represents the color space distance between two adjacent pixel points p and q, p represents any pixel point in the enhanced image, and q represents the adjacent pixel point of pixel point p, represents the local similarity threshold, represents the color brightness anomaly of pixel point p, represents the color brightness anomaly of pixel point q, represents the color brightness anomaly threshold, represents the brightness component of pixel point p, represents the brightness component of pixel point q, represents the chromaticity a component of pixel point p, represents the chromaticity a component of pixel point q, represents the chromaticity b component of pixel point p, represents the chromaticity b component of pixel point q; Perform edge detection based on the printed area and extract the boundary of the printed area to obtain the image to be detected.

[0030] It is understandable that during the carton printing process, due to characteristics such as ink diffusion and penetration, even within the same color block area, there will be slight color differences between adjacent pixel points. Generally, color differences with a color difference value less than 2.0 are difficult to distinguish visually. Therefore, the local similarity threshold can be adjusted according to the actual usage scenario. And the color brightness anomaly threshold needs to be set considering the influence of lighting conditions and the characteristics of printing materials.

[0031] In the CIELab color space, the chromaticity a component represents the red-green chromaticity channel, with positive values indicating a red tendency and negative values indicating a green tendency. The larger the absolute value of the chromaticity a component, the stronger the color tendency in that direction; the chromaticity b component represents the yellow-blue chromaticity channel, with positive values indicating a yellow tendency and negative values indicating a blue tendency. The larger the absolute value of the chromaticity b component, the stronger the color tendency in that direction.

[0032] In an embodiment of the present invention, edge detection is performed based on the printed area and the boundary of the printed area is extracted to obtain the image to be detected, specifically including: Perform Sobel operator operations on each pixel point in the printed area image, and calculate the gradient component in the horizontal direction and the gradient component in the vertical direction of each pixel point respectively; Calculate the total gradient amplitude and the gradient direction angle of each pixel point respectively according to the gradient component in the horizontal direction and the gradient component in the vertical direction; Perform non-maximum suppression on the gradient amplitude of each pixel point along the gradient direction; Set the high threshold and the low threshold of the edge image, and perform adaptive threshold processing on the suppressed image: If the total gradient amplitude of the pixel point is greater than the high threshold, then the pixel point is an edge point; If the total gradient amplitude of the pixel point is less than the low threshold, then the pixel point is a non-edge point; If the total gradient amplitude of the pixel point is within the range of the high threshold and the low threshold, then further determine whether the pixel point is connected to an edge point. If so, then the pixel point is also determined to be an edge point. If not, then the pixel point is a non-edge point; Connect the edge points, remove overly short contour line segments, and connect the broken contours to obtain a sequence of contour points, denoted as the boundary of the printed area, where each contour point in the sequence of contour points contains position and direction information.

[0033] S2. Perform printing quality detection on the image to be detected, calculate the comprehensive measure of the color difference component and the morphological feature component, and determine the defect area distribution characteristics and defect types of the carton printing; As Figure 3 shown, specifically, step S2 specifically includes: Calculate the color difference and morphological features of the image to be detected, and calculate the comprehensive metric of each pixel point in the image to be detected based on the color difference and morphological features; the calculation formula is: ; ; Among them, represents the comprehensive metric of the pixel point (x, y), represents the color difference weight, represents the color difference of the pixel point (x, y), represents the morphological feature weight, represents the morphological feature deviation of the pixel point (x, y), represents the gradient feature weight, represents the gradient feature deviation, represents the texture feature weight, represents the texture feature deviation, represents the shape feature weight, represents the shape feature deviation; Set the comprehensive metric threshold, and compare the comprehensive metric of each image in the image to be detected with the comprehensive metric threshold respectively: If the comprehensive metric exceeds the threshold, mark the pixel points that exceed the threshold as suspicious defect pixel points; Based on the suspicious defect pixel points, form a defect area, and perform shape analysis on the defect area based on the color difference and morphological features to determine the distribution characteristics and defect types of the defect area.

[0034] Among them, the gradient feature deviation is calculated based on the weighted sum of the gradient magnitude deviation and the gradient direction deviation. The calculation process is as follows: Use a differential operator (such as the Sobel operator) to perform a convolution operation on the image to be detected and the carton printing standard template image, extract the gradient components in the horizontal and vertical directions, and then calculate the gradient magnitude and gradient direction. The gradient magnitude deviation is obtained by calculating the absolute difference of the gradient magnitudes at the corresponding positions of the image to be detected and the carton printing standard template image, and then dividing by the normalization factor (usually the maximum gradient magnitude in the image). The gradient direction deviation takes into account the cyclic nature of the angle, and is obtained by calculating the minimum angle difference (ensuring not exceeding 180 degrees) of the gradient directions at the corresponding positions of the image to be detected and the carton printing standard template image, and then normalizing by dividing by π.

[0035] The texture feature deviation is a comprehensive measure based on the differences of various texture descriptors. The calculation process is as follows: texture features are extracted from the image to be detected and the standard template image of carton printing. 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 at the corresponding positions between the image to be detected and the standard template image of carton printing is calculated, and it is normalized by dividing by the maximum possible value of the descriptor.

[0036] The calculation process of the shape feature deviation is as follows: shape descriptors are extracted from the image to be detected and the standard template image of carton printing. These descriptors may include moment features (ordinary moments, central moments, Hu invariant moments, etc.), edge contour features (perimeter, area, circularity, rectangularity, etc.), skeleton features (branch point distribution, number of endpoints, skeleton length, etc.), etc. Then, the absolute difference of each shape descriptor at the corresponding positions between the image to be detected and the standard template image of carton printing is calculated, and it is normalized by dividing by the maximum possible value of the descriptor.

[0037] It can be understood that in the existing carton printing process, defects are often abnormalities of multiple features. For example, ink dot defects are not only local color difference abnormalities, but may also have morphological feature changes; scratch-like defects have both linear abnormalities of morphological features and may also have color difference fluctuations. Therefore, using a comprehensive measure to determine the defect area distribution characteristics and defect types of carton printing can improve the detection accuracy. Among them, the color difference is the Euclidean distance based on the CIELab color space, and the morphological feature deviation reflects the morphological features and can capture the comprehensive changes in local areas. The color difference weight and the morphological feature weight can be set according to actual usage requirements. For example, when requiring high color reproduction of carton printing, the color difference weight takes a higher value (such as above 0.7), and the morphological feature weight takes a smaller value (such as below 0.3). The present invention does not make specific limitations on this.

[0038] The comprehensive measure threshold can be set according to the carton printing process specifications and material characteristics. The present invention does not make specific limitations on this.

[0039] By calculating the comprehensive weight based on the color difference and morphological features, the present invention can accurately identify the defect areas in the printed image, and determine the defect types according to the distribution characteristics and shape indexes of the defect areas. It can not only detect obvious printing defects (such as ink leakage, printing smudging, etc.), but also capture slight color differences and morphological changes, avoiding the problems of missed detection or false detection in traditional methods.

[0040] Further, the shape analysis specifically includes: Determine the area of the defective area according to the total number of the suspicious defective pixel points, calculate the boundary contour and shape index of each defective area to obtain the shape of the defective area, and calculate the centroid coordinates of the defective area to determine the position of the defective area; wherein the shape index includes aspect ratio, compactness and circularity; Compare the area, shape and position of the defective area with those of the carton printing standard template respectively to determine the distribution characteristics of the defective area; Calculate the color difference amplitude of the suspicious defective pixel points, and construct a carton printing defect feature set based on the color difference amplitude of the suspicious defective pixel points, the position of the defective area and the distribution characteristics of the defective area; Input the carton printing defect feature set into the multi-classification model of the vector machine to obtain a defect type set, where the defect type set includes overprint deviation, ink leakage, smudging and misprinting.

[0041] Among them, the multi-classification model of the vector machine is a multi-classification model constructed by using a support vector machine, adopting a radial basis function kernel, mapping the feature space to the defect type space by constructing an optimal separating hyperplane. The multi-classification model of the vector machine outputs the probability distribution of each defective area belonging to various defect types, can effectively handle 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.

[0042] In an embodiment of the present invention, if the aspect ratio of the defective area is greater than the aspect ratio threshold, and the position of the defective area is offset relative to the position of the carton printing standard template, the defect type of the defective area is overprint deviation; If the compactness of the defective area is less than the compactness threshold or the circularity is less than the circularity threshold, and the color difference of the defective area is higher than that of the carton printing standard template, the defect type of the defective area is ink leakage; If the area of the defective area is greater than the area of the carton printing standard template, and the color difference amplitude is less than the color difference amplitude threshold, the defect type of the defective area is smudging; If the centroid position of the defective area deviates from the position of the carton printing standard template, and the average color difference of the defective area is greater than the average color difference of the carton printing standard template, the defect type of the defective area is misprinting.

[0043] Specifically, the color difference amplitude threshold can be set according to actual usage requirements. The aspect ratio is the ratio of the length to the width of the outer rectangle of the defect area. The compactness is used to measure whether the composition of the defect area is regular and tight, that is, compactness = 4 * π * defect area / (defect area perimeter * defect area perimeter). The circularity is used to determine whether the defect area is close to a circle, that is, circularity = radius of the circle / radius of the circumscribed circle of the defect area, where the radius of the circle can be set according to the size of the actual usage scenario.

[0044] Illustrated with a specific embodiment: A dark abnormal area is detected on the carton printing image and confirmed as the defect area. The area of the carton printing standard template is 28 square millimeters, the position is (142, 110), and the average color difference of the carton printing standard template is 5; It is calculated that the defect area has 3000 pixel points, the area is 30 square millimeters, the aspect 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. Then the centroid position of the defect area deviates from the position of the carton printing standard template and the average color difference of the defect area is greater than the average color difference of the carton printing standard template. The defect type of the defect area is misprinting.

[0045] S3. Perform quality grading on the carton printing quality based on the distribution characteristics of the defect areas of the carton printing to obtain the carton printing quality grade, and generate a repair suggestion based on the defect type according to the carton printing quality grade; Specifically, step S3 specifically includes: Calculate the proportion of the defect area according to the distribution characteristics of the defect areas of the carton printing: When the proportion of defects in the carton printing is less than 1%, the defect area of the carton printing is a minor defect; when the proportion of defects in the carton printing exceeds 1% and is less than 5%, the defect area of the carton printing is a medium defect; when the proportion of defects in the carton printing is not less than 5%, the defect area of the carton printing is a serious defect; When the defect category of the carton printing is ink leakage: If the defect area is a minor defect, the carton printing quality grade is A grade, and the repair suggestion is local reprinting; if the defect area is a medium defect, the carton printing quality grade is B grade, and the repair suggestion is re-making the plate and reprinting; if the defect area is a serious defect, the carton printing quality grade is C grade, and the repair suggestion is rework printing and checking the status of the carton printing equipment; When the defect category of the carton printing is overprint deviation: If the defective area is a minor defect, the carton printing quality grade is A, and the repair suggestion is to adjust the carton printing process and realign the overprint; if the defective area is a medium defect, the carton printing quality grade is B, and the repair suggestion is to rework and readjust the printing process; if the defective area is a severe defect, the carton printing quality grade is C, and the repair suggestion is to rework and reprint, and check the carton printing die and layout; When the defect type of carton printing is ink smudging: If the defective area is a minor defect, the carton printing quality grade is B, and the repair suggestion is to adjust the ink volume control process or reprint locally; if the defective area is a medium defect, the carton printing quality grade is C, and the repair suggestion is to readjust the machine parameters and rework and reprint; if the defective area is a severe defect, the carton printing quality grade is C, and the repair suggestion is to discard the entire batch of cartons and reprint; When the defect type of carton printing is misprinting: If the defective area is a minor defect, the carton printing quality grade is C, and the repair suggestion is to locally cover or reprint; if the defective area is a medium defect, the carton printing quality grade is D, and the repair suggestion is to rework and reprint the relevant content; if the defective area is a severe defect, the carton printing quality grade is D, and the repair suggestion is to reprint the entire batch of cartons, and at the same time, it is necessary to verify whether the printing template data is correct.

[0046] It can be understood that when there are multiple defects in carton printing, the severe grade should be assigned. For example, when there are both ink leakage (minor) and overprint deviation (medium defect) in carton printing at the same time, the more severe overprint deviation should be processed, and comprehensive inspection should be combined to reduce the possibility of secondary defects.

[0047] The present invention can provide different treatment solutions according to the severity of the defects (minor, medium, severe), effectively reducing the repair cost and the defective rate.

[0048] In an embodiment of the present invention, when there are multiple defects in carton printing at the same time, the defective area with a higher grade should be processed preferentially according to the severity grade of the defects (minor, medium, severe). For example, if the ink leakage is a medium defect and the overprint deviation is a minor defect, the ink leakage area should be repaired preferentially.

[0049] In an embodiment of the present invention, when the severity grades of the defective areas of carton printing are equal, they are processed according to the priority of the impact of the defects on the product functionality. For example, the overprint deviation usually has a greater impact on the functionality of the packaging design and should be processed preferentially. Although the ink leakage affects the appearance, it can be postponed by local remedies in some scenarios.

[0050] S4. Correlate the carton printing quality grade and repair suggestions with the production process data of carton printing, generate quality traceability records, and store the quality traceability records in the quality management database; Among them, the production process data of carton printing includes printing press parameters (such as pressure, temperature, speed, etc.), ink supply system status (ink volume, balance, etc.), and operation process flow (such as plate making, printing step time periods, etc.).

[0051] Specifically, the correlation analysis includes: Determine the defect type and defect area distribution characteristics of carton printing according to the carton printing quality grade and repair suggestions; Align the defect type, defect area distribution characteristics, carton printing grade of the carton printing with the production data of the carton printing in time series, and establish a data mapping relationship based on the time axis; Calculate the deviation between each parameter in the production data of the carton printing and the production standard value of the carton printing, and determine the abnormal parameters of the carton printing; Analyze the correlation between the abnormal parameters 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; Determine the relationship between the abnormal production parameters of the carton printing, the carton printing quality, and the carton printing defects according to the data mapping relationship based on the time axis and the mapping relationship between the parameter abnormal mode and the defect type.

[0052] Illustrated with a specific embodiment, when the defect category of carton printing is overprint deviation and the carton printing quality grade is B level: Extract the production process data: printing speed is 200 meters per minute, plate pressure is 0.8 MPa, ink supply volume is 0.6 ml per square centimeter. Among them, the printing speed is lower than the normal value (300 meters per minute). After comparing with historical data, it is found that the frequent fluctuation of the speed is highly correlated with the occurrence of overprint deviation defects; Combined with the process time axis, determine that the printing start time of this batch of products is 9:10 am and the end time is 9:35 am. When 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 a significant correlation with the time of defect occurrence; Generate quality traceability records, record that the defect type is overprint deviation, medium defect, the defect occurrence time is between 9:20 am and 9:25 am, and record the equipment number, operator name and equipment parameters (excessive speed fluctuation). Store this data in the quality management database, and mark the production batch number and operator for rework for subsequent rectification.

[0053] S5. Optimize the detection method of carton printing quality based on the historical records of the quality management database.

[0054] It is understandable that all historical defect data of carton printing are extracted from the quality management database and correlated with production process parameters as much as possible to find the regularity of defect occurrence. For example, it is found that "increase in carton thickness + too fast printing speed" is the main cause of overprint deviation. According to the regularity of defect occurrence, the standards of carton printing are adjusted, such as reducing color difference to improve the image recognition accuracy of carton printing.

[0055] Specifically, step S5 specifically includes: Analyze the carton printing defects in the quality management database and production process parameters to determine the root cause of carton printing. The analysis includes judging whether the production process parameters exceed the production process threshold, analyzing whether the carton printing production equipment and operations are abnormal, and analyzing the time correlation between carton printing defects and the production line environment; Determine the adjusted threshold of carton printing process parameters according to the root cause of carton printing, monitor the production line of carton printing in real time, and adjust the industrial parameters of carton printing production.

[0056] Specifically, a specific embodiment is used for illustration: Extract all relevant quality traceability records in the database, including defect information (such as ink leakage, overprint deviation, plate smudging, etc.), their corresponding production process parameters (such as speed, ink volume, pressure, etc.), and repair suggestions; Conduct statistical analysis based on historical record data, and use the corresponding relationship between printing process and defects to analyze the key factors for defect occurrence, such as the specific reasons for production parameters deviating from the normal range, abnormal equipment operation, or failure to implement operation specifications in place; According to the analyzed key factors, construct optimized detection rules: set the parameter threshold of carton printing production process. When the carton printing production process parameters exceed the threshold, real-time monitoring of carton printing is carried out. For example, clarify the parameter threshold (such as the printing speed fluctuation is controlled within ±5%, and the standard range of ink volume and pressure is 0.7 ml / square centimeter and 0.8 - 1.0 MPa); increase the real-time monitoring conditions for key processes (such as defining the per-second inspection frequency for overprint accuracy); Adjust the existing printing detection methods based on the analyzed key factors and optimized detection rules, such as adjusting the threshold of real-time detection, optimizing the finished product quality judgment standard, or increasing the monitoring frequency of specific processes to reduce the occurrence probability of specific defects.

[0057] By introducing industrial vision technology, the present invention processes and classifies defects in carton printing images by combining color space conversion, adaptive filtering, and comprehensive measurement of color difference and morphological features, improving the efficiency and accuracy of carton printing quality detection. It can quickly identify carton printing defects in a high-speed production line environment and generate targeted repair suggestions based on the defect types. At the same time, through the correlation analysis of production process data and the generation of quality traceability records, it realizes the full-process management and optimization of carton printing quality, reducing the defective rate and rework costs.

[0058] The present invention also provides a carton printing quality detection system based on industrial vision to implement the above-mentioned carton printing quality detection method, including: An image processing module for acquiring a carton printing image, suppressing the reflection interference of the carton printing image based on color space conversion to obtain a suppressed printing image, and enhancing the printing features of the suppressed printing image to obtain an image to be detected; A quality detection module for detecting the printing quality of the image to be detected, calculating the comprehensive measurement of the color difference component and the morphological feature component, and determining the defect area distribution characteristics and defect types of the carton printing; A quality grading module for grading the carton printing quality based on the defect area distribution characteristics of the carton printing to obtain the carton printing quality grade, and generating repair suggestions based on the defect types according to the carton printing quality grade; A data management module for performing correlation analysis on the carton printing quality grade and repair suggestions with the production process data of the carton printing, generating quality traceability records, and storing the quality traceability records in the quality management database; A quality optimization module for optimizing the detection method of carton printing quality based on the historical records in the quality management database.

[0059] The carton printing quality detection device provided by the present invention is described below. The carton printing quality detection device described below can be correspondingly referred to the carton printing quality detection method described above.

[0060] Figure 4 The schematic physical structure diagram of an electronic device is exemplified, such as Figure 4As shown in the figure, the electronic device may include: a processor 410, a communications interface 420, a memory 430, and a communication bus 440. Among them, the processor 410, the communications interface 420, and the memory 430 complete communication with each other through the communication bus 440. The processor 410 may call the logical instructions in the memory 430 to execute a carton printing quality detection method. The method includes obtaining a carton printing image, suppressing the specular interference of the carton printing image based on color space conversion to obtain a suppressed printing image, and enhancing the printing features of the suppressed printing image to obtain an image to be detected; performing printing quality detection on the image to be detected, calculating a comprehensive measure of the color difference component and the morphological feature component, and determining the defect area distribution characteristics and defect types of the carton printing; 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; performing correlation analysis on the carton printing quality grade and the repair suggestion with the production process data of the carton printing to generate a quality traceability record, and storing the quality traceability record in a quality management database; optimizing the detection method of the carton printing quality based on the historical records of the quality management database.

[0061] In addition, when the logical instructions in the above-mentioned memory 430 can be implemented in the form of software functional units and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0062] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the carton printing quality detection method provided by each of the above methods. The method includes: acquiring a carton printing image, suppressing the reflection interference of the carton printing image based on color space conversion to obtain a suppressed printing image, and enhancing the printing features of the suppressed printing image to obtain an image to be detected; performing printing quality detection on the image to be detected, calculating a comprehensive measure of the color difference component and the morphological feature component, and determining the defect area distribution characteristics and defect types of the carton printing; grading the carton printing quality based on the defect area distribution characteristics 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; performing correlation analysis on the carton printing quality grade and the repair suggestion with the production process data of the carton printing to generate a quality traceability record, and storing the quality traceability record in a quality management database; optimizing the detection method of the carton printing quality based on the historical records of the quality management database.

[0063] On another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it realizes the carton printing quality detection method provided by each of the above methods. The method includes: acquiring a carton printing image, suppressing the reflection interference of the carton printing image based on color space conversion to obtain a suppressed printing image, and enhancing the printing features of the suppressed printing image to obtain an image to be detected; performing printing quality detection on the image to be detected, calculating a comprehensive measure of the color difference component and the morphological feature component, and determining the defect area distribution characteristics and defect types of the carton printing; grading the carton printing quality based on the defect area distribution characteristics 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; performing correlation analysis on the carton printing quality grade and the repair suggestion with the production process data of the carton printing to generate a quality traceability record, and storing the quality traceability record in a quality management database; optimizing the detection method of the carton printing quality based on the historical records of the quality management database.

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

[0065] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the essence of the above technical solution, 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 enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0066] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions 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 cartons based on industrial vision, characterized in that, Including the following steps: S1. Obtain the carton printing image, suppress the specular interference of the carton printing image based on color space conversion to obtain the suppressed printing image, and enhance the printing features of the suppressed printing image to obtain the image to be detected; S2. Perform printing quality detection on the image to be detected, calculate the comprehensive metric of the color difference component and the morphological feature component, and determine the defect area distribution characteristics and defect types of the carton printing; S3. Grade the carton printing quality based on the defect area distribution characteristics of the carton printing to obtain the carton printing quality grade, and generate a repair suggestion based on the defect type according to the carton printing quality grade; S4. Perform correlation analysis on the carton printing quality grade and the repair suggestion with the production process data of the carton printing to generate a quality traceability record, and store the quality traceability record in the quality management database; S5. Optimize the detection method of the carton printing quality based on the historical records of the quality management database.

2. The method for detecting the printing quality of cartons based on industrial vision according to claim 1, wherein, Step S1 specifically includes: Convert the carton printing image to the CIELab color space to obtain the first color image; Use the adaptive chromaticity-luminance evaluation function to measure the chromaticity deviation of the first color image to obtain the chromaticity-luminance deviation value; Construct an adaptive filter kernel based on the chromaticity-luminance deviation value, and use the adaptive filter kernel to perform adaptive filtering on the first color image to obtain the filtered image; Perform image enhancement on the filtered image, segment the printing area and extract the contour of the enhanced image to obtain the image to be detected.

3. The method for detecting the printing quality of cartons based on industrial vision according to claim 2, wherein The segmentation of the printing area and the contour extraction of the enhanced image specifically include: Set the local similarity threshold and the color-luminance anomaly threshold; Calculate the color space distance between two adjacent pixel points in the enhanced image, and compare the color space distance between two adjacent pixel points and the color-luminance difference between two adjacent pixel points with the local similarity threshold and the color-luminance anomaly threshold respectively: If the color space distance between two adjacent pixel points is not greater than the local similarity threshold, and the color-luminance anomaly difference between two adjacent pixel points is not greater than the color-luminance anomaly threshold, then the two adjacent pixel points are included in the printing area; Perform edge detection based on the printing area and extract the boundary of the printing area to obtain the image to be detected.

4. A method for detecting the printing quality of cartons based on industrial vision according to claim 1, characterized in that, Step S2 specifically includes: Calculate the color difference and morphological features of the image to be detected, and calculate the comprehensive metric of each pixel point in the image to be detected based on the color difference and morphological features; Set the comprehensive metric threshold, and compare the comprehensive metric of each image in the image to be detected with the comprehensive metric threshold respectively: If the comprehensive metric exceeds the threshold, then mark the pixel points that exceed the threshold as suspicious defect pixel points; Form a defect area based on the suspicious defect pixel points, and perform shape analysis on the defect area based on the color difference and morphological features to determine the defect area distribution characteristics and defect types.

5. A method for detecting the printing quality of cartons based on industrial vision according to claim 4, characterized in that, The shape analysis specifically includes: Determine the area of the defective area according to the total number of the suspected defective pixel points, calculate the boundary contour and shape index of each defective area to obtain the shape of the defective area, and calculate the centroid coordinates of the defective area to determine the position of the defective area; wherein the shape index includes aspect ratio, compactness and circularity. Compare the area, shape and position of the defective area with those of the carton printing standard template respectively to determine the distribution characteristics of the defective area. Calculate the color difference amplitude of the suspected defective pixel points, and construct a carton printing defect feature set based on the color difference amplitude of the suspected defective pixel points, the position of the defective area and the distribution characteristics of the defective area. Input the carton printing defect feature set into the multi-classification model of the vector machine to obtain a defect type set, where the defect type set includes overprint deviation, ink leakage, printing smudge and misprinting.

6. The method for detecting the printing quality of a carton based on industrial vision according to claim 1, characterized in that, The correlation analysis specifically includes: Determine the defect type and the distribution characteristics of the defective area of the carton printing according to the carton printing quality grade and the repair suggestion. Perform time series alignment on the defect type, the distribution characteristics of the defective area, the carton printing grade of the carton printing and the production data of the carton printing, and establish a data mapping relationship based on the time axis. Calculate the deviation between each parameter in the production data of the carton printing and the production standard value of the carton printing to determine the abnormal parameters of the carton printing. Analyze the correlation between the abnormal parameters 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. Determine the relationship between the abnormal production parameters of the carton printing, the carton printing quality and the carton printing defects according to the data mapping relationship based on the time axis and the mapping relationship between the parameter abnormal mode and the defect type.

7. A method for detecting the printing quality of cartons based on industrial vision according to claim 2, characterized in that, The adaptive chromaticity-luminance evaluation function is: ; Among them, represents the chromaticity and luminance deviation value of the pixel point (x, y), where x represents the abscissa of the pixel point in the first color image, and y represents the ordinate of the pixel point in the first color image, represents the chromaticity and luminance balance coefficient, represents the chromaticity intensity of the pixel point (x, y), represents the luminance value of the pixel point (x, y), represents the stability factor, represents the average luminance of the local area of the first color image, represents the maximum luminance value of the first color image.

8. A carton printing quality inspection system based on industrial vision, characterized in that, Implement the carton printing quality detection method according to any one of claims 1-7, including: An image processing module, configured to acquire a carton printing image, perform anti-reflection interference suppression on the carton printing image based on color space conversion to obtain a suppressed printing image, and perform printing feature enhancement on the suppressed printing image to obtain an image to be detected. A quality detection module, configured to perform printing quality detection on the image to be detected, calculate a comprehensive measure of the color difference component and the morphological feature component, and determine the distribution characteristics of the defective area and the defect type of the carton printing. A quality grading module, configured to perform quality grading on the carton printing quality based on the distribution characteristics of the defective area of the carton printing to obtain a carton printing quality grade, and generate a repair suggestion based on the defect type according to the carton printing quality grade. A data management module, configured to perform correlation analysis on the carton printing quality grade and the repair suggestion with the production process data of the carton printing, generate a quality traceability record, and store the quality traceability record in a quality management database. A quality optimization module, configured to optimize the detection method of the carton printing quality based on the historical records of the quality management database.

9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the carton printing quality detection method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the carton printing quality detection method according to any one of claims 1 to 7.

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

  • Printing and laminating process quality detection method based on image generation

    CN119477811A

  • Defect rate reduction method for finished products based on trademark surface parameter detection and control

    US20250091750A1

Cited By

  • Surface printing flaw detection method, system and device for corrugated packaging box

    CN120707563A

  • A method, system and device for detecting surface printing defects of a corrugated packaging box

    CN120707563B

  • Printed matter defect automatic detection method and system based on image recognition

    CN120894323A

  • Printed matter defect online detection method and system based on machine vision

    CN121707914A