Printing pattern defect detection method and system for carton packaging
By combining image acquisition and data processing with multi-level threshold judgment and dynamic learning modules, the problems of missed detection, misjudgment and poor timeliness of traditional manual inspection methods are solved, realizing full online detection and real-time early warning, and improving the accuracy and efficiency of printed pattern defect detection.
Patent Information
- Application Number
- CN202511114504.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-11
- Publication Date
- 2025-12-23
AI Technical Summary
Traditional manual inspection methods cannot achieve full coverage, have the risk of missing detections, are prone to misjudgment, have poor timeliness and high cost, and cannot provide real-time feedback on defect information.
By combining image acquisition, data processing, and defect coefficient calculation with multi-level threshold judgment and dynamic learning modules, full online detection is achieved, defect judgment is objectively quantified, and real-time early warning and optimization are performed through the defect classification module.
It achieves full coverage, high accuracy, real-time response and continuous optimization of printed pattern defect detection, reduces the risk of missed detection and human error, and improves detection efficiency and consistency.
Smart Images

Figure CN121190384A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of detection, and particularly relates to printed pattern defect detection, and specifically discloses a printed pattern defect detection method and system for carton packaging. BACKGROUND
[0002] As a core carrier of packaging, printed matter such as medicine labels, cigarette boxes and food packaging directly affects the trust of consumers in the product, and subtle defects can cause the appearance of the product to be degraded and harm the brand image.
[0003] The traditional manual detection method adopts a random sampling method, and a quality inspector visually observes the surface of the printed matter, compares with a standard sample or a design drawing, and checks item by item, such as color, pattern integrity and text clarity. The judgment of defects depends on experience, and after the defects are found, the problem area is marked by a marker pen, and the defect type and position are manually recorded. Usually, a binary judgment of "qualified / unqualified" is mainly used, and the following problems exist:
[0004] Insufficient coverage: only part of the products can be sampled, and it is difficult to achieve full-line detection, and the risk of missed detection is high.
[0005] Easy to misjudge: manual work is limited by experience and fatigue threshold, and misjudgment may also occur due to light differences or different personal subjective standards.
[0006] Poor timeliness: it is impossible to provide real-time feedback on problems, and defects are found when a large amount of waste has been produced, and it is also impossible to provide defect degree and cause analysis.
[0007] High cost: a large amount of manpower needs to be continuously invested, and the training period is long, and personnel flow affects the consistency of quality inspection.
[0008] Therefore, it is necessary to use a method of full coverage, objective judgment, real-time response and continuous optimization to solve the above problems. SUMMARY
[0009] Therefore, the present application provides a printed pattern defect detection method and system for carton packaging. The method realizes printed defect detection for carton packaging through image acquisition, data processing, defect coefficient calculation and threshold comparison, and specifically includes: partitioning and collecting printed image data and calculating related coefficients, calculating process / printing / content three types of defect coefficients through the related coefficients and generating a defect index, using a multi-level threshold to determine the existence of defects, grading early warning based on the area proportion of defects, and continuously optimizing the detection model in combination with a dynamic learning module to adapt to new defect modes.
[0010] The purpose of the present application can be achieved by the following technical scheme: a printed pattern defect detection method for carton packaging, characterized in that it specifically includes the following steps:
[0011] S1, the printed pattern part of the carton package is partitioned, the image of each to-be-tested area is collected by an image collection module, and the printed data contained therein is extracted;
[0012] S2, the collected data is processed by a data processing module, and the correlation coefficient of the printing defects of each area is calculated;
[0013] S3, the coefficient obtained by processing is processed again, the process defect coefficient, the printing defect coefficient and the content defect coefficient of each area are calculated by a defect coefficient generation module;
[0014] S4, each defect coefficient is compared with the corresponding defect threshold value, and whether it is qualified is judged by a defect judgment module. If the comparison results of the three items are all qualified, it is judged that there is no printing defect; if any one of the comparison results is unqualified, it is judged that there is a printing defect, the defect position is marked and a defect distribution heat map is generated synchronously;
[0015] S5, the proportion of the defect area in the total area of the printed pattern is calculated to obtain a defect index, and the defect is classified by a defect classification module. The defect is classified and early warned by the defect level, and relevant measures are taken;
[0016] S6, the existing classification model is optimized by online incremental training through a dynamic learning module, and new defect modes are adapted.
[0017] The printed pattern defect detection system for carton packaging is characterized in that it specifically comprises:
[0018] The image collection module: an industrial line array camera is configured, which is used for multi-angle image collection of the partitioned carton printed pattern, and feature region data is extracted;
[0019] The data processing module: the collected data is subjected to feature matching and feature aggregation, and the correlation coefficient of the printing defects of each area is calculated;
[0020] The defect coefficient generation module: the process defect coefficient, the printing defect coefficient and the content defect coefficient are generated by secondary processing;
[0021] The defect judgment module: a dynamic threshold library is built in, three defect coefficients are compared with corresponding threshold values, any index exceeding the limit triggers a defect alarm, and multi-thread parallel detection is supported;
[0022] The defect classification module: based on the defect area ratio, the defect level is automatically divided into slight, moderate and severe, and the sound and light alarm device and the production line sorting mechanism are linked;
[0023] The dynamic learning module: an incremental training framework is integrated, the classification model is continuously optimized by few-sample learning, and new defect modes are adapted.
[0024] In combination with all the technical solutions described above, the application has the following positive effects:
[0025] 1. The application replaces sampling with full coverage: the image acquisition module realizes full online detection, completely solving the problem of missed detection by manual sampling.
[0026] 2. The application replaces subjective judgment with objective quantification: through comparison of the process / printing / content three coefficient thresholds, it eliminates the misjudgment caused by differences in manual experience and improves accuracy.
[0027] 3. The application replaces lag processing with real-time response: the defect grading module automatically triggers an early warning, improving detection efficiency.
[0028] 4. The application replaces fixed standards with continuous evolution: the dynamic learning module enables the system to have new defect recognition capabilities, reducing the cost of repeated manual training. BRIEF DESCRIPTION OF DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the application, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of these drawings.
[0030] ATTACHMENT Figure 1 is a system block diagram of the application.
[0031] ATTACHMENT Figure 2 is a flowchart of the application. DETAILED DESCRIPTION
[0032] The technical solutions of the application will be described in detail below in conjunction with the embodiments. Obviously, the described embodiments are only some of the embodiments of the application, not all. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the application.
[0033] Referring to Figure 1 , the application proposes a method and system for detecting defects in printed patterns of carton packaging, which includes an image acquisition module, a data processing module, a defect coefficient generation module, a defect judgment module, a defect grading module and a dynamic learning module.
[0034] As Figure 2 shown, the specific implementation steps of the application include the following steps:
[0035] S1, partition the printed pattern part of the carton packaging, acquire the image of each to-be-tested area through the image acquisition module and extract the printed data contained therein.
[0036] It needs to be specified that the partition strategy is specifically to divide the carton unfolded surface into m x n grids, each grid is detected independently, and the grid size is set according to the minimum defect size, and a typical value is generally 20 x 20 mm, which can cover the minimum 0.2 mm 2 Defects.
[0037] It needs to be noted that a part of the overlapping area needs to be reserved between adjacent grids to avoid missing edge defects.
[0038] Among them, the image acquisition module is equipped with an industrial area array camera, which uses a 5 million pixel or more global shutter camera, and a telecentric lens to eliminate perspective distortion, and captures the planar pattern of the carton with high precision, and performs multispectral imaging through RGB plus near-infrared instrument to detect ink layer thickness.
[0039] At the same time, a ring light source is used to uniformly irradiate the surface of the carton to eliminate reflection interference; a coaxial light source is used to detect scratches, bubbles and other non-printing pattern defects of mirror surface material labels; if it is a cylindrical carton, an auxiliary device needs to be added, and a rotating platform is used to take multiple angle shots of the carton.
[0040] It needs to be specified that the printing data is specifically:
[0041] The number of multi-color versions and their dot center coordinate data, the number of superimposed dots and their dot center coordinate data, the gray value data of the pixels in the printing area, the gray value data of the pixels in the white space, i.e. non-printing area, the Lab value data of the color including brightness, red-green axis, yellow-blue axis, ink layer thickness data, horizontal and vertical gradient data of the pixel points, gradient direction angle data of the pixel points and calculated edge pixel number data.
[0042] S2, processing the collected data through the data processing module, and calculating the correlation coefficient of the printing defects in each area.
[0043] It needs to be specified that the correlation coefficient of the printing defects is specifically:
[0044] The overlay error coefficient, the superimposed deviation coefficient, the area contrast coefficient, the color deviation coefficient, the ink layer uniformity coefficient and the edge gradient coefficient.
[0045] Among them, the overlay error coefficient measures the overlay inaccuracy defect, which is specifically the position offset of the text and graphics in multi-color printing, resulting in color overlap misplacement.
[0046] The superimposed deviation coefficient measures the ghosting defect, which is specifically that the edges of the text and graphics appear light ghosting or silhouette, reducing the sharpness of the picture.
[0047] The area contrast coefficient measures the white space defect, which is specifically that the local printing area is not inked, exposing the paperboard base color.
[0048] Color deviation coefficient measures color deviation defects, specifically, the printed hue does not match the design or there is color difference in the same batch of products.
[0049] Ink layer uniformity coefficient measures ink layer unevenness defects, specifically, uneven ink layer thickness, striping, patching or gloss difference.
[0050] Edge gradient coefficient measures insufficient definition defects, specifically, blurred image edges, broken strokes or serious dot expansion.
[0051] It should be specifically pointed out that the overprint error coefficient is specifically:
[0052]
[0053] Wherein P is the overprint error coefficient, which converts the printing registration problem into a quantifiable numerical index, quantifies the comprehensive overprint error according to the weight of color on visual effect, and the larger the value, the larger the overprint error.
[0054] It should be explained that n is the number of color plates, is the deviation amount of any color channel dot center, the physical deviation amount between the actual printed dot coordinates and the preset reference coordinates is calculated through the Euclidean distance formula in two-dimensional plane, and the positioning error of a single color channel in the printing process is quantified.
[0055] Wherein (x b , y b ) is the preset standard dot coordinate, (x s , y s ) is the actual detected dot coordinate.
[0056] The weight distribution is the influence of different colors on visual effect, wherein black has higher weight because it is more sensitive to the human eye due to high contrast, and black text outline is often used in packaging main vision and needs high-precision control. Due to different number of color plates, the weight distribution is different, which is not limited in the embodiment.
[0057] It should be specifically pointed out that the overprint error coefficient is specifically:
[0058]
[0059] Wherein D is the overprint error coefficient, which measures the ghosting deviation rule, and the larger the value, the larger the ghosting deviation.
[0060] When D is close to 1, the variance is close to the total energy, indicating that the deviation distance difference is significant, for example, some dots deviate greatly, and the rest are normal, which is caused by local equipment failure or uneven plate pressure; when D is close to 0, the variance is much smaller than the total energy, indicating that the deviation distance is consistent, for example, all dots are slightly right, which is a whole overprint deviation or paper tension problem.
[0061] It should be explained that m represents the number of test sites. Let Δx be the Euclidean distance offset between the main image and the ghost image at the j-th dot. j and Δy j These are horizontal and vertical offsets, respectively, measured by the horizontal offset Δx. j and longitudinal offset Δy j The calculated total offset distance of the dots quantifies the severity of ghosting of a single dot; the larger the value, the more obvious the offset.
[0062] The average offset distance, which is the arithmetic mean of the offset distances of all dots, reflects the baseline level of ghosting offset and is used to compare the degree of deviation of individual dots.
[0063] The numerator is the offset variance, which is the sum of squares of the difference between the offset distance of each point and the average value. The larger the value, the more drastic the fluctuation of the offset distance of each point, indicating a systematic bias; the smaller the value, the more uniform the offset distance, indicating a random error. The denominator is the total offset, which is the sum of squares of the offset distances of all points, standardizing the coefficient D. The value is between 0 and 1, which is convenient for comparison.
[0064] It should be specifically noted that the regional contrast coefficient is as follows:
[0065]
[0066] Q is the regional contrast coefficient, which is used to quantify the contrast difference between the printed area and the white area. The larger the value, the more obvious the contrast and the smaller the white defect.
[0067] It needs to be explained that μ p The average grayscale value of pixels in the printed area; for example, dark ink areas have low grayscale. (μ) b The white area refers to the average grayscale value of pixels in the non-printed area, such as the high grayscale value of the paper's background color; |μ p -μ b | Directly reflects the distinction between ideal printing and the missing white area. The greater the difference between the two, the more obvious the visual contrast between the printing and the background. The smaller the difference, the smaller the absolute value of the difference, indicating that the missing white problem is serious and the boundary is blurred.
[0068] σ p σ represents the standard deviation of the pixel grayscale values in the printed area. b The standard deviation of the grayscale values of the pixels in the white-out area measures the dispersion of grayscale values within the area; for example, σ. p A smaller σ indicates more uniform color and more complete ink coverage in the printing area. b The larger the area of white leakage, the more likely it is to have spots or stains, and the greater the grayscale fluctuation; σ p +σ bUsed for normalization, it represents the sum of grayscale fluctuations in two regions, eliminating the influence of uneven lighting or image noise. A large denominator is due to uneven grayscale distribution caused by paper texture or equipment vibration, which needs to be standardized to avoid misjudgment.
[0069] It should be specifically noted that the color deviation coefficient is as follows:
[0070]
[0071] Where S is the color deviation coefficient, which is used to quantify the difference between the actual printed color and the standard color. The larger the value, the greater the color deviation.
[0072] L1, a1, b1 are the Lab values of the standard color, including lightness, red-green axis, and yellow-blue axis; L2, a2, b2 are the Lab values of the actual measured color, and w is the corresponding weighting coefficient.
[0073] It should be explained that the human eye is more sensitive to changes in brightness, therefore it is usually assigned a value of w. L Higher weights are assigned, ranging from 1 to 1.2; when the printing process has a high tolerance for color fluctuations, the weight of the color axis is reduced to decrease misjudgment, ranging from 0.5 to 0.6. The default weight for the red-green axis is w. a And yellow and blue axis weights w b The same applies; however, in scenarios that emphasize the performance of specific colors, such as brand logos, the weight of a particular color axis can be increased individually.
[0074] The ink layer uniformity coefficient is specifically:
[0075]
[0076] It should be noted that M is the ink layer uniformity coefficient, which combines the dispersion and thickness constraint through a product, and the final result is normalized to the range of 0 to 1. The larger the value, the better the uniformity.
[0077] It needs to be explained that σ t σ represents the standard deviation of thickness, reflecting thickness fluctuations; t represents the average ink layer thickness, calculated as the arithmetic mean of all measurement points; t / t measures the relative fluctuation of ink layer thickness, when σ t When σ = 0, this term is 0; M = 1 represents the ideal state, i.e., the ink layer is completely uniform; when σ = 0, this term is 0. t When t increases or decreases, the dispersion term increases and the uniformity decreases.
[0078] As a correction term, process constraints are introduced to account for insufficient average thickness, where t min t is the minimum thickness threshold required for the process, i.e., the minimum thickness required for ink color development; k is an adjustment coefficient that controls the steepness of the curve. If t < tmin As the correction term approaches 0, the value of M decreases; if t ≥ t min As the correction term approaches 1, the formula becomes M = 1 - σ t / t.
[0079] It should be specifically noted that the edge gradient coefficients are as follows:
[0080]
[0081] Where B is the edge gradient coefficient, which reflects the sharpness of the printed pattern edge and quantifies the image edge clarity. The larger the value, the clearer the image and the fewer the defects.
[0082] The gradient magnitude at pixel q directly reflects the edge intensity; a larger value indicates a sharper edge. G x Gy is the horizontal gradient, which detects changes in pixel values in the horizontal direction of the image along the x-axis, reflecting the strength of vertical edges; Gy is the vertical gradient, which detects changes in pixel values in the vertical direction of the image along the y-axis, reflecting the strength of horizontal edges.
[0083] p is the total number of edge pixels involved in the calculation, θ q Let θ be the gradient direction angle of the pixel; θ is the mean of the gradient direction within the local window, when θ q When θ = 0, cos(0) = 1, indicating that the directions are completely consistent.
[0084] S3. Perform secondary processing on the coefficients obtained from the previous processing, and calculate the process defect coefficient, printing defect coefficient and content defect coefficient of each area through the defect coefficient generation module.
[0085] It should be specifically noted that the process defect coefficient is as follows:
[0086] G = α*P + (1-α)*D;
[0087] Where G is the process defect coefficient, with a value between 0 and 1. The larger G is, the greater the process defect. P is the overprinting error coefficient, and D is the superimposed image deviation coefficient.
[0088] α represents the weight of registration deviation, which directly reflects the contribution of both to process defects. Since registration deviation usually has a more direct visual impact, α ranges from 0.6 to 0.65.
[0089] It should be specifically noted that the printing defect coefficient is as follows:
[0090]
[0091] Where Y is the printing defect coefficient, which maps white gaps and color differences to a scalar value to reflect ink printing defects. The larger the value, the more serious the defect. Q is the area contrast coefficient, which takes the reciprocal to unify the directionality, that is, the larger the value, the more serious the defect. S is the color deviation coefficient.
[0092] β is the weight of the reciprocal of the regional contrast coefficient. The weight is used to balance the detection sensitivity of white leakage and color difference. Paper box printing pays more attention to color consistency, so β has a higher weight, ranging from 0.7 to 0.8. It can be adjusted according to the printing process requirements. This embodiment does not make specific limitations.
[0093] It should be specifically noted that the content defect coefficient is as follows:
[0094] N=δ*(1-M)+ε*(1-B)+φ*(1-M)*(1-B);
[0095] Where N is the content defect coefficient, the larger the value, the larger the defect; M is the ink layer uniformity coefficient, the larger the value, the more uniform; B is the edge gradient coefficient, the larger the value, the clearer; the weights satisfy a sum of 1.
[0096] It should be explained that the uniformity defect term δ*(1-M) reflects the defects caused by uneven ink layer thickness. When M approaches 0, the contribution value of this term increases, directly increasing the defect coefficient. The clarity defect term ε*(1-B) quantifies edge blurring or burr problems. A low B value directly increases the defect coefficient. The cross-coupling term φ*(1-M)*(1-B) captures the synergistic effect of uniformity and clarity. For example, when the ink layer is too thin, it leads to low edge diffusion clarity. When both are low, the defect coefficient increases non-linearly.
[0097] The uniformity defect term weight δ and the sharpness defect term weight ε are the same, ranging from 0.35 to 0.4. They can be dynamically adjusted according to the focus of defect detection. The cross-coupling term weight φ ranges from 0.2 to 0.3 to avoid excessive amplification of nonlinearity. The weights satisfy δ + ε + φ = 1.
[0098] S4. Compare each defect coefficient with its corresponding defect threshold, and determine whether it is qualified through the defect judgment module. If all three comparison results are qualified, it is determined that there is no printing defect; if any one of the comparison results is unqualified, it is determined that there is a printing defect, the defect location is marked and a defect distribution heat map is generated simultaneously.
[0099] It should be noted that the non-compliance threshold for the process defect coefficient is set as x, the non-compliance threshold for the printing defect coefficient is set as y, and the non-compliance threshold for the content defect coefficient is set as z.
[0100] If any coefficient reaches the unqualified threshold, it is determined that there is a printing defect, i.e., G≥x or Y≥y or N≥z; if all coefficients are below the qualified threshold, it is determined that there is no defect and proceeds to the next production stage, i.e., G<x and Y<y and N<z.
[0101] The range of x is between 0.4 and 0.4, the range of y is between 0.9 and 1, and the range of z is between 0.2 and 0.3. The value of the threshold is determined by a combination of large-scale model analysis of the sample data and human experience. It can also be adjusted appropriately based on the influence of common sense. This embodiment does not impose specific limitations.
[0102] S5. Calculate the proportion of the defect area in the total area of the printed pattern to obtain the defect index, and classify the defects through the defect classification module. Then, classify and warn based on the defect level and take relevant measures.
[0103] It should be noted that the calculation of the defect index... Where S q S represents the area of the defect region. z The defect classification is based on the total area of the printed pattern:
[0104] When 0 < DI ≤ a, it is a minor defect, a yellow warning is issued, the log is recorded, and the next batch is continuously monitored without downtime.
[0105] When a < DI ≤ b, it is a moderate defect, an orange warning is issued, the production rate is reduced, the ink volume / pressure parameters are automatically adjusted, and manual spot checks are triggered.
[0106] When DI > b, it indicates a severe defect, triggering a red alert, immediate shutdown, locking the current batch, initiating equipment self-test, and generating a maintenance work order.
[0107] It should be noted that the value of 'a' ranges from 1 to 1.2, and the value of 'b' ranges from 5 to 6. The specific settings should be made according to the printing requirements.
[0108] S6. Optimize existing classification models and adapt to newly emerging defect patterns through online incremental training using the dynamic learning module.
[0109] It should be noted that the dynamic learning module specifically includes:
[0110] The data stream pipeline collects defect images and extracts features, constructs a circular buffer to store the latest 1000 samples, and discards the oldest 10% of old data; the incremental training engine performs full training during the low-load period in the early morning every day, and triggers updates when new defects are detected in real time; the isolated forest algorithm is applied to detect outliers in the feature space, and the category labels are automatically expanded after manual annotation.
[0111] Through the above description of the embodiments, those skilled in the art can clearly understand that the various embodiments of this application can be implemented by means of software or software combined with necessary general-purpose hardware platforms, and of course, they can also be implemented by hardware functions; based on this understanding, the technical solution of this application, in essence or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to cause a computer device, such as including but not limited to a personal computer, server, or network device, to execute all or part of the steps of the method described in any embodiment of this application.
[0112] The foregoing describes exemplary embodiments of this application. It should be understood that the above exemplary embodiments are not restrictive but illustrative, and the scope of protection of this application is not limited thereto. It should be understood that those skilled in the art can make modifications and variations to the embodiments of this application without departing from the spirit and scope of this application, and such modifications and variations should be within the scope of protection of this application.
Claims
1. A method for detecting defects in printed patterns used in cardboard box packaging, characterized in that, Specifically, the following steps are included: S1. Divide the printed pattern part of the paper box packaging into sections, and use the image acquisition module to acquire the image of each area to be tested and extract the printing data contained therein; S2. The data processing module processes the collected data and calculates the correlation coefficients of the process defect coefficients, printing defect coefficients, and content defect coefficients for each region. S3. Perform secondary processing on the coefficients obtained from the previous processing, and calculate the process defect coefficient, printing defect coefficient and content defect coefficient of each area through the defect coefficient generation module. S4. Compare each defect coefficient with its corresponding defect threshold, and determine whether it is qualified through the defect judgment module. If all three comparison results are qualified, it is determined that there is no printing defect; if any one of the comparison results is unqualified, it is determined that there is a printing defect, the defect location is marked and a defect distribution heat map is generated simultaneously. S5. Calculate the proportion of the defect area in the total area of the printed pattern to obtain the defect index, and classify the defects through the defect classification module. Then, classify and warn based on the defect level and take relevant measures. S6. Optimize existing classification models and adapt to newly emerging defect patterns through online incremental training using the dynamic learning module.
2. The method for detecting defects in printed patterns for paper box packaging as described in claim 1, characterized in that: The correlation coefficients of the process defect coefficients include the overprinting error coefficient and the superimposition deviation coefficient, specifically: The specific overprinting error coefficient is as follows: Where P is the registration error coefficient and n is the number of color plates. Let x be the center deviation of the halftone dots in any color channel. b y b (x) represents the preset standard grid point coordinates. s y s () represents the actual coordinates of the detected dots, with weights assigned based on the impact of different colors on the visual effect; The specific superimposition deviation coefficient is: Where D is the superimposed image deviation coefficient, and m is the number of measured points. Δx represents the total offset distance of the network points. j and Δy j These are horizontal offset and vertical offset, respectively. This represents the average offset distance.
3. The method for detecting defects in printed patterns for paper box packaging as described in claim 2, characterized in that: The correlation coefficients of the printing defect coefficient include the regional contrast coefficient and the color deviation coefficient, specifically: The specific regional contrast coefficient is: Where Q is the regional contrast coefficient, μ p μ is the average grayscale value of the pixels in the printed area. b The grayscale average of pixels in the unprinted area; σ p σ represents the standard deviation of pixel grayscale values in the printed area. b The standard deviation of the pixel grayscale values in the white-out area; The color deviation coefficient is specifically: Where S is the color deviation coefficient, L1, a1, b1 are the Lab values of the standard color including lightness, red-green axis, and yellow-blue axis; L2, a2, b2 are the Lab values of the actual measured color, and w is the corresponding weighting coefficient.
4. The method for detecting defects in printed patterns for paper box packaging as described in claim 1, characterized in that: The correlation coefficients of the content defect coefficient include the ink layer uniformity coefficient and the edge gradient coefficient, specifically: The ink layer uniformity coefficient is specifically: Where M is the ink layer uniformity coefficient, σ t Let t be the standard deviation of the ink layer thickness, and t be the average ink layer thickness. min is the minimum ink layer thickness threshold required by the process, and k is the adjustment coefficient; The edge gradient coefficients are specifically: Where B is the edge gradient coefficient. Let θ be the gradient magnitude at pixel q; q Let be the gradient direction angle of pixel q; θ be the mean gradient direction within the local window; and p be the total number of edge pixels involved in the calculation. G x It is the horizontal gradient, G y It is the vertical gradient.
5. The method for detecting defects in printed patterns for paper box packaging as described in claim 1, characterized in that: The process defect coefficient is specifically: G = α*P + (1-α)*D; Where G is the process defect coefficient, P is the overprinting error coefficient, D is the superimposed image deviation coefficient, and α is the weight of the overprinting deviation. The printing defect coefficient is specifically: Where Y is the printing defect coefficient, Q is the area contrast coefficient, S is the color deviation coefficient, and β is the weight of the reciprocal of the area contrast coefficient; The specific content defect coefficient is as follows: Where N is the content defect coefficient, M is the ink layer uniformity coefficient, and B is the edge gradient coefficient, and the weights satisfy the condition that the sum is 1.
6. The method for detecting defects in printed patterns for paper box packaging as described in claim 1, characterized in that: The defect classification is specifically as follows: Calculate the defect index Where S q S represents the area of the defect region. z The total area of the printed pattern is denoted as DI. When 0 < DI ≤ a, it is a minor defect; when a < DI ≤ b, it is a moderate defect; and when DI > b, it is a severe defect.
7. A printing pattern defect detection system for cardboard box packaging, characterized in that, Specifically, it includes: Image acquisition module: Equipped with an industrial line scan camera, used to acquire multi-angle images of the partitioned paper box printing pattern and extract feature area data; Data processing module: Performs feature matching and feature aggregation on the collected data, and calculates the correlation coefficient of printing defects in each region; Defect coefficient generation module: Generates process defect coefficient, printing defect coefficient and content defect coefficient through secondary processing; Defect detection module: Built-in dynamic threshold library, compares three defect coefficients with corresponding thresholds, triggers a defect alarm if any index exceeds the limit, supports multi-threaded parallel detection; Defect classification module: Automatically classifies defects into minor / moderate / severe levels based on the proportion of defect area, and links the audible and visual alarm device with the production line sorting mechanism; Dynamic learning module: Integrates an incremental training framework to continuously optimize the classification model through few-shot learning and adapt to newly emerging defect patterns.