Digital printing quality detection method based on image analysis
Through the dynamic adjustment of multi-band light sources and cross-modal association of spatiotemporal attention mechanism, the problems of highlight details and color transitions in metal ink area detection are solved, and the accuracy of material property inversion and the reliability of digital printing quality detection are improved.
Patent Information
- Application Number
- CN202510720295.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-05-30
AI Technical Summary
When processing metallic ink areas, existing digital printing quality inspection methods have difficulty in synchronously optimizing highlight details and color transitions in ordinary areas, and the dynamic registration accuracy of visible light and infrared features is insufficient, affecting the accuracy of material property inversion.
HDR image groups are generated by dynamic adjustment of multi-band light sources, cross-modal association is performed by combining the spatiotemporal attention mechanism, the reverse Monte Carlo ray tracing algorithm is used to obtain the physical properties of the material, and defect detection and positioning are performed through the improved DBSCAN clustering algorithm.
The simultaneous optimization of highlight details in the metallic ink area and color transition in the ordinary area is achieved, which improves the accuracy of material property inversion and the reliability of detection.
Smart Images

Figure CN120707475A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital printing quality intelligent detection, in particular to a digital printing quality detection method based on image analysis. Background Art
[0002] In the field of digital print quality inspection, existing technologies generally employ multi-band imaging and high dynamic range (HDR) fusion methods, combined with machine vision algorithms, to achieve defect detection. Conventional methods use multi-band light sources (such as visible light and short-wave infrared) to collect surface reflectance data from printed materials. HDR technology is then used to compensate for the dynamic range of highly reflective areas, thereby extracting surface texture features and substrate penetration characteristics. For example, multiple images are acquired through short, medium, and long exposure sequences. The Mertens algorithm is used to fuse these images to generate an HDR image set, which is then combined with convolutional neural networks (such as MobileNet and ResNet) to extract multi-scale features. For defect detection, traditional methods typically use clustering algorithms such as DBSCAN to spatially cluster abnormal regions and classify defects based on geometric parameters (such as area and aspect ratio) and energy parameters (such as average intensity). Furthermore, existing technologies integrate visible and infrared features through cross-modal feature correlation (such as spatiotemporal attention mechanisms) to enhance the comprehensiveness of defect detection. Such methods have achieved certain success in inspecting common printed areas (such as paper and plastic substrates), effectively identifying common defects such as overprint deviation and missing ink dots.
[0003] However, existing methods still have two limitations: First, when processing highly reflective areas such as metallic ink, traditional HDR fusion algorithms (such as the Mertens algorithm) adopt a unified weight calculation strategy, which makes it difficult to simultaneously optimize the highlight details of the metal area and the color transition of the ordinary area. For example, the specular reflection characteristics of metallic ink are prone to local overexposure, while the low-reflection features of the ordinary area may produce color deviation due to uneven distribution of fusion weights; second, in the process of cross-modal feature association, the dynamic registration accuracy of visible light and infrared features is insufficient. Especially in scenarios of mechanical vibration or substrate deformation, the spatial alignment error of the multi-scale feature map will significantly reduce the representation ability of the three-dimensional feature cube, thereby affecting the inversion accuracy of the material physical properties (such as ink thickness and surface roughness). Summary of the Invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides a digital printing quality detection method based on image analysis to solve the problem of decreased material property inversion accuracy caused by loss of metal ink HDR fusion details and visible light-infrared feature registration error.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: In the first aspect, the present invention provides a digital printing quality detection method based on image analysis, which includes collecting surface reflection light data and ambient light data of printed products, performing high reflection compensation on the metal ink area through dynamic adjustment of a multi-band light source, and generating an HDR image group; obtaining the surface texture features of the visible light channel and the substrate penetration features of the infrared channel in the HDR image group, performing cross-modal association through a spatiotemporal attention mechanism, and generating a three-dimensional feature cube; using a reverse Monte Carlo ray tracing algorithm to obtain the material physical properties of the printed product, generating an enhanced feature tensor through three-dimensional convolutional network splicing, and performing defect detection and positioning through cross-scale feature aggregation; using an improved DBSCAN clustering algorithm to spatially aggregate defect coordinates to generate a complete defect area, and outputting a defect detection report through dynamic threshold classification.
[0007] As a preferred solution of the digital printing quality detection method based on image analysis described in the present invention, wherein: the high reflection compensation of the metallic ink area is performed by dynamically adjusting the multi-band light source to generate an HDR image group, the steps are as follows: Generate a mask of high-reflective areas on the printed surface by combining edge gradient analysis with reflectivity differences; The reflected light data of the printed surface is dynamically adjusted, and images of the metallic ink area and ordinary area of the printed surface are collected in a sequence of short exposure, medium exposure, and long exposure. The images are then fused to generate an HDR image group using an improved Mertens algorithm.
[0008] As a preferred solution of the digital printing quality detection method based on image analysis described in the present invention, the surface texture features of the visible light channel and the substrate penetration features of the infrared channel in the HDR image group are obtained through the MobileNetV3 network and the ConvNeXt network respectively.
[0009] As a preferred solution of the digital printing quality detection method based on image analysis described in the present invention, wherein: the cross-modal association is performed through the spatiotemporal attention mechanism to generate a three-dimensional feature cube, the steps are as follows: Generate multi-scale feature maps of visible light bands through multi-level feature pyramid fusion; Generate multi-scale feature maps in the shortwave infrared band through cross-scale attention aggregation; Through the spatiotemporal cross-attention mechanism, cross-modal feature association is performed on the multi-scale feature maps of the visible light band and the shortwave infrared band to generate a three-dimensional feature cube.
[0010] As a preferred solution of the digital printing quality detection method based on image analysis of the present invention, wherein: the reverse Monte Carlo ray tracing algorithm is used to obtain the material physical properties of the printed matter, the steps are as follows: Through the ink absorbance-thickness relationship curve, the infrared characteristic response value of each spatial position in the short-wave infrared band multi-scale characteristic map is inverted to generate the ink layer thickness distribution; The varnish curing degree calibration curve was compared with the dual-band characteristic ratio analysis method, and the nonlinear least squares fitting was used to generate the varnish curing degree heat map. Through the micro-surface BRDF fitting algorithm, the surface normal distribution modeling and scattering energy analysis of the multi-scale feature map of the visible light band in the three-dimensional feature cube are performed to obtain the surface roughness parameters of the substrate.
[0011] As a preferred solution of the digital printing quality detection method based on image analysis described in the present invention, the generation of enhanced feature tensors through splicing of a three-dimensional convolutional network refers to the first layer of multi-scale convolution identifying shallow joint features, the second layer of hole convolution expanding the shallow joint features to generate deep feature tensors, and the third layer of cross-modal fusion convolution performing cross-modal jump splicing of the HDR image group and the deep feature tensor, and combining the cross-modal attention mechanism to generate an enhanced feature tensor.
[0012] As a preferred solution of the digital printing quality inspection method based on image analysis of the present invention, wherein: the defect detection and positioning by cross-scale feature aggregation is performed in the following steps: Based on the enhanced feature tensor, channel joint normalization calculation is performed through cross-scale feature aggregation to predict the surface anomaly score of the printed product and compare it with the defect threshold to identify defects on the printed product surface; Through non-maximum suppression and connected domain analysis, the sub-pixel coordinate boundaries of printed surface defects are obtained.
[0013] As a preferred solution of the digital printing quality inspection method based on image analysis described in the present invention, the improved DBSCAN clustering algorithm is used to spatially aggregate defect coordinates to generate a complete defect area, and a defect inspection report is output through dynamic threshold classification. The steps are as follows: A regional attribute analysis algorithm is used to obtain the geometric parameters and defect energy parameters of each defect coordinate cluster. At the same time, a decision tree classifier is used to segment the data, and a dynamic process threshold is defined as the decision boundary of the decision tree classifier to generate defect level labels. Generate a defect detection report based on defect level labels, sub-pixel coordinate bounding boxes, defect geometry parameters, and defect energy parameters.
[0014] In a second aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the digital printing quality detection method based on image analysis as described in the first aspect of the present invention is implemented.
[0015] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, any step of the digital printing quality detection method based on image analysis as described in the first aspect of the present invention is implemented.
[0016] The beneficial effects of the present invention are as follows: through the improved Mertens algorithm, the fusion weights of the metallic ink area and the ordinary area are dynamically adjusted by using the high-reflective area mask, so that the synchronous optimization of highlight details and color transitions is achieved in the image pyramid fusion stage; at the same time, the visible light and infrared multi-scale feature maps are cross-modally associated through the spatiotemporal cross-attention mechanism, and a three-dimensional feature cube containing surface texture and substrate penetration characteristics is constructed, which realizes the accurate inversion of material properties such as ink thickness and roughness, and improves the accuracy and reliability of digital printing quality detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 Flowchart of the digital printing quality detection method based on image analysis.
[0019] Figure 2 Flowchart for HDR image group generation based on multi-exposure fusion.
[0020] Figure 3 Flowchart for 3D feature cube generation based on spatiotemporal crisscross attention mechanism.
[0021] Figure 4 Flowchart of material property inversion and defect detection based on inverse Monte Carlo ray tracing. DETAILED DESCRIPTION
[0022] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0023] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0024] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive of other embodiments.
[0025] Reference Figures 1 to 4 , is an embodiment of the present invention, which provides a digital printing quality detection method based on image analysis, comprising the following steps: S1. Collect the reflected light data and ambient light data of the printed surface, and perform high reflection compensation on the metallic ink area through dynamic adjustment of the multi-band light source to generate an HDR image group; The reflected light data of the printed matter surface includes the reflected light signal of the visible light band and the reflected light signal of the short-wave infrared band; Ambient light data includes ambient light intensity and ambient light angle; It should be noted that the reflected light signals in the visible light band and the short-wave infrared band are collected by high-precision industrial cameras, the ambient light intensity is measured by an illuminance meter, and the ambient light angle is recorded by a three-axis gyroscope and a photoelectric encoder.
[0026] Based on the reflected light data and ambient light data of the printed surface, a mask of the high-reflective area on the printed surface is generated by edge gradient analysis combined with reflectivity differences; Furthermore, the Sobel edge detection algorithm is used to process the visible light band reflected light signals captured by a high-precision industrial camera, identifying highly reflective pixels whose reflectivity exceeds the reflectivity characteristic threshold. Simultaneously, a region growing algorithm is used to process the shortwave infrared band reflected light signals, marking low-reflective pixels whose reflectivity falls below the reflectivity characteristic threshold. High-reflective pixels identified by the Sobel edge detection algorithm in the visible light band reflected light signals are spatially matched with low-reflective pixels marked by the region growing algorithm in the shortwave infrared band reflected light signals. Successfully matched adjacent pixels are then fused using a morphological closing algorithm to form a continuous region. The final output is a high-reflective area mask containing both metallic ink areas and ordinary areas.
[0027] It should be noted that the reflectivity characteristic threshold is set based on the comparison of the standard reflectivity spectral curves of metallic ink and ordinary ink in the visible light band and short-wave infrared band. The value range is [0.1, 0.3].
[0028] According to the high-reflective area mask on the printed surface, the reflected light data of the printed surface is dynamically adjusted, and the images of the metallic ink area and the ordinary area of the printed surface are collected in a sequence of short exposure, medium exposure, and long exposure; Furthermore, a mask for the highly reflective areas of the printed surface is used to guide exposure parameter selection. The metallic ink area is captured using a short exposure time, while the normal area is captured using medium and long exposure times. Exposure parameters are dynamically determined based on the spatial distribution of the mask for the highly reflective areas. The short exposure time targets the high reflectivity of the metallic ink area, the medium exposure time targets the primary reflective features of the normal area, and the long exposure time targets the low-reflectivity details of the normal area. This exposure sequence yields images of the metallic ink area and the normal area, with the metallic ink area image retaining the high reflectivity details and the normal area image containing two different brightness levels, one at medium exposure and the other at long exposure.
[0029] The improved Mertens algorithm is used to fuse the metallic ink area image and the ordinary area image to generate an HDR image group.
[0030] The improvement of the Mertens algorithm and the process of generating HDR image groups are as follows: In the existing Mertens algorithm's weighted map-based multi-exposure fusion framework, the high-reflective area mask of the printed surface is used as a dynamic adjustment factor to address the difference in reflective characteristics between the metallic ink area and the ordinary area on the printed surface. A weight calculation strategy based on local contrast enhancement is adopted for the metallic ink area image, while the brightness and saturation weight calculation method of the traditional Mertens algorithm is retained for the ordinary area image. In the image pyramid fusion stage, the high-reflective area mask of the printed surface is used to guide the adaptive weighted blending of the metallic ink area image and the ordinary area image at each level of the Laplacian pyramid, ensuring that the highlight details of the metallic ink area and the color transition of the ordinary area are synchronously optimized and presented in the HDR image group.
[0031] S2. Obtain the surface texture features of the visible light channel and the substrate penetration features of the infrared channel in the HDR image group, perform cross-modal association through the spatiotemporal attention mechanism, and generate a three-dimensional feature cube; Perform sub-pixel registration correction on the printed surface reflected light data in the HDR image group to eliminate the offset caused by mechanical vibration; Furthermore, the printed surface reflected light data from the HDR image set undergoes sub-pixel registration and correction using a phase correlation algorithm. Fourier transforms are used to calculate the displacement vector between images, and displacement estimation is achieved using a pyramid layering strategy, with coarse registration performed at low resolution followed by high-resolution refinement. Displacement compensation is achieved through bilinear interpolation, preserving high-frequency image details. The registration process uses adaptive thresholding to account for motion differences between regions, ultimately eliminating offsets caused by mechanical vibration.
[0032] Based on the corrected visible light band reflected light signal, the MobileNetV3 network is used to extract the surface texture features of the visible light channel (including overprint deviation and ink dot missing features), and a multi-scale feature map of the visible light band is generated through multi-level feature pyramid fusion. Furthermore, the corrected visible light band reflected light signal is processed through the deep separable convolutional structure of the MobileNetV3 network, and the inverse residual method is used to gradually extract surface texture features at different scales. Shallow processing extracts basic texture features such as edges and corners, mid-level processing captures overprint deviation features, and deep processing identifies subtle defects such as missing ink dots. The multi-level feature pyramid fusion process adopts a top-down and horizontally connected structure to align the resolution and splice the channels of feature maps at different scales to form a multi-scale feature map of the visible light band with a rich hierarchical structure. The fusion process uses an attention mechanism to dynamically adjust the weights of texture features at different levels, highlighting channels that are important for defect detection. The resulting multi-scale feature map of the visible light band contains complete texture information from the microscopic to the macroscopic level.
[0033] Based on the corrected short-wave infrared band reflected light signal, the ConvNeXt network is used to extract the substrate penetration characteristics of the infrared channel (including uncured ink and fiber fracture characteristics), and a multi-scale feature map of the short-wave infrared band is generated through cross-scale attention aggregation; Furthermore, the corrected shortwave infrared (SWIR) reflected light signal is processed through the layered convolutional architecture of a ConvNeXt network, employing deep convolution with large kernels to capture long-range dependencies. The feature extraction process focuses on substrate penetration characteristics, with shallow processing identifying uncured ink features and deep processing detecting fiber breakage. A cross-scale attention aggregation mechanism establishes feature associations across both spatial and channel dimensions, employing a progressive upsampling strategy to maintain spatial continuity within the feature map. The resulting multi-scale SWIR feature map comprehensively characterizes substrate penetration, including uncured ink features and fiber breakage.
[0034] Through the spatiotemporal cross-attention mechanism, cross-modal feature association is performed on the multi-scale feature maps of the visible light band and the shortwave infrared band to generate a three-dimensional feature cube.
[0035] Furthermore, the spatiotemporal cross-attention mechanism processes multi-scale feature maps in the visible and shortwave infrared bands. A cross-modal feature correlation matrix is first established. Bidirectional attention is then applied to the spatial dimension of the visible and shortwave infrared multi-scale feature maps, generating spatial-channel interaction weights. These interaction weights guide the feature recombination process, deeply fusing the surface texture features of the visible multi-scale feature maps with the substrate penetration features of the shortwave infrared multi-scale feature maps. Feature recombination utilizes point-by-point convolution to expand the feature representation along the channel dimension while maintaining spatial resolution. The fused features undergo layer normalization and residual connections to form a spatiotemporally consistent three-dimensional feature cube. The height and width dimensions of the 3D feature cube preserve the spatial information of the original image, while the depth dimension integrates cross-modal features, achieving a unified representation of overprint deviation, missing ink dots, uncured ink, and fiber breakage.
[0036] S3, using the inverse Monte Carlo ray tracing algorithm to obtain the material physical properties of the printed product, generating enhanced feature tensors through 3D convolutional network stitching, and performing defect detection and positioning through cross-scale feature aggregation; The material physical properties of printed products include ink layer thickness distribution, substrate surface roughness parameters and varnish curing degree heat map.
[0037] Through the ink absorbance-thickness relationship curve, the infrared characteristic response value of each spatial position in the short-wave infrared band multi-scale characteristic map is inverted to generate the ink layer thickness distribution; Furthermore, the infrared characteristic response values at each spatial position in the short-wave infrared band multi-scale feature map are matched with the ink absorbance-thickness relationship curve to obtain a preliminary thickness value for each pixel in the multi-scale feature map. The infrared characteristic response values are compared with the ink absorbance-thickness relationship curve through an interpolation algorithm, and the preliminary thickness estimate is converted into a thickness value with sub-pixel accuracy. The conversion process maintains the spatial position correspondence. Finally, the ink layer thickness distribution is generated; The varnish curing degree calibration curve was compared with the dual-band characteristic ratio analysis method, and the nonlinear least squares fitting was used to generate the varnish curing degree thermodynamic map.
[0038] Furthermore, two characteristic absorption bands were selected based on the spectral absorption characteristics of the substrate's permeability, and the central wavelengths of the bands were determined using peak detection. The ratio of the response values of the two bands at each spatial location was compared point by point with a varnish cure degree calibration curve. This varnish cure degree calibration curve was established using differential scanning calorimetry data to characterize the nonlinear mapping relationship between the characteristic ratio and cure degree. This comparison process optimized the correspondence between the characteristic ratio and cure degree using a nonlinear least-squares fit, maintaining spatial consistency, ultimately generating a varnish cure degree heat map.
[0039] Through the micro-surface BRDF fitting algorithm, the surface normal distribution modeling and scattering energy analysis of the multi-scale feature map of the visible light band in the three-dimensional feature cube are performed to obtain the surface roughness parameters of the substrate.
[0040] Furthermore, a reflection characteristic description framework is established based on the microplane theory. The spatial gradient information of the multi-scale feature map of the visible light band is used to construct the surface normal distribution, and the anisotropic Gaussian distribution is used to characterize the microsurface orientation characteristics. The reflection behavior under multi-angle illumination conditions is simulated by the Monte Carlo ray tracing method, and the simulation results (the anisotropic Gaussian distribution parameters output by the microsurface BRDF fitting algorithm that match the measured reflection characteristics of the multi-scale feature map of the visible light band) are iteratively optimized with the measured reflection characteristics of the multi-scale feature map of the visible light band. The optimization process adjusts the microsurface height field parameters to achieve the best match between the reflection characteristic description and the reflection characteristics of the multi-scale feature map of the visible light band, and obtains the surface roughness parameters of the substrate; It should be noted that the ink absorbance-thickness relationship curve is obtained through the following process: under standard temperature and humidity conditions, a spectrometer is used to measure the absorbance values of ink samples of different known thicknesses in the short-wave infrared band, and the ink absorbance-thickness relationship curve is established through least squares fitting.
[0041] The process of obtaining the varnish curing degree calibration curve is as follows: Based on the short-wave infrared band reflected light signal, the actual curing degree is measured by differential scanning calorimetry as the vertical coordinate. The corresponding relationship curve between the varnish curing degree and the characteristic absorption peak ratio is established through polynomial regression fitting, and the varnish curing degree calibration curve is finally output.
[0042] Through the multimodal affine transformation registration algorithm, the three-dimensional feature cube and the material physical properties are spatially registered to generate a set of registered multi-source data; Furthermore, a multimodal affine transformation registration algorithm establishes a geometric transformation relationship based on translation, rotation, and scaling parameters. This parameter is optimized by matching the multi-scale feature points of the 3D feature cube with the spatial key points of the material's physical properties. The matching process employs a hierarchical strategy, starting with low-resolution coarse registration followed by high-resolution fine registration, ensuring that the multi-scale feature maps of the 3D feature cube in the visible and shortwave infrared bands are consistent with the material's physical properties. This ultimately generates a set of registered multi-source data.
[0043] Through hierarchical feature reorganization and zero-filling expansion, the registered multi-source fusion data set is structured and organized according to the channel dimension, depth dimension and spatial dimension to construct a standardized three-dimensional tensor; The calibrated multi-source dataset is then structured through hierarchical feature recombination and zero-padding expansion. Channel dimension recombination arranges the multi-scale feature maps for the visible light band, the shortwave infrared band, the ink layer thickness distribution, the substrate surface roughness parameters, and the varnish curing degree heat map by category. The depth dimension is expanded to the same depth using zero-padding, and the spatial dimension is aligned to the resolution using bilinear interpolation. The resulting normalized three-dimensional tensor is then constructed.
[0044] Based on the normalized 3D tensor, shallow joint features are identified through the first layer of multi-scale convolution (7×7×3 convolution kernel); The normalized 3D tensor is then processed through a first layer of multiscale convolution, using a 7×7×3 convolution kernel sliding synchronously across the height, width, and depth dimensions. This convolution kernel captures local texture details in the multiscale feature map of the visible band, substrate penetration characteristics in the multiscale feature map of the shortwave infrared band, and shallow correlation patterns in the material physical properties of the 3D tensor, including ink layer thickness distribution, substrate surface roughness parameters, and varnish cure degree heatmaps. The output feature map of the multiscale convolution retains the original spatial resolution, while the channel dimension integrates primary joint features from multiple sources to generate shallow joint features that include edge responses, thickness gradients, and cure degree differences.
[0045] The shallow joint features are expanded in height, width, and depth through the second layer of dilated convolution (3×3×3 convolution kernel) to generate deep feature tensors; The shallow joint features are then processed through a second layer of dilated convolution, using a 3×3×3 convolution kernel to expand them in height, width, and depth. Dilated convolution expands the receptive field through staggered sampling, simultaneously correlating distant regions of ink thickness variation, surface roughness anomalies, and varnish curing degree mutations in the shallow joint features. The convolution kernel learns the coordinated variations of multimodal features across channels in the depth dimension, linking local texture features with global material properties. The output is a deep feature tensor.
[0046] The HDR image group and the deep feature tensor are cross-modally jump-concatenated through the third layer of cross-modal fusion convolution (1×1×1 point-by-point convolution kernel), and the enhanced feature tensor is generated in combination with the cross-modal attention mechanism.
[0047] Furthermore, the deep feature tensor and the HDR image set undergo a third layer of cross-modal fusion convolution, using a 1×1×1 point-by-point convolution kernel for channel-wise reweighting. Cross-modal skip concatenation combines the full dynamic range reflectance information of the HDR image set with the abstract semantic features of the deep feature tensor along the channel dimension. The concatenated features are dynamically weighted using a cross-modal attention mechanism: spatial attention focuses on the interface between metallic ink and normal areas, while channel attention enhances the response strength of uncured ink features and fiber fracture characteristics. The fused enhanced feature tensor integrates multi-exposure details and material property correlations, while the depth dimension preserves cross-modal complementary information, providing a discriminative basis for defect classification.
[0048] Based on the enhanced feature tensor, the channel joint normalization calculation is performed through cross-scale feature aggregation to predict the surface anomaly score of the printed product. The expression is: ; in, is the score of abnormality on the printed surface. is the vertical dimension of the multi-scale feature map of the visible light band, is the horizontal dimension of the multi-scale feature map of the shortwave infrared band, is the channel dimension of the 3D feature cube, is the enhanced feature tensor at position No. The value of each channel.
[0049] It should be noted that the spatial feature map of each channel is first squared along the channel dimension. The channel joint normalization calculation calculates the square value of each channel in the vertical dimension of the multi-scale feature map of the visible light band. and the horizontal dimension of the shortwave infrared band multi-scale feature map The energy mean of each channel is obtained by spatial averaging. The channel dimension of each channel is Perform global averaging on the printed surface to generate a print surface anomaly score The calculation process strictly maintains the spatial position correspondence of the enhanced feature tensor and the printed surface abnormality score The value of reflects the consistency of the multimodal characteristic energy distribution at each position on the printed surface. The higher the value, the greater the probability of surface abnormality.
[0050] Based on the surface anomaly scores of historical qualified printed products, the defect threshold S1 is defined by the 6σ criterion; when When ≥S1, it is considered that there are defects on the printed surface; when When <S1, the printed matter is considered to meet the printing standards; It should be noted that when defining the defect threshold S1 using the 6σ criterion based on historical surface anomaly score data for qualified printed products, this data is used to establish a statistical distribution benchmark. Defect threshold S1 is determined by combining the distribution characteristics of the historical surface anomaly score dataset with the 6σ criterion. The value range of defect threshold S1 is between four and six standard deviations of the mean of the historical surface anomaly score for qualified printed products.
[0051] Printing standards refer to the qualified range of surface quality parameters of printed products, including specific indicators such as overprint deviation tolerance (for example ≤0.05mm), ink dot integrity (missing diameter <80μm), ink layer thickness tolerance (±2μm), substrate roughness threshold (Ra≤0.8μm) and varnish curing degree compliance value (≥95%). They are formulated based on the statistical distribution of measured data such as ink layer thickness distribution and surface roughness parameters of historical qualified printed products.
[0052] Based on the spatial distribution of the enhanced feature tensor, the sub-pixel coordinate boundaries of printed surface defects are obtained through non-maximum suppression and connected domain analysis. Furthermore, when the spatial distribution of the enhanced feature tensor is processed through non-maximum suppression, the neighborhood response values are first compared pixel by pixel along the height and width dimensions, suppressing candidate points that are not local maxima while retaining the peak regions of the defect feature response. The binary mask output by non-maximum suppression is then used to mark independent defect regions through connected domain analysis. Cubic spline interpolation is then used to fit the gradient changes at the defect edge, and the sub-pixel coordinate boundaries of the printed surface defects are identified with sub-pixel accuracy.
[0053] Enhanced spatial distribution of feature tensors , the expression is: ; S4. Use the improved DBSCAN clustering algorithm to spatially aggregate the defect coordinates to generate a complete defect area, and output the defect detection report through dynamic threshold classification.
[0054] The improvement process of DBSCAN clustering algorithm is as follows: First, based on the fixed neighborhood density calculation of traditional DBSCAN, the density gradient weighted method is combined to enhance the spatial distribution of feature tensors through Gaussian kernel function. Local weighting is performed so that high-energy defect areas obtain greater density weights, thereby improving the detection sensitivity of weak defects. Secondly, in order to address the cluster boundary missegmentation problem that is prone to occur in traditional algorithms, a boundary point reclassification mechanism is added (specifically: when a boundary point connects two clusters and meets the density ratio condition, it is reclassified into an adjacent cluster with a higher density). The density ratio of the boundary point to the adjacent cluster is obtained through density ratio comparison analysis, and based on the statistical analysis of the density ratio of the boundary point to the cluster in the historical qualified printed surface defect data, α=1.2 is set as the empirical threshold, and the boundary points that meet the empirical threshold are reclassified into the adjacent high-density cluster, effectively avoiding over-segmentation.
[0055] Based on the sub-pixel coordinate boundaries of printed surface defects, a defect coordinate clustering set is generated through density gradient weighting and boundary point reclassification; Furthermore, a Gaussian kernel function is used to assign local density weights to the coordinate neighborhood, enhancing spatial locations with higher response values in the feature tensor to receive greater density weights. The weighted coordinate set is processed through a boundary point reclassification mechanism. When a boundary point connects two core clusters simultaneously and the density ratio of adjacent clusters exceeds an empirical threshold, the boundary point is reclassified into the cluster with the higher density. The density ratio is determined by comparing the number of defects within a cluster to the area of the neighborhood. The reclassification process eliminates false boundary segmentations caused by local density fluctuations, and the resulting defect coordinate clusters represent the complete defect area.
[0056] Through the regional attribute analysis algorithm, the geometric parameters and defect energy parameters of each defect coordinate cluster are obtained; Furthermore, the defect coordinate clustering set is obtained by the regional attribute analysis algorithm in two steps to obtain the geometric parameters and defect energy parameters: Geometric parameter acquisition is based on the sub-pixel coordinate boundary point set of the defect coordinate cluster. The regional attribute analysis algorithm constructs the grid topology of the defect area through Delaunay triangulation. The grid unit area is accumulated to generate the defect area area; the Euclidean distance of adjacent points in the coordinate boundary point sequence is accumulated to generate the perimeter; principal component analysis is used to extract the variance ratio of the coordinate point set to generate the aspect ratio; the rotating caliper algorithm is used to generate the minimum enclosing rectangle size; finally, the geometric parameter acquisition is achieved.
[0057] The defect energy parameters are obtained by traversing the sub-pixel coordinate points within the defect coordinate cluster through the regional attribute analysis algorithm, extracting the channel response values of the corresponding positions of the enhanced feature tensor, and aggregating the mean and standard deviation of the response values of all coordinate points to generate the defect energy parameters.
[0058] The decision tree classifier is used to segment the geometric parameters and defect energy parameters, and a dynamic process threshold is defined as the decision boundary of the decision tree classifier to generate defect level labels. Furthermore, a judgment rule is first established based on the dynamic process threshold, which is set according to printing standards such as ink layer thickness tolerance and overprint deviation tolerance; the defect area is used as the primary splitting feature, and the defect energy parameter is used as the secondary judgment basis, and the defects are divided into different subsets through recursive binary division; finally, the leaf node generates a defect level label; among them, the dynamic process threshold is adjusted in real time according to the ink layer thickness distribution, ambient temperature and humidity, printing pressure and ink viscosity. For example, when the ink layer thickness increases, the dynamic process threshold is automatically increased, and when the ambient humidity rises, the dynamic process threshold is correspondingly reduced.
[0059] It should be noted that the dynamic process threshold is determined by the statistical distribution of defect parameters of historical qualified printed products and the printing process requirements, and the value range is [0.1, 0.5].
[0060] Generate a defect detection report based on defect level labels, sub-pixel coordinate bounding boxes, defect geometry parameters, and defect energy parameters.
[0061] This embodiment also provides a computer device suitable for the digital printing quality detection method based on image analysis, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute computer-executable instructions to implement the digital printing quality detection method based on image analysis proposed in the above embodiment.
[0062] The computer device may be a terminal, comprising a processor, memory, a communication interface, a display, and an input device connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores an operating system and computer programs. The internal memory provides an environment for the operating system and computer programs stored in the non-volatile storage media. The communication interface of the computer device is used to communicate with external terminals via wired or wireless communication. Wireless communication may be achieved via Wi-Fi, a carrier network, NFC (near-field communication), or other technologies. The display of the computer device may be a liquid crystal display or an electronic ink display. The input device may be a touchscreen overlay on the display, buttons, a trackball, or a touchpad on the computer device housing, or an external keyboard, touchpad, or mouse.
[0063] This embodiment further provides a storage medium having a computer program stored thereon. When the program is executed by a processor, the digital printing quality detection method based on image analysis as proposed in the above embodiment is implemented. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0064] In summary, the present invention achieves synchronous optimization of highlight details and color transitions in the image pyramid fusion stage by: using an improved Mertens algorithm and utilizing a high-reflective area mask to dynamically adjust the fusion weights of the metallic ink area and the ordinary area; at the same time, cross-modally correlating the visible light and infrared multi-scale feature maps through a spatiotemporal cross-attention mechanism, constructing a three-dimensional feature cube containing surface texture and substrate penetration characteristics, achieving accurate inversion of material properties such as ink thickness and roughness, and improving the accuracy and reliability of digital printing quality detection.
[0065] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A digital printing quality detection method based on image analysis, characterized by: include, Collect reflected light data and ambient light data from the printed surface, dynamically adjust the multi-band light source to compensate for high reflectivity in the metallic ink area, and generate an HDR image group; The surface texture features of the visible light channel and the substrate penetration features of the infrared channel in the HDR image group are obtained, and cross-modal association is performed through the spatiotemporal attention mechanism to generate a three-dimensional feature cube; The reverse Monte Carlo ray tracing algorithm is used to obtain the material physical properties of the printed product, and enhanced feature tensors are generated through 3D convolutional network splicing. Defect detection and positioning are then performed through cross-scale feature aggregation. The improved DBSCAN clustering algorithm is used to spatially aggregate the defect coordinates to generate a complete defect area, and the defect detection report is output through dynamic threshold classification.
2. The digital printing quality inspection method based on image analysis according to claim 1, characterized in that: The steps of dynamically adjusting the multi-band light source to compensate for high reflection in the metal ink area and generate an HDR image group are as follows: Generate a mask of high-reflective areas on the printed surface by combining edge gradient analysis with reflectivity differences; The reflected light data of the printed surface is dynamically adjusted, and images of the metallic ink area and ordinary area of the printed surface are collected in a sequence of short exposure, medium exposure, and long exposure. The images are then fused to generate an HDR image group using an improved Mertens algorithm.
3. The digital printing quality inspection method based on image analysis according to claim 1, wherein: The surface texture features of the visible light channel and the substrate penetration features of the infrared channel in the HDR image group are obtained through the MobileNetV3 network and the ConvNeXt network respectively.
4. The digital printing quality inspection method based on image analysis according to claim 3, wherein: The steps of performing cross-modal association through the spatiotemporal attention mechanism to generate a three-dimensional feature cube are as follows: Generate multi-scale feature maps of visible light bands through multi-level feature pyramid fusion; Generate multi-scale feature maps in the shortwave infrared band through cross-scale attention aggregation; Through the spatiotemporal cross-attention mechanism, cross-modal feature association is performed on the multi-scale feature maps of the visible light band and the shortwave infrared band to generate a three-dimensional feature cube.
5. The digital printing quality inspection method based on image analysis according to claim 1, wherein: The reverse Monte Carlo ray tracing algorithm is used to obtain the material physical properties of the printed matter. The steps are as follows: Through the ink absorbance-thickness relationship curve, the infrared characteristic response value of each spatial position in the short-wave infrared band multi-scale characteristic map is inverted to generate the ink layer thickness distribution; The varnish curing degree calibration curve was compared with the dual-band characteristic ratio analysis method, and the nonlinear least squares fitting was used to generate the varnish curing degree heat map. Through the micro-surface BRDF fitting algorithm, the surface normal distribution modeling and scattering energy analysis of the multi-scale feature map of the visible light band in the three-dimensional feature cube are performed to obtain the surface roughness parameters of the substrate.
6. The digital printing quality inspection method based on image analysis according to claim 1, wherein: The generation of enhanced feature tensors through three-dimensional convolutional network splicing refers to the first layer of multi-scale convolution identifying shallow joint features, the second layer of void convolution expanding the shallow joint features to generate deep feature tensors, and the third layer of cross-modal fusion convolution performing cross-modal jump splicing on the HDR image group and the deep feature tensor, and combining the cross-modal attention mechanism to generate enhanced feature tensors.
7. The digital printing quality inspection method based on image analysis according to claim 6, characterized in that: The steps of defect detection and positioning through cross-scale feature aggregation are as follows: Based on the enhanced feature tensor, channel joint normalization calculation is performed through cross-scale feature aggregation to predict the surface anomaly score of the printed product and compare it with the defect threshold to identify defects on the printed product surface; Through non-maximum suppression and connected domain analysis, the sub-pixel coordinate boundaries of printed surface defects are obtained.
8. The digital printing quality inspection method based on image analysis according to claim 1, wherein: The improved DBSCAN clustering algorithm is used to spatially aggregate the defect coordinates to generate a complete defect area, and a defect detection report is output through dynamic threshold classification. The steps are as follows: A regional attribute analysis algorithm is used to obtain the geometric parameters and defect energy parameters of each defect coordinate cluster. At the same time, a decision tree classifier is used to segment the data, and a dynamic process threshold is defined as the decision boundary of the decision tree classifier to generate defect level labels. Generate a defect detection report based on defect level labels, sub-pixel coordinate bounding boxes, defect geometry parameters, and defect energy parameters.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the digital printing quality detection method based on image analysis according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the digital printing quality detection method based on image analysis according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Detection method based on image fusion and detection apparatus therefor
CN108445007A
Digital jet printing image defect detection method based on lightweight semantic segmentation
CN116205881A
Printed matter detection method and device based on machine vision
CN118674713A
Industrial vision product surface printing quality detection method
CN119323686A
Denoising diffusion model driven texture enhanced infrared and visible light image fusion method and system
CN119540071A
Cited By
Visible light detection method and system for tubular workpiece inner surface defects
CN121007901A
Ink printing defect detection method based on image processing
CN121414680A
Multi-angle image fusion printed matter three-dimensional defect detection method and system
CN121767318A