An image processing method applied to printed matter surface color difference detection
By employing multi-layer image pyramids and homomorphic filtering for illumination correction, color gradient and texture boundary region segmentation, and combined with a dynamic reference model, the problems of insufficient illumination correction and inaccurate region segmentation in color difference detection of printed materials are solved, thus achieving accuracy and adaptability in color difference detection.
Patent Information
- Application Number
- CN202510633507.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-05-16
AI Technical Summary
Existing methods for detecting color difference in printed materials have shortcomings in terms of illumination correction, region segmentation, and color difference evaluation. They are difficult to adapt to the characteristics of different batches of printed materials, and the consistency and accuracy of the test results are poor.
An illumination correction technique combining multi-layer image pyramids and homomorphic filtering is employed, along with a region segmentation method based on color gradients and texture boundaries. A dynamic reference model is used for color difference evaluation, and accurate quantization is achieved through multi-dimensional feature distance calculation and adaptive weight fusion.
It effectively eliminates uneven illumination, improves the accuracy of region segmentation, solves the problems of over-segmentation and under-segmentation in traditional methods, and achieves accuracy and adaptability in color difference detection, which is in line with the characteristics of human eye perception.
Smart Images

Figure CN120612286B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to an image processing method for detecting color differences on the surface of printed materials. Background Technology
[0002] Color quality control in printed materials is a crucial aspect of the printing industry, directly impacting the visual appeal and market value of products. Currently, color difference detection in printed materials primarily relies on manual visual inspection or traditional colorimeter measurements. Manual visual inspection methods are susceptible to influences such as the inspector's subjective judgment, fatigue, and ambient lighting, resulting in poor consistency and repeatability of the test results. While traditional colorimeter measurements offer high accuracy, they can only perform point measurements and cannot capture the overall color difference distribution across the printed surface.
[0003] With the development of machine vision technology, color difference detection methods for printed materials based on image processing have gradually emerged. However, existing image processing methods still have shortcomings in areas such as illumination correction, region segmentation, and feature extraction. In particular, they lack comprehensive consideration of printing process parameters and material characteristics, making it difficult to dynamically adjust the detection standards according to the characteristics of different batches of printed materials. Furthermore, the color difference evaluation methods are too simplistic and fail to fully utilize multi-dimensional feature information, making it difficult to meet the differentiated detection needs of different regions. Summary of the Invention
[0004] This invention provides an image processing method for detecting color differences on the surface of printed materials, which solves the technical problems in the prior art such as insufficient illumination correction, inaccurate region segmentation, fixed detection standards, and single color difference evaluation.
[0005] In view of this, the first aspect of the present invention provides an image processing method for detecting color differences on the surface of printed matter, comprising:
[0006] Acquire a digital image of the printed material to be inspected and perform illumination non-uniformity correction, then convert the corrected digital image to the CIELAB color space;
[0007] In the CIELAB color space, region segmentation is performed on digital images based on dual constraints of color gradient and texture boundary to generate a detection region map;
[0008] Feature parameters are extracted from the detection region map to generate a feature dataset;
[0009] A dynamic reference model is established using printing process parameters and material properties.
[0010] Calculate the distance between the feature dataset and the dynamic reference model, identify color difference regions and generate color difference scores, and filter and classify color difference regions based on the color difference scores;
[0011] The color difference areas after screening and grading are optimized, and the color difference detection results are output.
[0012] Optionally, performing illumination non-uniformity correction includes:
[0013] Perform Gaussian pyramid decomposition on the acquired digital images to construct multi-layer image pyramids;
[0014] Extract the luminance components of each layer of the multi-layer image pyramid and perform a logarithmic transformation on the luminance components;
[0015] The transformed luminance component is converted to the frequency domain, a homomorphic filter is applied to suppress low-frequency components, and an inverse transform is performed.
[0016] The processed images of each layer are adjusted to the original digital image size, and the weight coefficients of each layer are determined based on the image features to perform multi-scale fusion.
[0017] The fused brightness information is combined with the color information of the original digital image to generate a light-corrected digital image.
[0018] Optionally, performing region segmentation on a digital image based on dual constraints of color gradient and texture boundary includes:
[0019] Extract the multi-channel gradients of digital images in the CIELAB color space to generate a comprehensive color gradient map;
[0020] A local gray-level co-occurrence matrix is constructed based on digital images, and texture clustering is performed using a Gaussian mixture model. After morphological processing, a texture boundary map is generated.
[0021] Initial seed points are selected based on the comprehensive color gradient map, and the region growing algorithm is executed with the texture boundary map as a constraint to generate the initial region segmentation result.
[0022] The frequency characteristics of printing dots in the initial region segmentation results are analyzed, and the region boundaries are optimized based on the analysis results to obtain the boundary-optimized segmentation map.
[0023] Calculate the color statistical features and boundary features of each region in the boundary optimization segmentation map, merge adjacent regions that meet the preset merging conditions, and generate a merged segmentation map;
[0024] Assign a unique identifier to each region in the merged segmentation map and output the detection region map.
[0025] Optionally, the feature dataset includes contour features, color features, texture features, and printing features.
[0026] Optionally, establishing a dynamic reference model includes:
[0027] Acquire and preprocess the batch reference dataset and historical batch dataset; the batch reference dataset includes a standard sample feature dataset of each batch of printed materials.
[0028] Perform cluster analysis on the standard sample feature dataset to determine the feature distribution pattern and cluster centers, and form the feature statistical structure;
[0029] Obtain the printing process parameters and material property parameters corresponding to each batch, establish the mapping relationship between process parameters, material properties and feature statistics, and calculate the feature adjustment coefficient matrix;
[0030] The feature statistical structure is adjusted by applying the feature adjustment coefficient matrix to generate the feature benchmarks for each batch;
[0031] Based on the similarity analysis between the batch reference dataset and the historical batch dataset, and combined with the characteristic benchmarks of each batch, the dynamic tolerance range is determined, and the color difference evaluation standard for each batch of printed matter is formed.
[0032] By integrating the characteristic benchmarks of each batch and the color difference evaluation standards of printed matter, a dynamic reference model is constructed.
[0033] Optionally, identifying color difference areas and generating color difference scores includes:
[0034] Based on the batch identifier of the printed matter to be tested, the corresponding feature benchmarks and color difference evaluation standards of the printed matter are retrieved from the dynamic reference model;
[0035] Calculate the normalized Euclidean distance between each feature in the feature dataset and the corresponding feature in the feature benchmark, and generate the feature distance matrix;
[0036] Based on the visual sensitivity and feature reliability indicators of each detection area, the weight coefficients of various feature distances are determined, and a weighted fusion method is used to generate a comprehensive distance metric, thus forming a regional color difference quantification value.
[0037] The quantified value of regional color difference is compared with the dynamic tolerance range in the color difference evaluation standard for printed matter to identify color difference areas that exceed the tolerance range, and the color difference grade is determined according to the degree of exceedance.
[0038] Spatial clustering is performed on color difference areas to merge adjacent color difference areas of the same level;
[0039] Calculate the area ratio, boundary clarity, and severity of color difference for each color difference region, and determine the significance score of each color difference region in accordance with the requirements of printing quality specifications;
[0040] The saliency score is used as the color difference score. The color difference regions are then sorted and graded to form a color difference region grading result.
[0041] Optionally, determining the weight coefficients for each image layer based on image features includes:
[0042] The brightness gradient magnitude features and local contrast features of each image layer are extracted and normalized.
[0043] Calculate the comprehensive feature value based on the brightness gradient amplitude feature and local contrast feature;
[0044] For images at different levels in a multi-layer image pyramid, set level weight factors;
[0045] The weight coefficients of each layer of the image are generated by combining the comprehensive feature values with the hierarchical weight factors.
[0046] A second aspect of the present invention provides an image processing system for detecting color differences on the surface of printed matter, comprising:
[0047] The illumination correction module is used to acquire a digital image of the printed material to be inspected and to correct for uneven illumination, and then convert the corrected digital image to the CIELAB color space.
[0048] The region segmentation module is used to perform region segmentation on digital images in the CIELAB color space based on dual constraints of color gradient and texture boundary, and generate a detection region map.
[0049] The feature extraction module is used to extract feature parameters based on the detection region map and generate a feature dataset;
[0050] The reference model building module is used to create a dynamic reference model using printing process parameters and material properties.
[0051] The color difference grading module is used to calculate the distance between the feature dataset and the dynamic reference model, identify color difference regions and generate color difference scores, and filter and grade color difference regions based on the color difference scores;
[0052] The optimization processing module is used to optimize the color difference areas after screening and grading, and output the color difference detection results.
[0053] The beneficial effects of this invention are as follows: This invention employs a lighting correction technique combining multi-layer image pyramids and homomorphic filtering, and introduces an adaptive weight fusion mechanism based on image features, effectively eliminating lighting unevenness while maintaining the clarity of printing details; it proposes a dual-constraint segmentation method based on color gradients and texture boundaries, combined with printing dot frequency feature analysis and region boundary optimization techniques, improving the segmentation accuracy of complex patterns and gradient areas in printed materials, and effectively reducing over-segmentation and under-segmentation phenomena; the dynamic reference model achieves precise adjustment of feature benchmarks through XGBoost regressors and Shapley value weight allocation, solving the problem that traditional fixed standard models are difficult to adapt to the differences in characteristics of different batches of printed materials; and it constructs a color difference evaluation system that integrates visual perception characteristics, achieving precise quantitative evaluation of color difference through multi-dimensional feature distance calculation, adaptive weight fusion, and dynamic threshold grading techniques, thereby improving the accuracy of color difference detection. Attached Figure Description
[0054] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0055] Figure 1 This is a flowchart of an image processing method for detecting color differences on the surface of printed materials.
[0056] Figure 2 This is an image correction flowchart for an image processing method applied to the detection of color differences on the surface of printed materials.
[0057] Figure 3 This is a flowchart of an image region segmentation method for detecting color differences on the surface of printed materials. Detailed Implementation
[0058] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0059] Reference Figures 1-3 As one embodiment of the present invention, this embodiment provides an image processing method for detecting color differences on the surface of printed matter, the flowchart of which is shown below. Figure 1 As shown, the method includes,
[0060] S1: Acquire a digital image of the printed material to be inspected and perform illumination non-uniformity correction, then convert the corrected digital image to the CIELAB color space.
[0061] In a specific embodiment of the present invention, the image correction flowchart is as follows: Figure 2 As shown, it includes the following steps:
[0062] S1.1: Acquire a digital image of the printed material to be inspected, perform Gaussian pyramid decomposition on the acquired digital image, and construct a multi-layer image pyramid.
[0063] The first layer is the original digital image, and each subsequent layer is obtained by performing Gaussian smoothing and downsampling on the previous layer. The number of pyramid layers N is adaptively determined based on the image resolution; if the image size is... ,but .
[0064] In addition, it is necessary to ensure that the image resolution meets the detection accuracy requirements during the acquisition process.
[0065] S1.2: Extract the luminance components of each layer of the multi-layer image pyramid and perform a logarithmic transformation on the luminance components.
[0066] It is important to note that when performing a logarithmic transformation, a small positive number (such as 0.001) needs to be added to the luminance component to prevent the logarithmic operation from being invalid when the luminance value is zero. Extracting the luminance component and performing a logarithmic transformation helps to compress the dynamic range and make the luminance distribution more uniform.
[0067] S1.3: Convert the transformed luminance component to the frequency domain, apply a homomorphic filter to suppress the low-frequency components that represent illumination non-uniformity, and perform the inverse transform.
[0068] In this embodiment, the frequency domain transformation adopts a two-dimensional Fourier transform to efficiently separate the low-frequency illumination component (concentrated in the center of the frequency domain) and the high-frequency reflection component (distributed at the edge of the frequency domain); the inverse transform adopts an inverse Fourier transform to ensure that the frequency domain filtering result is losslessly restored to the spatial domain.
[0069] In addition, homomorphic filters The transfer function satisfies:
[0070]
[0071] in, For frequency domain coordinates, and These are high-frequency gain and low-frequency gain, respectively (high-frequency gain controls the enhancement intensity of high-frequency components, and low-frequency gain controls the suppression intensity of low-frequency components). The slope constant is... The cutoff frequency is defined as 0.05 to 0.2 times the image size. Homomorphic filters are chosen because: printed images conform to the illumination-reflection imaging model, and homomorphic filtering transforms this multiplicative model into an additive model through logarithmic transformation, facilitating frequency domain separation; it also allows for independent control of the high-frequency reflection component (enhancing printing details) and the low-frequency illumination component (suppressing uneven illumination), which is superior to traditional filtering methods.
[0072] S1.4: The processed images of each layer are upsampled to the original digital image size, and the weight coefficients of each layer are determined based on the image features to perform multi-scale fusion.
[0073] The image features include luminance gradient magnitude and local contrast. Specifically, the luminance gradient magnitude is obtained by calculating the horizontal and vertical gradients using the Sobel operator and then taking the modulus; the local contrast is obtained by calculating the ratio of the standard deviation to the mean of the luminance components in the neighborhood. Ideally, the combination of these two features can comprehensively characterize the image structure information: the luminance gradient magnitude effectively captures edge and detail features, while the local contrast accurately reflects changes in illumination uniformity. The weighted combination of the two ensures the clarity of the printed pattern edges while suppressing interference caused by uneven illumination.
[0074] Furthermore, determining the weight coefficients of each image layer based on image features includes: extracting the brightness gradient magnitude features and local contrast features of each image layer, performing normalization processing to map their value range to the [0,1] interval; calculating the comprehensive feature value using a weighted method, in this embodiment assigning a larger weight to the gradient magnitude feature; setting a layer weight factor for different layers of images in the multi-layer image pyramid, typically assigning a larger base weight to lower layers and appropriately reducing the base weight to higher layers; and combining the comprehensive feature value with the layer weight factor to generate the weight coefficients of each image layer.
[0075] Furthermore, in the multi-scale fusion stage, the images of each layer are fused pixel-level weighted according to the calculated weight coefficients.
[0076] Through the above steps, the present invention effectively eliminates the unevenness of illumination in printed images. Compared with the traditional global illumination correction method, this method achieves a more uniform illumination distribution while maintaining edge clarity, laying a solid foundation for subsequent color difference detection.
[0077] S1.5: Combine the fused brightness information with the color information of the original digital image to generate a light-corrected digital image.
[0078] It should be noted that this step is designed to address the color distortion that may occur during the illumination correction process, ensuring that color accuracy is maintained while correcting the illumination.
[0079] S1.6: Convert the corrected digital image to the CIELAB color space.
[0080] Furthermore, the conversion to the CIELAB color space is accomplished by first converting the image from the RGB color space to the XYZ color space, and then from the XYZ color space to the CIELAB color space.
[0081] S2: In the CIELAB color space, region segmentation is performed on the digital image based on the dual constraints of color gradient and texture boundary to generate a detection region map.
[0082] In a specific embodiment of the present invention, the image region segmentation flowchart is as follows: Figure 3 As shown, it includes the following steps:
[0083] S2.1: Extract the multi-channel gradients of the digital image in the CIELAB color space and generate a comprehensive color gradient map.
[0084] It should be noted that extracting multi-channel gradients from digital images in the CIELAB color space is to comprehensively capture color change information. Specifically, the gradient magnitudes of the L, a, and b channels are calculated separately. The Sobel operator is used to calculate the gradients in both the horizontal and vertical directions. The gradient characteristics of the three channels are taken into account and different weights are assigned (usually, the L channel gradient is given a weight of 0.4, and the a and b channel gradients are each given a weight of 0.3). Then, the weighted gradient magnitudes of the three channels are fused to generate a comprehensive color gradient map.
[0085] S2.2: Construct a local gray-level co-occurrence matrix based on digital images, perform texture clustering using a Gaussian mixture model, and generate a texture boundary map after morphological processing.
[0086] Specifically, the luminance channel L is extracted from the digital image in the CIELAB color space, and the image is divided into multiple overlapping local regions. For each local region, the gray-level co-occurrence matrix in multiple directions is calculated, including four main directions: horizontal, vertical, diagonal, and anti-diagonal. Four texture statistical features—contrast, correlation, energy, and homogeneity—are extracted for each direction to form a local texture feature vector. Unsupervised clustering is performed on the texture feature vector using a Gaussian mixture model to generate a texture category label map. Morphological processing is performed on the texture category label map, including edge extraction, thinning, and connection operations, to remove noise and isolated points, fill broken boundaries, and generate a texture boundary map with closed boundaries.
[0087] Preferably, by constructing a local gray-level co-occurrence matrix and Gaussian mixture model clustering, the differences in texture features of different areas of printed matter can be effectively identified, especially for areas of printed matter with special texture structures such as dots, lines and fixed patterns.
[0088] S2.3: Select initial seed points based on the comprehensive color gradient map, use the texture boundary map as a constraint, execute the region growing algorithm to generate the initial region segmentation result.
[0089] Further, thresholding is performed on the comprehensive color gradient map generated in S2.1, identifying regions with gradient values below the gradient selection threshold as candidate seed regions, where the gradient selection threshold is determined based on the color complexity of the printed material. Within each candidate seed region, the pixel with the highest color uniformity and texture consistency index is selected as the initial seed point. The texture boundary map is converted into a constraint matrix, and the pixels at the texture boundary positions are set as region growth blocking points. Starting from each initial seed point, adaptive threshold region growth is performed, and a color similarity threshold is set, which is dynamically adjusted according to the color variance of the local region to adapt to the color change characteristics of different printing areas. When the region growth process encounters texture boundary constraints or the color difference between pixels exceeds the color similarity threshold, the expansion stops, completing the growth process of a single region. Post-processing is performed on all generated regions, including small region merging and hole filling, eliminating fragmented regions, and generating the initial region segmentation result.
[0090] Ideally, a region growing algorithm that integrates color gradient and texture boundary constraints improves the segmentation accuracy of gradient transition regions and dot-matrix variation regions in printed materials, while reducing over-segmentation. Furthermore, an adaptive thresholding mechanism enables the algorithm to intelligently adapt to the local characteristics of different color regions, effectively solving the segmentation challenges posed by the unique dot structure and color transitions of printed materials.
[0091] S2.4: Analyze the frequency characteristics of printing dots in the initial region segmentation results, optimize the region boundaries based on the analysis results, and obtain the boundary-optimized segmentation map.
[0092] Among them, the frequency characteristics of printing dots include dot density, dot arrangement pattern and dot size distribution.
[0093] Specifically, the boundary regions of the initial region segmentation result are extracted; the differences in dot features on both sides of the boundary are detected, and the dot density difference rate, consistency of arrangement pattern, and similarity of size distribution are calculated. Based on these three indicators, a comprehensive feature difference index is determined; for boundary segments with a comprehensive feature difference index lower than a preset feature difference judgment threshold, a boundary relocation operation is performed to adjust the boundary to the nearest position with the maximum dot density gradient; for boundary segments with a comprehensive feature difference index higher than a preset feature difference judgment threshold, boundary smoothness is improved through boundary optimization processing; the optimized boundary is merged with the initial region segmentation result to update the region boundary information and form a boundary-optimized segmentation map.
[0094] The threshold for determining feature differences is determined based on the type of printed matter and the required detection accuracy.
[0095] S2.5: Calculate the color statistical features and boundary features of each region in the boundary optimization segmentation map, merge adjacent regions that meet the preset merging conditions, and generate a merged segmentation map.
[0096] Among them, color statistical features include the average CIELAB value, standard deviation, and color histogram distribution of pixels within the region, while boundary features include boundary gradient magnitude, directional consistency, and boundary curvature. Color difference values are calculated based on the color statistical features of adjacent regions, and boundary intensity values are calculated based on the boundary features. These two values are used to determine whether adjacent regions meet the preset merging conditions.
[0097] Furthermore, the preset merging condition means that when the color difference value between adjacent areas is less than the color difference threshold and the boundary intensity value is less than the boundary intensity threshold, these areas will be merged. In addition, the color difference threshold and boundary intensity threshold can be adaptively adjusted based on factors such as the size and shape of the area and the characteristics of the surrounding area.
[0098] Optionally, for areas that may contain special materials such as metallic inks or fluorescent inks (pre-identified by detecting high brightness, high saturation, or abnormal reflection characteristics), local reflection characteristic analysis is used, and a reflection uniformity index is added to the merging judgment conditions to prevent the erroneous merging of special material areas with ordinary printing areas.
[0099] It should be noted that if the preset merging conditions are not met, there is no need to merge, and the merged split image will be used instead.
[0100] S2.6: Assign a unique identifier to each region in the merged segmentation map and output the detection region map.
[0101] S3: Extract feature parameters based on the detection region map and generate a feature dataset.
[0102] In a specific embodiment of the present invention, step S3 includes the following steps:
[0103] S3.1: Based on the detection area map, extract the geometric morphological parameters of each detection area to generate contour features.
[0104] Among them, the geometric morphological parameters include area, perimeter, and shape complexity, with shape complexity represented by the ratio of the square of the perimeter to the area.
[0105] S3.2: Extract the color statistical distribution parameters of each detection area in the CIELAB color space, calculate the color space distribution parameters, and generate color features.
[0106] Among them, the color statistical distribution parameters include the mean and standard deviation of the luminance L channel and the chroma a and b channels, and the color space distribution parameters include color clustering degree and color boundary sharpness. Color clustering degree is quantified by the degree of clustering of similar color pixels in the detection area, and color boundary sharpness is quantified by calculating the color gradient amplitude at the boundary of the detection area.
[0107] S3.3: Apply texture feature extraction technology to extract structural texture parameters and statistical texture parameters, and construct texture features.
[0108] Specifically, based on the local binary pattern feature map, the texture directionality and roughness of each detection region are analyzed to obtain structural texture parameters; using the gray-level co-occurrence matrix, the texture contrast and homogeneity of each detection region are calculated to obtain statistical texture parameters.
[0109] S3.4: Apply printing feature analysis technology to extract printing process parameters and printing quality parameters, and construct printing features.
[0110] Furthermore, dot distribution density, dot arrangement consistency, and dot size uniformity are extracted to obtain printing process parameters. Dot distribution density is calculated by the precise number of dots per unit area, dot arrangement consistency is quantified by the variability of dot spacing, and dot size uniformity is characterized by the standard deviation of dot size within the region. The color contrast between each detection area and its adjacent areas is calculated to obtain printing quality parameters.
[0111] S3.5: The extracted contour features, color features, texture features, and printing features are filtered and normalized to generate a structured feature dataset.
[0112] It should be noted that the screening process includes applying feature selection algorithms to evaluate the importance of various extracted features, retaining features that significantly contribute to color difference detection, and removing redundant features; the normalization process includes mapping the retained features to a uniform numerical range and organizing them according to region identifiers.
[0113] Preferably, the various features in the feature dataset are optimized and combined according to the detection objective. Specifically, contour features are mainly used to describe the spatial morphological characteristics of color difference regions, color features reflect the color distribution patterns within the regions, texture features reflect the surface structure characteristics of the regions, and printing features specifically characterize the printing process quality. Through this collaborative representation of multi-dimensional features, the color difference characteristics of the printed surface can be comprehensively reflected, providing a reliable data foundation for subsequent color difference evaluation.
[0114] S4: Establish a dynamic reference model using printing process parameters and material properties.
[0115] In one specific embodiment of the present invention, step S4 includes the following steps:
[0116] S4.1: Obtain and preprocess the batch reference dataset and historical batch dataset.
[0117] The batch reference dataset includes standard sample feature datasets for each batch of printed materials. The standard sample feature dataset refers to the feature dataset obtained from confirmed qualified standard printed material samples within a batch, using the exact same feature extraction method as the printed material to be inspected. The historical batch dataset is the standard sample feature dataset of all previous batches stored in the system database. The batch reference dataset is collected through the production quality control process, while the historical batch dataset is retrieved through database system retrieval.
[0118] Furthermore, for new batches of printed materials being inspected for the first time, when no standard sample for that batch is available, the system selects the batch data with the most similar printing process and material characteristics from the historical batch dataset based on the batch's printing process parameters and material properties. This data is then used to construct a standard sample feature dataset for that batch. Similarity is determined by calculating the weighted distance between printing process information (such as printing equipment type, ink formulation, and printing speed) and material property information (such as paper type, surface treatment, and basic whiteness). This similarity matching mechanism based on process parameters and material properties solves the problem of lacking standard samples for the first inspection of new batches of printed materials, ensuring the continuous availability of the inspection system.
[0119] S4.2: Perform cluster analysis on the standard sample feature dataset to determine the feature distribution pattern and cluster centers, and form a feature statistical structure.
[0120] Specifically, the contour features, color features, texture features, and printing features in the standard sample feature dataset are normalized to eliminate dimensional differences. Correlation analysis and dimensionality reduction are then performed on the normalized features to form simplified feature vectors. Based on these simplified feature vectors, a Gaussian mixture model is used for clustering, and the optimal number of clusters is automatically determined using the Bayesian information criterion. The Gaussian mixture model better handles the non-normal distribution characteristics of printing features. Using the initial clustering results, the clustering results are parametrically described, and the dispersion of clusters and the distance relationships between clusters are analyzed to evaluate the clustering quality. A topological relationship structure for each feature is constructed using cluster centers as nodes, establishing a hierarchical organization of the feature space. Batch labeling of the clustering topology is performed using batch information to establish a batch characteristic matrix and construct a bidirectional mapping relationship between batches and feature distributions. The clustering analysis results and batch mapping relationships of all feature categories are integrated to generate a complete feature statistical structure. The use of a Gaussian mixture model for clustering and the establishment of a bidirectional mapping relationship between batches and feature distributions effectively solves the modeling challenge of non-normal distributions of printing features and improves the accuracy of the feature statistical structure.
[0121] S4.3: Obtain the printing process parameters and material characteristic parameters corresponding to each batch, establish the mapping relationship between process parameters, material characteristics and characteristic statistics, and calculate the characteristic adjustment coefficient matrix.
[0122] Furthermore, printing process parameters and material characteristic parameters for each batch are obtained, and the obtained parameters are normalized to construct a parameter matrix. Based on the feature statistical structure formed in S4.2, the feature center value, distribution range, and dispersion corresponding to each batch are extracted to construct a feature statistics matrix. An XGBoost regressor is used to establish a mapping function model from the parameter matrix to the feature statistics matrix, and Shapley value weighting is introduced. The parameter sensitivity of the established mapping function model is calculated to form a sensitivity matrix, quantifying the influence of each parameter on different feature statistics. Combining the actual variation range of the parameters and the allowable fluctuation range in production, the sensitivity matrix is converted into a feature adjustment coefficient matrix. By establishing a mapping relationship through an XGBoost regressor with Shapley value weighting, the influence of process parameters and material characteristics on feature statistics is accurately quantified, providing a reliable basis for the dynamic adjustment of feature benchmarks.
[0123] S4.4: Apply the feature adjustment coefficient matrix to adjust the feature statistical structure and generate the feature benchmarks corresponding to each batch.
[0124] Furthermore, based on the printing process parameters and material characteristic parameters of the current batch, the corresponding adjustment coefficients are extracted from the feature adjustment coefficient matrix; the feature adjustment coefficients are applied to each cluster center and its distribution range in the feature statistical structure; adjustment calculations are performed on the statistical parameters of color features, texture features, contour features and printing features respectively; based on the adjusted feature cluster centers and distribution ranges, the batch feature statistical structure is reconstructed; the reconstructed feature statistical structure is verified and saved as the feature benchmark for the current batch.
[0125] S4.5: Based on the similarity analysis between the batch reference dataset and the historical batch dataset, and combined with the characteristic benchmarks of each batch, determine the dynamic tolerance range and form the color difference evaluation standard for each batch of printed matter.
[0126] Furthermore, the similarity index between the current batch feature benchmark and the feature benchmarks of each batch in the historical batch dataset is calculated. Based on the similarity index, the historical batch data that is most similar to the current batch is selected. The feature difference distribution of qualified and unqualified products in the selected historical batches is analyzed. Combined with the feature benchmark of the current batch, the initial tolerance range of each feature is calculated. The initial tolerance range is corrected according to the stability of the printing process and the material characteristics to generate a dynamic tolerance range.
[0127] S4.6: A batch indexing mechanism is established using a hash table structure with batch identifiers as keys, integrating the characteristic benchmarks of each batch and the color difference evaluation standards of printed matter to construct a dynamic reference model.
[0128] It should be noted that the dynamic reference model can quickly extract the feature benchmarks and color difference evaluation standards for the corresponding batch based on the batch identifier of the printed matter to be inspected, and use them for comparison and evaluation with the feature dataset of the printed matter to be inspected. This technical solution achieves dynamic adjustment of the inspection standard by establishing a precise mapping relationship between process parameters, material properties and feature statistics, overcoming the problem that traditional fixed standard models are difficult to adapt to the differences in characteristics of different batches of printed matter, and significantly improving the adaptability and accuracy of color difference detection.
[0129] S5: Calculate the distance between the feature dataset and the dynamic reference model, identify color difference regions and generate color difference scores, and filter and classify color difference regions based on the color difference scores.
[0130] In one specific embodiment of the present invention, step S5 includes the following steps:
[0131] S5.1: Based on the batch identifier of the printed matter to be inspected, retrieve the corresponding feature benchmarks and color difference evaluation standards for printed matter from the dynamic reference model.
[0132] S5.2: Calculate the normalized Euclidean distance between each type of feature in the feature dataset and the corresponding feature in the feature benchmark, and generate the feature distance matrix.
[0133] It should be noted that when calculating the normalized Euclidean distance, the Z-score standardization method is first used to unify and normalize the dimensions of various features, ensuring the comparability of features of different ranges and magnitudes. For the four main categories of features—contour features, color features, texture features, and printing features—the Euclidean distance to the feature benchmark is calculated separately, constructing feature distance vectors. Simultaneously, considering the potential correlation between features, a Mahalanobis distance correction mechanism is introduced to reduce the impact of feature redundancy on distance calculation. For each detection region, the four types of feature distance vectors are organized into a feature distance matrix. By introducing the Mahalanobis distance correction mechanism, the interference problem of feature correlation on distance calculation is effectively solved, improving the accuracy of feature distance measurement.
[0134] S5.3: Based on the visual sensitivity and feature reliability index of each detection area, determine the weight coefficients of various feature distances, use a weighted fusion method to generate a comprehensive distance metric, and form a regional color difference quantification value.
[0135] Specifically, the visual sensitivity features of each detection region (including region area, region location, boundary complexity, and color contrast) are acquired, and the visual importance index of each detection region is calculated based on the characteristics of human vision. Reliability assessments are performed on four types of features: contour features, color features, texture features, and printing features. These features are quantified and scored from three dimensions: feature stability, feature discriminability, and feature consistency, generating a feature reliability score. Based on the type and process parameters of the printed material to be inspected, a matching basic weight configuration is retrieved from a pre-set weight template library as the initial weight allocation scheme. Combining the visual importance index and feature reliability score of each detection region, the basic weight configuration is adaptively adjusted to generate the final feature weight coefficient matrix, ensuring that the sum of the weight coefficients for each detection region is 1. The feature distance matrix and the weight coefficient matrix are weighted and fused to generate a comprehensive regional distance mapping. This comprehensive distance mapping is then non-linearly mapped according to printing process standards and batch characteristics to ensure that its distribution conforms to the human eye's perception of color difference, forming the final quantitative value of regional color difference. This adaptive weight allocation mechanism based on visual sensitivity and feature reliability achieves accurate assessment of the feature importance of different detection regions, significantly improving the consistency between color difference detection results and human perception.
[0136] S5.4: Compare the quantified value of regional color difference with the dynamic tolerance range in the color difference evaluation standard for printed matter, identify color difference areas that exceed the tolerance range, and determine the color difference grade based on the degree of exceedance.
[0137] The process of determining color difference levels based on the degree of deviation includes: calculating the deviation ratio between the quantified color difference value of each detection area and the upper limit of the dynamic tolerance range; establishing a five-level color difference classification standard based on the deviation ratio, including slight color difference, general color difference, significant color difference, severe color difference, and extremely severe color difference; and using an adaptive threshold method to determine the critical value for each level; dynamically adjusting the critical values for each level in conjunction with the quality control requirements of the printing process, while also considering the visual salience of the color difference area for secondary correction, thus forming a color difference level assessment mechanism. By establishing an adaptive threshold color difference level classification standard and incorporating visual salience for secondary correction, the problem of traditional fixed threshold methods being unable to adapt to different printing quality requirements is solved.
[0138] S5.5: Perform spatial clustering on color difference areas and merge adjacent color difference areas of the same level.
[0139] It should be noted that spatial clustering employs an adaptive clustering algorithm based on region growing. Specifically, a connected graph is first established based on the spatial adjacency relationships of color difference regions. Then, the similarity of color difference features is calculated for adjacent color difference regions of the same level. When the similarity exceeds a preset threshold, regions are merged, where the merging threshold is dynamically adjusted according to the color difference level. This method can effectively reduce the fragmentation of color difference regions, improve the practicality of the detection results, and maintain the accuracy of color difference region boundaries.
[0140] S5.6: Calculate the area ratio, boundary clarity, and severity of color difference for each color difference region, and determine the salience score of each color difference region in accordance with the requirements of the printing quality specifications.
[0141] Specifically, the ratio of the area of each color difference region to the overall area of the printed matter is calculated, an area proportion scoring function is established, and an area proportion score is generated; the boundary contour of the color difference region is extracted, the gradient magnitude and direction consistency of the edge pixels are analyzed, the boundary sharpness is quantified, and a boundary sharpness score is generated; the perceptual salience of the color difference is evaluated by combining the color difference level of the color difference region and the uniformity of the color difference distribution within the region, and a color difference severity score is generated; according to the application scenario of the printed matter, the corresponding color difference evaluation standard is retrieved from the quality specification database, and the weight coefficients of different scoring indicators (area proportion, boundary sharpness, and color difference severity) are determined; the area proportion score, boundary sharpness score, and color difference severity score are weighted and combined to generate a comprehensive salience score for each color difference region.
[0142] S5.7: Use the saliency score as the color difference score, sort and classify the color difference areas to form a color difference area classification result.
[0143] Furthermore, all color difference regions are sorted from high to low according to their significance scores to determine the priority processing order of each color difference region. Then, a dynamic threshold method is used to divide the color difference regions into three levels: high significance, medium significance, and low significance. The threshold is adaptively determined based on the statistical distribution of the significance scores of the current batch of printed materials. Combining the color difference levels (slight color difference, general color difference, obvious color difference, severe color difference, and extremely severe color difference) and significance levels obtained in S5.4, a two-dimensional grading matrix is constructed to generate the final color difference region grading results.
[0144] Preferably, the color difference recognition and scoring method proposed in this invention establishes a complete quantitative evaluation system for color difference through innovative technologies such as multi-dimensional feature distance calculation, adaptive weight fusion, and dynamic threshold grading. This method not only considers objective measurement indicators of color difference but also incorporates the characteristics of human visual perception and printing quality standards, making the color difference detection results more in line with practical application needs, while also possessing strong adaptability and scalability.
[0145] S6: Optimize the color difference areas after screening and grading, and output the color difference detection results and evaluation report.
[0146] The optimization process includes: applying morphological filtering algorithms to optimize the boundaries of color difference regions, improving edge smoothness and continuity; removing color difference regions with areas smaller than a preset threshold and low significance scores to reduce the impact of detection noise; classifying and labeling color difference regions based on printing process characteristics and color difference distribution patterns to distinguish between systematic and random color differences; generating color difference detection results and evaluation reports, and providing color difference cause analysis and improvement suggestions.
[0147] Furthermore, this embodiment also provides an image processing system for detecting color differences on the surface of printed matter, including: an illumination correction module, used to acquire a digital image of the printed matter to be detected and perform illumination non-uniformity correction, and convert the corrected digital image to the CIELAB color space; a region segmentation module, used to perform region segmentation on the digital image in the CIELAB color space based on dual constraints of color gradient and texture boundary, and generate a detection region map; and a feature extraction module, used to extract feature parameters based on the detection region map and generate a feature dataset.
[0148] The reference model construction module is used to build a dynamic reference model using printing process parameters and material characteristics; the color difference grading module is used to calculate the distance between the feature dataset and the dynamic reference model, identify color difference areas and generate color difference scores, and filter and grade color difference areas based on the color difference scores; the optimization processing module is used to optimize the filtered and graded color difference areas and output color difference detection results and evaluation reports.
[0149] In summary, this invention employs a lighting correction technique combining multi-layer image pyramids and homomorphic filtering, and introduces an adaptive weight fusion mechanism based on image features. This effectively eliminates lighting unevenness while maintaining the clarity of printing details. A dual-constraint segmentation method based on color gradients and texture boundaries is proposed, combined with printing dot frequency feature analysis and region boundary optimization techniques. This improves the segmentation accuracy of complex patterns and gradient areas in printed materials, effectively reducing over-segmentation and under-segmentation. The dynamic reference model achieves precise adjustment of feature benchmarks through XGBoost regressors and Shapley value weight allocation, solving the problem that traditional fixed standard models are difficult to adapt to the differences in characteristics between different batches of printed materials. A color difference evaluation system integrating visual perception characteristics is constructed. Through multi-dimensional feature distance calculation, adaptive weight fusion, and dynamic threshold grading, accurate quantitative evaluation of color difference is achieved, improving the accuracy of color difference detection.
[0150] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An image processing method for detecting color differences on the surface of printed materials, characterized in that, include: Acquire a digital image of the printed material to be inspected and perform illumination non-uniformity correction, then convert the corrected digital image to the CIELAB color space; In the CIELAB color space, region segmentation is performed on the digital image based on dual constraints of color gradient and texture boundary to generate a detection region map; Feature parameters are extracted based on the detection region map to generate a feature dataset; A dynamic reference model is established using printing process parameters and material properties. Calculate the distance between the feature dataset and the dynamic reference model, identify color difference regions and generate color difference scores, and filter and classify the color difference regions based on the color difference scores; The color difference areas after screening and grading are optimized, and the color difference detection results are output. The establishment of the dynamic reference model includes: Acquire and preprocess batch reference datasets and historical batch datasets; the batch reference dataset includes standard sample feature datasets for each batch of printed materials. Cluster analysis is performed on the standard sample feature dataset to determine the feature distribution pattern and cluster centers, forming a feature statistical structure; Obtain the printing process parameters and material property parameters corresponding to each batch, establish the mapping relationship between process parameters, material properties and feature statistics, and calculate the feature adjustment coefficient matrix; The feature adjustment coefficient matrix is applied to adjust the feature statistical structure to generate feature benchmarks for each batch; Based on the similarity analysis between the batch reference dataset and the historical batch dataset, and combined with the characteristic benchmarks of each batch, the dynamic tolerance range is determined, and the color difference evaluation standard for each batch of printed matter is formed. Integrate the characteristic benchmarks of each batch and the color difference evaluation standards of printed matter to construct a dynamic reference model; The process of identifying color difference regions and generating color difference scores includes: Based on the batch identifier of the printed matter to be tested, the corresponding feature benchmarks and color difference evaluation standards of the printed matter are retrieved from the dynamic reference model; Calculate the normalized Euclidean distance between each type of feature in the feature dataset and the corresponding feature in the feature benchmark, and generate a feature distance matrix; Based on the visual sensitivity and feature reliability indicators of each detection area, the weight coefficients of various feature distances are determined, and a weighted fusion method is used to generate a comprehensive distance metric, thus forming a regional color difference quantification value. The quantified color difference value of the region is compared with the dynamic tolerance range in the color difference evaluation standard of the printed matter to identify the color difference region that exceeds the tolerance range, and the color difference level is determined according to the degree of exceedance. Spatial clustering is performed on the color difference regions to merge adjacent color difference regions of the same level; Calculate the area ratio, boundary clarity, and severity of color difference for each color difference region, and determine the significance score of each color difference region in accordance with the requirements of printing quality specifications; The saliency score is used as the color difference score, and the color difference regions are sorted and graded to form a color difference region grading result.
2. The image processing method for detecting color differences on the surface of printed matter according to claim 1, characterized in that, The process of correcting for uneven illumination includes: Perform Gaussian pyramid decomposition on the acquired digital images to construct multi-layer image pyramids; Extract the luminance components of each layer of the image in the multi-layer image pyramid, and perform a logarithmic transformation on the luminance components; The transformed luminance component is converted to the frequency domain, a homomorphic filter is applied to suppress low-frequency components, and an inverse transform is performed. The processed images of each layer are adjusted to the original digital image size, and the weight coefficients of each layer are determined based on the image features to perform multi-scale fusion. The fused brightness information is combined with the color information of the original digital image to generate a light-corrected digital image.
3. The image processing method for detecting color differences on the surface of printed matter according to claim 1, characterized in that, The region segmentation of the digital image based on the dual constraints of color gradient and texture boundary includes: Extract the multi-channel gradients of digital images in the CIELAB color space to generate a comprehensive color gradient map; A local gray-level co-occurrence matrix is constructed based on the digital image, and texture clustering is performed using a Gaussian mixture model. After morphological processing, a texture boundary map is generated. Initial seed points are selected based on the comprehensive color gradient map, and the region growing algorithm is executed with the texture boundary map as a constraint to generate the initial region segmentation result. The frequency characteristics of printing dots in the initial region segmentation results are analyzed, and the region boundaries are optimized based on the analysis results to obtain the boundary-optimized segmentation map. Calculate the color statistical features and boundary features of each region in the boundary optimization segmentation map, merge adjacent regions that meet the preset merging conditions, and generate a merged segmentation map; Assign a unique identifier to each region in the merged segmentation map and output the detection region map.
4. The image processing method for detecting color differences on the surface of printed matter according to claim 1, characterized in that, The feature dataset includes contour features, color features, texture features, and printing features.
5. The image processing method for detecting color differences on the surface of printed matter according to claim 2, characterized in that, The determination of weight coefficients for each image layer based on image features includes: The brightness gradient magnitude features and local contrast features of each image layer are extracted and normalized. Based on the brightness gradient amplitude characteristics and local contrast characteristics, a comprehensive feature value is calculated; For images at different levels in a multi-layer image pyramid, set level weight factors; The weight coefficients of each layer of the image are generated by combining the comprehensive feature values with the hierarchical weight factors.
6. An image processing system for detecting color differences on the surface of printed materials, characterized in that, include: The illumination correction module is used to acquire a digital image of the printed material to be inspected and to correct for uneven illumination, and then convert the corrected digital image to the CIELAB color space. The region segmentation module is used to perform region segmentation on the digital image in the CIELAB color space based on dual constraints of color gradient and texture boundary, and generate a detection region map. The feature extraction module is used to extract feature parameters based on the detection region map and generate a feature dataset; The reference model building module is used to create a dynamic reference model using printing process parameters and material properties. The color difference grading module is used to calculate the distance between the feature dataset and the dynamic reference model, identify color difference regions and generate color difference scores, and filter and grade the color difference regions according to the color difference scores; The optimization processing module is used to optimize the color difference areas after screening and grading, and output the color difference detection results; The establishment of the dynamic reference model includes: Acquire and preprocess batch reference datasets and historical batch datasets; the batch reference dataset includes standard sample feature datasets for each batch of printed materials. Cluster analysis is performed on the standard sample feature dataset to determine the feature distribution pattern and cluster centers, forming a feature statistical structure; Obtain the printing process parameters and material property parameters corresponding to each batch, establish the mapping relationship between process parameters, material properties and feature statistics, and calculate the feature adjustment coefficient matrix; The feature adjustment coefficient matrix is applied to adjust the feature statistical structure to generate feature benchmarks for each batch; Based on the similarity analysis between the batch reference dataset and the historical batch dataset, and combined with the characteristic benchmarks of each batch, the dynamic tolerance range is determined, and the color difference evaluation standard for each batch of printed matter is formed. Integrate the characteristic benchmarks of each batch and the color difference evaluation standards of printed matter to construct a dynamic reference model; The process of identifying color difference regions and generating color difference scores includes: Based on the batch identifier of the printed matter to be tested, the corresponding feature benchmarks and color difference evaluation standards of the printed matter are retrieved from the dynamic reference model; Calculate the normalized Euclidean distance between each type of feature in the feature dataset and the corresponding feature in the feature benchmark, and generate a feature distance matrix; Based on the visual sensitivity and feature reliability indicators of each detection area, the weight coefficients of various feature distances are determined, and a weighted fusion method is used to generate a comprehensive distance metric, thus forming a regional color difference quantification value. The quantified color difference value of the region is compared with the dynamic tolerance range in the color difference evaluation standard of the printed matter to identify the color difference region that exceeds the tolerance range, and the color difference level is determined according to the degree of exceedance. Spatial clustering is performed on the color difference regions to merge adjacent color difference regions of the same level; Calculate the area ratio, boundary clarity, and severity of color difference for each color difference region, and determine the significance score of each color difference region in accordance with the requirements of printing quality specifications; The saliency score is used as the color difference score, and the color difference regions are sorted and graded to form a color difference region grading result.
Citation Information
Patent Citations
Postoperative rehabilitation effect monitoring system based on image enhancement
CN118570099A
Online detection system and method for printing and dyeing chromatic aberration and medium
CN118758429A