A machine vision-based package printing nest position accuracy detection method

CN122966524APending Publication Date: 2026-10-23ZHEJIANG YIXING PACKAGING TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202610883705.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0005]本发明旨在解决印刷油墨边界与全息光学干涉伪影在单通道图像空间内难以解耦导致套位检测失效的问题

Benefits of technology

[0023]1、在包装印刷套位精度检测中,建立基于跨通道梯度散度张量的光致伪影剥离机制,通过对样张彩色图像中的红、绿、蓝3个离散色彩通道分别提取梯度矢量场,并计算不同通道梯度向量之间的空间内积以表征边缘分量的共线程度,利用物理油墨边界在多光谱维度下维持几何一致性而全息干涉条纹随波长产生空间相位错位的本征物理差异,从数学底层直接识别并强制置零不具备物理实体属性的干涉梯度响应,使视觉分析逻辑从受污染的灰度空间中抽离,从而实现印刷实体边缘与光学相干干扰点的维度级分离。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122966524A_ABST
    Figure CN122966524A_ABST
Patent Text Reader

Abstract

The application relates to the field of industrial visual detection, and discloses a packaging printing sleeve position precision detection method based on machine vision, which comprises the following steps: acquiring a color image of a printed part containing holographic features and extracting a multi-channel pixel matrix, calculating a luminance difference value to construct a gradient field vector matrix, using a divergence value generated by cross-channel gradient inner product to distinguish a physical ink boundary from a light-induced artifact, outputting a pure edge feature map, positioning a feature operator by establishing a multi-scale pyramid level index, solving a sub-pixel offset amount by using Taylor expansion, establishing a homography transformation model by using geometric topological constraints and analyzing offset parameters, and filtering out optical interference noise points by using a cross-channel physical consistency rule, optimizing calculation efficiency, and eliminating detection beacon interference generated by high-reflectivity materials on a high-speed production line.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of industrial vision inspection technology, and in particular relates to a method for detecting the registration accuracy of packaging printing based on machine vision. Background Technology

[0002] Currently, the accuracy of overprinting directly determines the visual quality of printed products and the effectiveness of anti-counterfeiting functions. The industry generally uses color industrial cameras to capture images of printed samples, and uses image processing algorithms to extract the translation and rotation deviations of marker points relative to the reference pose. Based on this deviation, the servo control system is driven to complete the phase compensation and lateral correction of the printing cylinder. In addition to the rigid constraints of mechanical components under dynamic working conditions, existing technologies also have shortcomings in the control algorithms for image representation and feature extraction. For example, Chinese invention patent CN120711636B discloses a high-precision positioning method for screen printing based on machine vision. It attempts to solve the problem of physical deformation compensation in the printing process by combining sub-pixel edge detection with a thermo-mechanical coupling mapping model. However, when facing printing materials with complex microscopic and optical textures, such as holographic anti-counterfeiting positioning paper or laser transfer paper, this technology reveals serious fundamental limitations.

[0003] For printing materials with complex microscopic optical textures, such as holographic anti-counterfeiting positioning paper or laser transfer paper, at high linear speeds above 300 m / min, interference fringes dynamically change with the observation angle due to the microscopic grating diffraction effect on the surface of the holographic material. These optical artifacts exhibit a high degree of similarity to the real physical printing edges in terms of grayscale characteristics, spatial frequency, and geometric shape on a single imaging plane. Traditional anisotropic diffusion filters or Gaussian smoothing operators are essentially statistical processing methods based on local spatial grayscale correlations. While suppressing high-frequency optical noise, they inevitably blur the real ink boundaries, leading to a decrease in the accuracy of physical boundary recognition. There are fundamental constraints that are difficult to reconcile in terms of background interference suppression capabilities. Existing technologies attempt to avoid interference by improving imaging resolution or introducing multi-scale feature search strategies. However, due to the lack of dimensional utilization of the physical properties of optical dispersion, the mathematical fitting generated in the two-dimensional grayscale domain cannot distinguish the step response of printing ink from the photo-induced artifacts of the holographic background from the logical level. This approach, which forcibly reduces the three-dimensional optical phenomena with wavelength correlation to a single-channel image space for feature extraction, inevitably leads to sub-pixel-level positioning center drift under conditions of strong reflection or non-uniform light fields, and cannot meet the 0.05mm accuracy threshold for industrial access.

[0004] Therefore, the technical problem to be solved by this invention is to start from the intrinsic physical properties of imaging data, achieve effective decoupling of printing ink boundaries and holographic optical interference artifacts at the source of data flow, and establish a precision measurement architecture with physical consistency constraints. Summary of the Invention

[0005] The present invention aims to solve the problem of registration detection failure caused by the difficulty in decoupling the printing ink boundary and holographic optical interference artifacts in a single-channel image space.

[0006] In this technical solution, a method for detecting registration accuracy in packaging printing based on machine vision includes the following steps:

[0007] Step S101: Obtain a color image of the packaging printed with holographic anti-counterfeiting features, and extract the red discrete color channel pixel matrix, green discrete color channel pixel matrix and blue discrete color channel pixel matrix from the color image.

[0008] Step S102: Calculate the brightness difference values ​​of each discrete color channel pixel matrix in the horizontal and vertical directions to construct a multi-channel gradient vector field that characterizes the contour of the printed surface.

[0009] Step S103: Obtain the multi-channel gradient vector field, calculate the gradient vector dot product of the red discrete color channel pixel matrix and the blue discrete color channel pixel matrix at the same pixel position, and obtain the cross-channel gradient divergence value; when the cross-channel gradient divergence value is greater than the preset confidence threshold, determine the corresponding pixel as a physical ink boundary point and retain its gradient response; when the cross-channel gradient divergence value is less than or equal to the preset confidence threshold, determine the corresponding pixel as a holographic photoluminescence artifact point and force its gradient response to zero, and output a clean edge feature map;

[0010] Step S104: Construct a multi-scale Laplacian pyramid of the clean edge feature map, use the Hessian matrix to determine the local curvature maxima in each scale level, and locate the edge feature operator.

[0011] Step S105: Calculate the weighted center of the gradient vector in the 3×3 neighborhood of the edge feature operator, and use Taylor expansion to solve the sub-pixel level coordinate offset to determine the coordinates of the sub-pixel feature points.

[0012] Step S106: Use the random sampling consistency algorithm to verify the geometric topological constraints of the sub-pixel feature point coordinates, and iteratively calculate the homography transformation model of the sample image relative to the reference template.

[0013] Step S107: Analyze the rotational deviation parameter and translational deviation parameter in the homography transformation model, and output the position compensation signal characterizing the printing registration accuracy based on the rotational deviation parameter and translational deviation parameter.

[0014] Preferably, step S102 specifically includes the following sub-steps: step S1021, calculating the horizontal component gradient and vertical component gradient at each pixel position in each discrete color channel pixel matrix; step S1022, determining the cross-channel gradient correlation weight based on the brightness correlation between the red discrete color channel pixel matrix, the green discrete color channel pixel matrix, and the blue discrete color channel pixel matrix, and using the cross-channel gradient correlation weight to perform nonlinear mapping on the horizontal component gradient and the vertical component gradient to generate a multi-channel gradient vector field.

[0015] Preferably, step S103 further includes the following sub-steps: step S1031, setting a lower limit threshold for the gradient amplitude that characterizes the physical boundary of the ink layer, and removing vector points in the multi-channel gradient vector field whose amplitude is lower than the lower limit threshold; step S1032, using the gradient pointing continuity criterion to verify the retained vector points, removing optical scintillation points that are discretely distributed, and obtaining the physical ink boundary points.

[0016] Preferably, step S104 specifically includes the following sub-steps: step S1041, constructing a multi-level Gaussian pyramid through Gaussian smoothing filtering and downsampling processing; step S1042, calculating the image difference values ​​of adjacent levels of the Gaussian pyramid and performing size interpolation compensation, extracting edge prominence features, and forming a multi-scale Laplacian pyramid.

[0017] Preferably, step S106 specifically includes the following sub-steps: step S1061, randomly extracting a preset sample group from the sub-pixel feature point coordinates to construct an initial transformation matrix; step S1062, calculating the projection error of the initial transformation matrix relative to the remaining feature points, and applying the least squares method to iteratively optimize the parameters of the homography transformation model until the transformation residual converges to a preset interval.

[0018] Preferably, step S101 further includes the following sub-steps: step S1011, mapping the red, green and blue channel pixel data of the color image to independent storage levels to construct a three-dimensional image data cube; step S1012, calculating the spectral feature vector of each pixel in the three-dimensional image data cube, and calculating the Mahalanobis distance between each spectral feature vector to identify holographic metallized regions with high reflectivity.

[0019] Preferably, step S107 specifically includes the following sub-steps: step S1071, extracting the horizontal deviation value, vertical deviation value, and rotation angle of the sample to be tested relative to the reference template from the homography transformation model; step S1072, mapping the horizontal deviation value, vertical deviation value, and rotation angle to electrical pulse control parameters for driving the printing servo mechanism.

[0020] Preferably, the method further includes the following steps: step S108, real-time monitoring of the processing time of a single frame image; step S109, when the processing time exceeds a preset time threshold, reducing the level depth of the multi-scale Laplacian pyramid to adapt to the line speed monitoring requirement of not less than 300m / min.

[0021] Preferably, the process of determining the physical ink edge points in step S103 further includes the following steps: step S1033, establishing a characteristic reflectance distribution model of the printing ink; step S1034, calculating the deviation between the brightness response value of the pixel and the characteristic reflectance distribution model, and filtering out oversaturated noise points whose deviation exceeds a preset outlier threshold.

[0022] Compared with existing technologies, the machine vision-based packaging printing registration accuracy detection method of this invention has the following advantages:

[0023] 1. In the detection of registration accuracy in packaging printing, a photo-induced artifact removal mechanism based on cross-channel gradient divergence tensor is established. By extracting gradient vector fields from the three discrete color channels (red, green, and blue) in the sample color image, and calculating the spatial inner product between the gradient vectors of different channels to characterize the collinearity of edge components, the intrinsic physical difference of maintaining geometric consistency of physical ink boundaries in multispectral dimensions and spatial phase misalignment of holographic interference fringes with wavelength is utilized. The interference gradient response that does not possess physical entity properties is directly identified from the mathematical level and forced to be zeroed, so that the visual analysis logic is extracted from the contaminated gray space, thereby achieving dimensional separation between the printed entity edge and the optical coherence interference point.

[0024] 2. A precise positioning architecture that combines multi-scale topology analysis and energy centroid fitting is adopted. Based on the pure feature primitive map generated by tensor operations, the Laplacian pyramid structure guides the second-order local curvature matrix to lock the edge intersections with strong geometric constraints. By calculating the gradient vector in the neighborhood of the feature point, the weighted centroid is added and the edge response curve is fitted with a second-order polynomial. Since the sub-pixel coordinate solution is anchored to the real physical edge energy distribution center after removing optical artifacts, the reference drift problem that traditional spatial smoothing algorithms are prone to cause when processing fine textures is overcome, ensuring that the detection results still have sub-pixel level physical reliability under high line speed conditions.

[0025] 3. Construct a robust control link consisting of global geometric consistency constraints and physical pose closed-loop feedback. Establish the homography mapping relationship between the sample sub-pixel coordinate set and the standard reference set through a random sampling consistency algorithm. Use iterative screening of transformation residuals to isolate pseudo-feature points caused by instantaneous fluctuations in the ambient light field or microscopic deformation of materials. On this basis, apply the least squares method to solve for global pose parameters including horizontal displacement, longitudinal displacement and rotation angle. Convert these parameters into electrical signals to drive the servo system to complete the phase correction and position compensation of the printing roller. This enables the system to achieve real-time control closed loop from perception to execution without introducing external hardware modulation methods. Attached Figure Description

[0026] Figure 1 This is a complete process diagram of the fitting accuracy detection method of the present invention;

[0027] Figure 2 This is a data flow and processing logic diagram of the core algorithm of this invention. Detailed Implementation

[0028] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0029] It should be noted that all directional and positional terms used in this invention, such as: up, down, left, right, front, back, vertical, horizontal, inner, outer, top, bottom, transverse, longitudinal, center, etc., are only used to explain the relative positional relationship and connection between components in a specific state (as shown in the accompanying drawings). They are only for the convenience of describing this invention and do not require that this invention be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting this invention. In addition, the descriptions of "first," "second," etc., in this invention 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.

[0030] In the description of this invention, unless otherwise explicitly specified and limited, the terms installation, connection, and linking should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections; they can refer to direct connections or indirect connections through an intermediate medium; they can refer to the internal connection of two components. For those skilled in the art, the specific meaning of the above terms in this invention can be understood according to the specific circumstances.

[0031] In the description of this specification, references to the terms "an embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example, and the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0032] A machine vision-based method for detecting registration accuracy in packaging printing includes the following steps:

[0033] Step S101: Obtain a color image of the packaging printed with holographic anti-counterfeiting features, and extract the red discrete color channel pixel matrix, green discrete color channel pixel matrix and blue discrete color channel pixel matrix from the color image.

[0034] Step S102: Calculate the brightness difference values ​​of each discrete color channel pixel matrix in the horizontal and vertical directions to construct a multi-channel gradient vector field that characterizes the contour of the printed surface.

[0035] Step S103: Obtain the multi-channel gradient vector field, calculate the gradient vector dot product of the red discrete color channel pixel matrix and the blue discrete color channel pixel matrix at the same pixel position, and obtain the cross-channel gradient divergence value; when the cross-channel gradient divergence value is greater than the preset confidence threshold, determine the corresponding pixel as a physical ink boundary point and retain its gradient response; when the cross-channel gradient divergence value is less than or equal to the preset confidence threshold, determine the corresponding pixel as a holographic photoluminescence artifact point and force its gradient response to zero, and output a clean edge feature map;

[0036] Step S104: Construct a multi-scale Laplacian pyramid of the clean edge feature map, use the Hessian matrix to determine the local curvature maxima in each scale level, and locate the edge feature operator.

[0037] Step S105: Calculate the weighted center of the gradient vector in the 3×3 neighborhood of the edge feature operator, and use Taylor expansion to solve the sub-pixel level coordinate offset to determine the coordinates of the sub-pixel feature points.

[0038] Step S106: Use the random sampling consistency algorithm to verify the geometric topological constraints of the sub-pixel feature point coordinates, and iteratively calculate the homography transformation model of the sample image relative to the reference template.

[0039] Step S107: Analyze the rotational deviation parameter and translational deviation parameter in the homography transformation model, and output the position compensation signal characterizing the printing registration accuracy based on the rotational deviation parameter and translational deviation parameter.

[0040] Preferably, step S102 specifically includes the following sub-steps: step S1021, calculating the horizontal component gradient and vertical component gradient at each pixel position in each discrete color channel pixel matrix; step S1022, determining the cross-channel gradient correlation weight based on the brightness correlation between the red discrete color channel pixel matrix, the green discrete color channel pixel matrix, and the blue discrete color channel pixel matrix, and using the cross-channel gradient correlation weight to perform nonlinear mapping on the horizontal component gradient and the vertical component gradient to generate a multi-channel gradient vector field.

[0041] Preferably, step S103 further includes the following sub-steps: step S1031, setting a lower limit threshold for the gradient amplitude that characterizes the physical boundary of the ink layer, and removing vector points in the multi-channel gradient vector field whose amplitude is lower than the lower limit threshold; step S1032, using the gradient pointing continuity criterion to verify the retained vector points, removing optical scintillation points that are discretely distributed, and obtaining the physical ink boundary points.

[0042] Preferably, step S104 specifically includes the following sub-steps: step S1041, constructing a multi-level Gaussian pyramid through Gaussian smoothing filtering and downsampling processing; step S1042, calculating the image difference values ​​of adjacent levels of the Gaussian pyramid and performing size interpolation compensation, extracting edge prominence features, and forming a multi-scale Laplacian pyramid.

[0043] Preferably, step S106 specifically includes the following sub-steps: step S1061, randomly extracting a preset sample group from the sub-pixel feature point coordinates to construct an initial transformation matrix; step S1062, calculating the projection error of the initial transformation matrix relative to the remaining feature points, and applying the least squares method to iteratively optimize the parameters of the homography transformation model until the transformation residual converges to a preset interval.

[0044] Preferably, step S101 further includes the following sub-steps: step S1011, mapping the red, green and blue channel pixel data of the color image to independent storage levels to construct a three-dimensional image data cube; step S1012, calculating the spectral feature vector of each pixel in the three-dimensional image data cube, and calculating the Mahalanobis distance between each spectral feature vector to identify holographic metallized regions with high reflectivity.

[0045] Preferably, step S107 specifically includes the following sub-steps: step S1071, extracting the horizontal deviation value, vertical deviation value, and rotation angle of the sample to be tested relative to the reference template from the homography transformation model; step S1072, mapping the horizontal deviation value, vertical deviation value, and rotation angle to electrical pulse control parameters for driving the printing servo mechanism.

[0046] Preferably, the method further includes the following steps: step S108, real-time monitoring of the processing time of a single frame image; step S109, when the processing time exceeds a preset time threshold, reducing the level depth of the multi-scale Laplacian pyramid to adapt to the line speed monitoring requirement of not less than 300m / min.

[0047] Preferably, the process of determining the physical ink edge points in step S103 further includes the following steps: step S1033, establishing a characteristic reflectance distribution model of the printing ink; step S1034, calculating the deviation between the brightness response value of the pixel and the characteristic reflectance distribution model, and filtering out oversaturated noise points whose deviation exceeds a preset outlier threshold.

[0048] Example 1: In a high-speed production inspection application scenario for packaging printed parts with holographic anti-counterfeiting features, when the production line speed is 300m / min, the color image captured by the industrial camera is affected by the diffraction of the grating on the surface of the holographic material, resulting in photo-induced artifacts that dynamically shift with wavelength. Because the spatial frequency of these artifacts in the conventional grayscale space highly overlaps with the physical ink edge, the edge detection algorithm based on a single-channel gradient cannot effectively distinguish between holographic interference fringes and the real registration mark. The system executes a packaging printing registration accuracy detection method to obtain a color image of the packaging printed part containing holographic anti-counterfeiting features. The system extracts the pixel matrices of the red, green, and blue discrete color channels. It calculates the brightness difference between each discrete color channel pixel matrix in the horizontal and vertical directions to construct a multi-channel gradient vector field. The system then calculates the dot product of the gradient vectors of the red and blue discrete color channel pixel matrices at the same pixel position to obtain the cross-channel gradient divergence value. Because the physical printing boundary has spatial geometric consistency across different wavelength channels, holographic photo-induced artifacts exhibit phase differences with wavelength. The system determines that when the cross-channel gradient divergence value exceeds a preset threshold, the corresponding pixel... The physical ink boundary points are defined and their gradient responses are preserved. When the cross-channel gradient divergence value is less than or equal to a preset threshold, the corresponding pixel is determined to be a holographic photonic artifact and its gradient response is forcibly set to zero, generating a clean edge feature map that eliminates interference noise. At the physical mechanism level, the cross-channel gradient divergence value referred to in this invention essentially uses the consistency of the gradient vector field to characterize the physical reality of the edge. Specifically, the physical boundary formed by the printing ink has the same geometric step direction in the visible light band (red, green, and blue channels), which is manifested as the gradient vectors of each channel being highly collinear in the spatial direction, and their dot product... The result shows a maximum value; however, the photo-induced artifacts generated by holographic anti-counterfeiting materials are affected by microscopic grating diffraction, and their light field distribution has a significant spatial phase shift with wavelength (i.e., color channel), causing the gradient vectors of different channels at the same pixel position to deflect or even become orthogonal. This invention quantifies this directional consistency by calculating the dot product and defines it as a divergence measure at the logical level. That is, when the dot product value is low, it is determined that the gradient flow has undergone logical divergence or distortion at that point, thereby identifying and filtering out optical coherence noise that does not have physical geometric consistency, and achieving effective decoupling of physical edges and artifacts in the gradient distribution dimension.

[0049] After acquiring the clean edge feature map, the system establishes a multi-scale Laplacian pyramid. The Hessian matrix is ​​used to determine the local curvature maxima within each scale level to locate the edge feature operators. The gradient vector weighted center within the 3×3 neighborhood of the edge feature operators is calculated, and Taylor expansion is used to solve for the sub-pixel level coordinate offset, determining the sub-pixel feature point coordinates. A random sampling consistency algorithm is used to verify the geometric and topological constraints of the sub-pixel feature point coordinates, and the homography transformation model of the sample relative to the reference template is iteratively calculated. The rotational and translational deviation parameters in the homography transformation model are analyzed. Based on these parameters, a position compensation signal characterizing the printing registration accuracy is output, controlling the detection error within 0.05mm.

[0050] When constructing a multi-channel gradient vector field representing the contour of the printed surface, the system performs a non-linear mapping on the brightness differences between the red, green, and blue discrete color channel pixel matrices. Within a 5×5 pixel window, the system calculates the normalized cross-correlation coefficients between the pixel matrices of each discrete color channel to determine the cross-channel gradient correlation weights. The calculation method is as follows: ,in, For cross-channel gradient correlation weights, and These represent the pixel brightness values ​​at corresponding positions for different color channels. The system uses cross-channel gradient correlation weights to perform a weighted summation of the horizontal and vertical gradient components of each channel. When a color channel is affected by holographic interference, causing the local cross-correlation coefficient to fall below 0.6, the system reduces the weight contribution of that channel in the synthesis of the multi-channel gradient vector field. The system does not simply perform linear superposition when synthesizing the multi-channel gradient vector field. In specific operation, the cross-channel gradient correlation weights are introduced into a nonlinear gating function. This function performs nonlinear scaling based on the distribution characteristics of the cross-correlation coefficient: when the correlation weight is higher than a preset safety threshold, the weight is maintained linearly according to the ratio; once the correlation weight is lower than the critical point (such as 0.6), the function will trigger an exponential decay mapping to suppress the gradient magnitude contribution of the interfered channel. This nonlinear transformation achieved through dynamic adjustment of weights ensures that the synthesized vector field can selectively amplify edge signals with multi-channel physical consistency, while nonlinearly eliminating incoherent gradient fluctuations generated by high-reflectivity areas, so that the synthesized magnitude response is focused on the spatially coherent edges generated by the physical ink layer.

[0051] Example 2: In the testing and verification of packaging materials for high-reflectivity metallic ink printing characteristics, the test platform consists of a linear guide rail with a movement speed of 3000 mm / s and a global shutter industrial camera. The industrial camera is equipped with a set of low-distortion telecentric lenses with a focal length of 50 mm and a dynamic range of 72 dB. The raw image data is acquired at 12-bit depth through a GMSL2 serial link. Simultaneously, the system simulates the electromagnetic environment and background light fluctuations of a high-speed production line. Additive Gaussian white noise with a signal-to-noise ratio of 20 dB is superimposed in the acquisition link, and illumination ripple disturbance with a frequency of 50 Hz is introduced to test the positioning stability of the packaging printing registration accuracy detection method under non-ideal conditions. For a preset threshold value... The determination of this threshold depends on the technical balance between the false detection rate at the edges and the completeness of feature extraction. If a pre-set threshold is used... Setting the value too low will cause residual holographic photonic artifacts to enter the registration process and trigger positioning jumps. Setting it too high will suppress the physical printing boundary of the light-colored ink area and cause feature primitives to be missing. The system uses a set of calibration parameters from a reference sample with known registration deviations to calculate the gradient vector dot product statistical distribution of the red discrete color channel pixel matrix and the blue discrete color channel pixel matrix in the holographic interference area, and then sets the preset information threshold. The signal threshold is set at 3.5 times the standard deviation of the mean of the interference noise divergence, under a noise intensity of 20 dB. The value is determined to be 15.6.

[0052] During comparative verification, the control group used the Sobel operator to process the noisy original grayscale image. Its output edge feature map contained randomly distributed optical scintillation points. Due to fluctuations in edge curvature distribution, the measured error of the registration deviation reached 0.12 mm. In contrast, after acquiring the color image, the sample group of this invention showed a local brightness gradient magnitude of 45 for the red discrete color channel pixel matrix at the registration mark edge, and a local brightness gradient magnitude of 42 for the blue discrete color channel pixel matrix at the same position. The cosine of the angle between their gradient directions was 0.98. The cross-channel gradient divergence value calculated by the system was 1852.2, which is higher than the preset confidence threshold of 15.6. The gradient response of the physical ink boundary is preserved. In the holographic interference region, the local brightness gradient magnitude of the red discrete color channel pixel matrix is ​​8, and the local brightness gradient magnitude of the blue discrete color channel pixel matrix is ​​9. Due to wavelength dependence, the cosine of the gradient direction angle is 0.15, and the calculated cross-channel gradient divergence is 10.8. The system determines the corresponding pixel as a holographic photo-induced artifact and sets its gradient response to zero, thereby outputting a pure edge feature map without optical interference noise. After obtaining the pure edge feature map, the sample of this invention uses a multi-scale Laplacian pyramid to locate the edge feature operator and uses Taylor expansion to solve the sub-pixel feature point coordinates. The analyzed rotation deviation parameter is 0.12 degrees, and the translation deviation parameter is... The accuracy is 0.035mm in the X direction and 0.028mm in the Y direction, with a comprehensive detection accuracy of 0.045mm, meeting the 0.05mm threshold. When the slide rail speed increases to make the equivalent production speed exceed 400m / min, the limited shutter time of the industrial camera causes geometric motion blur, resulting in a decrease in the spatial coherence of the gradient vector. The cross-channel gradient divergence value at the physical boundary shows an attenuation inflection point and drops below 200, increasing the detection error to 0.08mm. This proves that the packaging printing registration accuracy detection method can eliminate the interference of holographic dynamic interference on registration detection within the standard working condition of 300m / min, and output a position compensation signal characterizing the printing registration accuracy to achieve precise positioning.

[0053] After acquiring the physical ink boundary points, the system eliminates discretely distributed optical scintillation points using a gradient pointing continuity criterion. Specifically, the system retrieves adjacent vector points within a 3×3 neighborhood of the physical ink boundary point and calculates the gradient angle between each adjacent vector point and the central vector point. If the proportion of adjacent vector points with pointing angles less than 15 degrees within the neighborhood is less than 75%, the central vector point is determined to be an isolated noise point caused by random optical scintillation, and the gradient response at that location is forcibly set to zero. In the specific deployment of this technical solution, for high-intensity metal reflection interference on a 300m / min production line, this criterion distinguishes randomly distributed interference noise points from spatially extended printed edges through the first-order topological continuity feature of the spatial vector field, ensuring that the output pure edge feature map only contains the printed registration mark outline that satisfies geometric coherence.

[0054] Example 3: This example combines Figures 1 to 2 This document describes a machine vision-based method for detecting registration accuracy in packaging printing. Figure 1As shown, steps S101 to S107 are as follows: Step S101 involves acquiring a color image of the printed packaging containing holographic anti-counterfeiting features and extracting the pixel matrices of the red, green, and blue discrete color channels; Step S102 involves calculating the brightness difference values ​​of each discrete color channel pixel matrix in the horizontal and vertical directions to construct a multi-channel gradient vector field representing the contour of the printed surface; Step S103 involves calculating the dot product of the gradient vectors at the same position of the red and blue discrete color channel pixel matrices to obtain the cross-channel gradient divergence value, and combining it with a confidence threshold to determine the physical ink boundary or holographic photoinduced artifacts to output a clean edge feature map; Step S104 involves establishing a clean edge feature map. The multi-scale Laplacian pyramid of the image is used to determine the local curvature maxima within each scale level using the Hessian matrix to locate the edge feature operator. Step S105 calculates the weighted center of the gradient vector in the neighborhood of the edge feature operator and uses Taylor expansion to solve the sub-pixel level coordinate offset to determine the sub-pixel feature point coordinates. Step S106 uses the random sampling consistency algorithm to verify the geometric topological constraints of the sub-pixel feature point coordinates to iteratively calculate the homography transformation model of the sample relative to the reference template. Step S107 analyzes the rotation and translation deviation parameters in the homography transformation model and outputs the position compensation signal characterizing the printing registration accuracy based on the deviation parameters.

[0055] like Figure 2 As shown, it begins with obtaining the discrete color channel pixel matrix, generating a multi-channel gradient vector field by calculating the brightness difference values ​​in the horizontal and vertical directions, and then extracting a clean edge feature map under the premise that the cross-channel gradient divergence value is greater than a preset threshold. The Hessian matrix is ​​used to determine the local curvature maxima within the scale level to identify the edge feature operator. The coordinates of the sub-pixel feature points are obtained by calculating the weighted center of the gradient vector and solving it using Taylor expansion. The random sampling consistency algorithm is further applied to verify the geometric topological constraints to establish a homography transformation model. Finally, the rotational deviation parameters and translational deviation parameters are analyzed and the position compensation signal is output.

[0056] Example 4: In the production process of cigarette packaging with microtext features, the physical line width of the feature to be detected is in the range of 0.1mm to 0.12mm, and the production line speed is maintained at 300m / min. Since the tiny edges are prone to contrast attenuation at multiple scales, the convergence stability of subpixel positioning is limited.

[0057] The system employs a packaging printing registration accuracy detection method. When constructing a multi-scale Laplacian pyramid, the downsampling factor is determined based on the ratio of the physical size of the feature to be detected to the pixel resolution. The inter-layer downsampling factor is set to 1.2, and an image sequence containing five scale levels is generated. The selection of this downsampling factor is based on a balance between image aliasing suppression and computational accuracy. Since the line width of the microtext to be detected is close to the pixel limit, an excessively large downsampling factor (such as 2.0) will cause high-frequency edge information to be lost at the top of the pyramid. A factor of 1.2 ensures the maintenance of the topological continuity of sub-pixel feature points during scale space transformation, enabling the Hessian matrix to obtain stable local extremum responses at different scales. In each level, the edge feature operator is located, and the gradient vector weighted center within its 3×3 neighborhood is calculated. The corresponding sub-pixel offset vector is then calculated using the Hessian matrix as follows: ,in, H is the sub-pixel offset vector, and G is the Hessian matrix composed of local second-order partial derivatives. The system sets a termination criterion for the calculation. The calculation stops when the offset increment generated by two consecutive iterations is less than 0.01 pixels. If the criterion requirement is not met within 5 iterations, the feature point is removed to ensure that the coordinates of the generated sub-pixel feature points conform to the physical geometric constraints.

[0058] The system analyzes rotational and translational deviation parameters. Based on the kinematic feedforward compensation principle, the system acquires the traction linear velocity of the packaging material in real time through the spindle rotary encoder. It reads the total delay time from the triggering of the global image exposure to the completion of homography transformation parameter analysis, latched by the internal hardware clock. Multiplying the traction linear velocity by the total delay time yields the feedforward phase shift compensation. This compensation is then superimposed with the translational deviation parameter vector to obtain the absolute physical pose correction. Before the superposition operation, the system performs coordinate system mapping and dimension transformation. The feedforward phase shift compensation, as a one-dimensional scalar displacement along the packaging material's running direction (defined as the Y-axis in this scheme), is constructed as a two-dimensional feedforward vector (0, ΔL), where ΔL is the calculated compensation length. This feedforward vector is then compared with the two-dimensional translational deviation parameter vector obtained from the homography transformation model. The difference parameter vector (ΔX, ΔY) is summed in the same direction to couple the hysteresis phase shift compensation generated by high-speed operation into the geometric position deviation detected in the image domain. Finally, the absolute physical pose correction amount is synthesized, and the position compensation step is calculated according to the physical characteristics of the printing servo mechanism. The pulse equivalent of the printing servo mechanism is set to 0.001mm / pulse. When the X-direction translational deviation parameter is 0.032mm, the corresponding number of compensation pulses is calculated to be 32, and the servo motor is driven to complete the position correction at a starting frequency of 500Hz. This process converts the geometric deviation amount in the image domain into a driving pulse flow in the physical domain. After correction, the residual deviation of the registration accuracy is stabilized within 0.015mm, which meets the reproduction requirements of high-end printing for micro-displacement compensation.

[0059] Example 5: In the commissioning phase of deploying the packaging printing registration accuracy detection method on a newly added holographic transfer paper production line, the system acquires 50 frames of color images on a blank substrate without ink printing. It extracts the red and blue discrete color channel pixel matrices and calculates the cross-channel gradient divergence distribution at each location to characterize the environmental background noise. Based on the principle of multidimensional normal distribution statistics, the system simultaneously extracts the spectral feature vectors of each effective pixel within the sampling frames to construct a three-dimensional background benchmark dataset. The spectral mean vector and multi-channel covariance matrix of the benchmark dataset are calculated and written into non-volatile memory as prior reference parameters for solving the Mahalanobis distance constant of local pixels in the online detection phase. In the actual detection process… The system calculates the Mahalanobis distance between the spectral feature vector of the currently acquired pixel and the benchmark dataset. Based on the chi-square distribution law, the system sets a classification mapping benchmark: when the calculated Mahalanobis distance value exceeds a preset significance threshold (corresponding to the outlier determination boundary in statistics), the system marks the pixel as a non-ink attribute. Combined with its high brightness feature, it is further identified as a holographic metallized region with high reflectivity. In this way, the system can use the distance metric in spectral space to hardly separate the background area with abnormal reflectivity from the normal printing area from the data layer. When the optical interference intensity caused by random microparticles on the substrate surface fluctuates, the system calculates the statistical expectation value of the cross-channel gradient divergence distribution. with standard deviation and preset threshold values Associated with the above statistical parameters, a preset confidence threshold is established. The calculation method is as follows: ,in, To preset the threshold, Let be the statistical expectation value of the background noise divergence, and k be the confidence coefficient, which is taken as 3.5 in the specific deployment of this technical solution. The standard deviation of the background noise dispersion is used to determine the initial suppression level of physical ink edge extraction by quantitatively modeling the background noise benchmark of a specific physical production environment, thus eliminating parameter adaptation bias caused by differences in the intrinsic optical properties of the substrate.

[0060] Once the detection system completes the physical installation of the optical components and enters the operational readiness state, the system acquires a set of planar calibration template images containing precise mesh features. It then uses the Hessian matrix and Taylor expansion to iteratively calculate the sub-pixel centers of the mesh intersections. The system calculates the mapping residual between the template's physical coordinate system and the camera's pixel coordinate system to correct the initial projection parameters of the homography transformation model. Finally, the system calculates the radial distortion coefficient of the camera lens. It is then embedded into the preprocessing operator of the feature point coordinates to correct the geometric nonlinear deformation caused by the distortion of the optical path at the lens edge. This pre-calibration process provides a spatial physical reference for the subsequent establishment of a homography transformation model using geometric topological constraints, so that the position compensation signal output by the system can maintain dimensional consistency under different camera installation angles.

[0061] Example 6: In a standardized debugging scenario where a packaging printing registration accuracy detection method is deployed on a laser transfer film production line with high-frequency holographic texture features, the system acquires a set of feature images under controlled illumination conditions to determine the spatial smoothing operator parameters during the multi-scale pyramid construction process. To suppress spectral aliasing during the image downsampling stage, the system pre-smooths the pixel matrix using a 3×3 Gaussian convolution kernel before scaling each layer of the Laplacian pyramid. The standard deviation of the Gaussian distribution is... It satisfies a linear proportional relationship with the downsampling factor s, that is, it sets Under the current operating conditions, the downsampling factor s is set to 1.2. The standard deviation of the smoothing operator is calculated. It is 0.6 pixels, where, s is the standard deviation of the smoothing operator and s is the downsampling factor. This method ensures that the edge feature operators extracted between different scale levels have spatial phase stability by quantizing the smoothing intensity, thus providing consistent feature input for subsequent topological constraint verification.

[0062] When the system acquires the coordinates of sub-pixel feature points and uses the random sample consensus algorithm to establish a geometric model, the interior point determination threshold is... The value is dynamically calibrated based on the reprojection residual distribution during the feature extraction stage. The system calculates the average reprojection residual under the initial transformation model and uses 1.5 times it as the interior point determination threshold. In an image resolution of 2048 pixels, the interior point determination threshold The resolution was set at 0.25 pixels. For the conversion from homography transformation model to physical displacement, the system uses singular value decomposition to orthogonally deconstruct the homography matrix, extracting rotation and translation components. Based on the camera pixel size and lens magnification, the mapping coefficient from pixel to physical length is calculated. Under the current hardware configuration, the mapping coefficient is 0.012 mm / pixel, thus converting the geometric deviation parameter into a physical domain position compensation signal. Because this procedure completes the path closure from pixel-level analysis to mechanical-level compensation by calibrating the algorithm parameters and the physical mapping relationship, the measured residual deviation of the registration accuracy remained within the tolerance range of 0.015 mm during a 24-hour stability test on a laser transfer film production line.

[0063] The embodiments of this application have been described above with reference to the accompanying drawings. Unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other. This application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit of this application and the scope of protection of this invention, and all of these forms are within the protection scope of this application.

Claims

1. A machine vision-based method for detecting registration accuracy in packaging printing, comprising the following steps: Step S101: Obtain a color image of the packaging printed with holographic anti-counterfeiting features, and extract the red discrete color channel pixel matrix, green discrete color channel pixel matrix and blue discrete color channel pixel matrix from the color image. Step S102: Calculate the brightness difference values ​​of each discrete color channel pixel matrix in the horizontal and vertical directions to construct a multi-channel gradient vector field that characterizes the contour of the printed surface. Step S103: Obtain the multi-channel gradient vector field, calculate the gradient vector dot product of the red discrete color channel pixel matrix and the blue discrete color channel pixel matrix at the same pixel position, and obtain the cross-channel gradient divergence value; when the cross-channel gradient divergence value is greater than the preset threshold, determine the corresponding pixel as a physical ink boundary point and retain its gradient response. When the cross-channel gradient divergence value is less than or equal to the preset threshold, the corresponding pixel is determined to be a holographic photoluminescent artifact and its gradient response is forced to zero, and a clean edge feature map is output. Step S104: Construct a multi-scale Laplacian pyramid of the clean edge feature map, use the Hessian matrix to determine the local curvature maxima in each scale level, and locate the edge feature operator. Step S105: Calculate the weighted center of the gradient vector in the 3×3 neighborhood of the edge feature operator, and use Taylor expansion to solve the sub-pixel level coordinate offset to determine the coordinates of the sub-pixel feature points. Step S106: Use the random sampling consistency algorithm to verify the geometric topological constraints of the sub-pixel feature point coordinates, and iteratively calculate the homography transformation model of the sample image relative to the reference template. Step S107: Analyze the rotational deviation parameter and translational deviation parameter in the homography transformation model, and output the position compensation signal characterizing the printing registration accuracy based on the rotational deviation parameter and translational deviation parameter.

2. The method for detecting registration accuracy in packaging printing based on machine vision according to claim 1, characterized in that, Step S102 specifically includes the following sub-steps: Step S1021, calculate the horizontal component gradient and vertical component gradient at each pixel position in each discrete color channel pixel matrix; Step S1022, determine the cross-channel gradient correlation weight based on the brightness correlation between the red discrete color channel pixel matrix, the green discrete color channel pixel matrix and the blue discrete color channel pixel matrix, and use the cross-channel gradient correlation weight to perform nonlinear mapping on the horizontal component gradient and the vertical component gradient to generate a multi-channel gradient vector field.

3. The method for detecting registration accuracy in packaging printing based on machine vision according to claim 1, characterized in that, Step S103 further includes the following sub-steps: Step S1031, setting a lower limit threshold for the gradient amplitude that characterizes the physical boundary of the ink layer, and removing vector points in the multi-channel gradient vector field whose amplitude is lower than the lower limit threshold; Step S1032, using the gradient pointing continuity criterion to verify the retained vector points, removing optical scintillation points that are discretely distributed, and obtaining the physical ink boundary points.

4. The method for detecting registration accuracy in packaging printing based on machine vision according to claim 1, characterized in that, Step S104 specifically includes the following sub-steps: Step S1041, constructing a multi-level Gaussian pyramid through Gaussian smoothing filtering and downsampling processing; Step S1042, calculating the image difference values ​​of adjacent levels of the Gaussian pyramid and performing size interpolation compensation, extracting edge prominence features, and forming a multi-scale Laplacian pyramid.

5. The method for detecting registration accuracy in packaging printing based on machine vision according to claim 1, characterized in that, Step S106 specifically includes the following sub-steps: Step S1061, randomly select a preset sample group from the sub-pixel feature point coordinates to construct an initial transformation matrix; Step S1062, calculate the projection error of the initial transformation matrix relative to the remaining feature points, and apply the least squares method to iteratively optimize the parameters of the homography transformation model until the transformation residual converges to the preset interval.

6. The method for detecting registration accuracy in packaging printing based on machine vision according to claim 1, characterized in that, Step S101 further includes the following sub-steps: Step S1011, mapping the red, green and blue channel pixel data of the color image to independent storage levels to construct a three-dimensional image data cube; Step S1012, calculating the spectral feature vector of each pixel in the three-dimensional image data cube, and calculating the Mahalanobis distance between each spectral feature vector to identify holographic metallized regions with high reflectivity.

7. The method for detecting registration accuracy in packaging printing based on machine vision according to claim 1, characterized in that, Step S107 specifically includes the following sub-steps: Step S1071, extracting the horizontal deviation value, vertical deviation value, and rotation angle of the sample to be tested relative to the reference template from the homography transformation model; Step S1072, mapping the horizontal deviation value, vertical deviation value, and rotation angle to electrical pulse control parameters for driving the printing servo mechanism.

8. The method for detecting registration accuracy in packaging printing based on machine vision according to claim 1, characterized in that, It also includes the following steps: Step S108: Monitor the processing time of a single frame image in real time; Step S109: When the processing time exceeds a preset time threshold, reduce the level depth of the multi-scale Laplacian pyramid to adapt to the line speed monitoring requirement of not less than 300m / min.

9. The method for detecting registration accuracy in packaging printing based on machine vision according to claim 1, characterized in that, The process of determining the physical ink edge points in step S103 also includes the following steps: step S1033, establishing a characteristic reflectance distribution model of the printing ink; step S1034, calculating the deviation between the brightness response value of the pixel and the characteristic reflectance distribution model, and filtering out oversaturated noise points whose deviation exceeds the preset outlier threshold.

Citation Information

Patent Citations

  • A High-Precision Positioning Method for Screen Printing Based on Machine Vision

    CN120711636B