Intelligent image correction method and system for clothing customization

By performing data preprocessing and precise color space conversion on CMYK images, the display deviation problem caused by the difference between CMYK and RGB color modes was solved, realizing intelligent color correction of clothing customization images, ensuring the consistency of online display with the actual finished product color, and improving the accuracy of customization services and user satisfaction.

CN121437348BActive Publication Date: 2026-03-17DALIAN DAYANG GARMENT CUSTOMIZATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

In personalized clothing customization, the difference between CMYK and RGB color modes causes significant deviations when images are displayed in an RGB environment, affecting customers' judgment of the final product color, resulting in finished products that do not meet expectations, leading to customer complaints and returns.

Method used

By reading the metadata of the target image file, data preprocessing of the CMYK format image is performed, including color channel separation and normalization. After eliminating K channel interference, it is mapped to the XYZ space. Then, the RGB image is obtained through the inverse matrix of the RGB color gamut and Gamma correction technology. Accurate conversion is performed using ICC profile and multidimensional CLUT interpolation tool. Finally, color verification and optimization are performed to ensure color consistency.

Benefits of technology

It achieves accurate color reproduction across color modes, ensuring color consistency of images throughout the digital customization process, improving the accuracy of customization services and user experience, and reducing return rates and customer complaints.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121437348B_ABST
    Figure CN121437348B_ABST
Patent Text Reader

Abstract

The application discloses a kind of clothing customization image intelligent color correction method and system, including S1: reading the file header metadata corresponding to target image file;Based on the preset flag, the picture format type of target image file is confirmed according to file header metadata;And when the picture format type of target image file is CMYK format, step S3 is executed;S3: data preprocessing is carried out to target image, and preprocessing data is obtained;S4: based on color space conversion strategy, the RGB image after conversion is obtained by mapping preprocessing data to RGB color space via XYZ color space;S5: color verification and optimization are carried out to the RGB image after conversion, and the optimized RGB format picture is obtained, to realize intelligent color correction to clothing customization image.Finally, the color deviation problem existing in the customization system for the provided picture is solved, and the consistency of image color in digital customization process is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image color processing technology in personalized clothing customization systems in garment manufacturing, and particularly to an intelligent color correction method and system for customized clothing images. Background Technology

[0002] In the field of personalized apparel customization, users often upload custom lining patterns. These patterns are typically created by designers using professional software based on the CMYK color model to suit subsequent physical printing. However, the front-end web pages and mobile applications of e-commerce customization platforms are displayed based on the RGB color model. Because CMYK (subtractive color model) and RGB (additive color model) have fundamental differences in color generation principles and color gamut, directly displaying a CMYK image in an RGB environment will result in significant and uncontrollable color deviations. This seriously misleads customers' judgment of the final product color, easily leading to discrepancies between the finished product and expectations, causing customer complaints and returns, resulting in economic losses and damage to brand reputation.

[0003] Therefore, there is an urgent need for a method and system for intelligent color correction of images in clothing customization, which aims to address the color deviation issues in user-provided images within the customization system and ensure accurate and consistent color representation in the digital customization process. Summary of the Invention

[0004] This invention provides a method and system for intelligent color correction of images for customized clothing, in order to overcome the above-mentioned technical problems.

[0005] To achieve the above objectives, the technical solution of the present invention is as follows:

[0006] A method for intelligent color correction of images for customized clothing, specifically including the following steps:

[0007] S1: Read the file header metadata corresponding to the target image file;

[0008] S2: Based on the preset flag bit, determine the image format type of the target image file according to the file header metadata; and execute step S3 if the image format type of the target image file is CMYK.

[0009] S3: Perform data preprocessing on the target image to obtain preprocessed data;

[0010] S4: Based on the color space conversion strategy, the preprocessed data is mapped from the XYZ color space to the RGB color space to obtain the converted RGB image;

[0011] S5: Perform color verification and optimization on the converted RGB image to obtain an optimized RGB format image, thereby realizing intelligent color correction of the clothing customization image.

[0012] Furthermore, the data preprocessing method described in S3 includes the following steps:

[0013] S31: Perform color channel separation on the target image to obtain the channel image;

[0014] The rules for performing color channel separation are as follows:

[0015] According to the channel order of C, M, Y, K in the target image, each pixel in the target image is traversed in turn, and the pixel data corresponding to the channels C, M, Y, K in each pixel is used as the elements in the two-dimensional data matrix corresponding to the C, M, Y, K channels respectively.

[0016] S32: Normalize the pixel data corresponding to each channel image to floating-point values ​​in the 0-1 range to obtain a normalized image.

[0017] Furthermore, the color space conversion strategy described in S4 is specifically as follows:

[0018] S41: Linearize the normalized image to eliminate the interference of the K channel on the C, M, Y channel images, and thus obtain optimized C, M, Y channel images;

[0019] S42: The optimized C, M, Y channel images and the normalized images corresponding to the K channel are used as new channel images; and the new channel images are mapped to the XYZ space to obtain XYZ mapping data;

[0020] S43: Based on the inverse matrix of the RGB color gamut, the XYZ mapping data is linearly mapped to the preset RGB color space, and then the RGB image is obtained through Gamma correction technology.

[0021] Furthermore, the expression for linearizing the normalized image described in S41 is as follows:

[0022] =C×(1-K)+K

[0023] = ×(1-K)+K

[0024] = ×(1-K)+K

[0025] In the formula: , , This represents the optimized image after processing the C, M, Y channels; C, M, Y, K represent the pixel data corresponding to the channels C, M, Y, K.

[0026] Furthermore, the method for mapping the new channel image to the XYZ space in S42 is as follows:

[0027] S421: Read the preset ICC configuration file of the CMYK image, obtain the A2B tag of the corresponding rendering intent, apply the TRC curve equation to linearize the pixel data in the new channel image based on the A2B tag, and obtain the linearized data.

[0028] S422: By calling the multidimensional CLUT interpolation tool, the linearized data is interpolated and transformed to XYZ space to obtain XYZ mapping data.

[0029] Furthermore, the method for color verification and optimization of the converted RGB image in S5 is as follows:

[0030] S51: Convert the target image in CMYK format to Lab color space, obtain the L color component in Lab color space, and record it as the first luminance value;

[0031] S52: Convert the RGB image to the Lab color space, obtain the L color component in the Lab color space, and record it as the second luminance value;

[0032] S53: Obtain the brightness difference value based on the first brightness value and the second brightness value;

[0033] And the formula for obtaining the brightness difference value is: =|L_original-L_converted|, where... L_original represents the brightness difference value; L_converted represents the first brightness value; L_converted represents the second brightness value.

[0034] S54: Determine whether the brightness difference value meets the preset brightness threshold;

[0035] If the brightness difference value is less than the preset brightness threshold, then the brightness of the current RGB image is confirmed to meet the target requirements, and step S55 is continued.

[0036] If the brightness difference value is greater than or equal to the preset brightness threshold, the brightness of the RGB image is adjusted based on the target image according to the expert's experience value, and step S55 is continued.

[0037] S55: Calculate and obtain the first chromaticity value of the target image in CMYK format and the second chromaticity value of the RGB image based on the CIEDE2000 formula; and obtain the color difference value based on the first chromaticity value and the second chromaticity value.

[0038] And the formula for obtaining the color difference value is: =| _original- _converted|, where, Indicates the color difference value; _original represents the first chromaticity value; _converted represents the second chromaticity value;

[0039] S56: Determine whether the color difference value meets the preset color threshold;

[0040] If the color difference value is less than the preset color threshold, then the color of the current RGB image is confirmed to meet the target requirements, and step S57 is continued.

[0041] If the color difference value is greater than or equal to the preset color threshold, the RGB image is adjusted based on the target image according to the expert's experience value, and step S57 is continued.

[0042] S57: Perform color banding optimization on the result image from step S56 based on the brightness difference value and color difference value to obtain an optimized RGB format image.

[0043] Furthermore, the method for color banding optimization in S57 is as follows:

[0044] based on The algorithm propagates the quantization error of each pixel in the resulting image to adjacent pixels according to a preset weight ratio, based on the brightness difference value and color difference value.

[0045] A color correction system for a smart color correction method for customized clothing images includes a data reading module, an image format determination module, a data preprocessing module, a color space conversion module, and a color verification and optimization module;

[0046] The data reading module is used to read the file header metadata corresponding to the target image file to be customized.

[0047] The image format determination module is used to determine the image format of the target image file based on preset flag bits and file header metadata; the image format includes RGB format and CMYK format;

[0048] The data preprocessing module is used to preprocess the target image corresponding to the CMYK format and obtain preprocessed data;

[0049] The color space conversion module is used to map preprocessed data from the XYZ color space to the RGB color space to obtain the converted RGB image based on the color space conversion strategy.

[0050] The color verification and optimization module is used to perform color verification and optimization on the converted RGB image to obtain an optimized RGB format image.

[0051] Beneficial Effects: This invention provides an intelligent color correction method for clothing customization images. Based on a color space conversion strategy, preprocessed data is mapped from the XYZ color space to the RGB color space to obtain a converted RGB image, achieving accurate color reproduction across color modes. The converted RGB image undergoes color verification and optimization to obtain an optimized RGB format image, intelligently correcting color cast issues present in the customization system and ensuring accurate and consistent image color throughout the digital customization process. This invention effectively solves the color cast problem caused by color mode mismatch in the clothing customization field, ensuring consistency between online display and physical finished product colors, significantly improving the accuracy of customization services and user experience, while reducing return rates and customer complaints due to color differences. Attached Figure Description

[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0053] Figure 1 This is a flowchart of the intelligent color correction method for customized clothing images according to the present invention;

[0054] Figure 2 This is the result of intelligent color correction for the customized clothing image in this embodiment; Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0056] This embodiment provides a method for intelligent color correction of images for customized clothing, such as... Figure 1 As shown, the specific steps include:

[0057] S1: Obtain the image uploaded by the user and read the file header metadata corresponding to the target image file;

[0058] S2: Based on the preset flag bits, confirm the image format of the target image file according to the file header metadata; if the image format is confirmed to be RGB, no processing is performed on the target image; if the image format is confirmed to be CMYK, continue to step S3;

[0059] Specifically, confirm the flags of the image file's own attributes:

[0060] If the flag is Format24bppRgb, the target image file is determined to be in RGB format;

[0061] If the flag shows Pixel Format.Format32bppCmyk, it is determined to be in CMYK printing mode; if it is determined to be in RGB format, no processing is done and the image is output directly; if it is determined to be in CMYK format, color conversion is performed, i.e., step S3 is executed.

[0062] S3: Perform data preprocessing on the target image to obtain preprocessed data;

[0063] The data preprocessing method described in this embodiment includes the following steps:

[0064] S31: Perform color channel separation on the target image to obtain the channel image;

[0065] The rules for performing color channel separation are as follows:

[0066] According to the channel order of C, M, Y, K in the target image, each pixel in the target image is traversed in turn, and the pixel data corresponding to the channels C, M, Y, K in each pixel is used as the elements in the two-dimensional data matrix corresponding to the C, M, Y, K channels respectively.

[0067] Specifically, the first byte of data for each pixel is extracted and placed into a two-dimensional data matrix for the C (cyan) channel; the second byte of data for each pixel is extracted and placed into a two-dimensional data matrix for the M (magenta) channel; the third byte of data for each pixel is extracted and placed into a two-dimensional data matrix for the Y (yellow) channel; and the fourth byte of data for each pixel is extracted and placed into a two-dimensional data matrix for the K (black) channel. A pixel's color contains four channels: CMYK, with the first channel being C (cyan), which is the first byte. Thus, the original color image is separated into four independent, grayscale channel images, each representing the distribution of the primary color ink content.

[0068] S32: Normalize the pixel data corresponding to each channel image to floating-point values ​​in the 0-1 range to obtain a normalized image. In this embodiment, the original byte data (0-255) of the CMYK four channels is uniformly converted into floating-point values ​​in the 0-1 range to eliminate the difference in dimensions;

[0069] S4: Based on the color space conversion strategy, the preprocessed data is mapped from the XYZ color space to the RGB color space to obtain the converted RGB image;

[0070] The color space conversion strategy is as follows:

[0071] S41: Linearize the normalized image, that is, use the "subtractive color mixing" principle to eliminate the interference of the K channel on the C, M, Y channel images, and thus obtain the optimized C, M, Y channel images.

[0072] Furthermore, the expression for the "subtractive color mixing" principle is:

[0073] =C×(1-K)+K

[0074] = ×(1-K)+K

[0075] = ×(1-K)+K

[0076] In the formula: , , This represents the optimized image after optimizing the C, M, Y channels; C, M, Y, K represent the pixel data corresponding to channels C, M, Y, K.

[0077] S42: The optimized C, M, Y channel images and the normalized images corresponding to the K channel are used as new channel images; and the new channel images are mapped to the XYZ space to obtain XYZ mapping data;

[0078] Specifically, the method for mapping the new channel image to the XYZ space is as follows:

[0079] S421: Read the preset ICC profile of the CMYK image, obtain the A2B label of the corresponding rendering intent, apply the TRC curve equation to linearize the pixel data in the new channel image based on the A2B label, and obtain linearized data.

[0080] In this embodiment, the A2B tag in the ICC profile represents the conversion from a device-dependent color space to a device-independent color space (such as CIEXYZ or CIELAB). This conversion process involves the selection of rendering intent. The A2B tag contains multiple conversion tables, each corresponding to a rendering intent. This means that different rendering intents can be selected as needed during color conversion, resulting in different conversion results. Furthermore, the A2B tag typically contains three main conversion tables, corresponding to perceptual intent, relative chromaticity intent, and absolute chromaticity intent, respectively. These conversion tables define how to convert device-specific color values ​​to device-independent color values ​​to enable accurate color transfer between different devices.

[0081] S422: By calling the multidimensional CLUT interpolation tool, the linearized data is interpolated and transformed to XYZ space to obtain XYZ mapping data;

[0082] S43: Inverse matrix based on RGB color gamut After linearly mapping the XYZ mapping data to the preset RGB color space, the RGB image is obtained through Gamma correction technology;

[0083] The expression for linearly mapping XYZ data to a preset RGB color space is:

[0084]

[0085] In this embodiment, the normalized CMYK data is mapped to the XYZ color space through an ICC configuration file and a multidimensional CLUT interpolation lookup table. Then, the XYZ data is mapped to the target RGB color space by matrix operations and Gamma correction using a conversion formula to obtain an RGB image.

[0086] S5: Perform color verification and optimization on the converted RGB image to obtain an optimized RGB format image, thereby realizing intelligent color correction of the clothing customization image.

[0087] Specifically, the method for color verification and optimization of the converted RGB image is as follows:

[0088] S51: Convert the target image in CMYK format to Lab color space, obtain the L color component in Lab color space, and record it as the first luminance value;

[0089] S52: Convert the RGB image to the Lab color space, obtain the L color component in the Lab color space, and record it as the second luminance value;

[0090] S53: Obtain the brightness difference value based on the first brightness value and the second brightness value;

[0091] And the formula for obtaining the brightness difference value is: =|L_original-L_converted|, where... L_original represents the brightness difference value; L_converted represents the first brightness value; L_converted represents the second brightness value.

[0092] S54: Determine whether the brightness difference value meets the preset brightness threshold, wherein the preset brightness threshold is 2.0;

[0093] If the brightness difference value is less than the preset brightness threshold, then the brightness of the current RGB image is confirmed to meet the target requirements, and step S55 is continued.

[0094] If the brightness difference value is greater than or equal to the preset brightness threshold, the brightness of the RGB image is adjusted based on the target image according to the expert's experience value, and step S55 is continued.

[0095] S55: Calculate and obtain the first chromaticity value of the target image in CMYK format and the second chromaticity value of the RGB image based on the CIEDE2000 formula; and obtain the color difference value based on the first chromaticity value and the second chromaticity value.

[0096] And the formula for obtaining the color difference value is: =| _original- _converted|, where, Indicates the color difference value; _original represents the first chromaticity value; _converted represents the second chromaticity value;

[0097] S56: Determine whether the color difference value meets the preset color threshold, wherein the preset color threshold is 1.0;

[0098] If the color difference value is less than the preset color threshold (assuming that the human eye cannot perceive the difference), then it is confirmed that the color of the current RGB image meets the target requirements, and step S57 is continued.

[0099] If the color difference value is greater than or equal to the preset color threshold, then the RGB image is adjusted for color difference based on the target image according to the expert's experience value (the image provided by the user and the color-corrected image are sent to the printing plant so that the workers can manually adjust the color difference), and step S57 is continued.

[0100] S57: Based on the brightness difference value and color difference value, perform color banding optimization processing on the result image of step S56 to obtain an optimized RGB format image; in this embodiment, a distributed error compensation method is used, namely... The algorithm makes the color transition in local areas more natural, significantly improves the continuity perceived by the human eye, and effectively solves the problem of color discontinuity in large areas of solid color or gradient areas.

[0101] Specifically, the method for color banding optimization is as follows:

[0102] based on The algorithm propagates the quantization error of each pixel in the resulting image to adjacent pixels according to a preset weight ratio (7 / 16 (right pixel), 3 / 16 (bottom left pixel), 5 / 16 (bottom right pixel), 1 / 16 (bottom right pixel)) based on the brightness difference value and color difference value.

[0103] In this embodiment, a processed and optimized RGB format image is used to complete the user order, such as... Figure 2 As shown in this embodiment, the method achieves high-precision conversion from printing color space to display color space by establishing a complete color management process. Specifically, the system automatically identifies the image color mode, performs professional-grade color space conversion for CMYK format images, uses ICC profiles to ensure accurate color reproduction, achieves precise color mapping through multidimensional lookup tables and interpolation calculations, and optimizes visual performance using an error diffusion algorithm. This method effectively solves the problem of color deviation caused by color mode mismatch in the clothing customization field, ensuring consistency between online display and physical finished product colors, significantly improving the accuracy of customization services and user experience, while reducing return rates and customer complaints due to color differences.

[0104] A color correction system for a smart color correction method for customized clothing images includes a data reading module, an image format determination module, a data preprocessing module, a color space conversion module, and a color verification and optimization module;

[0105] The data reading module is used to read the file header metadata corresponding to the target image file;

[0106] The image format determination module is used to determine the image format of the target image file based on preset flag bits and file header metadata; the image format includes RGB format and CMYK format;

[0107] The data preprocessing module is used to preprocess the target image corresponding to the CMYK format and obtain preprocessed data;

[0108] The color space conversion module is used to map preprocessed data from the XYZ color space to the RGB color space to obtain the converted RGB image based on the color space conversion strategy.

[0109] The color verification and optimization module is used to perform color verification and optimization on the converted RGB image to obtain an optimized RGB format image.

[0110] Specifically, in this embodiment, the data reading module, image format determination module, and data preprocessing module receive image files uploaded by the user through a file parsing interface and automatically identify their color modes. This module first reads the file header metadata of the image file and analyzes the color mode flag bits. When it is identified as CMYK mode, the module calls the image processing library to read the binary data of the image and parses out the continuous C, M, Y, and K channel values ​​in pixel order. This module has a built-in data verification submodule used to check the integrity and validity of the image data. After parsing, the module performs a data normalization operation, mapping the original values ​​of each channel to a floating-point range of 0-1, and allocates dedicated memory space to store the separated and normalized K channel data.

[0111] The color space conversion module is the core computing unit of the system. It receives normalized CMYK data from the preprocessing module. This module first performs linearization and black background removal to eliminate color interference from the K channel to the CMY channel. Then, the module completes the color space conversion in two stages: first, it maps the processed CMYK data to the XYZ color space, and then it maps the XYZ data to the target RGB color space. During the mapping process, the module reads the ICC profile embedded in the source image or specified by the system, and achieves high-precision color conversion through multidimensional lookup tables and interpolation calculations. This module supports batch matrix operations, enabling simultaneous conversion operations on multiple pixels to ensure processing efficiency.

[0112] The color verification and optimization module receives initial RGB data from the color conversion module. This module sequentially performs three main functions: brightness consistency check, color difference calculation, and color banding optimization. The brightness consistency check submodule converts the source CMYK and target RGB samples to the Lab color space respectively, compares their L values, and ensures brightness consistency. The color difference calculation submodule uses the CIEDE2000 formula to calculate color differences, ensuring... Values ​​less than 1.0. Implementation of the color banding optimization submodule. An error diffusion algorithm distributes quantization errors to adjacent pixels, smoothing color transitions. The system described in this embodiment also includes an output module responsible for generating and delivering the final result. This module reassembles the corrected RGB pixel data processed by the post-processing module into a complete image memory object and encodes the image data into a specified output format according to the platform configuration. Finally, the output module saves the generated image to a specified storage location on the server via a file system interface and returns the accessible URL of the image to the front-end application platform, completing the entire intelligent color correction process.

[0113] The overall workflow of the method and system described in this embodiment is as follows: Users submit custom lining pattern orders and upload images through an online suit customization platform. The system backend automatically calls the intelligent color correction system. First, the image format recognition and preprocessing module completes image parsing, pattern recognition, and data normalization. Subsequently, the color space conversion module performs precise color space mapping. The converted RGB data is immediately sent to the post-processing module for color verification and optimization. Finally, the output module generates and stores the corrected RGB image, and its URL is returned to the platform frontend to display the accurate color effect to the user.

[0114] The beneficial effects of the method and system described in this embodiment are as follows:

[0115] (1) By designing a core color mapping model based on color science principles, especially by using ICC profiles, XYZ color space mediation, and multi-dimensional CLUT interpolation calculation, the fundamental technical obstacles in CMYK to RGB conversion are solved from the bottom up, ensuring the consistency of the color visual essence. <1.0, achieving accurate color reproduction across color modes;

[0116] (2) Through “batch matrix operation” and automated “preprocessing-conversion-postprocessing” process, instantaneous automatic color correction of images is achieved without the need for manual intervention throughout the process, which greatly improves the automation level of the online customization process and user experience;

[0117] (3) It eliminates customer misunderstandings caused by color difference in front-end display from the source, directly reduces the defect rate, return rate and customer complaints caused by color problems, protects the commercial value of customized business, improves customer satisfaction and brand professional image, and thus reduces business risks and costs.

[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for intelligent correction of customization images of garments, characterized in that, Specifically comprising steps of: S1: reading file header metadata corresponding to the target image file; S2: based on the preset flag, confirming the picture format type of the target image file according to the file header metadata; And when the picture format type of the target image file is CMYK format, executing step S3; S3: data preprocessing is performed on the target image to obtain preprocessed data; The data preprocessing method comprises steps of: S31: color channel separation is performed on the target image to obtain channel images; And the color channel separation rule is: According to the channel order of C, M, Y and K in the target image, each pixel in the target image is traversed in turn, and the pixel data corresponding to the C, M, Y and K channels in each pixel is taken as an element in the two-dimensional data matrix corresponding to the C, M, Y and K channels respectively; S32: the pixel data corresponding to each channel image is normalized to a floating-point value in the interval of 0-1 to obtain a normalized image; S4: based on a color space conversion strategy, the preprocessed data is mapped to the RGB color space through XYZ color space to obtain a converted RGB image; The color space conversion strategy is specifically: S41: linearization processing is performed on the normalized image to eliminate the interference of the K channel on the C, M and Y channel images, and then optimized C, M and Y channel images are obtained; S42: the optimized C, M and Y channel images and the normalized image corresponding to the K channel are taken as new channel images; And the new channel image is mapped to the XYZ space to obtain XYZ mapping data; S43: based on the inverse matrix of the RGB color gamut, the XYZ mapping data is linearly mapped to the preset RGB color space, and then the RGB image is obtained through the Gamma correction technology; S5: color verification and optimization are performed on the converted RGB image to obtain an optimized RGB format picture, and intelligent color correction of the customized image of the garment is realized.

2. The method of claim 1, wherein, The expression for linearization processing of the normalized image in S41 is: = C x (1 - K) + K = ×(1-K)+K = x(1-K)+K In the formula: , , represents the image optimized for C, M, Y channel images; C, M, Y, K represents the pixel data corresponding to channels C, M, Y, K.

3. The method of claim 2, wherein, The method for mapping the new channel image to the XYZ space in S42 is: S421: a preset ICC configuration file of the CMYK image is read to obtain an A2B label corresponding to a rendering intent, and linearization processing is performed on the pixel data in the new channel image based on the A2B label by applying a TRC curve equation to obtain linearization data; S422: the linearization data is converted to the XYZ space by calling a multi-dimensional CLUT interpolation tool to obtain XYZ mapping data.

4. The method of claim 3, wherein, The method for color verification and optimization of the converted RGB image in S5 is specifically: S51: the target image in the CMYK format is converted to the Lab color space, and the L color component in the Lab color space is obtained and recorded as a first brightness value; S52: the RGB image is converted to the Lab color space, and the L color component in the Lab color space is obtained and recorded as a second brightness value; S53: the brightness difference value is obtained according to the first brightness value and the second brightness value; and the luminance difference value is obtained by the formula: = |L_original - L_converted|, wherein, denotes the luminance difference value; L_original denotes the first luminance value; and L_converted denotes the second luminance value. S54: whether the brightness difference value meets the preset brightness threshold is judged; If the luminance difference value is less than the preset luminance threshold, it is confirmed that the luminance of the current RGB image meets the target requirement, and step S55 is continued to be executed; If the luminance difference value is greater than or equal to the preset luminance threshold, the luminance of the RGB image is adjusted based on the target image according to the expert experience value, and step S55 is continued to be executed; S55: Based on the CIEDE2000 formula, the target image in the picture format of CMYK format is calculated and obtained, the corresponding first chrominance value, the second chrominance value corresponding to the RGB image is calculated and obtained, and the color difference value is obtained according to the first chrominance value and the second chrominance value; and the color difference value is obtained according to the following formula: | _original- _converted|, wherein, represents the color difference value; _original represents the first chroma value; _converted represents the second chroma value; S56: Determine whether the color difference value meets the preset chroma threshold; If the color difference value is less than the preset chroma threshold, it is confirmed that the chroma of the current RGB image meets the target requirement, and step S57 is continued to be executed; If the color difference value is greater than or equal to the preset chroma threshold, the color difference of the RGB image is adjusted based on the target image according to the expert experience value, and step S57 is continued to be executed; S57: Color tomography optimization processing is performed on the result image of step S56 according to the luminance difference value and the color difference value, and an optimized RGB format picture is obtained.

5. The method of claim 4, wherein, The method for color tomography optimization processing in S57 is: based on According to the luminance difference value and the color difference value, the quantization error of each pixel point in the result image is propagated to the adjacent pixel points according to the preset weight proportion.

6. A correction system designed according to the intelligent correction method of customizing images of clothes according to any one of claims 1 to 5, characterized in that, It includes a data reading module, a picture format determination module, a data preprocessing module, a color space conversion module, and a color verification and optimization module; The data reading module is used to read the file header metadata corresponding to the target image file of the garment customization; The picture format determination module is used to confirm the picture format of the target image file according to the file header metadata based on the preset flag bit; the picture format includes RGB format and CMYK format; The data preprocessing module is used to preprocess the target image corresponding to the CMYK format to obtain preprocessed data; The color space conversion module is used to map the preprocessed data to the RGB color space through XYZ color space to obtain a converted RGB image based on a color space conversion strategy; The color verification and optimization module is used to perform color verification and optimization on the converted RGB image to obtain an optimized RGB format picture.

Citation Information

Patent Citations

  • Color correction method based on physical imaging process and spectral power distribution embedding

    CN119784653A

  • Image white balance optimization method and apparatus, and electronic device

    WO2023088188A1