A two-dimensional code full-dimension detection method and system for a packaging processing flow
By using polarized multi-angle structured light and near-infrared auxiliary light before and after the coding stage, combined with capillary action distribution map and penetration model, the ideal coding shape of QR code is simulated, which solves the single-dimensional problem of existing detection methods and improves the accuracy of QR code detection results and optimizes the production process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN ART PAPER & PLASTIC PACKAGING CO LTD
- Filing Date
- 2026-05-13
- Publication Date
- 2026-07-24
AI Technical Summary
Existing QR code detection methods mainly rely on barcode readers or vision systems, which have a single detection dimension and lack a systematic evaluation of QR code printing quality, structural integrity, and positional accuracy, resulting in a decrease in recognition rate and impact on production traceability efficiency.
Multi-angle polarized structured light and near-infrared auxiliary light are used to collect multi-angle polarized images and light intensity signals before and after the inkjet printing stage. Combined with capillary action distribution map, penetration vector distribution map and ink droplet penetration model, the ideal inkjet printing morphology spectrum is simulated to perform full-dimensional morphology detection.
It improves the accuracy of QR code detection results, avoids recognition failures caused by ambient lighting and scanning angle limitations, provides a full-dimensional quality inspection report, and supports production process optimization and quality control.
Smart Images

Figure CN122174855B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of QR code detection, and more particularly to a method and system for full-dimensional QR code detection in the packaging process. Background Technology
[0002] With the rapid development of IoT technology and smart manufacturing, QR codes, as an important carrier of information storage and interaction, have been widely used in packaging, logistics traceability, product anti-counterfeiting, and supply chain management. In the packaging process, QR codes are typically printed directly or affixed to the surface of packaging materials to carry key data such as product identification, production batch, and traceability information. If printing defects (such as damaged, deformed, or misaligned QR codes) lead to scanning failures, it may trigger quality traceability risks and even lead to production batch recalls, resulting in significant economic losses and reputational damage for the company. Therefore, ensuring the printing quality and accuracy of packaging QR codes is a crucial aspect of quality control on the production line.
[0003] Currently, existing QR code integrity detection methods mainly rely on code readers or vision systems for decoding tests. These methods have a single detection dimension and lack a systematic evaluation of multi-dimensional performance aspects such as printing quality, structural integrity, and positional accuracy. This can lead to decreased recognition rates or even reading failures in actual circulation processes due to differences in ambient lighting, scanning angle limitations, or varying equipment performance, thereby affecting production traceability efficiency and product reliability. Summary of the Invention
[0004] This application provides a method and system for full-dimensional QR code detection in the packaging process, which improves the accuracy of QR code detection results.
[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:
[0006] Firstly, a method for full-dimensional detection of QR codes in the packaging process is provided, which includes:
[0007] Before the coding stage, polarized multi-angle structured light and near-infrared auxiliary light are applied to the packaging semi-finished product;
[0008] Collect multi-angle polarization images and inkjet printing related parameters of the area to be inkjet printed inside the packaged semi-finished product, and simultaneously extract multi-angle light intensity signals from the multi-angle polarization images. Among them, the inkjet printing related parameters include inkjet printing area parameters, inkjet printing process parameters, and real-time environmental parameters.
[0009] By combining multi-angle polarization images and multi-angle light intensity signals, the capillary action distribution map of the area to be printed can be retrieved.
[0010] Based on the capillary action distribution map, the capillary action vector field of all polarized pixels in the multi-angle polarization image is synthesized to obtain the penetration vector distribution map of the area to be inkjet printed;
[0011] By combining inkjet printing parameters and penetration vector distribution maps, the ink droplet penetration evolution analysis of the area to be printed is completed, and an ink droplet penetration model is constructed based on the ink droplet penetration evolution analysis results.
[0012] The ideal inkjet pattern of the area to be inkjet-printed was simulated using an ink droplet penetration model.
[0013] After the inkjet printing stage, a polarized image of the QR code on the packaged semi-finished product is captured;
[0014] Based on the ideal inkjet pattern map, full-dimensional morphology detection of QR code polarization images is completed, and a QR code detection report of QR code polarization images is generated based on the full-dimensional morphology detection results.
[0015] Optionally, retrieving the capillary action distribution map of the area to be inkjet printed by combining multi-angle polarization images and multi-angle light intensity signals includes the following steps:
[0016] Dark field correction and intensity normalization are performed on multi-angle light intensity signals to obtain a reference light intensity signal;
[0017] The Stokes vector components of all polarized pixels in the multi-angle polarization image are calculated based on the reference light intensity signal.
[0018] The degree of polarization and the angle of polarization of all polarized pixels are calculated based on the Stokes vector components.
[0019] The image reflection data of the area to be printed is extracted from the multi-angle polarization image, and the coating density coefficient of the area to be printed is calculated based on the image reflection data.
[0020] The pixel gravitational modulus and pixel drag modulus of all polarized pixels were calculated by combining the coating density coefficient and pixel polarization degree.
[0021] The capillary intensity of all polarized pixels is calculated by combining the pixel gravitational modulus and pixel drag modulus.
[0022] All pixel polarization angles are mapped to the area to be printed as pixel fiber directions;
[0023] A capillary action distribution map of the area to be inkjet printed is constructed by combining the pixel fiber orientation and capillary action intensity of all polarized pixels.
[0024] Optionally, the capillary action vector field synthesis of all polarized pixels in the multi-angle polarization image is completed based on the capillary action distribution map to obtain the penetration vector distribution map of the area to be inkjet printed, including the following steps:
[0025] For any polarized pixel in the capillary action distribution map, a pixel coordinate system is established with the pixel fiber direction of the polarized pixel as the reference.
[0026] The pixel penetration parameters in the pixel coordinate system are calculated based on the capillary intensity in the capillary distribution diagram. The pixel penetration parameters include the principal axis effective penetration and the cross axis effective penetration.
[0027] A diagonal permeation tensor is constructed based on the pixel permeation parameters, and the diagonal permeation tensor is rotated and transformed into a global second-order permeation tensor according to the pixel fiber direction.
[0028] The penetration vector direction and penetration vector modulus of the polarization pixel are calculated based on the global second-order penetration tensor.
[0029] By combining the penetrating vector direction and penetrating vector modulus, the vector field space of all polarized pixels is synthesized to obtain the penetrating vector distribution map of the area to be inkjet printed.
[0030] Optionally, by combining inkjet printing parameters and a penetration vector distribution map, an ink droplet penetration evolution analysis is performed on the area to be printed. Based on the ink droplet penetration evolution analysis results, an ink droplet penetration model is constructed, including the following steps:
[0031] The dynamic contact angle of the ink in the area to be printed is calculated based on the inkjet printing parameters. The dynamic contact angle of the ink and the real-time environmental parameters are then combined to update the penetration vector field of the penetration vector distribution map, thus obtaining the coupled penetration distribution map.
[0032] A mesh simulation domain was constructed based on the inkjet printing area parameters, and an ink free energy model for the mesh simulation domain was constructed based on the coupled penetration distribution map.
[0033] Extract the coupling penetration tensor of all polarized pixels within the coupling penetration distribution map;
[0034] Variational operations were performed on the ink free energy model, and the ink droplet penetration model in the mesh simulation domain was constructed by combining the variational operation results with all coupled penetration tensors.
[0035] Optionally, the dynamic contact angle of the ink in the area to be printed is calculated based on the relevant inkjet printing parameters. The dynamic contact angle is then combined with real-time environmental parameters to update the penetration vector field of the penetration vector distribution map, resulting in a coupled penetration distribution map. This process includes the following steps:
[0036] The ink performance parameters for the inkjet printing stage are determined based on the inkjet printing process parameters and real-time environmental parameters. These ink performance parameters include ink tension parameters, ink viscosity parameters, and ink evaporation parameters.
[0037] Determine the coating free energy parameters of the area to be printed based on the inkjet area parameters and real-time environmental parameters;
[0038] The dynamic wetting coefficient for the coding stage is determined based on the coding equipment parameters in the coding process parameters.
[0039] The dynamic contact angle of the ink in the area to be printed is calculated by combining ink performance parameters, coating free energy parameters, and dynamic wetting coefficient.
[0040] The pixel penetration parameters of all polarized pixels are corrected based on the dynamic contact angle of the ink to obtain the corrected penetration parameters;
[0041] The penetration energy diffusion coefficient of the penetration vector distribution map is determined by combining real-time environmental parameters and the dynamic contact angle of the ink.
[0042] By combining the corrected permeability parameters and the permeability energy diffusion coefficient, the permeability vector field of the permeability vector distribution map is updated, resulting in a coupled permeability distribution map.
[0043] Optionally, constructing a mesh simulation domain based on the inkjet printing area parameters and building an ink free energy model for the mesh simulation domain based on the coupled penetration distribution map includes the following steps:
[0044] Using the area to be printed as a reference, an initial mesh simulation domain is constructed based on the parameters of the printing area;
[0045] The coupled penetration distribution map and ink performance parameters are loaded as ink droplet evolution constraints into the initial mesh simulation domain to obtain the mesh simulation domain.
[0046] Set the bottom layer of the mesh simulation domain as a fixed penetration boundary, and set the top layer and sides of the mesh simulation domain as open penetration boundaries;
[0047] To complete the initial phase field variable assignment for the grid simulation domain with defined boundaries, the ink volume phase energy function of the grid simulation domain is constructed by combining the initial phase field variable assignment results with the inkjet printing process parameters and using the double potential well function.
[0048] The interface gradient energy function of the mesh simulation domain is constructed by combining the ink tension parameters and the initial phase field variable assignment results;
[0049] The permeation vector modulus in the coupled permeation distribution map is linearly mapped to the energy barrier coefficient;
[0050] An ink free energy model for the mesh simulation domain was constructed by combining the energy barrier coefficient, the ink bulk phase energy function, and the interface gradient energy function.
[0051] Optionally, simulating the ideal inkjet pattern of the area to be printed using an ink droplet penetration model includes the following steps:
[0052] The ink droplet volume and velocity are determined by combining the inkjet printing process parameters and ink performance parameters, and the initial momentum of the inkjet printing is calculated by combining the ink droplet volume and ink droplet velocity.
[0053] The initial momentum of the inkjet printing was used as the initial dynamic value for the ink droplet penetration model;
[0054] Using the mesh simulation domain as the evolution space carrier, the initial dynamic values are loaded into the ink droplet penetration model for spatiotemporal evolution iteration until the free energy change rate and ink droplet displacement vector calculated based on the output results of the ink droplet penetration model are both less than the corresponding preset thresholds. The spatiotemporal evolution iteration stops, and the inkjet printing feature data field of the mesh simulation domain is output. The inkjet printing feature data field includes the phase field variable distribution field and the ink droplet steady-state distribution field.
[0055] The phase field variable distribution field is traversed using the moving cube algorithm. The phase field variable distribution field is fitted into a continuous closed surface, and the continuous closed surface is mapped onto a two-dimensional plane to obtain the initial inkjet printing profile.
[0056] Subpixel-level contour optimization is performed on the initial inkjet outline to obtain the ideal inkjet outline.
[0057] Boundary steady-state gradient verification of ideal inkjet printing profile is performed using the steady-state distribution field of ink droplets.
[0058] If the boundary steady-state gradient verification of the ideal inkjet outline passes, the feature extraction algorithm is used to extract the full-dimensional inkjet features of all symbols within the ideal inkjet outline. The full-dimensional inkjet features include geometric morphological features, edge micro features, and vertical penetration features.
[0059] By arranging and combining the full-dimensional inkjet printing features of all code elements according to the QR code encoding rules, an ideal inkjet printing pattern map is obtained.
[0060] Optionally, performing full-dimensional morphological detection of the QR code polarization image based on the ideal inkjet pattern and generating a QR code detection report based on the full-dimensional morphological detection results includes the following steps:
[0061] The ink image of the QR code is extracted by performing spatial filtering of the polarization difference in the QR code polarization image.
[0062] The QR code ink image is physically aligned with the ideal inkjet pattern map, and the ink distribution residual map between the QR code ink image and the ideal inkjet pattern map is calculated based on the physical space alignment result.
[0063] Key reference symbols are extracted from the ideal inkjet pattern map that has completed physical spatial alignment, resulting in multiple ideal symbols and their corresponding symbol coordinates;
[0064] Multiple ink symbols within the QR code ink image are extracted based on the symbol coordinates;
[0065] All ideal symbols are matched with ink symbols to obtain multiple symbol feature pairs.
[0066] For any symbol feature pair, calculate the multidimensional feature residual between the ideal symbol and the ink symbol within the symbol feature pair;
[0067] A QR code detection report is generated by combining the ink distribution residual map and the multidimensional feature residual features to produce a QR code polarization image.
[0068] Secondly, this application provides a machine-readable storage medium storing instructions for causing a machine to perform a QR code full-dimensional detection method for packaging processing as described in the first aspect.
[0069] Thirdly, this application provides a QR code full-dimensional detection system for the packaging processing flow, including:
[0070] The memory is configured to store instructions; and
[0071] The processor is configured to retrieve the instructions from the memory and, when executing the instructions, to implement the QR code full-dimensional detection method for packaging processing as described in the first aspect.
[0072] The above technical solution captures the microscopic features of packaging substrates, such as cigarette pack paper and gold / silver cards, by applying multi-angle polarized structured light and near-infrared auxiliary light. This provides real physical input for subsequent capillary action analysis, avoiding distortion of capillary action results due to substrate surface interference. Next, the anisotropy of the substrate is quantified using the polarization state differences of the multi-angle polarized images. Combined with the reflection intensity gradient of the multi-angle light intensity signals, the capillary adsorption capacity at different locations is inferred, forming a capillary action distribution map. This determines the spatial distribution of the substrate's adsorption and diffusion potential for ink droplets within the coding area, accurately quantifying the impact of substrate microscopic differences on ink droplets. This allows the subsequent penetration vector field to accurately match the true capillary characteristics of each polarized pixel, improving the reliability of the ideal coding morphology map. By synthesizing the capillary action vector field of all polarized pixels based on the capillary action distribution map, the ink droplet penetration trend can be visualized, avoiding prediction deviations in the ideal morphology feature map due to unknown penetration direction or intensity. Finally, by constructing an ink droplet penetration model to simulate the entire process of ink droplets from impacting the substrate to penetration and shaping, a data foundation is provided for the subsequent ideal morphology feature map. Next, based on the ink droplet penetration model, the optimal physical form of each code element under the current substrate, process, and environment is simulated according to the QR code encoding rules. This provides a personalized judgment benchmark for subsequent actual QR code detection, achieving full-dimensional detection of QR codes. Simultaneously, the judgment logic based on physical limits improves the objectivity of quality levels and avoids detection errors caused by fluctuations in human standards. Through these steps, the accuracy of QR code detection results can be effectively improved, providing technical support for QR code printing.
[0073] Other features and advantages of the embodiments of this application will be described in detail in the following detailed description section. Attached Figure Description
[0074] Figure 1 A flowchart illustrating a QR code full-dimensional detection method for packaging processing provided in this application embodiment;
[0075] Figure 2 A flowchart illustrating a method for constructing a capillary distribution map provided in an embodiment of this application;
[0076] Figure 3 This is a flowchart illustrating a method for constructing a coupled penetration distribution map, as provided in an embodiment of this application. Detailed Implementation
[0077] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for illustration and explanation of the embodiments of this application and are not intended to limit the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0078] It should be noted that if the embodiments of this application involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.
[0079] Furthermore, if the embodiments of this application involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0080] Figure 1 This illustration schematically shows a flowchart of a QR code full-dimensional detection method for packaging processing according to an embodiment of this application. Figure 1As shown in the figure, this application provides a method for full-dimensional detection of QR codes in the packaging process, which may include the following steps:
[0081] S101. Before the coding stage, apply polarized multi-angle structured light and near-infrared auxiliary light to the packaging semi-finished product.
[0082] S102. Collect multi-angle polarization images and inkjet printing related parameters of the area to be inkjet printed inside the packaged semi-finished product, and simultaneously extract multi-angle light intensity signals from the multi-angle polarization images. Among them, the inkjet printing related parameters include inkjet printing area parameters, inkjet printing process parameters, and real-time environmental parameters.
[0083] S103. Combine multi-angle polarization images and multi-angle light intensity signals to retrieve the capillary distribution map of the area to be inkjet printed;
[0084] S104. Based on the capillary action distribution map, synthesize the capillary action vector field of all polarized pixels in the multi-angle polarization image to obtain the penetration vector distribution map of the area to be inkjet printed.
[0085] S105. Combine the inkjet printing parameters and the penetration vector distribution map to complete the ink droplet penetration evolution analysis of the area to be printed, and construct the ink droplet penetration model based on the ink droplet penetration evolution analysis results;
[0086] S106. Simulate the ideal inkjet pattern of the area to be inkjet printed using the ink droplet penetration model.
[0087] S107. After the inkjet printing stage, collect the QR code polarization image of the packaged semi-finished product;
[0088] S108. Perform full-dimensional morphological detection of the QR code polarization image based on the ideal inkjet pattern map, and generate a QR code detection report of the QR code polarization image based on the full-dimensional morphological detection results.
[0089] In this embodiment, firstly, the area to be printed inside the semi-finished packaging product is scanned using polarized multi-angle structured light. The semi-finished packaging product can be an unprinted cigarette box. To adapt to the surface characteristics of the cigarette box, a narrow-band laser light source (wavelength 532nm, bandwidth ±5nm) can be selected as the polarized multi-angle structured light. The polarization state is set to linear polarization, and the polarization direction includes P-polarization and S-polarization. P-polarization refers to the polarization direction parallel to the potential fiber orientation on the cigarette box surface, and S-polarization refers to the polarization direction perpendicular to the potential fiber orientation on the cigarette box surface. The polarization direction can be adjusted by a polarizer. Next, a polarization camera is used to acquire multi-angle polarization images, including P-polarization images and S-polarization images. The coding-related parameters include coding area parameters, coding process parameters, and real-time environmental parameters. Coding area parameters include the physical dimensions of the area to be coded, such as 20mm × 20mm for QR codes; coating type, such as matte layer / high-gloss varnish / gold / silver cardstock metallic layer; and microscale (fiber diameter approximately 10-20μm). Coding process parameters include the ink type (UV ink / solvent ink), inherent ink parameters, and coding equipment parameters read from the coding equipment control system. Real-time environmental parameters include the real-time temperature and relative humidity of the coding area collected by industrial sensors in the workshop. Multi-angle light intensity signals are grayscale values extracted pixel-by-pixel from P-polarized and S-polarized images.
[0090] The Stokes vector components of the multi-angle polarized image are calculated based on the reference light intensity signal. These components include the total light intensity component, the polarization intensity difference component, and the circular polarization component. Next, image reflection data of the area to be printed is extracted from the multi-angle polarized image. The coating thickness corresponding to each polarized pixel is calculated based on the image reflection data. The density coefficient of each polarized pixel is then calculated based on the coating thickness. Integrating the density coefficients of all polarized pixels yields the coating density coefficient of the area to be printed. A larger density coefficient indicates a more uniform coating thickness, a smoother surface, and a higher degree of coating density, resulting in stronger ink penetration resistance. Conversely, a smaller density coefficient indicates the presence of defects such as pores and scratches in the coating, making ink penetration easier. The pixel gravitational modulus and pixel resistance modulus of all polarized pixels are calculated. The effective surface energy, i.e., capillary action intensity, of each polarized pixel is then calculated using these moduli. The capillary action intensity and pixel fiber direction corresponding to the same polarized pixel are integrated according to the arrangement order of the polarized pixels to obtain the capillary action distribution map of the area to be printed. For any polarized pixel in the capillary action distribution map, a global second-order penetration tensor is constructed based on the capillary action intensity and fiber orientation of that polarized pixel. For each polarized pixel, the penetration eigenvalues and penetration eigenvectors of its global second-order penetration tensor are solved, and the penetration eigenvector corresponding to the maximum penetration eigenvalue is taken as the penetration vector direction of that polarized pixel. Then, the sum of the absolute values of the diagonal terms of the global second-order penetration tensor is calculated as the penetration vector modulus of that polarized pixel. The penetration vector directions and penetration vector moduli of all polarized pixels are integrated to construct a penetration vector distribution map.
[0091] The dynamic contact angle of the ink in the area to be printed is calculated using inkjet printing process parameters and real-time environmental parameters. The penetration vector field of the penetration vector distribution map is then updated based on the dynamic contact angle and real-time environmental parameters to obtain a coupled penetration distribution map. Next, using the area to be printed as a reference, data such as the area size, microscale, and substrate of the area are obtained based on the printing area parameters. A mesh simulation domain is then constructed by combining the coupled penetration distribution map and ink performance parameters. Based on the coupled penetration distribution map, an ink free energy model for the mesh simulation domain is constructed. This model includes an energy barrier function, an ink bulk energy function, and an interface gradient energy function. The coupled penetration tensor of the coupled penetration distribution map is then extracted. This coupled penetration tensor can be calculated by modifying the penetration parameters and is consistent with the calculation method and structure of the global second-order penetration tensor. Finally, the free energy model and the coupled penetration tensor are integrated to establish a dynamic evolution model of the ink droplet from impact to shaping, i.e., the ink droplet penetration model. An ideal inkjet pattern map of the area to be coded is simulated using an ink droplet penetration model. First, the inkjet feature data field is evolved using the ink droplet penetration model, which includes the phase field variable distribution field and the ink droplet steady-state distribution field. Then, the ideal inkjet outline is fitted using the inkjet feature data field, and the full-dimensional inkjet features of all symbols within the ideal inkjet outline are extracted. The full-dimensional inkjet features include geometric morphological features, edge microscopic features, and vertical penetration features. The full-dimensional inkjet features of all symbols are arranged and combined according to the QR code encoding rules to obtain the ideal inkjet pattern map.
[0092] After inkjet printing is completed in the area to be printed, a polarized image of the QR code on the semi-finished package is acquired. This image is captured by an array camera with an integrated polarization code disk, and includes S-channel and P-channel images. A polarization difference spatial filtering operation is performed on the QR code polarized image to obtain a background-free QR code ink image. Positioning features are extracted from the ideal inkjet pattern map. An affine transformation is performed on the QR code ink image based on these features, projecting the ink image onto the physical space of the ideal map, ensuring complete overlap of the positioning feature points. After physical alignment, the grayscale difference between the QR code ink image and the ideal inkjet pattern map is calculated pixel-by-pixel to construct an ink distribution residual map. Next, the code elements of key functional areas are located as ideal code elements, and multiple code elements are randomly selected from the remaining areas of the ideal inkjet pattern map as ideal code elements, used as redundant error correction bits. Simultaneously, the coordinates of the ideal code elements and auxiliary code element coordinates are extracted. Next, based on the physical spatial alignment results, symbol coordinates, and auxiliary symbol coordinates, ink symbols at the same spatial position as the ideal symbol are selected from the QR code inkblot image. Inkblot coding features are extracted from the ink symbols, which also include geometric morphology features, edge microscopic features, and vertical penetration features. Then, the multidimensional feature residuals between the ideal symbol and the ink symbol within the symbol feature pair are calculated. These multidimensional feature residuals include geometric morphology residuals, edge microscopic residuals, and vertical penetration residuals. Defective symbols are selected based on the multidimensional feature residuals, and the number and distribution of defective symbols are statistically analyzed to determine the QR code quality level in the QR code inkblot image. The QR code quality level, the number and distribution of defective symbols, the inkblot distribution residual map, and the multidimensional feature residuals are integrated into a QR code detection report.
[0093] Through the above steps, the optimal physical ideal inkjet pattern spectrum for the current scenario can be accurately simulated under the given conditions (including environmental constraints, substrate of the packaging semi-finished product, etc.). For example, the ideal spectrum for gold and silver card substrates will consider its strong reflectivity and low penetration characteristics, while the spectrum for white cardboard will be adapted to its high capillary adsorption capacity. This ensures that the detection benchmark is completely matched with the actual production scenario, avoiding misjudgments caused by a one-size-fits-all standard. In addition, the QR code detection report not only provides the QR code quality level, but also includes data such as ink distribution residual map (intuitively showing the defect area), multi-dimensional feature residuals, and defect code element distribution. If uneven penetration frequently occurs in a certain area, it can be traced back to abnormal fiber arrangement in the substrate capillary action distribution map, or unreasonable ink viscosity parameters in the inkjet printing process, providing direct basis for substrate selection and process adjustment. In summary, this solution achieves accurate, universal, and controllable detection of QR code quality through multi-technology integration and a closed-loop design throughout the entire process. It not only ensures the quality of current production, but also supports continuous optimization of the production process, ultimately reducing risks, improving efficiency, and protecting brand reputation for enterprises.
[0094] In one embodiment, reference is made to Figure 2 The process of retrieving the capillary action distribution map of the area to be inkjet printed by combining multi-angle polarization images and multi-angle light intensity signals includes the following steps:
[0095] S201. Perform dark field correction and intensity normalization on the multi-angle light intensity signals to obtain the reference light intensity signal;
[0096] S202. Calculate the Stokes vector components of all polarized pixels in the multi-angle polarization image based on the reference light intensity signal.
[0097] S203. Calculate the degree of polarization and the angle of polarization of all polarized pixels based on the Stokes vector components.
[0098] S204. Extract the image reflection data of the area to be printed from the multi-angle polarization image, and calculate the coating density coefficient of the area to be printed based on the image reflection data.
[0099] S205. Calculate the pixel gravitational modulus and pixel drag modulus of all polarized pixels by combining the coating density coefficient and pixel polarization degree.
[0100] S206. Calculate the capillary intensity of all polarized pixels by combining the pixel gravitational modulus and pixel drag modulus respectively.
[0101] S207. Map all pixel polarization angles to the area to be printed as pixel fiber directions;
[0102] S208. By combining the pixel fiber orientation and capillary intensity of all polarized pixels, a capillary distribution map of the area to be printed is constructed.
[0103] In this embodiment, under conditions of no polarized light illumination and before the packaged semi-finished product enters the scanning area, a polarization camera is controlled to acquire dark-field images and record the dark current grayscale value of each pixel in the dark-field image. Then, for each group of multi-angle light intensity signals, the dark current grayscale value is subtracted pixel by pixel to eliminate the interference of camera noise on the detection of reflected light intensity, resulting in corrected multi-angle light intensity signals. Next, the corrected multi-angle light intensity signals undergo intensity normalization processing to obtain a reference light intensity signal. Intensity normalization processing refers to the process of converting light intensity signals from different angles into a uniform scale (such as the 0-1 range).
[0104] Next, the Stokes vector components of the multi-angle polarization image are calculated based on the reference light intensity signal. The Stokes vector components include the total light intensity component, the polarization intensity difference component, and the circular polarization component. The total intensity component refers to the sum of the reference light intensities corresponding to each polarized pixel within the P-polarized image and the S-polarized image. The total intensity component reflects the overall reflected light intensity of the polarized pixels. The polarization intensity difference component refers to the difference in reference light intensity between each polarized pixel within the P-polarized image and the S-polarized image. Since this application is mainly used in cigarette box production, the circular polarization component has minimal impact in this scenario, so it is simplified to 0 and no additional data acquisition is required. Next, the pixel polarization degree and pixel polarization angle of all polarized pixels are calculated based on the Stokes vector components. The formula for calculating the pixel polarization angle is: ,in, The pixel coordinates representing polarized pixels. It refers to the coordinates as The total light intensity component corresponding to the polarized pixel. It refers to the coordinates as The polarization intensity difference component corresponding to the polarized pixel, the pixel polarization angle can be directly used as the physical rotation angle of the paper fiber corresponding to that polarized pixel, the formula for calculating the pixel polarization degree is: The greater the degree of pixel polarization, the more significant the polarization response of the polarized pixel and the more regular the arrangement of its substrate fibers.
[0105] Next, the image reflection data of the area to be marked is extracted from the multi-angle polarization image. The reference light intensity of each polarization pixel (extracted from the reference light intensity signal) is input into the pre-constructed light intensity-reflectivity reference curve in the near-infrared auxiliary light band to query the corresponding pixel reflectivity. Then, the relative reflectivity of each polarization pixel is queried according to the light intensity-reflectivity reference curve in the visible light band in the P polarization direction. The pixel reflectivity and relative reflectivity of all polarization pixels are integrated to obtain the image reflection data. The core of the light intensity-reflectivity benchmark curve is to establish a quantitative mapping between the light intensity acquired by the device and the actual reflectivity using a standard grayscale plate. A standard grayscale plate with a reflectivity of 10%-90% and an accuracy of ±1% (containing 9 gradient calibration points) is used. Under conditions of no ambient light interference, the plate is placed at the scanning calibration position. In the absence of a light source, a polarization camera is used to acquire benchmark images in the P / S polarization directions. The grayscale values of the benchmark images are then extracted, and the average grayscale value of multiple frames is used as the dark current benchmark value. Next, with the light source turned on (near-infrared auxiliary light or visible light), the original light intensity in the P or S polarization direction corresponding to each calibration point on the grayscale plate is acquired. The original light intensity is subtracted from the dark current benchmark value to obtain the effective light intensity. The actual reflectivity of the standard grayscale plate is plotted on the x-axis, and the corresponding effective light intensity value is plotted on the y-axis. A linear fit is then performed to obtain the light intensity-reflectivity benchmark curve.
[0106] Next, the coating thickness corresponding to each polarization pixel is calculated based on the image reflection data. The calculation formula includes: ,in, It is the calibration coefficient. This refers to pixel reflectivity. This refers to relative reflectance. Calibration coefficient. This can be achieved by selecting a standard cigarette box sample with a known coating thickness, and then collecting the pixel reflectance and relative reflectance of the standard cigarette box substrate sample for fitting calculation. Next, the standard deviation of the pixel reflectance and relative reflectance within a preset pixel neighborhood (e.g., a 3×3 pixel neighborhood) for each polarized pixel is calculated. Next, the reflection standard deviation is substituted into the compactness coefficient calculation formula to calculate the compactness coefficient of each polarized pixel, and then the compactness coefficients of all polarized pixels are integrated. The density coefficient of the coating in the area to be printed is obtained. The formula for calculating the density coefficient is: A higher coating density coefficient indicates a more uniform coating thickness, a smoother surface, and a higher degree of coating density, resulting in stronger ink penetration resistance. Conversely, a lower coating density coefficient indicates the presence of defects such as pores and scratches in the coating, making it easier for ink to penetrate.
[0107] The pixel gravitational modulus characterizes the capillary pull of ink by the fiber pores in the area to be printed. The formula for calculating the pixel gravitational modulus is as follows: ,in, The proportionality coefficient of pixel gravitational modulus can be determined by ink penetration experiments. Substrate samples with different coating density coefficients and pixel polarization degrees are selected, and the capillary suction force of the ink on the sample surface is measured using the capillary rise method (Willy method). The capillary suction force is plotted on the ordinate. The x-axis is obtained through linear fitting. Pixel resistance modulus characterizes the ability of the coating in the area to be printed to hinder ink penetration. The formula for calculating pixel resistance modulus is: , The proportionality coefficient of pixel resistance modulus can be obtained through ink contact angle experiments. Substrate samples with different coating density coefficients are selected, and the contact angle of ink on the sample surface is measured using the static droplet method. This angle is then converted into the resistance force of the coating on the ink, with the resistance force as the ordinate. The x-axis is obtained through linear fitting.
[0108] After calculating the pixel gravitational modulus and pixel resistance modulus of all polarized pixels, the effective surface energy of each polarized pixel, i.e., capillary action intensity, is calculated by combining these moduli. The capillary action intensity is the difference between the pixel gravitational modulus and the pixel resistance modulus, reflecting the overall effect of that polarized pixel on the ink. Next, the polarization angles of all pixels are mapped to the area to be printed, thus representing the orientation of the substrate fibers within that area, i.e., the pixel fiber direction. Then, the capillary action intensity and pixel fiber direction corresponding to the same polarized pixel are integrated according to the arrangement order of the polarized pixels to obtain a capillary action distribution map of the area to be printed.
[0109] In one embodiment, the process of synthesizing the capillary vector field of all polarized pixels in a multi-angle polarized image based on the capillary distribution map to obtain the penetration vector distribution map of the area to be inkjet printed includes the following steps:
[0110] For any polarized pixel in the capillary action distribution map, a pixel coordinate system is established with the pixel fiber direction of the polarized pixel as the reference.
[0111] The pixel penetration parameters in the pixel coordinate system are calculated based on the capillary intensity in the capillary distribution diagram. The pixel penetration parameters include the principal axis effective penetration and the cross axis effective penetration.
[0112] A diagonal permeation tensor is constructed based on the pixel permeation parameters, and the diagonal permeation tensor is rotated and transformed into a global second-order permeation tensor according to the pixel fiber direction.
[0113] The penetration vector direction and penetration vector modulus of the polarization pixel are calculated based on the global second-order penetration tensor.
[0114] By combining the penetrating vector direction and penetrating vector modulus, the vector field space of all polarized pixels is synthesized to obtain the penetrating vector distribution map of the area to be inkjet printed.
[0115] In this embodiment, for any polarized pixel in the capillary action distribution map, a pixel coordinate system is established based on the pixel fiber direction of the polarized pixel. Among them, the main shaft Parallel to the pixel fiber direction, this is the direction in which ink easily diffuses, and the cross-axis... Perpendicular to the pixel fiber direction is the direction where ink diffusion is difficult. The principal axis effective penetration is the difference between the pixel's gravitational modulus and pixel's resistance modulus, i.e., the capillary action intensity, reflecting the ink's penetration ability along the fiber direction. Since the fiber gaps are smaller perpendicular to the fiber direction, the penetration resistance increases significantly; therefore, the cross-axis effective penetration is taken as 30% of the principal axis effective penetration. Next, based on the pixel fiber direction, a two-dimensional rotation transformation matrix is constructed as follows:
[0116]
[0117] in, This refers to the direction of the pixel fiber.
[0118] Next, the pixel penetration parameters are constructed as a diagonal penetration tensor, as follows:
[0119]
[0120] in, The effective penetration of the main axis The effective permeability of the cross-axis.
[0121] Next, the diagonal permeation tensor is mapped to the global second-order permeation tensor in the global coordinate system using the two-dimensional rotation transformation matrix. , The global coordinate system refers to a coordinate system constructed with the conveying direction of the production line where the packaging semi-finished product is located as the X-axis, the perpendicular direction of the conveying direction as the Y-axis, and the center point of the area to be printed as the origin. The global second-order penetration tensor is as follows:
[0122]
[0123] Among them, diagonal terms and These reflect the effective penetration capabilities in the X and Y directions in the global coordinate system, directly corresponding to the physical coordinates of the packaged semi-finished product, and are non-diagonal terms. and For the lateral shear diffusion effect caused by fiber tilt, when the pixel fiber direction is 45°, the non-diagonal term takes the maximum value, and the surface ink will diffuse along the main axis and laterally at the same time, which is prone to ink overflow.
[0124] For each polarization pixel, solve for the penetration eigenvalue and penetration eigenvector of its global second-order penetration tensor, and take the penetration eigenvector corresponding to the maximum penetration eigenvalue as the penetration vector direction of that polarization pixel. Then calculate the diagonal terms. and The sum of the absolute values of the values is taken as the penetration vector modulus of that polarization pixel. The larger the penetration vector modulus, the stronger the effective penetration ability of that point, the greater the pulling force of the substrate on the ink, the more significant the ink penetration, and the higher the risk of ink overflow and edge jaggedness. The smaller the modulus, the more stable the penetration. Next, the penetration vector direction and penetration vector modulus of each polarization pixel are visualized according to their actual physical coordinates in the area to be printed. Arrows are used to represent vectors, and the direction of the arrow is the dominant direction of ink penetration, which is consistent with the direction of the penetration vector. The length of the arrow is a visual representation of the penetration vector modulus. The larger the penetration vector modulus, the longer the arrow. The arrows are scaled proportionally to ensure visual recognition, thus obtaining the penetration vector distribution map of the area to be printed.
[0125] In one embodiment, the ink droplet penetration evolution analysis of the area to be printed is completed by combining inkjet printing-related parameters and penetration vector distribution map, and an ink droplet penetration model is constructed based on the ink droplet penetration evolution analysis results, including the following steps:
[0126] The dynamic contact angle of the ink in the area to be printed is calculated based on the inkjet printing parameters. The dynamic contact angle of the ink and the real-time environmental parameters are then combined to update the penetration vector field of the penetration vector distribution map, thus obtaining the coupled penetration distribution map.
[0127] A mesh simulation domain was constructed based on the inkjet printing area parameters, and an ink free energy model for the mesh simulation domain was constructed based on the coupled penetration distribution map.
[0128] Extract the coupling penetration tensor of all polarized pixels within the coupling penetration distribution map;
[0129] Variational operations were performed on the ink free energy model, and the ink droplet penetration model in the mesh simulation domain was constructed by combining the variational operation results with all coupled penetration tensors.
[0130] In this embodiment, the inkjet printing parameters include inkjet printing area parameters, inkjet printing process parameters, and real-time environmental parameters. The dynamic contact angle of the ink in the area to be printed is calculated using the inkjet printing process parameters and real-time environmental parameters. The dynamic contact angle of the ink refers to the instantaneous wetting angle formed by ink droplets during the dynamic process of impact, spreading, and penetration; its core function is to reflect the interfacial interaction between the ink and the substrate under non-equilibrium conditions. The penetration vector distribution map is updated by combining the dynamic contact angle of the ink and the real-time environmental parameters to obtain a coupled penetration distribution map. Then, using the area to be printed as a reference, data such as the area size, microscale, and substrate of the area to be printed are obtained according to the inkjet printing area parameters. Next, based on the microscale of the area to be printed, i.e., the fiber diameter, the grid spatial resolution, area size, and substrate are determined to construct an initial grid simulation domain, laying the spatial foundation for subsequent boundary conditions and constraint parameter loading. Then, the coupled penetration distribution map is mapped to the initial grid simulation domain. Following the physical coordinate alignment principle, the penetration vector direction and penetration vector modulus of each polarized pixel in the coupled penetration distribution map are assigned to the corresponding grid cell in the initial grid simulation domain. Next, the ink tension, viscosity, and chemical potential parameters from the ink performance parameters are used as global constraint parameters and assigned to all mesh elements. This is because the same batch of inkjet printers uses the same ink, thus ensuring consistent global constraint parameters. Through these steps, the mesh simulation domain is obtained. Based on the coupled penetration distribution map, an ink free energy model for the mesh simulation domain is constructed. This model includes an energy barrier function, an ink bulk energy function, and an interface gradient energy function. Then, the coupled penetration tensor from the coupled penetration distribution map is extracted. The coupled penetration tensor can be calculated by modifying the penetration parameters, and its calculation method and structure are consistent with those of the global second-order penetration tensor.
[0131] Next, the free energy model and the coupled penetration tensor are integrated to establish a dynamic evolution model of ink droplets from impact to shaping, namely the ink droplet penetration model. First, the total free energy functional of the ink free energy model is used to obtain the chemical potential. The chemical potential is the core driving force for ink droplet spreading and penetration. The higher the chemical potential, the stronger the ink diffusion trend. The chemical potential of each grid cell is calculated to form a chemical potential spatial distribution field. The coupled penetration tensor is integrated as a mobility factor into the chemical potential spatial distribution field to form the control logic of ink droplet evolution, so that the ink diffusion strictly follows the fiber direction of the substrate. This simulates the actual physical phenomenon of ink bleeding along the fiber direction and vertical shrinkage in cigarette box coding. Then, a steady-state convergence judgment rule is set, and the free energy change rate and ink droplet displacement vector are calculated in real time. When both the free energy change rate and the ink droplet displacement vector are less than the corresponding preset threshold, the current phase field variable distribution is frozen. This distribution is the physical limit shape of the ink droplet on the cigarette box substrate, providing steady-state data of single code elements for the subsequent generation of ideal coding pattern. By integrating the control logic and steady-state convergence judgment rules of the above-mentioned droplet evolution, and taking the ink free energy model that completes the variational operation as the main body, a droplet penetration model in the mesh simulation domain is finally constructed. The droplet penetration model is a comprehensive model that integrates thermodynamic energy constraints and substrate directional penetration constraints. The ink free energy model is the core component of the droplet penetration model, which can accurately reproduce the entire process of ink droplets from impacting the substrate to penetrating and shaping in cigarette box inkjet printing. The output steady-state data field, namely the phase field variable distribution field and the ink droplet steady-state distribution field, will be directly used to extract the full-dimensional features of the code elements (geometric shape, edge microscopy, vertical penetration), supporting the dynamic synthesis of ideal inkjet printing pattern.
[0132] In one embodiment, reference is made to Figure 3 The dynamic contact angle of the ink in the area to be printed is calculated based on the relevant inkjet printing parameters. The dynamic contact angle is then combined with real-time environmental parameters to update the penetration vector field of the penetration vector distribution map, resulting in a coupled penetration distribution map. This process includes the following steps:
[0133] S301. Determine the ink performance parameters for the inkjet printing stage based on the inkjet printing process parameters and real-time environmental parameters. The ink performance parameters include ink tension parameters, ink viscosity parameters, and ink evaporation parameters.
[0134] S302. Determine the coating free energy parameters of the area to be printed based on the inkjet area parameters and real-time environmental parameters.
[0135] S303. Determine the dynamic wetting coefficient of the inkjet printing stage based on the inkjet printing equipment parameters in the inkjet printing process parameters.
[0136] S304. Calculate the dynamic contact angle of the ink in the area to be printed by combining ink performance parameters, coating free energy parameters and dynamic wetting coefficient.
[0137] S305. Correct the pixel penetration parameters of all polarized pixels based on the dynamic contact angle of the ink to obtain the corrected penetration parameters;
[0138] S306. Determine the penetration energy diffusion coefficient of the penetration vector distribution map by combining real-time environmental parameters and ink dynamic contact angle;
[0139] S307. By combining the corrected permeability parameters and the permeability energy diffusion coefficient, the permeability vector field of the permeability vector distribution map is updated to obtain the coupled permeability distribution map.
[0140] In this embodiment, real-time environmental parameters include real-time temperature and humidity, which can be collected by industrial-grade high-precision sensors pre-deployed in the coding workshop. Coding process parameters include inherent ink parameters and coding equipment parameters. Inherent ink parameters include the surface tension reference value for UV inks / solvent inks (i.e., surface tension at 25°C), viscosity-temperature relationship curve, solvent ink evaporation rate-humidity relationship function, ink chemical potential, reference surface free energy (i.e., surface free energy at 25°C and 50%RH), ink polarity component, and ink dispersion component, etc., which can be extracted from technical documents provided by ink suppliers. Coding equipment parameters include printhead impact speed and printhead model.
[0141] Ink tension parameter refers to the surface tension of ink under current temperature and humidity conditions. It can be determined based on the surface tension reference value and real-time temperature. The surface tension of UV ink decreases with increasing temperature because the increased temperature enhances the thermal motion of ink molecules, leading to a linear decrease in surface tension. The correction formula is as follows: ,in, This refers to the surface tension reference value of UV ink. This refers to real-time temperature. This refers to the ink surface tension parameter of UV inks. The surface tension of solvent-based inks is affected by their evaporation rate. The lower the evaporation rate, the higher the proportion of solvent molecules on the ink surface, and the higher the surface tension. The evaporation rate of solvent-based inks refers to their evaporation parameter. By inputting real-time humidity into the solvent ink evaporation rate-humidity relationship function, the evaporation parameter of the solvent-based ink can be obtained. Then, the ink surface tension is corrected based on the evaporation parameter to obtain the ink tension parameter of the solvent-based ink. The correction formula is: , This refers to the ink tension parameter of solvent-based inks. This refers to the inherent evaporation rate of solvent-based inks at 50% relative humidity. This refers to the ink evaporation parameters of solvent-based inks under the current humidity. Ink viscosity parameters are determined through a viscosity-temperature curve; the real-time temperature is input into the viscosity-temperature curve to obtain the ink viscosity parameters.
[0142] The coating free energy parameter decreases slightly with increasing temperature. This is because increasing temperature enhances the thermal motion of molecules on the coating surface, weakens intermolecular van der Waals forces and polar forces, resulting in a linear decrease in the total surface free energy. Therefore, the reference surface free energy can be corrected using real-time temperature. The initial surface free energy is obtained. , corrected formula: In addition, real-time humidity also affects the coating free energy parameters. If the coding area parameters show that the coating in the area to be coded is a hydrophilic coating, such as a matte layer, then for every 10% increase in RH, the polar component of the surface free energy increases by 5%. If the coating in the area to be coded is a hydrophobic coating, such as a gloss varnish, for every 10% increase in RH, the polar component of the surface free energy increases by 3%, while the dispersion component remains unchanged. The coating free energy parameter refers to the total surface free energy of the area to be coded, which is equal to the sum of the polar and dispersion components of the free energy. Therefore, the initial surface free energy can be corrected using real-time humidity to obtain the coating free energy parameters. The dynamic wetting coefficient is a dimensionless proportionality coefficient used to quantify the impact kinetic energy of ink droplet impact on the ink wetting and spreading enhancement effect. Its core function is to correct the calculation deviation of the classical equilibrium wetting theory. It is derived from a large number of experimental calibrations based on the mainstream printhead process parameter range in the printing industry. The higher the nozzle impact velocity, the higher the dynamic wetting coefficient. When the nozzle impact velocity is 6 m / s, the dynamic wetting coefficient is 1.2. For every 1 m / s change in velocity, the dynamic wetting coefficient is adjusted by ±0.1.
[0143] The interface free energy of the area to be printed is calculated by inputting the ink performance parameters, coating free energy parameters, and inherent ink parameters into the interface free energy formula. Interface free energy refers to the physical quantity that determines the strength of molecular interactions at the interface between the ink and the coating on the surface of the area to be printed. The lower the interface free energy, the better the compatibility between the ink and the coating. The interface free energy formula is as follows:
[0144]
[0145] in, This refers to the ink tension parameter for UV inks or solvent inks, depending on the type of inkjet used in the printing process. UV inks are generally used in cigarette box production, as they are more suitable for high-speed production scenarios. This represents the free energy parameter of the coating. and These represent the ink polarity component and the ink dispersion component, respectively. and These refer to the polar component and the dispersion component of the free energy within the coating's free energy parameters, respectively.
[0146] Next, the interfacial free energy, coating free energy parameters, ink tension parameters of UV ink or solvent ink, and dynamic wetting coefficient are input into the dynamic contact angle formula to calculate the dynamic contact angle of the ink in the area to be printed. The dynamic contact angle of the ink refers to the instantaneous wetting angle formed by the ink droplet during the dynamic process of impact, spreading, and penetration. Its core function is to reflect the interfacial interaction between the ink and the substrate under non-equilibrium conditions. The dynamic contact angle formula follows these steps:
[0147]
[0148] in, This refers to the ink tension parameter for UV inks or solvent inks, specifically depending on the type of inkjet used in the printing stage. It is the interface free energy. This represents the free energy parameter of the coating. This represents the dynamic wetting coefficient.
[0149] Real-time environmental parameters and ink dynamic contact angle are injected into the penetration vector distribution map to correct the pixel penetration parameters corresponding to each polarized pixel in the penetration vector distribution map. The pixel penetration parameters include pixel gravitational modulus and pixel resistance modulus. When the ink dynamic contact angle is less than the contact angle reference value (60°), the pixel gravitational modulus is affected by the dynamic contact angle. The smaller the dynamic contact angle, the stronger the capillary attraction of the area to be printed. Therefore, the pixel gravitational modulus can be appropriately increased. The increase can be determined based on the absolute value of the difference between the dynamic contact angle and the contact angle reference value. At the same time, the pixel resistance modulus is reduced. The reduction is also determined based on the absolute value of the difference between the dynamic contact angle and the contact angle reference value. For example, the correction coefficients for both can be equal to 1 + (60° - dynamic contact angle) / 60° × 0.5. When the ink dynamic contact angle is greater than or equal to the contact angle reference value, the ink is prone to shrinking into droplets and is difficult to spread and penetrate. Therefore, the pixel gravitational modulus is reduced and the pixel resistance modulus is increased. Next, the penetration energy diffusion coefficient of the penetration vector distribution map is determined by combining real-time environmental parameters and the dynamic contact angle of the ink. The penetration energy diffusion coefficient is a core parameter describing the energy transfer efficiency during ink penetration; the larger the value, the faster the energy transfer during ink penetration and the wider the diffusion range. First, the basic diffusion coefficient is set according to the type of ink used in printing (UV ink or solvent ink). The basic diffusion coefficient for UV ink can be set to 0.8 × 10⁻⁶. -6 ~1.2×10 -6 m 2 / s, suitable for high-speed printing scenarios, the basic diffusion coefficient of solvent ink can be set to 1.0×10 -6 ~1.5×10 -6 m 2Solvent-based inks naturally have stronger penetration capabilities. Next, the basic diffusion coefficient is corrected based on the ink's dynamic contact angle. Using a 60° dynamic contact angle as a benchmark, if the dynamic contact angle is lower than this benchmark, the basic diffusion coefficient needs to be increased by a certain margin. The specific increase is determined by the difference between the dynamic contact angle and the benchmark. For example, if the dynamic contact angle decreases by 10° from the benchmark, the basic diffusion coefficient needs to increase by 8% to 12%, taking a middle value. This is because a smaller dynamic contact angle makes wetting and spreading easier, resulting in higher energy transfer efficiency. Conversely, if the dynamic contact angle is higher than the benchmark, the basic diffusion coefficient needs to be decreased by a certain margin. This is because a larger dynamic contact angle increases penetration resistance, hindering energy transfer, and therefore resulting in a smaller penetration energy diffusion coefficient. For example, if the dynamic contact angle increases by 10° from the benchmark, the basic diffusion coefficient needs to decrease by 5% to 10%, taking a middle value.
[0150] Next, the corrected baseline diffusion coefficient is further corrected based on real-time temperature and humidity. Real-time temperature affects the penetration energy diffusion efficiency by influencing ink viscosity. For example, using 25°C as the baseline temperature, for every 5°C increase in temperature, ink viscosity decreases and the diffusion coefficient increases by 6%–8%; for every 5°C decrease in temperature, ink viscosity increases and the diffusion coefficient decreases by 4%–6%. Real-time humidity has a significant impact on different types of inks. For example, for UV inks, for every 10% RH increase in humidity, surface osmotic pressure increases and the diffusion coefficient increases by 3%–5%; for solvent inks, for every 10% RH increase in humidity, the evaporation rate decreases, ink residence time increases, and the diffusion coefficient increases by 5%–7%. The corrected baseline diffusion coefficient is then further corrected according to the above rules to obtain the penetration energy diffusion coefficient.
[0151] Next, the permeation vector field of the permeation vector distribution map is updated by combining the corrected permeation parameters and the permeation energy diffusion coefficient, resulting in a coupled permeation distribution map. Specifically, the permeation vector direction represents the fiber orientation of the polarization pixel and is unaffected by the permeation energy diffusion coefficient and the corrected permeation parameters, therefore remaining unchanged. The permeation vector modulus is a core indicator reflecting the strength of permeation capability and is affected by the permeation energy diffusion coefficient and the corrected permeation parameters. First, the corrected permeation parameters are used to calculate the corrected vector modulus using the same method and steps as when calculating the permeation vector modulus. Then, the permeation energy diffusion coefficient is divided by the basic diffusion coefficient to obtain the diffusion correction coefficient. The product between the diffusion correction coefficient and the corrected vector modulus is calculated to scale the corrected vector modulus, resulting in the initial coupled permeation distribution map. Next, the initial coupled permeation distribution map is smoothed using mean filtering or median filtering, resulting in the final coupled permeation distribution map.
[0152] The above steps provide accurate data input for subsequent ink droplet penetration evolution analysis, enabling the ink free energy model to accurately capture the differences in ink droplet morphology between the easily overflowing ink zone and the stable printing zone, avoiding homogenization of simulation results, and ensuring that the subsequent simulation of the ideal inkjet pattern conforms to actual thermodynamic laws, making the simulation results of the ink droplet steady-state morphology more accurate.
[0153] In one embodiment, constructing a mesh simulation domain based on the inkjet printing area parameters and constructing an ink free energy model of the mesh simulation domain based on the coupled penetration distribution map includes the following steps:
[0154] Using the area to be printed as a reference, an initial mesh simulation domain is constructed based on the parameters of the printing area;
[0155] The coupled penetration distribution map and ink performance parameters are loaded as ink droplet evolution constraints into the initial mesh simulation domain to obtain the mesh simulation domain;
[0156] Set the bottom layer of the mesh simulation domain as a fixed penetration boundary, and set the top layer and sides of the mesh simulation domain as open penetration boundaries;
[0157] To complete the initial phase field variable assignment for the grid simulation domain with defined boundaries, the ink volume phase energy function of the grid simulation domain is constructed by combining the initial phase field variable assignment results with the inkjet printing process parameters and using the double potential well function.
[0158] The interface gradient energy function of the mesh simulation domain is constructed by combining the ink tension parameters and the initial phase field variable assignment results;
[0159] The permeation vector modulus in the coupled permeation distribution map is linearly mapped to the energy barrier coefficient;
[0160] An ink free energy model for the mesh simulation domain was constructed by combining the energy barrier coefficient, the ink bulk phase energy function, and the interface gradient energy function.
[0161] In this embodiment, the area to be printed is used as a reference, and data such as the area size, microscale, and substrate of the area are obtained according to the printing area parameters. Then, the grid spatial resolution is determined based on the microscale of the area to be printed, i.e., the fiber diameter; for example, the side length of the grid cell is set to 0.5 μm to balance accuracy and computational efficiency. Next, the three-dimensional coordinates (x, y, z) of the grid cell are mapped one-to-one with the actual physical coordinates of the area to be printed, ensuring that the (0, 0, 0) point of the grid corresponds to the starting physical position of the area to be printed, such as the upper left corner vertex of the area. The x and y axes of the grid cell are parallel to the surface of the area to be printed, and the z axis is perpendicular to the surface of the area to be printed, pointing towards the interior of the substrate. Next, the coating thickness and regional substrate are imported. Based on the substrate type in the inkjet printing region parameters, the bottom layer of the mesh, i.e. the mesh layer close to the interior of the substrate in the z-axis direction, is assigned the corresponding substrate characteristic identifier, such as the macroscopic trend of fiber arrangement. Then, combined with the coating thickness distribution data, the shallow layer of the mesh cell in the z-axis, such as 0-50μm, corresponding to the coating thickness, is marked as the coating region, thus obtaining the initial mesh simulation domain, which lays the spatial foundation for the subsequent loading of boundary conditions and constraint parameters.
[0162] Next, the coupled penetration distribution map is mapped to the initial mesh simulation domain. Following the physical coordinate alignment principle, the penetration vector direction and penetration vector modulus of each polarized pixel in the coupled penetration distribution map are assigned to the corresponding mesh element in the initial mesh simulation domain. Then, the ink tension parameter, ink viscosity parameter, and ink chemical potential from the ink performance parameters are used as global constraint parameters and assigned to all mesh elements. This is because the same batch of inkjet printers uses the same ink, thus ensuring consistent global constraint parameters. Through these steps, the mesh simulation domain is obtained.
[0163] Next, the bottom layer of the mesh simulation domain, corresponding to the maximum z-axis coordinate and also the deepest layer closest to the interior of the packaging semi-finished substrate, is set as a fixed penetration boundary. This represents the core region inside the substrate, where ink cannot penetrate further. Therefore, the boundary condition is a fixed 0 for the phase field variable φ. φ=0 represents the air / substrate phase, where no ink exists, limiting the unrestricted penetration of ink into the substrate, consistent with the actual penetration limit of paper substrates. The top layer of the mesh simulation domain, corresponding to the minimum z-axis coordinate and also the surface layer closest to the air, is set as an open penetration boundary. This represents the mesh layer in direct contact with the air, allowing the ink to exchange energy and interact with the air through processes such as evaporation and surface tension. Therefore, the boundary condition is a free evolution of the phase field variable φ, without a fixed value constraint, allowing it to adjust between 0 and 1 with energy changes, simulating the spreading and contraction of ink droplets at the air-substrate interface. The four sides of the mesh simulation domain, namely the mesh layers corresponding to the maximum / minimum x-axis and the maximum / minimum y-axis coordinates, which also refer to the edges of the area to be printed, are set as open penetration boundaries. This means that the ink at the edge of the area to be printed can interact with the surrounding air without any additional physical obstruction. Therefore, the boundary conditions are also free evolution of the phase field variable φ, ensuring that the evolution of the ink droplets at the edge of the printing area is consistent with reality. For example, the ink at the edge may shrink due to surface tension or slightly diffuse outward.
[0164] Next, initial phase field variables are assigned to the mesh simulation domain to complete the boundary setting. Combining the initial phase field variable assignment results with the inkjet printing process parameters, and utilizing a double potential well function, the ink volume phase energy function of the mesh simulation domain is constructed. The initial phase field variable assignment simulates the initial state before the ink droplet impacts the substrate. The ink volume phase energy function is the core describing the internal energy state of the ink, driving the ink droplet to converge towards either a pure ink phase or a pure air / substrate phase. Specifically, the initial phase field variable assignment has the same meaning as the aforementioned phase field variable φ: φ=1 represents the ink phase (ink is present), φ=0 represents the air / substrate phase (no ink), and 0<φ<1 represents the transition interface between ink and air / substrate. Based on the droplet volume and impact position in the inkjet printing process parameters, an initial droplet shape is constructed in the corresponding space of the mesh simulation domain, near the center point of the inkjet printing. The initial droplet shape is assumed to be spherical, with the radius derived from the droplet volume; for example, a 30pl droplet corresponds to a radius of approximately 20μm. Next, the initial phase field variables φ=0.9-1.0 are assigned to the grid cells within the spherical range, where φ=1.0 in the core region and φ=0.9 in the edge transition region. The grid cells outside the spherical range are assigned φ=0.0-0.1, where φ=0.1 in the substrate surface and φ=0.0 in the air region, to simulate the instantaneous state of the ink droplet about to hit the substrate.
[0165] Next, a double-well function is used to construct the ink bulk energy function in the mesh simulation domain. The double-well function is characterized by the lowest energy (i.e., the bulk energy density of the ink) at φ=0 and φ=1, representing a stable state, and the highest energy at φ=0.5, representing an unstable state. This drives the phase field variables towards a pure phase, preventing the ink from remaining mixed with air for extended periods. The ink bulk energy function is as follows: ,in For the initial phase field variables, The chemical potential of the ink can be extracted from the technical documentation provided by the ink supplier. For each grid cell, substitute its initial phase field variables. and ink chemical potential The bulk energy density of the mesh element was calculated. This ultimately forms a volumetric energy distribution covering the entire mesh simulation domain, reflecting the internal energy differences of ink at different locations.
[0166] The interfacial gradient energy function describes the energy state of the ink-air / substrate interface. Its core function is to control the interface width and tension, preventing infinite diffusion or excessive contraction of ink droplets at the edges. It is directly related to the ink surface tension. The higher the ink tension parameter, the stronger the ink surface contraction tendency, the higher the interfacial gradient energy, and the narrower the interface width. Therefore, the interfacial gradient energy function needs to incorporate an interface width parameter related to ink tension. Since the interface width parameter is positively correlated with the ink tension parameter, the interfacial gradient energy function is: ,in, This represents the interface width parameter, which can be determined based on the ink tension parameter and the dynamic contact angle. The smaller the dynamic contact angle and the smaller the ink tension parameter, the better the wettability of the substrate, and the larger the interface width parameter. It is the spatial gradient of the phase field variables of a grid cell. It can be obtained by taking the difference between the initial phase field variable values of this cell and the six adjacent grid cells, calculating the partial derivatives of the initial phase field variable value difference in the x, y, and z directions of the grid cell, and then synthesizing them into the spatial gradient magnitude. .
[0167] The penetration vector modulus reflects the substrate's ability to penetrate ink; the larger the penetration vector modulus, the easier the penetration. First, the penetration vector modulus of all polarized pixels in the coupled penetration distribution map is extracted. Then, the extracted penetration vector modulus is normalized to ensure all modulus values are on a uniform scale. Next, the normalized penetration vector modulus is linearly mapped to the energy barrier coefficient according to a pre-defined linear mapping rule: α = 1 - r. M is the calculated α as the energy barrier coefficient, r is the mapping coefficient with a value of 0.8-1.0 (default 0.9), ensuring that the range of α after mapping is 0.1-1.0, and M is the normalized permeation vector modulus. The energy barrier coefficient reflects the strength of the energy resistance of the substrate permeation constraint on the ink per unit volume. Therefore, the stronger the permeation ability, the smaller the energy barrier coefficient, and the easier it is for the ink to diffuse in that area; the weaker the permeation ability, the larger the energy barrier coefficient, and the more difficult it is for the ink to diffuse.
[0168] Next, by combining the energy barrier coefficient, the ink bulk energy function, and the interface gradient energy function, an ink free energy model is constructed in the mesh simulation domain. The ink free energy model is as follows:
[0169]
[0170] in, This refers to the total free energy of the entire mesh simulation domain. For the spatial integration region of the mesh simulation domain, This represents the volume of a spatial volume element, corresponding to the volume of a mesh cell. , refers to the energy barrier energy function. This represents the energy barrier coefficient. Total free energy. The changing trend determines the evolution direction of the ink droplet. The bulk energy term drives the ink to converge toward the pure phase, the interface gradient energy term controls the edge width of the ink droplet, and the energy barrier term restricts the diffusion of the ink in the low-permeability region. The three work together to accurately simulate the penetration, spreading and shaping process of the ink droplet under the combined effects of ink characteristics, substrate constraints and environmental conditions.
[0171] In one embodiment, simulating the ideal inkjet pattern of the area to be inkjet-printed using an ink droplet penetration model includes the following steps:
[0172] The ink droplet volume and velocity are determined by combining the inkjet printing process parameters and ink performance parameters, and the initial momentum of the inkjet printing is calculated by combining the ink droplet volume and ink droplet velocity.
[0173] The initial momentum of the inkjet printing was used as the initial dynamic value for the ink droplet penetration model;
[0174] Using the mesh simulation domain as the evolution space carrier, the initial dynamic values are loaded into the ink droplet penetration model for spatiotemporal evolution iteration until the free energy change rate and ink droplet displacement vector calculated based on the output results of the ink droplet penetration model are both less than the corresponding preset thresholds. The spatiotemporal evolution iteration stops, and the inkjet printing feature data field of the mesh simulation domain is output. The inkjet printing feature data field includes the phase field variable distribution field and the ink droplet steady-state distribution field.
[0175] The phase field variable distribution field is traversed using the moving cube algorithm. The phase field variable distribution field is fitted into a continuous closed surface, and the continuous closed surface is mapped onto a two-dimensional plane to obtain the initial inkjet printing profile.
[0176] Subpixel-level contour optimization is performed on the initial inkjet outline to obtain the ideal inkjet outline.
[0177] Boundary steady-state gradient verification of ideal inkjet printing profile is performed using the steady-state distribution field of ink droplets.
[0178] If the boundary steady-state gradient verification of the ideal inkjet outline passes, the feature extraction algorithm is used to extract the full-dimensional inkjet features of all symbols within the ideal inkjet outline. The full-dimensional inkjet features include geometric morphological features, edge micro features, and vertical penetration features.
[0179] By arranging and combining the full-dimensional inkjet printing features of all code elements according to the QR code encoding rules, an ideal inkjet printing pattern map is obtained.
[0180] In this embodiment, the coding process parameters include coding equipment parameters, such as printhead model, nozzle orifice diameter, injection pressure, drive voltage, and printhead operating frequency. The calculation of the ink droplet volume is based on the nozzle orifice diameter and incorporates the ink tension parameter. Ideally, the droplet volume is proportional to the cube of the nozzle orifice diameter; that is, the larger the orifice diameter, the larger the droplet volume. For example, a nozzle with an aperture of 30 micrometers will have a basic ink droplet volume of approximately 30 picoliters (pl) under standard surface tension (0.03-0.05 N / m). However, in actual production, deviation corrections are required based on the ink tension parameters. When the ink tension parameter is higher than the standard surface tension, the ink droplet will be slightly smaller than the basic volume due to the shrinkage effect. When the ink tension parameter is lower than the standard surface tension, the ink droplet will be slightly larger than the basic volume due to the expansion effect. The correction coefficient is usually between 0.8 and 1.2. In addition, a laser particle size analyzer can be used to sample and test the actual ejected ink droplets, continuously collecting volume data from more than 100 ink droplets. After removing outliers, the average value is taken as the final determined ink droplet volume.
[0181] The droplet velocity of inkjet printing is determined by both the jetting pressure and the driving voltage, and is also affected by the ink viscosity. The core logic is: jetting pressure provides the propulsive force for the droplets, the driving voltage accelerates the droplets from the nozzle through the deformation of the piezoelectric crystal, and the ink viscosity provides a damping effect, slowing down the droplet velocity. Generally, droplet velocity is directly proportional to the square root of the jetting pressure, linearly positively correlated with the driving voltage, and negatively correlated with the ink viscosity. For example, with a jetting pressure of 0.5 MPa, a driving voltage of 20 V, and an ink viscosity of 20 mPa... Under the condition of s, the vertical jet velocity of ink droplets is approximately 5 m / s. If the production line has a lateral synchronous movement speed, such as 3 m / s, the actual impact velocity needs to be calculated through vector synthesis. That is, combining the resultant force of the vertical and lateral velocities, the instantaneous velocity of the ink droplet impacting the surface of the area to be printed is finally obtained, which is generally 4-8 m / s. Alternatively, a dual-pulse laser velocimeter can be used for actual verification, taking more than 50 consecutive measurements and using the average value as the final ink droplet velocity. After calculating the ink droplet volume and velocity, the initial momentum is calculated using the classical momentum formula, i.e., momentum equals the product of mass and velocity. The ink droplet mass can be calculated using the density formula based on the ink droplet volume and ink density. The initial momentum directly reflects the kinetic energy of the ink droplet when it impacts the surface of the area to be printed, and is the core driving force for subsequent ink droplet penetration and diffusion.
[0182] The calculated initial momentum of the inkjet printing is transformed into the initial dynamic conditions of the ink droplet penetration model. The core is to allocate the kinetic energy corresponding to the momentum to the initial state of the model. First, at the corresponding coordinates in the mesh simulation domain, i.e., the physical location of the area to be printed, the initial shape of the ink droplet is set as spherical. The radius of this sphere is derived from the volume of the ink droplet, and the spherical ink droplet is given a motion state corresponding to the initial momentum, i.e., an instantaneous velocity along the spray direction, i.e., perpendicular to the surface of the printed area. At the same time, the initial momentum of the inkjet printing is transformed into the initial energy term in the model and integrated into the ink volume phase energy function of the ink free energy model, serving as the initial driving force for ink droplet diffusion and penetration.
[0183] Next, using the mesh simulation domain as the evolution space carrier, the initial dynamic values are loaded into the ink volume phase energy function in the ink free energy model for spatiotemporal evolution iteration. This involves sequentially completing four core steps within microsecond time steps: phase field variable gradient calculation, chemical potential solution, Cahn-Hilliard equation solution, and phase field variable update. Specifically, the phase field variable gradient calculation employs a second-order central difference scheme to calculate the partial derivatives of the initial phase field variables in the x, y, and z directions for each grid cell within the mesh simulation domain, obtaining gradient components in three different directions. These calculated gradient components are then synthesized into a spatial gradient, which accurately captures subtle changes at the ink droplet edges, avoiding interface expansion or contraction distortion caused by gradient calculation errors. Finally, the coupled penetration tensor of the coupled penetration distribution map is extracted. The coupled penetration tensor can be calculated by correcting penetration parameters, and its calculation method and structure are consistent with those of the global second-order penetration tensor. By combining the coupling penetration tensor of each grid cell with the gradient components in different directions of the spatial gradient, directional weighting is applied. This means amplifying the gradient components along the fiber orientation, i.e., in directions with high coupling penetration tensor moduli, thus strengthening the capillary pull on ink droplet diffusion. Conversely, reducing the gradient components in directions with low coupling penetration tensor moduli reflects the inhibitory effect of coating resistance on diffusion. For example, for grid cells with the fiber orientation along the x-axis, the gradient components in the x-direction are multiplied by a correction factor of 1.2 to 1.5, while those in the y-direction are multiplied by a correction factor of 0.6 to 0.8 to obtain the phase field variable gradient.
[0184] Next, the chemical potential is solved based on the ink free energy model. This chemical potential solution is based on the constructed ink free energy model. By decomposing the effects of the three types of energy in the model, the comprehensive driving force for the change of phase field variables in each grid cell is calculated. The core is to transform the energy distribution into the specific direction of ink droplet evolution, such as expansion or contraction. First, the ink bulk phase energy function is calculated. Through its double-potential-well characteristic, the ink bulk phase energy function drives the phase field variables to converge towards a pure ink phase or a pure air / substrate phase. Specifically, for any grid cell, the initial phase field variables are input into the ink free energy model. After solving the energy barrier function, ink bulk phase energy function, and interface gradient energy function, the partial derivatives of these three functions are calculated. The partial derivative of the ink bulk phase energy function is the core driving force for the ink to converge towards a pure phase. This partial derivative eliminates the mixed state, ensuring that the ink either exists completely or not at all, avoiding the ink being in a long-term ambiguous mixed state, which aligns with the physical law that ink droplets have clear boundaries after solidification in actual inkjet printing. The partial derivative of the interface gradient energy function calculates the constraint dynamics that control the interface width, suppressing the infinite diffusion of ink droplets and maintaining interface stability. The partial derivative of the energy barrier function calculates the resistance of the substrate to ink penetration, adjusting its expansion / contraction trend. The chemical potential is the superposition of the three partial derivatives, essentially a comprehensive balance of convergence dynamics, constraint dynamics, and resistance dynamics, ultimately determining the ink evolution direction of each grid cell.
[0185] The phase field variables of each grid cell are updated by combining chemical potential and phase field variable gradients. For the ink droplet core region, i.e., the region with φ of 0.9-1.0, if the chemical potential is positive, its φ value is slightly increased by 0.001~0.005, for example, from 0.95 to 0.953. This is to enhance the stability of the ink phase. If the chemical potential is negative, it means that the ink core is already in a thermodynamically stable state. Contraction would lead to an increase in energy, which does not conform to the laws of physics, so its phase field variables are not adjusted. For the ink droplet edge region, i.e., the region with 0.1<φ<0.9, this region is the interface between ink and air / substrate. The phase field variable gradient is large, and it is the region with the most intense evolution, directly determining the final outline of the ink droplet, such as edge jaggedness and diffusion range. If the chemical potential is positive and the phase field variable gradient is greater than the preset gradient threshold (e.g., 0.5), the phase field variable needs to be increased by 0.005~0.01, which can be determined based on the substrate of the area to be printed. For example, for white cardboard, the ink spreads faster, so the upper limit of 0.01 is used; for gold and silver cardboard, the ink spreads slowly, so the lower limit of 0.005 is used. If the chemical potential is negative and the phase field variable gradient is greater than the preset gradient threshold, the phase field variable needs to be decreased by 0.005~0.01. This is to simulate the edge contraction caused by the surface tension of the ink. When the chemical potential is 0 and the phase field variable gradient equals the gradient threshold, it means that the interface between the ink and the air / substrate has reached local stability and no longer expands or contracts, so there is no need to adjust the phase field variable. For the internal area of the substrate, i.e., the area with no ink or a trace amount of ink (φ = 0~0.1), the ink can only penetrate into the fiber pores through capillary action. If the chemical potential is positive, the phase field variable is slightly increased by 0.001~0.005 to simulate the slow penetration of ink into the fiber pores. If the chemical potential is negative, it indicates that the ink has no driving force for penetration, so the phase field variable remains unchanged to prevent ink from appearing out of thin air without physical basis, which conforms to the substrate's constraint on ink penetration. Furthermore, the adjustment range of the phase field variable is ultimately determined based on the core logic of the simplified Cahn-Hilliard equation, combined with the engineering requirements such as the physical rationality of cigarette packaging printing in the cigarette box production scenario, computational efficiency, and substrate characteristics. This ensures that it conforms to the thermodynamic logic of the equation and is suitable for actual production scenarios. The formula for adjusting the phase field variable based on the simplified Cahn-Hilliard equation is as follows:
[0186]
[0187] in, Phase field variables The rate of change over time, i.e., the speed of evolution of the ink droplet morphology. It refers to the coupling penetration tensor, which controls the diffusion direction and adapts to the fiber orientation of the area to be printed. Chemical potential After gradient operator The calculated spatial gradient, outside the parentheses This refers to the vector flux of directional diffusion. Transform the divergence operator into a scalar rate of change to ensure the results. It is a scalar that describes how quickly φ changes over time.
[0188] The algorithm iterates through all grid cells within the simulation domain, calculates the total free energy of the simulation domain at the current moment using the ink free energy model formula, extracts the total free energy from the previous iteration, and calculates the difference between the two to obtain the free energy change rate. Next, it calculates the displacement of each grid cell in the selected droplet interface region (i.e., the isosurface corresponding to φ=0.5) as the monitoring object, calculates the positional changes in the x, y, and z directions of each grid cell in this region during the current iteration, and synthesizes them into a displacement vector. The average modulus of all grid cell displacement vectors in this region is taken as the droplet displacement vector. If the free energy change rate is less than a preset change rate threshold, such as 1e-6 (this threshold is determined with reference to the thermodynamic steady-state requirements of the cigarette packaging coding scenario), and the droplet displacement vector is also less than the corresponding vector threshold (which can be set to 0.01μm, depending on the side length of the grid cell; it needs to be much smaller than the side length of the grid cell), or the preset maximum number of spatiotemporal evolution iterations is reached, the spatiotemporal evolution iteration is stopped. Finally, the final phase field variables of all grid cells in the final round of the simulation domain are organized into a phase field variable distribution field according to physical coordinates. Based on the phase field variable distribution field, three types of core data are extracted to construct the ink droplet steady-state distribution field. These three types of core data include spatial abundance data, interfacial gradient modulus data, and vertical penetration depth data. Spatial abundance data can be obtained by statistically analyzing the ink concentration corresponding to the φ value of each grid cell; a higher φ value indicates a higher ink concentration, forming a spatial abundance matrix to reflect the degree of ink aggregation at different locations. Interfacial gradient modulus data can be obtained by calculating the interfacial gradient modulus of each grid cell within the ink droplet interface region, i.e., the φ=0.5 isosurface. The interfacial gradient modulus is positively correlated with the degree of change in interfacial energy, and its calculation method is consistent with that of the phase field variable gradient. The interfacial gradient modulus is used for subsequent prediction of edge jaggedness. The core of the vertical penetration depth data is to statistically analyze the maximum ink penetration depth at each surface position (x, y) along the thickness direction of the grid simulation domain, i.e., the z-axis, forming a two-dimensional matrix, which is then used as the vertical penetration depth data. These three types of core data are then correlated according to spatial coordinates and encapsulated into the ink droplet steady-state distribution field.
[0189] Next, a moving cubes algorithm is used to traverse the phase field variable distribution field. Its core logic is to find isosurfaces where the phase field variable value equals 0.5. These isosurfaces represent the interface between ink and air / substrate, and are the physical boundary of the ink droplet's steady-state morphology. During the traversal, the phase field variable value of each grid cell and its adjacent cells is checked one by one to determine whether the 0.5 isosurface passes through the grid. Then, linear interpolation is used to calculate the specific position of the isosurface within the grid. Connecting all isosurfaces within all grid cells forms a continuous, closed three-dimensional surface, which is the three-dimensional contour of the ink droplet's steady-state morphology. This three-dimensional closed surface can then be mapped onto a two-dimensional plane, parallel to the area to be printed, using orthogonal projection. The geometric features of the surface, such as the major and minor axis ratios and edge contour trends, are preserved during the projection process, ultimately yielding the initial printing contour. This initial printing contour visually reflects the two-dimensional shape of the printing on the surface of the area to be printed.
[0190] Because the initial inkjet printing outline has a certain degree of discreteness and jaggedness, sub-pixel-level optimization is required to improve accuracy. First, a cubic convolution interpolation algorithm is used to reconstruct the coordinate data of the initial inkjet printing outline, expanding the discrete pixels on the outline into continuous sub-pixel-level coordinates, filling the pixel gaps. Then, local curvature analysis is used to correct irregular parts of the outline. This involves calculating the local curvature of each point on the initial inkjet printing outline. When the curvature fluctuation exceeds a preset threshold (which can be 0.05), jaggedness or burrs are identified. A smoothing filtering algorithm, such as Gaussian filtering with a 3×3 kernel size, is then used to correct this area, making the outline transition more natural and obtaining the ideal inkjet printing outline.
[0191] Next, the interface gradient modulus data in the steady-state distribution field of ink droplets are used to verify the boundary steady-state gradient of the ideal inkjet printing profile. The interface gradient modulus reflects the degree of energy change at the ink droplet edge; the larger the gradient, the more significant the energy difference between the ink droplet edge and the surrounding environment, and the clearer and more stable the profile boundary. During the verification process, the corresponding interface gradient modulus values in the steady-state distribution field of ink droplets are extracted point by point along the boundary line of the ideal inkjet printing profile, and the average value and standard deviation of the gradient modulus are calculated. If the average value of the gradient modulus is higher than a preset threshold, typically 0.5 mJ / m², and the standard deviation is less than 10% of the average value, it indicates that the energy distribution of the ideal profile boundary is uniform and stable, with no significant fluctuations or unstable regions, and the boundary steady-state gradient verification of the ideal inkjet printing profile is deemed successful. Conversely, if the values are not met, the boundary steady-state gradient verification of the ideal inkjet printing profile is deemed unsuccessful, and sub-pixel-level profile optimization needs to be continued until the verification is successful.
[0192] When the boundary steady-state gradient verification of the ideal inkjet printing profile passes, an affine transformation is used—that is, translation, rotation, and scaling—to align the coordinate system of the ideal inkjet printing profile with the physical coordinate system of the area to be printed, ensuring that the position and size of the profile perfectly match the area to be printed. Simultaneously, if there are creases in the area to be printed, the ideal inkjet printing profile is slightly stretched along the crease direction to simulate the linear ink absorption effect along the crease. If the area to be printed is covered by a printed layer, the diffusion radius of the ideal inkjet printing profile is reduced according to the pore filling rate of the printed layer to adapt to the low ink absorption characteristics of the printed layer.
[0193] After completing the above steps, the full-dimensional inkjet printing features of all symbols within the ideal inkjet printing outline are extracted. These full-dimensional features include geometric morphology features, edge micro-features, and vertical penetration features. Specifically, geometric morphology features can be obtained by calculating the geometric parameters of the inkjet printing outline, including the symbol's major-to-minor axis ratio (the ratio of the major axis length to the minor axis length), which reflects the degree of stretching along the fiber direction; the centroid position (the deviation of the symbol's geometric center from the printing center), which reflects the displacement caused by fiber tension; the effective diffusion area (the physical area corresponding to the total number of pixels enclosed by the symbol outline), which reflects the ink diffusion range; and the perimeter-to-area ratio, based on the ratio of the perimeter to the area of the ideal inkjet printing outline, which reflects the compactness of the ideal inkjet printing outline.
[0194] The microscopic features of the edges are obtained based on the edge gradient data of the ink droplet steady-state distribution field and the local curvature analysis of the contour. These features include the edge fractal dimension, transition band width, and local curvature spectrum. The edge fractal dimension quantifies the jaggedness of the edge, reflecting the microscopic effect of fiber capillary adsorption. The transition band width refers to the spatial distance between grid cells corresponding to a phase field variable of 0.9 and those corresponding to a phase field variable of 0.1, reflecting the degree of edge blurring caused by ink penetration. The local curvature spectrum refers to the curvature distribution along the contour boundary, recording the frequency and amplitude of curvature fluctuations, reflecting the microscopic undulations of the edge. These features accurately capture the microscopic physical properties of the inkjet printing edges, providing detailed information for subsequent quality assessment.
[0195] Vertical penetration characteristics can be extracted from the vertical penetration density data of the ink droplet steady-state distribution field. These characteristics include vertical penetration depth, penetration depth uniformity, and theoretical minimum reflectivity. Vertical penetration depth refers to the maximum depth to which the ink penetrates the substrate of the area to be printed, reflecting the intensity of the interaction between the ink and the substrate. Penetration depth uniformity is the ratio of the standard deviation to the average value of the penetration depth at different locations within the printing area, reflecting the consistency of penetration. The theoretical minimum reflectivity can be calculated by combining penetration depth and the ink absorption coefficient using the Lambert-Beer law, reflecting the upper limit of the optical contrast of the inkjet printing. These characteristics reflect the penetration state of the ink within the substrate and are key indicators for evaluating the optical recognition performance of inkjet printing.
[0196] Based on the QR code encoding logic, such as the arrangement rules of the QR code's position detection pattern, timing pattern, and data code elements, the spatial position of each code element in the map is determined. Positioning corner code elements are placed at the three corners of the map, timing patterns are evenly distributed along the two edges of the map, data code elements fill the remaining area in a matrix form, and quiet areas (blank areas) surround the perimeter of the map. Next, the geometric morphological features, edge micro-features, and vertical penetration features of each code element are mapped to their spatial positions, constructing a map structure containing multi-channel information. The geometric contour channel records the two-dimensional geometric boundary of each code element, the edge feature channel records the edge micro-parameters of each code element, and the vertical penetration channel records the penetration depth and reflectivity data of each code element. Finally, a global consistency check is performed on the map to ensure that the arrangement of code elements conforms to the encoding rules, and that the distribution of feature parameters is continuous and conflict-free, ultimately forming an ideal inkjet map containing full-dimensional physical features and adapted to the substrate of the area to be inkjet-printed.
[0197] In one embodiment, the process of performing full-dimensional morphological detection of the QR code polarization image based on an ideal inkjet pattern map, and generating a QR code detection report of the QR code polarization image based on the full-dimensional morphological detection results, includes the following steps:
[0198] The ink image of the QR code is extracted by performing spatial filtering of the polarization difference in the QR code polarization image.
[0199] The QR code ink image is physically aligned with the ideal inkjet pattern map, and the ink distribution residual map between the QR code ink image and the ideal inkjet pattern map is calculated based on the physical space alignment result.
[0200] Key reference symbols are extracted from the ideal inkjet pattern map that has completed physical spatial alignment, resulting in multiple ideal symbols and their corresponding symbol coordinates;
[0201] Multiple ink symbols within the QR code ink image are extracted based on the symbol coordinates;
[0202] All ideal symbols are matched with ink symbols to obtain multiple symbol feature pairs.
[0203] For any symbol feature pair, calculate the multidimensional feature residual between the ideal symbol and the ink symbol within the symbol feature pair;
[0204] A QR code detection report is generated by combining the ink distribution residual map and the multidimensional feature residual features to produce a QR code polarization image.
[0205] In this embodiment, the QR code polarization image is acquired by an array camera with an integrated polarization code disk. It includes S-channel and P-channel images. The P-channel image refers to the QR code image acquired when the analyzer direction is perpendicular to the light source polarization direction, and the S-channel image refers to the QR code image acquired when the analyzer direction is orthogonal to the light source polarization direction. During acquisition, the camera speed is synchronized with the conveying speed of the semi-finished packaging product to avoid signal distortion caused by motion blur. In the context of cigarette box production, the gold and silver metal layers, varnish coating, and laser film on the cigarette box surface are specular reflectors, completely maintaining the polarization state of the incident light. Therefore, the reflected light from the background is almost entirely concentrated in the P-channel, while the signal in the S-channel is extremely weak. In contrast, the surface of the inkjet printing is composed of rough pigment particles, which are diffuse reflectors, producing a strong depolarization effect. The reflected light is evenly distributed in both the P-channel and S-channel. Therefore, background signals such as background printing and laser textures in the QR code polarization image can be removed by performing a polarization difference spatial filtering operation. The core logic formula for the polarization difference spatial filtering operation is: ,in, This represents the grayscale value of a pixel in the P-channel image. This represents the grayscale value of a pixel in the S-channel image. For gain matching parameters, adjust the parameters. By balancing the weights of the two channels, the specular reflections (background printing, laser textures) in the P channel cancel out the corresponding components in the S channel, thus completely suppressing the background signal. This can be achieved by pre-collecting pure background sample areas and calculating the grayscale mean values of the P and S channels respectively. and Then Divide by Obtain the gain matching parameters After spatial filtering based on polarization difference, a preliminary polarized image of the QR code with background removal is obtained. Next, the degree of polarization (DoP) can be calculated to further purify the signal. This involves calculating the degree of polarization of each pixel in the preliminarily background-removed QR code polarized image, filtering ink areas based on the degree of polarization, classifying pixels with a polarization degree greater than a threshold as background pixels, and classifying pixels with a polarization degree less than or equal to the threshold as ink pixels, thus obtaining a background-free QR code ink image. The polarization degree threshold is determined based on the substrate of the area to be printed; for highly reflective substrates such as gold or silver cards, the threshold is 0.3, and for ordinary white cardboard, the threshold is 0.4.
[0206] Positioning features, such as the positioning angles and timing patterns of the QR code, are extracted from the ideal inkjet pattern map and used as alignment reference points. An affine transformation, including translation, rotation, and scaling, is performed on the QR code ink image to project it into the physical space of the ideal map, ensuring complete overlap of the positioning feature points. Subpixel-level resampling technology is employed during alignment to increase the image resolution to the micrometer level, ensuring extremely low geometric overlap between the two images. After physical alignment, the grayscale difference between the QR code ink image and the ideal inkjet pattern map is calculated pixel-by-pixel. If a pixel is an ink area in both the ideal inkjet pattern map and the QR code ink image, the ink distribution residual is 0. If it is an ink area in the ideal inkjet pattern map but a background area in the QR code ink image, or vice versa, the ink distribution residual is the absolute value of the grayscale values of both. If both are background areas, the ink distribution residual is also 0. By integrating the residual results of all pixels, a complete ink distribution residual map is generated. The larger the residual value, the more significant the difference between the actual ink distribution and the ideal shape, and the higher the probability of a suspected defect area.
[0207] Next, the code elements in key functional areas are identified as ideal code elements, including positioning corner code elements, timing pattern code elements, and quiet zone code elements. Since these code elements significantly impact recognition rates according to tobacco industry standards, they can be used as ideal code elements. Then, multiple code elements are randomly selected from the remaining areas of the ideal inkjet pattern map as ideal code elements, used as redundant error correction bits. Next, the coordinates of the four vertices of each ideal code element are extracted. These vertex coordinates are at sub-pixel precision, retaining three decimal places. Then, the center point of each ideal code element is calculated based on the four vertex coordinates as its code element coordinates. In addition, for the positioning corner code elements, the coordinates of its inner corner vertices and edge inflection points need to be additionally recorded as auxiliary code element coordinates. For the timing pattern code elements, the coordinates of its start and end endpoints are recorded as auxiliary code element coordinates, providing redundant features for subsequent matching verification.
[0208] Next, based on the physical spatial alignment results, symbol coordinates, and auxiliary symbol coordinates, ink symbols with the same spatial position as the ideal symbol are selected from the QR code ink image. Then, ink symbols with the same spatial position are paired with their corresponding ideal symbols to obtain symbol feature pairs. Using the same method as extracting full-dimensional inkjet printing features, the inkjet printing features of the ink symbols are extracted, which also include geometric morphology features, edge micro-features, and vertical penetration features. Next, the multi-dimensional feature residuals between the ideal symbol and the ink symbol within the symbol feature pair are calculated. These multi-dimensional feature residuals include geometric morphology residuals, edge micro-feature residuals, and vertical penetration residuals. Geometric morphology residuals include centroid offset residuals, aspect ratio residuals, and effective diffusion area residuals. Edge micro-feature residuals include edge fractal dimension residuals and transition band width residuals. Vertical penetration residuals include reflectivity residuals and penetration depth uniformity residuals. The penetration depth uniformity residual refers to the difference between the standard deviation of the penetration depth within the ink symbol and the standard deviation of the penetration depth of the ideal symbol. For low-tolerance code elements such as positioning angle and key data bits, the residuals must be less than or equal to preset thresholds, such as reflectivity residual ≤ 0.05 mm and centroid offset residual ≤ 0.003 mm. If any residual exceeds the threshold, the low-tolerance code element is determined to be a defective code element. For high-tolerance code elements such as quiet zone code elements and redundant error correction bit code elements, if multiple residuals exist, such as three residuals exceeding the threshold, it is determined to be a defective code element. The number and distribution of defective code elements are statistically analyzed, and the equivalent number of defects in the QR code ink image is calculated based on the number and distribution of defective code elements. , This is for the number of low-tolerance defective symbols. The weighting coefficient assigned to low-tolerance defect symbols can be set to 2. This represents the number of high-tolerance defective symbols. The weighting coefficient assigned to low-tolerance defect symbols can be set to 1. This is because low-tolerance symbols directly handle QR code positioning, calibration, and core information reading; even minor defects can lead to decoding failure. In contrast, high-tolerance symbols can be compensated for through error correction mechanisms, limiting their impact on overall recognition. The QR code quality level in the QR code ink image is determined based on the equivalent defect count. For example, if the equivalent defect count is 0, the QR code quality level is A, the best level. If the equivalent defect count is less than or equal to 2 and greater than 0, and there are no low-tolerance defect symbols, it is B, the second-best level. If the equivalent defect count is less than or equal to 5 and greater than 2, and the number of low-tolerance defect symbols is less than or equal to 1, it is C, the acceptable level. If the equivalent defect count is less than or equal to 8 and greater than 5, and the number of low-tolerance defect symbols is less than or equal to 2, it is D, the unacceptable level. If the equivalent defect count is greater than 8, it is F, the severe defect level. The QR code quality level, the number and distribution of defective code elements, the ink distribution residual map, and the multidimensional feature residual features of the QR code ink image are integrated into a QR code detection report.
[0209] This application also provides a machine-readable storage medium storing instructions for causing a machine to perform a QR code full-dimensional detection method for a packaging process according to any one of the above.
[0210] This application also provides a QR code full-dimensional detection system for packaging processing, including:
[0211] The memory is configured to store instructions; and
[0212] The processor is configured to retrieve instructions from memory and, when executing the instructions, to implement a QR code full-dimensional detection method for the packaging process according to any of the above.
[0213] The processor can be a central processing unit (CPU). Of course, depending on the actual use, it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc., and this application does not limit it.
[0214] The memory can be an internal storage unit of a computer device, such as a hard disk or RAM, or an external storage device, such as a plug-in hard disk, smart memory card (SMC), secure digital card (SD), or flash memory card (FC) provided on the computer device. Furthermore, the memory can be a combination of internal storage units and external storage devices of a computer device. The memory is used to store computer programs and other programs and data required by the computer device. The memory can also be used to temporarily store data that has been output or will be output. This application does not limit this.
[0215] This application also provides a machine-readable storage medium storing instructions that cause a machine to execute the above-described QR code full-dimensional detection method for packaging processing.
[0216] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0217] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0218] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0219] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0220] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0221] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0222] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0223] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Without further limitation, the phrase "comprising an element..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0224] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for full-dimensional detection of QR codes in the packaging process, characterized in that, The method includes the following steps: Before the coding stage, polarized multi-angle structured light and near-infrared auxiliary light are applied to the packaging semi-finished product; Collect multi-angle polarization images and inkjet printing related parameters of the area to be inkjet printed inside the packaged semi-finished product, and simultaneously extract multi-angle light intensity signals from the multi-angle polarization images. Among them, the inkjet printing related parameters include inkjet printing area parameters, inkjet printing process parameters, and real-time environmental parameters. By combining multi-angle polarization images and multi-angle light intensity signals, the capillary action distribution map of the area to be printed can be retrieved. Based on the capillary action distribution map, the capillary action vector field of all polarized pixels in the multi-angle polarization image is synthesized to obtain the penetration vector distribution map of the area to be inkjet printed; By combining inkjet printing parameters and penetration vector distribution maps, the ink droplet penetration evolution analysis of the area to be printed is completed, and an ink droplet penetration model is constructed based on the ink droplet penetration evolution analysis results. The ideal inkjet pattern of the area to be inkjet-printed was simulated using an ink droplet penetration model. After the inkjet printing stage, a polarized image of the QR code on the packaged semi-finished product is captured; Based on the ideal inkjet pattern map, the full-dimensional morphology detection of the QR code polarization image is completed, and a QR code detection report of the QR code polarization image is generated based on the full-dimensional morphology detection results.
2. The method according to claim 1, characterized in that, The process of combining multi-angle polarization images and multi-angle light intensity signals to retrieve the capillary distribution map of the area to be inkjet printed includes the following steps: Dark field correction and intensity normalization are performed on multi-angle light intensity signals to obtain a reference light intensity signal; The Stokes vector components of all polarized pixels in the multi-angle polarization image are calculated based on the reference light intensity signal. The degree of polarization and the angle of polarization of all polarized pixels are calculated based on the Stokes vector components. The image reflection data of the area to be printed is extracted from the multi-angle polarization image, and the coating density coefficient of the area to be printed is calculated based on the image reflection data. The pixel gravitational modulus and pixel drag modulus of all polarized pixels were calculated by combining the coating density coefficient and pixel polarization degree. The capillary intensity of all polarized pixels is calculated by combining the pixel gravitational modulus and pixel drag modulus. All pixel polarization angles are mapped to the area to be printed as pixel fiber directions; A capillary action distribution map of the area to be inkjet printed is constructed by combining the pixel fiber orientation and capillary action intensity of all polarized pixels.
3. The method according to claim 2, characterized in that, The process of synthesizing the capillary action vector field of all polarized pixels in the multi-angle polarization image based on the capillary action distribution map to obtain the penetration vector distribution map of the area to be inkjet printed includes the following steps: For any polarized pixel in the capillary action distribution map, a pixel coordinate system is established with the pixel fiber direction of the polarized pixel as the reference. The pixel penetration parameters in the pixel coordinate system are calculated based on the capillary intensity in the capillary distribution diagram. The pixel penetration parameters include the principal axis effective penetration and the cross axis effective penetration. A diagonal permeation tensor is constructed based on the pixel permeation parameters, and the diagonal permeation tensor is rotated and transformed into a global second-order permeation tensor according to the pixel fiber direction. The penetration vector direction and penetration vector modulus of the polarization pixel are calculated based on the global second-order penetration tensor. By combining the penetrating vector direction and penetrating vector modulus, the vector field space of all polarized pixels is synthesized to obtain the penetrating vector distribution map of the area to be inkjet printed.
4. The method according to claim 3, characterized in that, The process of combining inkjet printing parameters and penetration vector distribution maps to perform ink droplet penetration evolution analysis in the area to be printed, and constructing an ink droplet penetration model based on the ink droplet penetration evolution analysis results, includes the following steps: The dynamic contact angle of the ink in the area to be printed is calculated based on the inkjet printing parameters. The dynamic contact angle of the ink and the real-time environmental parameters are then combined to update the penetration vector field of the penetration vector distribution map, thus obtaining the coupled penetration distribution map. A mesh simulation domain was constructed based on the inkjet printing area parameters, and an ink free energy model for the mesh simulation domain was constructed based on the coupled penetration distribution map. Extract the coupling penetration tensor of all polarized pixels within the coupling penetration distribution map; Variational operations were performed on the ink free energy model, and the ink droplet penetration model in the mesh simulation domain was constructed by combining the variational operation results with all coupled penetration tensors.
5. The method according to claim 4, characterized in that, The process of calculating the dynamic ink contact angle of the area to be printed based on relevant inkjet printing parameters, and updating the penetration vector field of the penetration vector distribution map by combining the dynamic ink contact angle and real-time environmental parameters to obtain the coupled penetration distribution map includes the following steps: The ink performance parameters for the inkjet printing stage are determined based on the inkjet printing process parameters and real-time environmental parameters. These ink performance parameters include ink tension parameters, ink viscosity parameters, and ink evaporation parameters. Determine the coating free energy parameters of the area to be printed based on the inkjet area parameters and real-time environmental parameters; The dynamic wetting coefficient for the coding stage is determined based on the coding equipment parameters in the coding process parameters. The dynamic contact angle of the ink in the area to be printed is calculated by combining ink performance parameters, coating free energy parameters, and dynamic wetting coefficient. The corrected penetration parameters are obtained by correcting the pixel penetration parameters of all polarized pixels based on the dynamic contact angle of the ink. The penetration energy diffusion coefficient of the penetration vector distribution map is determined by combining real-time environmental parameters and the dynamic contact angle of the ink. By combining the corrected permeability parameters and the permeability energy diffusion coefficient, the permeability vector field of the permeability vector distribution map is updated, resulting in a coupled permeability distribution map.
6. The method according to claim 5, characterized in that, The process of constructing a mesh simulation domain based on the inkjet printing region parameters and then constructing an ink free energy model for the mesh simulation domain based on the coupled penetration distribution map includes the following steps: Using the area to be printed as a reference, an initial mesh simulation domain is constructed based on the parameters of the printing area; The coupled penetration distribution map and ink performance parameters are loaded as ink droplet evolution constraints into the initial mesh simulation domain to obtain the mesh simulation domain; Set the bottom layer of the mesh simulation domain as a fixed penetration boundary, and set the top layer and sides of the mesh simulation domain as open penetration boundaries; To complete the initial phase field variable assignment for the grid simulation domain with defined boundaries, the ink volume phase energy function of the grid simulation domain is constructed by combining the initial phase field variable assignment results with the inkjet printing process parameters and using the double potential well function. The interface gradient energy function of the mesh simulation domain is constructed by combining the ink tension parameters and the initial phase field variable assignment results; The permeation vector modulus in the coupled permeation distribution map is linearly mapped to the energy barrier coefficient; An ink free energy model for the mesh simulation domain was constructed by combining the energy barrier coefficient, the ink bulk phase energy function, and the interface gradient energy function.
7. The method according to claim 6, characterized in that, The process of simulating the ideal inkjet pattern of the area to be inkjet-printed using an ink droplet penetration model includes the following steps: The ink droplet volume and velocity are determined by combining the inkjet printing process parameters and ink performance parameters, and the initial momentum of the inkjet printing is calculated by combining the ink droplet volume and ink droplet velocity. The initial momentum of the inkjet printing was used as the initial dynamic value for the ink droplet penetration model; Using the mesh simulation domain as the evolution space carrier, the initial dynamic values are loaded into the ink droplet penetration model for spatiotemporal evolution iteration until the free energy change rate and ink droplet displacement vector calculated based on the output results of the ink droplet penetration model are both less than the corresponding preset thresholds. The spatiotemporal evolution iteration stops, and the inkjet printing feature data field of the mesh simulation domain is output. The inkjet printing feature data field includes the phase field variable distribution field and the ink droplet steady-state distribution field. The phase field variable distribution field is traversed using the moving cube algorithm. The phase field variable distribution field is fitted into a continuous closed surface, and the continuous closed surface is mapped onto a two-dimensional plane to obtain the initial inkjet printing profile. Subpixel-level contour optimization is performed on the initial inkjet outline to obtain the ideal inkjet outline. Boundary steady-state gradient verification of ideal inkjet printing profile is performed using the steady-state distribution field of ink droplets. If the boundary steady-state gradient verification of the ideal inkjet outline passes, the feature extraction algorithm is used to extract the full-dimensional inkjet features of all symbols within the ideal inkjet outline. The full-dimensional inkjet features include geometric morphological features, edge micro features, and vertical penetration features. By arranging and combining the full-dimensional inkjet printing features of all code elements according to the QR code encoding rules, an ideal inkjet printing pattern map is obtained.
8. The method according to claim 1, characterized in that, The process of performing full-dimensional morphological detection of the QR code polarization image based on the ideal inkjet pattern spectrum, and generating a QR code detection report based on the full-dimensional morphological detection results, includes the following steps: The ink image of the QR code is extracted by performing spatial filtering of the polarization difference in the QR code polarization image. The QR code ink image is physically aligned with the ideal inkjet pattern map, and the ink distribution residual map between the QR code ink image and the ideal inkjet pattern map is calculated based on the physical space alignment result. Key reference symbols are extracted from the ideal inkjet pattern map that has completed physical spatial alignment, resulting in multiple ideal symbols and their corresponding symbol coordinates; Multiple ink symbols within the QR code ink image are extracted based on the symbol coordinates; All ideal symbols are matched with ink symbols to obtain multiple symbol feature pairs. For any symbol feature pair, calculate the multidimensional feature residual between the ideal symbol and the ink symbol within the symbol feature pair; A QR code detection report is generated by combining the ink distribution residual map and the multidimensional feature residual features to produce a QR code polarization image.
9. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores instructions for causing the machine to perform a QR code full-dimensional detection method for packaging process according to any one of claims 1 to 8.
10. A QR code full-dimensional detection system for packaging processing, characterized in that, include: The memory is configured to store instructions; as well as The processor is configured to retrieve the instructions from the memory and, when executing the instructions, to implement the QR code full-dimensional detection method for packaging processing flow according to any one of claims 1 to 8.