A method and system for digital print image color detection

By acquiring standard light source images and reference image renderings, and combining them with visual perception models and optical property parameters of the substrate, the overall and regional visual equivalent color differences are calculated. This solves the problem of discrepancies between color detection results and human visual perception in existing technologies, and enables refined color detection in high-end applications.

CN122049074BActive Publication Date: 2026-07-21NINGBO HAISHU XINGGUANG PRINTING TRADE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NINGBO HAISHU XINGGUANG PRINTING TRADE CO LTD
Filing Date
2026-04-17
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing digital printing color detection methods, when evaluating substrates with complex surface characteristics, produce calculation results that deviate from the subjective visual perception of the human eye, making it impossible to conduct differentiated evaluations. Furthermore, they lack adaptive threshold adjustment, making it difficult to meet the color fidelity requirements of high-end applications.

Method used

By acquiring standard light source images and reference image renderings, and combining the optical property parameters of the substrate with the input of pre-trained visual perception models, the overall and regional visual equivalent color differences are calculated. Based on dynamically generated regional tolerance thresholds, comparisons are made to identify key color regions and match the corresponding tolerance thresholds.

Benefits of technology

It achieves more accurate simulation of human visual perception, performs refined regional color detection, and improves the reliability of detection results and intelligent quality control capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122049074B_ABST
    Figure CN122049074B_ABST
Patent Text Reader

Abstract

The application relates to a digital printed image color detection method and system, comprising the following steps: obtaining a standard light source image of a target detection object, a corresponding reference image rendering image and optical property parameters of a printing substrate, inputting the parameters into a visual perception model, obtaining overall visual equivalent color difference and regional visual equivalent color difference, comparing the overall visual equivalent color difference with a preset overall tolerance threshold to obtain a first comparison result, identifying the attributes of key color regions and matching corresponding regional tolerance thresholds, comparing the regional visual equivalent color difference with the matched regional tolerance thresholds to obtain a second comparison result, and generating a color detection result based on the first comparison result and the second comparison result. In summary, the application inputs the standard light source image and the reference image rendering image into the visual perception model in combination with the optical property parameters of the printing substrate, and compares the parameters based on the dynamically generated regional tolerance thresholds, so that the reliability of the detection result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a method and system for color detection of digital printed images. Background Technology

[0002] In the field of digital printing, especially in high-end applications such as packaging, anti-counterfeiting, and art reproduction, color consistency between the printed product and the original digital artwork is an important indicator for measuring printing quality.

[0003] Currently, the color detection methods commonly used in the industry rely on physical instruments such as spectrophotometers to measure the CIELab value of specific color patches on printed materials, and then calculate the ΔE value between the measured value and the standard value. The standard color difference method uses ab color difference for objective evaluation; however, it has the following limitations: First, the standard color difference formula is based on the theoretical assumption of a uniform color space, and when evaluating substrates with complex surface characteristics, its calculation results often deviate significantly from the subjective visual perception of the human eye; second, existing methods usually only provide an overall average color difference, which cannot provide differentiated and detailed evaluation of different important areas in the image, such as brand logos, skin tones, and other key color areas; finally, traditional threshold judgments are mostly static and uniform, lacking a process mechanism for adaptive adjustment based on specific image content, regional attributes, and historical quality data, making it difficult to meet the needs of intelligent quality control with stringent requirements for color fidelity. Summary of the Invention

[0004] To address the aforementioned shortcomings, this application provides a method and system for color detection of digital printed images.

[0005] The above-mentioned objective of this application is achieved through the following technical solution: A method for color detection of digital printed images, comprising the following steps: The standard light source image of the target object and the corresponding reference image rendering are acquired through the image acquisition terminal. The optical property parameters of the substrate used for the target detection object are obtained, and the standard light source image, the reference image rendering map and the optical property parameters are input into the pre-trained visual perception model to obtain the overall visual equivalent color difference and the regional visual equivalent color difference. The overall visual equivalent color difference is the mean gradient of the similarity loss, and the regional visual equivalent color difference is the local maximum of the similarity loss. The overall visual equivalent color difference is compared with the preset overall tolerance threshold to obtain the first comparison result; Identify the attributes of key color regions corresponding to the visual equivalent color difference of a region, and match the corresponding region tolerance threshold for the key color regions based on the identified attributes; The visual equivalent color difference of the region is compared with the tolerance threshold of the matched region to obtain the second comparison result. Color detection results are generated based on the first and second comparison results.

[0006] The second objective of this invention is achieved through the following technical solution: A digital printed image color detection system, comprising: The image acquisition module is used to acquire a standard light source image of the target detection object and the corresponding reference image rendering through the image acquisition terminal; The color difference acquisition module is used to acquire the optical property parameters of the substrate used for the target detection object, and input the standard light source image, the reference image rendering map and the optical property parameters into the pre-trained visual perception model to obtain the overall visual equivalent color difference and the regional visual equivalent color difference. The overall visual equivalent color difference is the mean gradient of the similarity loss, and the regional visual equivalent color difference is the local maximum of the similarity loss. The first comparison module is used to compare the overall visual equivalent color difference with the preset overall tolerance threshold to obtain the first comparison result; The attribute recognition module is used to identify the attributes of the key color regions corresponding to the visual equivalent color difference of the region, and to match the corresponding region tolerance threshold for the key color regions based on the identified attributes. The second comparison module is used to compare the visual equivalent color difference of the region with the tolerance threshold of the matched region to obtain the second comparison result. The result generation module is used to generate color detection results based on the first comparison result and the second comparison result.

[0007] This application also relates to a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described digital printed image color detection method.

[0008] This application also relates to a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described digital printed image color detection method.

[0009] In summary, the digital printing image color detection method and system provided in this application acquires a standard light source image and a reference image rendering, combines the optical property parameters of the substrate with the input of a visual perception model, obtains the overall and regional visual equivalent color difference, and compares it based on dynamically generated regional tolerance thresholds. This solves the problems of existing technologies, such as difficulty in fully simulating human eye perception, lack of regional detection, and static thresholds. It can more accurately simulate human eye visual perception, achieve refined regional color detection, and thus improve the reliability of the detection results. Attached Figure Description

[0010] Figure 1 This is a flowchart of an embodiment of a digital printed image color detection method according to this application; Figure 2 This is a flowchart of an embodiment of a digital printed image color detection method according to this application; Figure 3 This is a flowchart of step S10 in an embodiment of a digital printed image color detection method of this application; Figure 4 This is a flowchart of step S20 in an embodiment of a digital printed image color detection method of this application. Detailed Implementation

[0011] The following will refer to the appendix to this application. Figures 1-4 The technical solutions in this application are clearly and completely described herein. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. The components of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0012] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0013] In the field of digital printing, especially in high-end applications such as packaging, anti-counterfeiting, and art reproduction, existing color detection methods rely on spectrophotometers to measure the CIELab values ​​of specific color patches on printed materials and calculate ΔE. The method evaluates color difference using the ab color space theory; however, based on the assumption of a uniform color space, its calculation results deviate from human subjective visual perception when evaluating substrates with complex surface characteristics. Furthermore, existing methods typically only provide the overall average color difference, failing to differentiate between important regions in the image, such as brand logos and skin tones. Simultaneously, traditional threshold judgment mechanisms are static and uniform, lacking the ability to adaptively adjust based on image content, regional attributes, and historical quality data, making it difficult for color quality control to meet intelligent requirements.

[0014] For example, in the printing process of cosmetic packaging, the substrate uses paper with specific surface characteristics. Its surface texture and reflective properties cause a difference between the CIELab value measured by a spectrophotometer and the color observed by the human eye. Specifically, when detecting the red area of ​​a brand logo, the ΔE calculated by the standard color difference formula... The ab value is lower than the threshold, but the human eye can perceive that there is a color cast in the area; while for the gradient area of ​​the background pattern, although the calculated value is high, the human eye perceives little difference; since the existing method cannot identify key color areas and apply differential thresholds, it is easy to cause the quality judgment result to be inconsistent with the actual visual effect.

[0015] If the above problems are not solved, color detection results will be difficult to accurately reflect human subjective perception. In high-end printing applications, qualified products may be misjudged as unqualified or vice versa, increasing production costs and delivery risks. In addition, the lack of a regionally differentiated evaluation mechanism will cause quality problems in key color areas to be masked by the overall average value, making it difficult to achieve accurate quality control.

[0016] In one embodiment, this application discloses a digital printed image color detection method, such as... Figures 1-2 As shown, the specific steps include the following: S10: Acquire the standard light source image of the target object and the corresponding reference image rendering through the image acquisition terminal; In this embodiment, the image acquisition terminal refers to a device used to capture physical images, such as a high-resolution digital camera, scanner, or industrial vision system, which can convert optical information into digital image data for image processing and analysis. The standard light source image refers to the physical image of the target detection object acquired by the image acquisition terminal under specific and controllable light source conditions. The standard light source image serves as the visual representation of the actual printed material and is used for comparison with the reference image rendering. The reference image rendering refers to a digital image generated by rendering technology based on the original digital manuscript of the target detection object, combined with specific observation conditions and device characteristics. This reference image rendering represents the ideal color performance and serves as a benchmark for color detection.

[0017] Specifically, standard light source images can be obtained by placing the target object in a standard light source box and taking pictures using a high-resolution industrial camera; reference image renderings can be obtained by importing the original digital manuscript into professional color management software and generating a rendering based on preset rendering parameters. For example, for a printed packaging box, a standard light source image can be obtained by taking pictures of it under a standard D50 light source, and a reference image rendering can be generated in software such as Adobe Photoshop based on its design manuscript.

[0018] S20: Obtain the optical property parameters of the substrate used for the target detection object, and input the standard light source image, the reference image rendering map and the optical property parameters into the pre-trained visual perception model to obtain the overall visual equivalent color difference and the regional visual equivalent color difference, wherein the overall visual equivalent color difference is the mean gradient of the similarity loss, and the regional visual equivalent color difference is the local maximum of the similarity loss. In this embodiment, the optical property parameters of the substrate refer to quantitative indicators describing the optical properties of the printing material. Further, these optical property parameters include the substrate's diffuse reflectance gradient, the substrate's white field gradient, and the ink penetration coefficient. These optical property parameters are crucial for understanding and predicting the color performance of printed materials under different lighting conditions and influence human color perception. The visual perception model refers to a pre-trained computational model designed to simulate how the human eye perceives color differences. This model comprehensively considers visual dimensions such as color, texture, edges, and contrast of the image, outputting a color difference assessment result that is more consistent with human subjective perception. The overall visual equivalent color difference refers to... The visual equivalent color difference, calculated by a visual perception model, is a comprehensive index reflecting the color difference between the entire image region and the reference image rendering. In this embodiment, the overall visual equivalent color difference is defined as the mean of the similarity loss gradient, used to evaluate the overall color consistency of the printed matter. The regional visual equivalent color difference is an index calculated by a visual perception model, reflecting the color difference between a specific key color region in the image and the reference image rendering. In this embodiment, the regional visual equivalent color difference is defined as the local maximum of the similarity loss, used to evaluate the color accuracy of important regions in the image. Furthermore, the similarity loss gradient can simultaneously encode four dimensions of human visual perception: color, texture, edge, and contrast.

[0019] Specifically, the optical properties of the substrate can be measured using specialized material testing equipment, such as using a spectrophotometer to measure the diffuse reflectance curve of paper, or using specialized instruments to assess the penetration depth of ink on paper. The visual perception model can be a deep learning network trained on a large amount of human eye perception data, capable of simulating the human eye's comprehensive perception of color, texture, edge, and contrast. Meanwhile, the overall visual equivalent color difference output by the visual perception model is the global average similarity loss gradient, while the regional visual equivalent color difference is the local maximum of the similarity loss of a local region in the image. For example, for a printed poster, the visual perception model will not only give the average color deviation between the entire poster and the design draft, but also the local color deviation of a specific area on the poster, such as the face of a person or the logo of a product.

[0020] S30: Compare the overall visual equivalent color difference with the preset overall tolerance threshold to obtain the first comparison result; In this embodiment, the overall tolerance threshold is a preset upper limit value used to determine whether the overall visual equivalent color difference is acceptable. When the overall visual equivalent color difference is lower than the overall tolerance threshold, the overall color of the printed product can be considered to meet the requirements. The first comparison result is the judgment result obtained by comparing the overall visual equivalent color difference with the preset overall tolerance threshold, which is used to characterize whether the overall color consistency of the printed product meets the overall inspection standard.

[0021] Specifically, the overall visual equivalent color difference is compared with the preset overall tolerance threshold to obtain the first comparison result. The overall tolerance threshold can be set according to industry standards or actual needs. For example, a fixed ΔE value can be set as the overall tolerance threshold. The comparison process can be a numerical comparison to determine whether the overall visual equivalent color difference is less than or equal to the overall tolerance threshold.

[0022] S40: Identify the attributes of the key color regions corresponding to the visual equivalent color difference of the region, and match the corresponding region tolerance threshold for the key color regions based on the identified attributes. In this embodiment, a key color region refers to a specific area in an image that is significant for visual quality or information transmission, such as brand logos, skin tones, and product images. Typically, the color accuracy of key color regions requires stricter control. The region tolerance threshold is a threshold matched for each key color region to determine whether the visually equivalent color difference of that region is acceptable. Furthermore, the region tolerance threshold can be obtained by constructing a three-dimensional tolerance surface that includes hue, saturation, and brightness. This three-dimensional tolerance surface can be dynamically generated based on the visual weight of the key color region in the entire image, the human eye sensitivity function, and the optical properties of the substrate, thereby achieving differentiated evaluation of different regions.

[0023] Visual weight refers to the quantified weight value set for a key color area in the entire printed image based on its attractiveness to human visual attention, its importance to overall visual quality, and its information transmission. A higher visual weight indicates that the key color area receives more attention and that color accuracy requirements are more stringent. The human eye sensitivity function describes the human eye's sensitivity to different colors (hues), brightness, and saturation. Its core function is to reflect which color deviations the human eye is more sensitive to and less sensitive to. The role of the human eye sensitivity function is to adjust the tolerance range of different color dimensions by combining the natural perceptual characteristics of the human eye when generating a three-dimensional tolerance surface. Both visual weight and the human eye sensitivity function can be set according to actual needs.

[0024] Specifically, the attribute recognition of key color regions can be achieved through image analysis algorithms, such as color clustering, texture analysis, or predefined template matching to identify brand logos, text, specific product patterns, etc. in an image. Once a key color region is identified, its attributes are used to match an initial region tolerance threshold from a preset rule base. This region tolerance threshold is usually not a single value, but can be obtained by constructing a three-dimensional tolerance surface for the key color region, including hue, saturation, and brightness. Furthermore, this three-dimensional tolerance surface can be dynamically generated based on the visual weight of the key color region in the whole image, the human eye sensitivity function, and the optical properties of the substrate. For example, for a brand logo on a printed product, the color accuracy requirement is extremely high, so a strict region tolerance threshold surface will be matched, while for a large area of ​​gradient in the background, the tolerance threshold surface may be relatively loose.

[0025] S50: Compare the visual equivalent color difference of the region with the matched region tolerance threshold to obtain the second comparison result; In this embodiment, the second comparison result refers to the judgment result obtained by comparing the visual equivalent color difference of the region with the matched region tolerance threshold, which is used to characterize whether the local color consistency of the key color region meets the region detection standard.

[0026] Furthermore, the comparison in step S50 is to determine whether the visual equivalent color difference of the region falls within the three-dimensional tolerance surface. If it falls within the surface, the region tolerance threshold requirement is met; if it does not fall within the surface, the region tolerance threshold requirement is not met.

[0027] Specifically, the visual equivalent color difference of the region is compared with the matched regional tolerance threshold to obtain a second comparison result. This comparison is to determine whether the visual equivalent color difference of the region falls inside the three-dimensional tolerance surface. If the combination of hue, saturation and brightness values ​​of the visual equivalent color difference of the region falls inside the space defined by the three-dimensional tolerance surface, it is considered to meet the threshold requirement; otherwise, it is considered not to meet the threshold requirement.

[0028] S60: Generate color detection results based on the first comparison result and the second comparison result.

[0029] In this embodiment, the color detection result refers to the final detection conclusion obtained by comprehensively judging based on the first comparison result and the second comparison result. It is used to clarify the color quality level of the target detection object and is the final output result of the detection scheme in this embodiment.

[0030] Specifically, a color detection result is generated based on the first comparison result and the second comparison result. The color detection result can be qualified or unqualified. For example, if the overall color difference and the color difference of all key areas meet the requirements, it is judged as qualified. If the overall color difference is unqualified, or the color difference of a certain key area seriously exceeds the area tolerance threshold, it is judged as unqualified.

[0031] For example, suppose a printing plant needs to inspect the color quality of a batch of high-end cosmetic packaging boxes, which contain a specific brand logo, such as a unique gold color, and a product image, such as a close-up of the product on a model's face.

[0032] First, the printed packaging box is photographed under a standard D65 light source environment using an image acquisition terminal to obtain its standard light source image; at the same time, based on the original design draft of the packaging box, combined with the D65 light source parameters and the color characteristic file of the image acquisition terminal, a corresponding reference image rendering is generated.

[0033] Furthermore, the optical properties of the special paper used in the packaging box are obtained, such as its high gloss, specific texture, and ink absorption characteristics. These optical properties are then compared with standard light source images and reference images for rendering. Figure 1 The same input is fed into the pre-trained visual perception model to obtain the overall visual equivalent color difference. For example, the average gradient of the overall similarity loss of the packaging box is 0.8. At the same time, the visual perception model can also identify the brand logo area and the model's face area as key color areas, and calculate the regional visual equivalent color difference of these two key color areas respectively. For example, the local maximum of the similarity loss of the brand logo area is 1.5, and the local maximum of the similarity loss of the model's face area is 1.2.

[0034] Furthermore, the overall visual equivalent color difference of 0.8 is compared with the preset overall tolerance threshold, for example, set to 1.0. Since 0.8 is less than 1.0, the first comparison result is that the overall result is qualified.

[0035] Furthermore, the brand logo area is identified as a highly important brand color, and the model's face area is identified as a human skin tone. Based on the identified attributes, and combined with the visual weight of the key color area in the whole image, the human eye sensitivity function, and the optical properties of the substrate, a strict three-dimensional tolerance surface is constructed for the brand logo area, while a relatively loose but still accurate three-dimensional tolerance surface is constructed for the model's face area.

[0036] Furthermore, the visually equivalent color difference of 1.5 in the brand logo area is compared with the three-dimensional tolerance surface matching the key color area, assuming that the hue, saturation, and brightness combination of 1.5 does not fall within the three-dimensional tolerance surface; at the same time, the visually equivalent color difference of 1.2 in the model's facial area is compared with the three-dimensional tolerance surface matching the key color area, assuming that the hue, saturation, and brightness combination of 1.2 falls within the three-dimensional tolerance surface, thus obtaining the second comparison result.

[0037] Finally, a color detection result is generated based on the first and second comparison results. Since the brand logo area does not fall within its matching three-dimensional tolerance surface, and this area is particularly important to the product image, the packaging box may be judged as an unqualified test result even if it is generally qualified. Alternatively, if the deviation is within the preset fluctuation range, it may be judged as a potentially qualified test result, indicating that further inspection or adjustment is needed.

[0038] Based on the examples above, traditional color detection methods typically rely on a single ΔE. The ab color difference value and static threshold are used, but when evaluating substrates with complex surface characteristics, the calculated results often deviate significantly from the subjective visual perception of the human eye, making it difficult to accurately reflect the consumer's true perception of color. For example, in the packaging box example above, even if the overall ΔE The ab value may be within an acceptable range, but if there are slight deviations in the specific gold color of the brand logo, the human eye can still easily detect them, while traditional methods may not be able to effectively capture them.

[0039] However, by introducing a visual perception model and combining it with the optical property parameters of the substrate, this embodiment can obtain the overall visual equivalent color difference and the regional visual equivalent color difference. This visual perception model simulates the comprehensive perception of the human eye, making the color difference assessment result closer to or even consistent with the subjective perception of the human eye. Compared with the traditional color difference formula based on the assumption of uniform color space, the solution in this embodiment has higher accuracy and practicality in the inspection of complex printed materials.

[0040] Furthermore, the solution in this embodiment can identify key color regions and dynamically match region tolerance thresholds for these regions. This solves the problem that traditional methods only provide the overall average color difference, thus failing to differentiate between regions of different importance in the image. In the example above, the brand logo and the model's face are identified as key regions and matched with different tolerance thresholds. Through this threshold judgment mechanism, the solution in this embodiment can effectively avoid ignoring color defects in key regions due to overall color difference compliance. This meets the requirements of intelligent quality control with stringent requirements for color fidelity and improves the intelligence level and reliability of color detection in printed images.

[0041] In one embodiment, such as Figure 3 As shown, step S10 includes: S11: Under a preset standard light source observation environment, a physical image of the target object is acquired through an image acquisition terminal and used as a standard light source image; In this embodiment, step S11 aims to ensure that the acquired physical images are obtained under standardized lighting conditions. Specifically, a standard light source box conforming to international standards such as ISO3664 or ASTMD1729 can be constructed. This light source box is equipped with standard light sources such as D50 and D65, and the light intensity, uniformity, and background color temperature are strictly controlled. The target object is placed in this light source box environment and photographed through an image acquisition terminal, such as a high-precision industrial camera, a spectral camera, or a color-calibrated digital camera. Alternatively, a portable device integrating a standard light source and an image acquisition module can be used to scan or photograph the target object on-site, while recording and compensating for environmental parameters to ensure the consistency of acquisition conditions.

[0042] S12: Based on the original digital manuscript associated with the target detection object, and combined with the light source parameters of the standard light source observation environment and the color characteristic file of the image acquisition terminal, generate a reference image rendering map that matches the acquisition conditions of the physical image in terms of color characteristics. In this embodiment, step S12 aims to generate an ideal reference image that highly matches the actual acquisition conditions, serving as a benchmark for precise comparison with the standard light source image. This ensures that the reference image is not only a digital representation of the original design draft but also an ideal image that has undergone color management and simulated the actual observation and acquisition conditions. Specifically, a professional color management system can be used to convert the color data of the original digital draft to color space through its associated ICC Profile. Simultaneously, by combining the light source spectral data of the standard light source observation environment and the ICC Profile of the image acquisition terminal itself, a rendering engine can generate a reference image simulating the acquisition conditions, such as a rendering module based on spectral rendering or ICC Profile conversion. Alternatively, a machine learning model can be trained to learn the complex mapping relationship between the original digital draft, light source parameters, camera feature files, and the final physical image. Then, the original digital draft, light source parameters, and camera feature files are input, and the machine learning model predicts and generates the corresponding reference image rendering.

[0043] S13: Spatial alignment and color feature preprocessing are performed on the standard light source image and the reference image rendering. The color feature preprocessing includes geometric distortion correction, color uniformity correction of image edge areas, and random noise filtering.

[0044] In this embodiment, step S13 aims to eliminate non-color difference factors that may be introduced during image acquisition and generation, thereby ensuring the accuracy of subsequent color difference calculations and avoiding misjudgments caused by factors such as geometric deformation, uneven illumination, or noise. Spatial alignment can employ feature-point-based image registration algorithms, such as SIFT, SURF, or ORB algorithms, to extract feature points from the standard light source image and the reference image rendering. Then, the optimal transformation matrix is ​​calculated using methods such as RANSAC, for example, affine transformation or perspective transformation, to precisely align the two images. Geometric distortion correction can be achieved by pre-calibrating the lens of the image acquisition terminal. The distortion coefficients are taken, and then the distortion coefficients are used to perform anti-distortion processing on the acquired standard light source image to eliminate the inherent radial and tangential distortion of the lens; the color uniformity correction of the image edge region can be achieved by analyzing the brightness or chromaticity distribution of the image edge region to identify and compensate for color deviations caused by uneven illumination or lens vignetting effect. For example, polynomial fitting, local adaptive equalization, or regional illumination compensation methods based on image segmentation can be used; random noise filtering can be achieved by using a variety of image denoising algorithms, such as Gaussian filtering, median filtering, bilateral filtering, or wavelet denoising, to eliminate random noise generated during image acquisition and improve the signal-to-noise ratio and quality of the image.

[0045] Specifically, a physical image of the target object is acquired under a preset standard light source observation environment and used as the standard light source image. Simultaneously, based on the original digital file associated with the target object, and combined with the light source parameters of the standard light source observation environment and the color characteristic file of the image acquisition terminal, a reference image rendering is generated that matches the acquisition conditions of the physical image in terms of color characteristics. This ensures that the reference image is not only an ideal representation of the original design but also simulates the ideal state under actual acquisition conditions, thus having direct comparability with the standard light source image in terms of color characteristics. On this basis, spatial alignment and color feature preprocessing are performed on the standard light source image and the reference image rendering. The color feature preprocessing includes geometric distortion correction, color uniformity correction of image edge areas, and random noise filtering. Through color feature preprocessing, non-color difference factors that may be introduced during image acquisition and generation, such as image distortion caused by lens distortion, uneven lighting, or sensor noise, can be effectively eliminated.

[0046] For example, suppose we need to perform color detection on a batch of digitally printed packaging boxes. First, the packaging boxes to be inspected are placed in an observation box compliant with the D65 standard light source. A high-resolution industrial camera with color calibration is used to capture a physical image of the packaging boxes, which serves as the standard light source image. Simultaneously, the original digital design artwork corresponding to the packaging boxes is obtained, such as a TIFF file containing CMYK color information. Using professional color management software, such as Adobe Photoshop or a dedicated color rendering engine, combined with the spectral data of the D65 standard light source and the ICC profile of the Basler camera, the original digital artwork is rendered to generate a color image. A reference image rendering is generated, whose color characteristics are highly matched to those acquired by the camera under D65 conditions. Further, the acquired standard light source image and the generated reference image rendering are imported into an image processing platform. A SIFT-based feature point image registration algorithm is used to spatially align the two images to eliminate shooting angle or positional deviations. Then, geometric distortion correction is performed on the standard light source image based on the pre-calibration parameters of the Basler camera lens. Next, a local adaptive histogram equalization algorithm is used to correct the color uniformity of the image edge regions to compensate for potential vignetting effects. Finally, a non-local mean denoising algorithm is used to filter out random noise from both images to improve image clarity.

[0047] Through the above technical solution, this application introduces standardization and preprocessing mechanisms in the image acquisition stage. Specifically, by acquiring physical images under a preset standard light source observation environment, the objectivity and consistency of color information can be ensured. At the same time, by combining the original digital manuscript, light source parameters, and color characteristic files of the image acquisition terminal to generate a matching reference image rendering, the reference image can truly reflect the ideal printing effect under specific acquisition conditions, thus having a high degree of comparability with the physical image. Furthermore, by performing spatial alignment and color feature preprocessing on the two images, including geometric distortion correction, color uniformity correction of image edge areas, and random noise filtering, the interference of non-color factors on color difference calculation can be effectively eliminated. Through the combined effect of these measures, the accuracy and reliability of the image data input to the visual perception model can be significantly improved, so that the obtained overall visual equivalent color difference and regional visual equivalent color difference can more accurately reflect the actual color deviation, avoid misjudgment caused by image quality problems, and thus improve the accuracy and reliability of digital printing image color detection results.

[0048] In one embodiment, the visual perception model includes a parameter adaptation layer, a color conversion layer, a first computation layer, and a second computation layer, such as... Figure 4 As shown, step S20 includes: S21: The parameter adaptation layer constructs an optical influence matrix based on optical property parameters, performs non-linear distortion correction on the perceived color space through the optical influence matrix, eliminates color difference shift caused by the substrate, and configures the conversion parameters of the color conversion layer based on the perceived color space after non-linear distortion correction. In this embodiment, the visual perception model is a pre-trained deep learning model designed to simulate how the human eye perceives color differences. It can map physical color information to a perceptual color space that is closer to or even consistent with the response of the human visual system, and quantify color differences within this space. The visual perception model can be built based on architectures such as convolutional neural networks or Transformers, and can be trained and optimized using a large amount of image data and human visual experiment data.

[0049] In this embodiment, the parameter adaptation layer is a module layer in the visual perception model. Its function is to dynamically adjust the parameters of the color conversion layer according to the specific optical properties of the substrate. For example, the parameter adaptation layer can be a small neural network whose output is used to adjust the weights or biases of the color conversion layer, or it can be a lookup table generator that generates a specific correction curve based on the input optical properties. The optical influence matrix is ​​a mathematical transformation matrix used to quantify and correct the influence of the substrate's optical properties on color perception. This optical influence matrix can be a 3×3 or higher-dimensional matrix, and its elements can be dynamically generated according to parameters such as the substrate's diffuse reflectance, substrate white field gradient, and ink penetration coefficient. It can describe the complex process of light reflection, absorption, and transmission on the substrate surface. Nonlinear distortion correction refers to the correction processing performed on the perceived color space, aiming to eliminate color deviations introduced by the substrate. Nonlinear distortion correction can be implemented using polynomial regression, spline interpolation, or neural network-based mapping.

[0050] S22: The color conversion layer converts the standard light source image and the reference image rendering to the perceptual color space based on the configured conversion parameters; In this embodiment, the color conversion layer is a module layer in the visual perception model. Its function is to convert the standard light source image and the reference image rendering to the perceptual color space. The perceptual color space refers to a color space used to simulate the uniformity of color perception by the human eye, such as CIEL. a b Or the IPT color space, whose distance is usually proportional to the size of the color difference perceived by the human eye; the color conversion layer is responsible for converting the input standard light source image and the reference image rendering from their original color space to the perceived color space. The conversion process depends on the conversion parameters configured by the parameter adaptation layer. Furthermore, the conversion parameters may include color conversion matrix, lookup table data, coefficients of gamma correction curve, etc.

[0051] S23: The first computational layer calculates the average gradient of the similarity loss between the standard light source image and the reference image rendering in the perceptual color space to obtain the overall visual equivalent color difference; In this embodiment, the first computational layer is a module layer in the visual perception model. It performs calculations in the perceptual color space to quantify the overall color difference between the standard light source image and the reference image rendering, and outputs the overall visual equivalent color difference. The first computational layer can use gradient calculation based on pixel-to-pixel differences or similarity measurement based on image feature extraction to calculate the average similarity loss gradient. The average similarity loss gradient is an indicator used to measure the overall similarity or difference between two images. It is obtained by calculating the color difference gradient of each pixel between the standard light source image and the reference image rendering, and averaging these color difference gradients.

[0052] S24: The second computational layer determines the key color region and calculates the local maxima of similarity loss between the standard light source image and the reference image rendering within the key color region in the perceptual color space to obtain the visual equivalent color difference of the region.

[0053] In this embodiment, the second computational layer is a module layer in the visual perception model, used to identify key color regions in the image and calculate local color differences within the key color regions. Key color regions refer to areas in the image that have a significant impact on human visual perception, are prone to color deviation, or have specific importance. Their identification can be based on image content analysis or dynamically determined through a visual attention model. The local maximum of similarity loss is an index used to measure the maximum color difference within a specific key color region. It is obtained by calculating the local maximum value of the pixel color difference between the standard light source image and the reference image rendering within the key color region.

[0054] Specifically, this embodiment introduces a layered visual perception model to achieve refined processing of color detection in digital printed images. Specifically, the parameter adaptation layer receives the optical attribute parameters of the substrate used for the target detection object and constructs an optical influence matrix based on these parameters, which quantifies the substrate's influence on color. The parameter adaptation layer uses the optical influence matrix to perform nonlinear distortion correction on the perceived color space, effectively eliminating color difference shifts caused by the substrate's own characteristics. Based on this, the color conversion layer configures the conversion parameters to ensure that subsequent color conversion accurately maps the physical image and rendered image to a perceived color space that is more consistent with human perception and optimized for substrate characteristics. Furthermore, the color conversion layer accurately converts the standard light source image and the reference image rendered image to the perceived color space according to the configured conversion parameters. In the perceived color space, the first calculation layer calculates the average gradient of the similarity loss between the two images to obtain the overall visual equivalent color difference, reflecting the overall color consistency of the image. Simultaneously, the second calculation layer identifies key color regions in the image and calculates local maxima of the similarity loss within these key color regions to obtain the regional visual equivalent color difference.

[0055] For example, the visual perception model can adopt a deep learning-based architecture, such as a neural network containing multiple convolutional and fully connected layers; wherein, the parameter adaptation layer can be a small multilayer perceptron, whose inputs are optical property parameters such as the diffuse reflectance gradient of the substrate, the white point gradient of the substrate, and the ink penetration coefficient, and whose output is used to dynamically generate an optical influence matrix, which can be a 3×3 color correction matrix used to adjust the L in the perceived color space. a b The values ​​undergo nonlinear transformation; nonlinear distortion correction can be performed using a lookup table-based method, which is dynamically generated based on the optical influence matrix and a preset correction function; the color conversion layer can be a layer containing CIEXYZ to CIEL. a b The transformation module's layers have transformation parameters configured by the parameter adaptation layer; the first computation layer can calculate the average of L1 or L2 loss, or use the average gradient of the structural similarity index as the average gradient of the similarity loss; the second computation layer can utilize an attention mechanism to identify key color regions and calculate pixel-level L1 loss within these regions. a b The local maximum of the difference is used as the local maximum of the similarity loss.

[0056] It should be noted that, for the above-mentioned visual perception model, the internal working mechanism, data flow and judgment logic of one of the models have been provided in this embodiment. Those skilled in the art can understand its principle based on this and adopt appropriate machine learning or image processing algorithms to implement the model with the described function according to the actual scenario and actual needs, such as using CNN to extract features, build attention mechanism, define specific loss function for training, etc.

[0057] By introducing parameter adaptation layers, optical influence matrices, and nonlinear distortion correction through the above technical solutions, the visual perception model can adaptively adjust according to the characteristics of different substrates. This ensures that color conversion and color difference calculation are performed in a perceptual color space optimized for the substrate, making the calculation results of overall visual equivalent color difference and regional visual equivalent color difference closer to the real perception of the human eye on actual printed materials. This can improve the accuracy and reliability of color detection. At the same time, the layered calculation method also makes the color difference assessment of the whole and key local areas more refined and comprehensive, providing accurate basis for color detection of digital printed materials.

[0058] In one embodiment, step S24 includes: S241: Compare and analyze the standard light source image and the reference image rendering in the perceived color space to extract abnormal candidate regions; In this embodiment, step S241 aims to initially identify regions in the image that may have color differences. This can be achieved by calculating the pixel-level color difference between the two images in the perceptual color space, then performing threshold segmentation on the color difference map, and marking pixels or connected regions with color differences exceeding a certain threshold as abnormal candidate regions. Alternatively, image difference detection algorithms, such as structural similarity index or perceptual hash algorithm, can be used to identify regions with significant differences between the two images and use them as abnormal candidate regions.

[0059] S242: Perform visual attention encoding on the reference image rendering map and reverse attention anchoring on the standard light source image, retaining only abnormal candidate regions with bidirectional attention overlap higher than a preset overlap threshold as key color regions. The bidirectional attention overlap is the percentage of the overlapping area between the attention encoding region of the reference image rendering map and the reverse attention anchoring region of the standard light source image. In this embodiment, step S242 aims to filter out key color regions that are truly important to human visual perception from the initially identified abnormal candidate regions. This combines positive and negative attention to ensure that the selected regions are considered important in both directions. Specifically, visual attention encoding can utilize a deep learning-based visual attention model to process the reference image rendering, generating an attention heatmap that represents the regions and their intensity that the human eye might focus on when viewing the image. Alternatively, an image feature-based attention mechanism can be used, such as analyzing image features like edges, contrast, and color saturation, combined with human visual characteristic models, such as the fovea effect, to generate attention codes. Reverse attention anchoring can identify features in the standard light source image that are related to these regions and likely to attract human attention by analyzing the corresponding location regions in the reference image rendering, for example, through saliency detection. Algorithm; or, the attention encoding of the reference image rendering map can be used as a guide to find regions on the standard light source image that match it in content or structure, and use them as reverse attention anchor regions; bidirectional attention overlap refers to the ratio of the overlapping area of ​​the attention encoding region of the reference image rendering map and the reverse attention anchor region of the standard light source image to the total area, used to quantify the consistency of the two attention regions, ensuring that the selected key color region is a region that the human eye pays high attention to in both images. Bidirectional attention overlap can be obtained by calculating the ratio of the pixel-level intersection and union of two binary attention maps or attention heatmaps that have been thresholded; the preset overlap threshold is a pre-set value used to judge whether the bidirectional attention overlap is high enough to decide whether to promote abnormal candidate regions to key color regions. This overlap threshold can be set and optimized by expert experience, statistical analysis of a large amount of experimental data or machine learning methods, combined with actual needs.

[0060] S243: Calculate the local maximum of the similarity loss between the standard light source image and the reference image rendering within each key color region, and use it as the regional visual equivalent color difference of that key color region.

[0061] In this embodiment, step S243 aims to accurately calculate the visually equivalent color difference within the key color region after determining the key color region. Using the local maxima of similarity loss instead of the simple maximum color difference better reflects the human eye's perception of significant local differences. The local maxima of similarity loss can be calculated by first calculating the pixel-level similarity loss between the standard light source image and the reference image rendering within the key color region, for example, based on perceptual similarity indices such as LPIPS and SSIM. Then, the point or small region with the highest similarity loss value within the key color region is identified, and its value is used as the local maxima. Alternatively, a sliding window or local aggregation function can be applied within the key color region to calculate the mean or maximum similarity loss within each local window, and then the largest of these local values ​​is taken as the local maxima of similarity loss for the key color region.

[0062] Specifically, the solution in this embodiment first performs a preliminary comparative analysis of the standard light source image and the reference image rendering in the perceived color space, aiming to identify all abnormal candidate regions that may have color differences. To further focus on regions that significantly affect visual perception, this embodiment introduces a bidirectional attention mechanism. Specifically, by performing visual attention encoding on the reference image rendering, the focus of human eye attention on the image under ideal conditions can be simulated. At the same time, reverse attention anchoring is performed on the standard light source image, which can identify regions that may attract attention from the perspective of the actual acquired image. When the regions identified by the above two attention mechanisms have a bidirectional attention overlap degree higher than a preset overlap degree threshold, the corresponding abnormal candidate region is confirmed as a key color region. This can effectively eliminate misjudgments caused by noise, non-critical details, or single image characteristics, ensuring that the identified key color regions are truly of visual perception importance. Finally, within the screened key color regions, by calculating the local maxima of similarity loss between the standard light source image and the reference image rendering, the visual equivalent color difference of the key color region can be accurately quantified, thereby avoiding the information loss that may be caused by simple averaging and improving the accuracy of the regional visual equivalent color difference assessment.

[0063] By employing the aforementioned technical solutions, comparative analysis of images in the perceived color space is introduced to extract abnormal candidate regions. Combined with visual attention encoding and reverse attention anchoring mechanisms, key color regions that significantly impact visual perception can be identified more accurately. This two-way verification mechanism effectively avoids misjudging non-critical local differences as important regions, thereby improving the accuracy of key color region identification. Furthermore, within the selected key color regions, calculating the local maxima of similarity loss as the region's visual equivalent color difference more realistically reflects the human eye's perception of the most significant local color differences, thus making the evaluation results of the region's visual equivalent color difference more consistent with the characteristics of human vision.

[0064] In one embodiment, step S40 includes: S41: Match the original color data corresponding to the key color region in the reference image rendering with the preset attribute rule library to determine the attributes of the key color region and obtain its associated initial tolerance threshold. In this embodiment, matching the original color data with a preset attribute rule base aims to automatically identify the semantic attributes of a key color region by comparing its original color information with predefined rules. The original color data may include the average hue, saturation, brightness value, or complex color distribution characteristics of the key color region. The preset attribute rule base stores the mapping relationships between different color feature combinations and specific attributes, such as skin tone, brand color, sky color, and specific logo colors on product packaging, as well as initial tolerance thresholds associated with these attributes. For example, the attribute rule base can define a specific hue range and... The color within the saturation range is skin tone, and a relatively lenient initial tolerance threshold is set for it; while the color within another hue and saturation range is defined as the brand logo color, and a strict initial tolerance threshold may be set; determining the attributes of the key color region and obtaining its associated initial tolerance threshold is based on the results of the above matching process; when the original color data of the key color region successfully matches a rule in the attribute rule base, the semantic attribute represented by the key color region can be clearly defined. At the same time, the initial tolerance threshold pre-associated with the attribute in the attribute rule base is extracted, and this initial tolerance threshold provides a preliminary judgment benchmark based on experience or industry standards.

[0065] S42: Identify the basic attributes of the target detection object and obtain the corresponding historical detection data based on the basic attributes, wherein the basic attributes include product type and production batch; In this embodiment, identifying the basic attributes of the target detection object aims to obtain basic macroscopic information related to the target detection object. These basic attributes include product type (e.g., food packaging, drug instructions, art books) and production batch (e.g., batch 5 of 2023, batch 1 of 2024). Basic attributes provide contextual information about the target detection object, helping to understand its characteristics from a broader perspective. Obtaining corresponding historical detection data based on these basic attributes involves retrieving all past detection records similar to or related to the current target detection object from a historical database using the identified basic attributes. This historical detection data may include color detection results, color difference distribution, user feedback, and product pass rates for the same product type in past production batches. Analyzing historical detection data reveals inherent deviations in color performance, common problem patterns, and the human eye's acceptance of these deviations for specific product types or production batches, thus providing empirical data support for tolerance threshold optimization.

[0066] S43: Based on historical detection data, optimize and adjust the initial tolerance threshold associated with key color regions to generate regional tolerance thresholds.

[0067] In this embodiment, after obtaining the initial tolerance threshold and related historical detection data for the key color region, the initial threshold can be adjusted using the historical detection data. For example, if historical data shows that a brand logo color, even with a slight color difference exceeding the initial threshold under specific product types and production batches, is still generally accepted by the market, then the tolerance threshold for the key color region can be appropriately relaxed. Conversely, if historical data shows that a small color difference in a certain area leads to a large number of negative reviews or customer complaints, then the tolerance threshold may need to be tightened. This dynamic optimization adjustment allows the tolerance threshold to learn and adapt dynamically based on actual production and market feedback. Furthermore, by combining the visual weight of the key color region in the entire image, the human eye sensitivity function, and the optical properties of the substrate, a three-dimensional tolerance surface including hue, saturation, and brightness can be generated, and the optimized tolerance threshold can be compared with... By combining the characteristics of human visual perception with the physical properties of the printing substrate, a three-dimensional tolerance surface is ultimately achieved. The visual weight reflects the degree to which a key color region attracts human attention within the entire image; the human eye sensitivity function describes the differences in human perception of variations in hue, saturation, and brightness; and the optical properties of the printing substrate affect the color's presentation on the actual medium. By comprehensively considering these factors, a three-dimensional tolerance space that better reflects human perception and physical printing characteristics can be constructed, making tolerance judgment more accurate. The generated region tolerance threshold is the output of all the above optimization and generation processes. This threshold is not a simple numerical value but can exist in the form of a three-dimensional tolerance surface. This surface defines a three-dimensional space where any color difference falling within this space is considered acceptable, thus providing a more realistic color quality evaluation standard.

[0068] Specifically, after acquiring the standard light source image and the corresponding reference image rendering of the target detection object, and obtaining the equivalent color difference of the region through a pre-trained visual perception model, to more accurately judge the color quality of the key color region, the original color data of the key color region in the reference image rendering is first extracted and matched with a preset attribute rule library to identify the semantic attributes of the key color region, such as brand logo, skin color, or background color. Based on the preset mapping relationship in the rule library, a preliminary initial tolerance threshold is obtained for the key color region. On this basis, to make the tolerance threshold closer to actual production and human visual perception, the basic attributes of the target detection object are further identified, such as product type and production batch. Using the identified basic attributes as indexes, historical detection data related to the current detection object is retrieved from the historical database. This historical detection data contains a large amount of color deviation data from actual production. The system incorporates case studies, user feedback, and pass rate information under different tolerance settings. By analyzing historical testing data, the initial tolerance thresholds can be optimized and adjusted. For example, if historical data shows that a key color area for a specific product type has a certain degree of color difference, but its visual weight in the overall image is low or the human eye is not sensitive to it, it is still considered acceptable in actual production. In this case, the tolerance threshold for that area can be appropriately relaxed. Finally, the tolerance threshold optimized and adjusted based on historical data can be combined with the visual weight of the key color area in the overall image, the human eye sensitivity function, and the optical properties of the substrate to generate a three-dimensional tolerance surface. This three-dimensional tolerance surface not only considers the hue, saturation, and brightness dimensions of color, but also incorporates the differences in human eye perception of changes in these color dimensions and the influence of the substrate on color performance, thereby generating a more comprehensive regional tolerance threshold.

[0069] For example, when performing color detection on a digitally printed cosmetic packaging, assume that the visual perception model identifies the brand logo area on the packaging as a key color area and calculates its visually equivalent color difference. To determine the tolerance threshold for this logo area, the original color data of the logo area in the reference image rendering is first extracted. For example, its main color is "Pantone Red 185C", with high saturation and moderate brightness. The extracted original color data is input into a preset attribute rule library for matching. This attribute rule library may define the color of "Pantone Red 185C" within a specific saturation and brightness range as the "brand logo color" and associate it with an initial tolerance threshold, for example, in the CIELAB color space, the initial ΔE. The ab tolerance value is 2.0. Simultaneously, the basic attributes of the target object are identified, such as the product type being lipstick packaging and the production batch being the Spring 2024 batch. Based on the identified basic attributes, historical detection data for all lipstick packaging in the "Pantone Red 185C" brand logo area is retrieved from the historical database. The retrieved historical detection data may show that in past production, the ΔE of this logo area... When the color difference between AB and AB is between 2.0 and 2.5, consumers generally do not perceive any obvious quality problems, and the product qualification rate is relatively high. Based on historical testing data, the initial tolerance threshold of 2.0 is optimized and adjusted. Here, the tolerance threshold for the logo area may be appropriately relaxed, for example, adjusted to 2.3. Subsequently, combining the visual weight of the logo area in the overall packaging design, the sensitivity function of the human eye to changes in red tones, and the optical properties of the substrate used for printing on the lipstick packaging, a three-dimensional tolerance surface is dynamically generated. This three-dimensional tolerance surface is a three-dimensional ellipsoid or irregular shape extending around the center point of "Pantone Red 185C" in CIELAB space. Its boundary defines the acceptable color difference range of the logo area in the three dimensions of hue, saturation, and brightness. Finally, whether the visually equivalent color difference of the area falls within the interior of this dynamically generated three-dimensional tolerance surface will be used as the basis for judging whether the color of the logo area is qualified.

[0070] By matching the original color data of key color regions with a preset attribute rule library, the region attributes can be accurately identified and a preliminary empirical tolerance threshold can be obtained. Furthermore, by combining the basic attribute retrieval of the target detection object with historical detection data to optimize and adjust the initial tolerance threshold, the tolerance threshold can fully reflect the acceptable range in actual production and human visual perception habits. This ensures that the generated region tolerance threshold is more in line with actual visual perception and printing characteristics, thereby improving the accuracy, reliability, and practicality of digital printing image color detection. It can effectively avoid misjudgment or missed detection caused by unreasonable tolerance settings.

[0071] In one embodiment, step S41 includes: S411: Extract image features of key color regions, including the central dominant hue of the key color region, statistical values ​​of color saturation distribution, and the relative position and area ratio of the key color region in the reference image rendering. In this embodiment, image features of key color regions are extracted to extract quantitative information representing their visual characteristics and importance. Image features refer to numerical or symbolic representations of image content or region attributes, capturing human perception of color, shape, and position. These image features include the central dominant hue of the key color region, statistical values ​​of color saturation distribution, and the relative position and area proportion of the key color region in the reference image rendering. The central dominant hue refers to the dominant hue within the key color region; it can be the average or mode of the pixel hues within that region, or a representative hue obtained through cluster analysis. The central dominant hue directly reflects the main color tendency of the region, such as red. Color, blue, or green; color saturation distribution statistics refer to quantitative values ​​describing the distribution of color saturation within a key color region. These can include the average, standard deviation, maximum, minimum, or specific quantiles of the saturation histogram, reflecting the vibrancy and uniformity of the color in that region; the relative position and area percentage of the key color region in the reference image rendering. The relative position can be represented by the coordinates of the region's center point or its distance relative to the image edge, while the area percentage is the proportion of pixels in the key color region to the total number of pixels in the image. Spatial features such as relative position and area percentage reflect the importance of the key color region in the overall design. For example, regions located in the center of the image or occupying a large area usually have higher visual weight.

[0072] S412: Match the image features with predefined image feature combination conditions in the attribute rule base, wherein the attribute rule base stores the mapping relationship between several image feature combinations and corresponding attribute classifications and initial tolerance thresholds; In this embodiment, matching image features with predefined image feature combination conditions in the attribute rule base means comparing the quantified features of the extracted key color regions with pre-set rules to identify their category. The matching process can employ various algorithms, such as rule-based expert systems, decision tree classifiers, support vector machines, or neural network machine learning models. These algorithms can classify key color regions into specific attribute categories based on feature combination patterns. The attribute rule base refers to a pre-built knowledge base containing the association between different image feature combinations and specific attribute classifications. For example, a rule might be defined as "If the central dominant hue is red with high saturation and a large area proportion, then the attribute classification is 'Brand Logo,' with a corresponding initial tolerance threshold of X." The construction of this attribute rule base can typically be based on expert experience, historical data analysis, or machine learning training to map complex visual features to meaningful semantic attributes and preset preliminary tolerance standards for each attribute.

[0073] S413: Determine the attributes of the key color regions based on the matched image feature combinations, and obtain the corresponding initial tolerance threshold.

[0074] In this embodiment, when an image feature successfully matches a feature combination condition in the attribute rule base, the attribute classification of the key color region can be clearly defined, such as a brand logo, skin tone region, or background color block. At the same time, based on the matching result, the initial tolerance threshold associated with the attribute classification can be directly obtained from the attribute rule base. This initial tolerance threshold provides differentiated tolerance standards for key color regions with different attributes.

[0075] Specifically, to accurately identify the attributes of key color regions and match them with appropriate initial tolerance thresholds, this embodiment extracts multi-dimensional image features from the key color regions and uses a preset attribute rule library for matching. Specifically, firstly, image features such as the central dominant hue, color saturation distribution statistics, relative position, and area proportion are extracted from the key color regions. These image features quantify the visual characteristics of the key color regions from multiple dimensions, including color, saturation, and spatial layout. Then, the extracted image features are input into the attribute rule library and compared with predefined image feature combination conditions. This attribute rule library pre-stores the mapping relationship between various image feature combinations, corresponding attribute categories, and corresponding initial tolerance thresholds. Through this matching process, the attribute category to which the key color region belongs can be identified based on its comprehensive visual features, and the initial tolerance threshold associated with that attribute category can be directly obtained from the attribute rule library.

[0076] By using the above technical solution, multi-dimensional image features such as the central dominant hue, color saturation distribution statistics, relative position, and area proportion of key color regions are extracted and matched with a preset attribute rule library. This enables automated identification of key color region attributes. The feature combination-based matching method described above can more accurately distinguish regions of different visual importance and provide a more reasonable and differentiated initial tolerance threshold for each attribute, thereby improving the efficiency and accuracy of attribute identification.

[0077] In one embodiment, the color detection results include qualified detection results, conditionally qualified detection results, and unqualified detection results. Step S60 includes: S61: If the overall visual equivalent color difference meets the overall tolerance threshold, and the regional visual equivalent color difference of all key color areas meets their respective matching regional tolerance thresholds, then a qualified test result is generated. In this embodiment, a qualified test result means that the color performance of the target object fully meets the preset quality standards and tolerance requirements, and can be put into use or delivered without any correction or adjustment. This can be achieved by marking, generating a qualified report, or triggering subsequent production processes. The overall visual equivalent color difference meets the overall tolerance threshold, which means that the average color deviation of the entire image is within an acceptable range. This can be achieved by calculating the average color difference of all pixels in the image and comparing it with the preset global tolerance upper limit. The regional visual equivalent color difference of all key color areas meets their respective matching regional tolerance thresholds, which means that the color deviation of all local areas identified as key in the image meets their respective set tolerance standards. This can be achieved by independently comparing the maximum color difference value of each key area.

[0078] Furthermore, when the regional tolerance threshold is obtained by constructing a three-dimensional tolerance surface for the key color regions, if the overall visual equivalent color difference meets the overall tolerance threshold, and the regional visual equivalent color difference of all key color regions falls within their respective matched three-dimensional tolerance surfaces, then a qualified test result is generated.

[0079] S62: If the overall visual equivalent color difference meets the overall tolerance threshold, but the regional visual equivalent color difference of at least one key color area does not meet its matching regional tolerance threshold, then it is further determined whether the degree of non-compliance is within the preset fluctuation range. If the degree of non-compliance is within the preset fluctuation range, then a conditionally qualified detection result is generated. In this embodiment, a conditionally acceptable test result means that although the color performance of the target object has local or slight deviations, these deviations are within an acceptable fluctuation range and do not constitute serious quality problems. Further observation, recording, or fine-tuning may be required, but they generally do not affect the basic functions or main visual effects of the product. This can be achieved by issuing a warning, suggesting manual review, or triggering a secondary processing flow. Whether the degree of non-compliance is within the preset fluctuation range means that when the color difference of a certain area slightly exceeds its matching area tolerance threshold, it is further determined whether the excess amount is within the preset additional allowable range. This can be achieved by calculating the difference exceeding the threshold and comparing it with the upper limit of the fluctuation range. The preset fluctuation range is a configurable parameter used to define the extent to which exceeding the area tolerance threshold can still be considered conditionally acceptable. This fluctuation range can be set according to different product types, production needs, or production experience. For example, it can be set to a fixed value in color difference units or a percentage based on a threshold.

[0080] Furthermore, when the regional tolerance threshold is obtained by constructing a three-dimensional tolerance surface for the key color region, if the overall visual equivalent color difference meets the overall tolerance threshold, but the regional visual equivalent color difference of at least one key color region does not fall within its matching three-dimensional tolerance surface, then it is further determined whether the degree of non-falling is within the preset floating range. If the degree of non-falling is within the preset floating range, then a conditionally qualified detection result is generated.

[0081] S63: If the overall visual equivalent color difference does not meet the overall tolerance threshold, or if the regional visual equivalent color difference of any key color area does not meet its matching regional tolerance threshold, and the degree of non-compliance exceeds the preset fluctuation range, then an unqualified detection result will be generated.

[0082] In this embodiment, a non-conforming test result indicates that the color performance of the target object has a significant deviation, exceeding the acceptable tolerance range and fluctuation range, which seriously affects the quality or visual effect of the product and requires rework, scrapping, or other corrective measures. This can be achieved by issuing an alarm, automatically stopping the production line, or generating a non-conforming report.

[0083] Furthermore, when the regional tolerance threshold is obtained by constructing a three-dimensional tolerance surface for the key color regions, if the overall visual equivalent color difference does not meet the overall tolerance threshold, or if the regional visual equivalent color difference of any key color region does not fall within its matching three-dimensional tolerance surface, and the degree of non-falling exceeds the preset floating range, then an unqualified detection result is generated.

[0084] Specifically, after obtaining the overall visual equivalent color difference, regional visual equivalent color difference, and corresponding tolerance thresholds, the first level of judgment is performed: if the overall visual equivalent color difference meets the overall tolerance threshold, and the regional visual equivalent color difference of all key color regions also meets their respective matching regional tolerance thresholds, it indicates that the overall and local color performance of the image meets the standard. At this time, a qualified detection result is generated, ensuring that a completely qualified conclusion is given only when all key indicators meet the standards, thereby guaranteeing high-standard color quality. Furthermore, to address slight deviations that may occur in actual production, this embodiment introduces the concept of conditional qualification, that is, when the overall visual equivalent color difference meets the overall tolerance threshold, but the regional visual equivalent color difference of at least one key color region fails to meet its matching regional tolerance threshold, it will not be immediately judged as unqualified. Instead of simply checking the degree of non-compliance, the test further determines whether the deviation is within a preset fluctuation range. If the deviation is within the fluctuation range, a conditionally acceptable test result is generated, allowing for some tolerance of minor local deviations that do not affect the core quality. This avoids misjudgments and unnecessary rework caused by an overly strict single standard, thereby improving production efficiency and resource utilization. Finally, for severe color deviations that exceed the acceptable range, an unacceptable test result is generated, including two situations: First, the overall visual equivalent color difference does not meet the overall tolerance threshold, indicating that there is a serious problem with the overall color of the image; second, the regional visual equivalent color difference of any key color area does not meet its matching regional tolerance threshold, and the degree of non-compliance exceeds the preset fluctuation range, indicating that the local color deviation of the key area has reached an unacceptable or unacceptable level.

[0085] Through the above technical solution, this embodiment provides a more refined image color detection result classification mechanism. Since traditional simple pass or fail judgments often cannot meet the complex and ever-changing production needs, they may lead to overreaction to slight deviations or neglect of potential problems. This application introduces conditionally passable detection results, so that when the overall quality meets the standards but there are slight tolerable deviations in some areas, a more flexible judgment can be given, avoiding unnecessary rework and waste of resources, thereby improving production efficiency, enhancing the stability and consistency of product quality, and effectively reducing production costs.

[0086] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0087] In one embodiment, a digital printed image color detection system is provided, which corresponds one-to-one with the digital printed image color detection method described in the above embodiments. The digital printed image color detection system includes: The image acquisition module is used to acquire a standard light source image of the target detection object and the corresponding reference image rendering through the image acquisition terminal; The color difference acquisition module is used to acquire the optical property parameters of the substrate used for the target detection object, and input the standard light source image, the reference image rendering map and the optical property parameters into the pre-trained visual perception model to obtain the overall visual equivalent color difference and the regional visual equivalent color difference. The overall visual equivalent color difference is the mean gradient of the similarity loss, and the regional visual equivalent color difference is the local maximum of the similarity loss. The first comparison module is used to compare the overall visual equivalent color difference with the preset overall tolerance threshold to obtain the first comparison result; The attribute recognition module is used to identify the attributes of the key color regions corresponding to the visual equivalent color difference of the region, and to match the corresponding region tolerance threshold for the key color regions based on the identified attributes. The second comparison module is used to compare the visual equivalent color difference of the region with the tolerance threshold of the matched region to obtain the second comparison result. The result generation module is used to generate color detection results based on the first comparison result and the second comparison result.

[0088] For specific limitations regarding a digital printing image color detection system, please refer to the limitations of a digital printing image color detection method described above, which will not be repeated here. Each module in the aforementioned digital printing image color detection system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0089] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a digital printed image color detection method.

[0090] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements a digital printed image color detection method.

[0091] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application 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 this application, and should all be included within the protection scope of this application.

Claims

1. A method for color detection of digital printed images, characterized in that, Including the following steps: The standard light source image of the target object and the corresponding reference image rendering are acquired through the image acquisition terminal. The optical property parameters of the substrate used for the target detection object are obtained, and the standard light source image, the reference image rendering map and the optical property parameters are input into the pre-trained visual perception model to obtain the overall visual equivalent color difference and the regional visual equivalent color difference. The overall visual equivalent color difference is the mean gradient of the similarity loss, and the regional visual equivalent color difference is the local maximum of the similarity loss. The overall visual equivalent color difference is compared with the preset overall tolerance threshold to obtain the first comparison result; Identify the attributes of key color regions corresponding to the visual equivalent color difference of a region, and match the corresponding region tolerance threshold for the key color regions based on the identified attributes; The visual equivalent color difference of the region is compared with the tolerance threshold of the matched region to obtain the second comparison result. Color detection results are generated based on the first comparison result and the second comparison result; The visual perception model includes a parameter adaptation layer, a color conversion layer, a first computation layer, and a second computation layer. The step of obtaining the optical property parameters of the substrate used for the target detection object, and inputting the standard light source image, the reference image rendering, and the optical property parameters into the pre-trained visual perception model to obtain the overall visual equivalent color difference and the regional visual equivalent color difference includes: The parameter adaptation layer constructs an optical influence matrix based on optical property parameters. The optical influence matrix is ​​used to perform nonlinear distortion correction on the perceived color space to eliminate color difference shift caused by the substrate. The conversion parameters of the color conversion layer are configured based on the perceived color space after nonlinear distortion correction. The color conversion layer converts the standard light source image and the reference image rendering to the perceptual color space based on the configured conversion parameters. The first computational layer calculates the average gradient of the similarity loss between the standard light source image and the reference image rendering in the perceptual color space to obtain the overall visual equivalent color difference. The second computational layer determines the key color regions and calculates the local maxima of similarity loss between the standard light source image and the reference image rendering within the key color regions in the perceptual color space to obtain the visually equivalent color difference of the regions.

2. The digital printed image color detection method according to claim 1, characterized in that: The step of acquiring a standard light source image of the target detection object and the corresponding reference image rendering image through an image acquisition terminal includes: Under a preset standard light source observation environment, a physical image of the target object is acquired through an image acquisition terminal and used as a standard light source image; Based on the original digital manuscript associated with the target detection object, and combined with the light source parameters of the standard light source observation environment and the color characteristic file of the image acquisition terminal, a reference image rendering map that matches the acquisition conditions of the physical image in terms of color characteristics is generated. Spatial alignment and color feature preprocessing are performed on the standard light source image and the reference image rendering. The color feature preprocessing includes geometric distortion correction, color uniformity correction of image edge regions, and random noise filtering.

3. The digital printed image color detection method according to claim 1, characterized in that: The second computational layer determines key color regions and calculates the local maxima of similarity loss between the standard light source image and the reference image rendering within the key color regions in the perceptual color space to obtain the visually equivalent color difference of the regions. This includes the following steps: Compare and analyze the standard light source image and the reference image rendering in the perceived color space to extract abnormal candidate regions; Visual attention encoding is performed on the reference image rendering map, and reverse attention anchoring is performed on the standard light source image. Only abnormal candidate regions with bidirectional attention overlap higher than a preset overlap threshold are retained as key color regions. The bidirectional attention overlap is the percentage of the overlapping area between the attention encoding region of the reference image rendering map and the reverse attention anchoring region of the standard light source image. Calculate the local maximum of the similarity loss between the standard light source image and the reference image rendering within each key color region, and use it as the regional visual equivalent color difference of that key color region.

4. The digital printed image color detection method according to claim 1, characterized in that: The step of identifying the attributes of the key color region corresponding to the visual equivalent color difference of the identification area, and matching the corresponding region tolerance threshold to the key color region based on the identified attributes, includes: The original color data corresponding to the key color region in the reference image rendering is matched with the preset attribute rule library to determine the attributes of the key color region and obtain its associated initial tolerance threshold. Identify the basic attributes of the target object to be detected, and obtain the corresponding historical detection data based on the basic attributes, including product type and production batch; Based on historical detection data, the initial tolerance threshold associated with key color regions is optimized and adjusted to generate regional tolerance thresholds.

5. The digital printed image color detection method according to claim 4, characterized in that: The step of matching the original color data corresponding to the key color region in the reference image rendering with a preset attribute rule library to determine the attributes of the key color region and obtain its associated initial tolerance threshold includes: Extract image features of key color regions, including the central dominant hue of the key color region, statistical values ​​of color saturation distribution, and the relative position and area proportion of the key color region in the reference image rendering. The image features are matched with predefined image feature combination conditions in the attribute rule base, wherein the attribute rule base stores the mapping relationship between several image feature combinations and corresponding attribute classifications and initial tolerance thresholds. The attributes of key color regions are determined based on the matched image feature combinations, and the corresponding initial tolerance threshold is obtained.

6. The digital printed image color detection method according to claim 1, characterized in that: The color detection results include qualified detection results, conditionally qualified detection results, and unqualified detection results. The step of generating color detection results based on the first comparison result and the second comparison result includes: If the overall visual equivalent color difference meets the overall tolerance threshold, and the regional visual equivalent color difference of all key color areas meets their respective matching regional tolerance thresholds, then a qualified test result is generated. If the overall visual equivalent color difference meets the overall tolerance threshold, but the regional visual equivalent color difference of at least one key color area does not meet its matching regional tolerance threshold, then it is further determined whether the degree of non-compliance is within the preset fluctuation range. If the degree of non-compliance is within the preset fluctuation range, then a conditionally qualified test result is generated. If the overall visual equivalent color difference does not meet the overall tolerance threshold, or if the regional visual equivalent color difference of any key color area does not meet its matching regional tolerance threshold, and the degree of non-compliance exceeds the preset fluctuation range, then an unqualified test result will be generated.

7. A digital printing image color detection system, characterized in that, include: The image acquisition module is used to acquire a standard light source image of the target detection object and the corresponding reference image rendering through the image acquisition terminal; The color difference acquisition module is used to acquire the optical property parameters of the substrate used for the target detection object, and input the standard light source image, the reference image rendering map and the optical property parameters into the pre-trained visual perception model to obtain the overall visual equivalent color difference and the regional visual equivalent color difference. The overall visual equivalent color difference is the mean gradient of the similarity loss, and the regional visual equivalent color difference is the local maximum of the similarity loss. The first comparison module is used to compare the overall visual equivalent color difference with the preset overall tolerance threshold to obtain the first comparison result; The attribute recognition module is used to identify the attributes of the key color regions corresponding to the visual equivalent color difference of the region, and to match the corresponding region tolerance threshold for the key color regions based on the identified attributes. The second comparison module is used to compare the visual equivalent color difference of the region with the tolerance threshold of the matched region to obtain the second comparison result. The result generation module is used to generate color detection results based on the first comparison result and the second comparison result; The visual perception model includes a parameter adaptation layer, a color conversion layer, a first computation layer, and a second computation layer. The step of obtaining the optical property parameters of the substrate used for the target detection object, and inputting the standard light source image, the reference image rendering, and the optical property parameters into the pre-trained visual perception model to obtain the overall visual equivalent color difference and the regional visual equivalent color difference includes: The parameter adaptation layer constructs an optical influence matrix based on optical property parameters. The optical influence matrix is ​​used to perform nonlinear distortion correction on the perceived color space to eliminate color difference shift caused by the substrate. The conversion parameters of the color conversion layer are configured based on the perceived color space after nonlinear distortion correction. The color conversion layer converts the standard light source image and the reference image rendering to the perceptual color space based on the configured conversion parameters. The first computational layer calculates the average gradient of the similarity loss between the standard light source image and the reference image rendering in the perceptual color space to obtain the overall visual equivalent color difference. The second computational layer determines the key color regions and calculates the local maxima of similarity loss between the standard light source image and the reference image rendering within the key color regions in the perceptual color space to obtain the visually equivalent color difference of the regions.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the digital printing image color detection method as described in any one of claims 1-6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the digital printed image color detection method as described in any one of claims 1-6.