A fabric high-fidelity color changing soft proofing method and system based on image segmentation

By photographing and correcting fabric images inside an experimental lightbox, and using image decomposition and clustering algorithms to generate textures and cartoon elements, combined with multiple methods to generate high-fidelity color-changing results, the problem of inconsistent texture and color in textile fabric color-changing was solved, achieving a high-fidelity color-changing effect where fabric texture and color are consistent.

CN119963666BActive Publication Date: 2025-11-21WUHAN TEXTILE UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510058249.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-11-21
Estimated Expiration
2045-01-14

AI Technical Summary

Technical Problem

When performing high-fidelity color changing on textile fabrics, existing methods fail to effectively consider the interaction between color and texture, resulting in inconsistencies between the texture strength of the image after color changing and the actual target color fabric.

Method used

A digital camera was used to capture images of fabric samples inside an experimental lightbox and perform color correction. The images were divided into cartoon and texture parts using image decomposition technology. The cartoon part was segmented using the mean-shift clustering algorithm. The color-changing map was generated by combining the TB and Reinhard methods, and the L component was separated and reconstructed. Finally, the color-separated maps were merged to generate a high-fidelity color-changing result.

Benefits of technology

It effectively reduces the impact of fabric texture on segmentation, ensuring that the image after color replacement maintains the color close to the real fabric while the texture strength is consistent with the visual perception of the real fabric.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119963666B_ABST
    Figure CN119963666B_ABST
Patent Text Reader

Abstract

The application is a kind of fabric high-fidelity color changing soft proofing method and system based on image segmentation, comprising: shooting a digital image of a fabric sample; color correction is performed on the fabric sample image; the fabric image is decomposed into a cartoon part and a texture part; the cartoon part is clustered and segmented to obtain a fabric separation chart; the part to be changed in color is selected from the separation chart, and the image to be changed in color and the target color image are respectively converted to YIQ space and CIELab space to obtain color changing images P1 and P2; P1 and P2 are converted to Lab space, and the L component of P1 and P2 is reconstructed to obtain a new L component; the new L component is combined with the ab component of P1 and converted to RGB space to generate a color changing result of the separation chart; all separation charts are merged to obtain the final fabric color changing result. The application can effectively reduce the influence of fabric texture on segmentation, and when changing color, the color can be kept close to the real fabric while the texture strength can also be consistent with the visual perception of the real fabric.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of computer digital image processing, and particularly relates to a fabric high-fidelity color changing soft proofing method and system based on image segmentation. BACKGROUND

[0002] Textile fabric needs to go through a complex process from design to proofing, and designers will adjust the pattern and color matching according to the proofing effect, and often need to proof multiple times to achieve satisfactory results. This traditional manual proofing method has a long proofing cycle, large workload, and is prone to resource waste. Therefore, researchers have explored various digital online color changing methods, mainly divided into two categories: traditional methods and deep learning methods. The traditional method replaces the fabric color with the target color by segmenting the different color regions of the fabric and applying color mapping technology. The deep learning method can achieve more detailed expression and natural and realistic image color changing effect by training a large number of samples. However, this method has strong dependence on samples and requires a large number of sample support. Therefore, the traditional method is more suitable for the field of textile fabric color changing.

[0003] However, textile fabric high-fidelity color changing faces many challenges. First, the complex texture structure of textile fabric affects the segmentation accuracy. Second, some existing color changing methods do not fully consider the influence of color on texture perception, resulting in the original fabric characteristics still being maintained in the texture strength of the color changed image, and the texture difference of the target color fabric is not reflected. Therefore, although the color of the color changed image has changed, the texture effect is not consistent with the real target color fabric. SUMMARY

[0004] The purpose of the present application is to solve the problems described in the background art, and to provide a fabric high-fidelity color changing soft proofing method based on image segmentation.

[0005] In view of the problems existing in the prior art, the present application provides a solution. First, a digital camera is used to take a digital image of the fabric sample in the experimental light box, and color correction is performed to ensure the accuracy of the color. Then, the image decomposition technology is used to decompose the fabric image into a cartoon part and a texture part, and the mean-shift clustering algorithm is used to cluster and segment the cartoon part to obtain a color separation map of the fabric. After selecting the part to be changed from the color separation map, the image to be changed and the target color image are converted to YIQ space and CIELab space respectively, and TB method and Reinhard method are used respectively to obtain color changing images P1 and P2. Then, P1 and P2 are converted to CIELab space, and the L component of P1 and P2 is reconstructed to obtain a new L component. The new L component is combined with the ab component of P1 and converted to RGB space to generate the color changing result of the color separation map. Finally, all the color separation maps are merged to obtain the final fabric color changing result.

[0006] The technical scheme of the present application is a fabric high-fidelity color changing soft proofing method based on image segmentation, specifically comprising the following steps:

[0007] Step 1, taking a digital image of the fabric sample;

[0008] Step 2, color correction of the fabric sample digital image;

[0009] Step 3, decomposing the color-corrected fabric image into a cartoon part and a texture part;

[0010] Step 4, clustering segmentation of the cartoon part to obtain a fabric image separation chart;

[0011] Step 5, selecting the color changing part from the separation chart, converting the color changing image and the target color image to YIQ space, and obtaining a color changing graph P1;

[0012] Step 6, converting the color changing image and the target color image to CIELab space, and obtaining a color changing graph P2 using the Reinhard method;

[0013] Step 7, converting P1 and P2 to CIELab space, separating the L component into low-frequency and high-frequency components using Gaussian filtering, and reconstructing the low-frequency component of P1 and the high-frequency component of P2 to obtain a new L component;

[0014] Step 8, fusing the new L component with the a, b components of P1 and converting to RGB space to obtain the separation chart color changing result;

[0015] Step 9, merging the separation chart color changing result in step 8 with other separation charts to obtain a complete color changing result image.

[0016] Further, in step 1, the digital camera is used to take a digital image of the fabric sample in the experimental light box, and the specific method is as follows: install the digital camera on the top of the experimental light box to form an integrated system, connect the digital camera with the computer, then place the fabric sample in the drawer of the experimental light box, close the drawer, adjust the camera shooting parameters, and press the shooting button to obtain the sample digital image.

[0017] Further, the specific implementation method of color correction of the fabric sample digital image in step 2 is as follows:

[0018] Take a standard color card digital image in a closed light box, construct a color correction model, and use a spectrophotometer to obtain the standard XYZ three-stimulus value color data C of the color card. According to the color space conversion matrix M from XYZ to RGB, the standard RGB data S of the color card is obtained, and the formula is as follows:

[0019]

[0020] The standard RGB data S is obtained by matrix multiplication:

[0021] S = MC (2)

[0022] The RGB data D of each color block is extracted from the photographed color card digital image, and the obtained RGB data value matrix is expanded using a polynomial model. Taking a second-order polynomial model as an example, the expansion form is as follows:

[0023] V = (1, R, G, B, RG, RB, GB) 2 2 2 T (3)

[0024] Wherein, R, G and B respectively correspond to the values of the three color channel components of the color block, and V is the color value vector after polynomial expansion; the expansion matrix V obtained from the standard RGB color data S of the color card and the RGB data D obtained by photographing the color card is established as follows:

[0025] S = V x Q T (4)

[0026] Wherein, Q is a 3 x K-dimensional color correction coefficient matrix to be solved, and K is the number of polynomial expansion terms. The matrix is obtained by least squares method, that is:

[0027]

[0028] Wherein, J is the number of color blocks of the color card, and the F norm is F Through the above process, the color correction model Q is obtained, and the final correction method is as follows:

[0029] I c = IQ T (6)

[0030] Wherein, I is the color data of the photographed digital image of the textile fabric, Q is the color correction model, and I c is the corrected digital image color data.

[0031] Further, the fabric image is decomposed into cartoon part and texture part in step 3 by using image decomposition technology, and the specific implementation method is as follows:

[0032] The goal of image decomposition is to decompose the image f ∈ R n into the corresponding texture part and cartoon part, that is

[0033] f = u + v (7)

[0034] Wherein, f is the original image, u, v ∈ R​​​n , u is the cartoon part of the image, containing the main structure and outline of the image, v is the texture part, containing the detailed information and noise in the image; the CLRP model is used for image decomposition, and the specific formula is as follows:

[0035]

[0036] Wherein, u is the cartoon part, v is the texture part, b0 is the input image, is the absolute value of the gradient of the cartoon part u, τ and μ are two regularization parameters for balancing the cartoon and texture parts. || ||1 is the l1 norm, || ||2 is the L2 norm, and || ||2 is the L2 norm. * is the kernel norm. || ||2 is the L2 norm, which is used to measure the difference between two images.

[0037] Further, the mean-shift clustering algorithm is used for clustering and segmenting the cartoon part in step 4, and the specific implementation method is as follows:

[0038] The cartoon part is converted from the RGB color space to the CIELab color space, and the mean-shift algorithm is applied in the CIELab color space to cluster the cartoon part pixels to obtain the color segmentation result. For each pixel point x i , the mean shift vector is calculated as follows:

[0039]

[0040] Wherein, x i represents the position of the i-th data point, S = {x j ∈X∣∥x i -x j ∥≤h} represents the neighborhood set, containing all points with a distance of x i from x h not more than the bandwidth parameter h, which is used to calculate the mean shift vector, X is the set of all pixel points of the image, K i (‖x j -x i ‖) is the Gaussian kernel function, which is used to calculate the weight between data points, and its formula is as follows:

[0041]

[0042] Wherein, h is the bandwidth parameter; the algorithm iteratively updates the position of each data point until the moving distance of all data points is less than the set threshold:

[0043] x i t+1 =x i t +m(x i ) (11)

[0044] where t represents the iteration number, the updated position is the new position of the data point after offset, by adjusting the bandwidth parameter h, the fineness of segmentation can be controlled to adapt to different image characteristics, and finally the final fabric image color separation map is obtained by using similar cluster merging and morphological operation.

[0045] Further, the specific implementation method in step 5 is as follows:

[0046] Firstly, the image is converted to YIQ color space, and the Y component Y t (x,y) of the image to be recolored is extracted c (x,y), the Y component deviation of the image to be recolored is calculated, as shown in formula (12):

[0047]

[0048] wherein the YIQ color space represents a color image by decomposing color information into luminance Y and chrominance IQ components, is the average value of the Y component of the image to be recolored; then, the deviation is superimposed on the Y component of the target color image to generate a new Y component:

[0049] Y'(x,y) = ΔY t (x,y) + Y c (x,y) (13)

[0050] Combined with the IQ component of the target color image, the output image P1 is obtained by converting to RGB color space after fusion.

[0051] Further, the specific implementation method of step 6 for obtaining the recolored image P2 by using the Reinhard method is as follows:

[0052] Firstly, the image to be recolored and the target color image are converted to CIELab color space, denoted as L t , a t , b t and L c , a c , b c , respectively, the mean and standard deviation of the image to be recolored and the target color image in the Lab channel are calculated, then the Lab channel of the image to be recolored is adjusted according to the formula, so that the mean and standard deviation match the target color image:

[0053]

[0054] wherein, are the mean and standard deviation of the L, a, b channels of the image to be recolored, are the mean and standard deviation of the L, a, b channels of the target color image; Lr a r b r For the adjusted image, convert to RGB space to get the output image P2.

[0055] Further, the specific implementation method in step 7 is as follows:

[0056] Convert the images P1 and P2 to the CIELab color space, respectively obtain the luminance components L1 and L2, decompose the luminance components into low-frequency and high-frequency components through a Gaussian filter, perform luminance fusion using the low-frequency component of P1 and the high-frequency component of P2 to obtain a new luminance component:

[0057]

[0058] Wherein, L(x,y) is the reconstructed new luminance component, is the low-frequency component of the L component of P1, is the high-frequency component of the L component of P2, x and y are horizontal and vertical coordinates respectively.

[0059] Further, the specific implementation method of the new L component and the a, b components of P1 in step 8 is as follows:

[0060] P(x,y)=Lab(L(x,y),a1(x,y),b1(x,y)) (16)

[0061] Wherein, L(x,y) is the reconstructed L component, a1(x,y) and b1(x,y) are respectively the a and b components of P1, P(x,y) is the fusion result, x and y are horizontal and vertical coordinates respectively.

[0062] The application also provides a fabric high-fidelity color changing soft proofing system based on image segmentation, comprising:

[0063] A processor and a memory, the memory is used for storing program instructions, and the processor is used for calling the stored instructions in the memory to execute the fabric high-fidelity color changing soft proofing method based on image segmentation as described in the above technical solution.

[0064] The present application aims at the problem that the existing textile fabric color changing method does not fully consider the interaction between color and texture, resulting in that the image after color changing has changed color, but the texture strength is not consistent with the real target color fabric. After color correction of the fabric image, the image is divided into cartoon part and texture part by using image decomposition technology, the mean-shift clustering algorithm is used for segmentation of the cartoon part, the TB and Reinhard methods are applied to the image to be changed to generate a color changing image, the L component is separated and reconstructed, the new L component and the ab component are reconstructed to obtain the color changing result. Finally, the color separation image is combined to obtain the final fabric color changing result. The present application can effectively reduce the influence of fabric texture on segmentation, and when changing color, the color is close to the real fabric while the texture strength is consistent with the real fabric in visual perception. BRIEF DESCRIPTION OF DRAWINGS

[0065] Figure 1 The flowchart of the embodiment of the present application.

[0066] Figure 2 The experimental light box used in the embodiment of the present application.

[0067] Figure 3 The color changing result of the textile sample in the embodiment of the present application. DETAILED DESCRIPTION

[0068] The technical solution of the present application can be run by computer software technology by those skilled in the art.

[0069] As shown in Figure 1 The embodiment of the present application proposes a fabric high-fidelity color changing soft proofing method based on image segmentation, which specifically includes the following steps:

[0070] Step 1, using a digital camera to shoot a digital image of the fabric sample in the experimental light box;

[0071] Step 2, color correction of the fabric sample image;

[0072] Step 3, using image decomposition technology to decompose the fabric image into cartoon part and texture part;

[0073] Step 4, using mean-shift clustering algorithm to cluster and segment the cartoon part to obtain the fabric image color separation image;

[0074] Step 5, selecting the part to be changed from the color separation image, converting the image to be changed and the target color image to YIQ space, and obtaining a color changing image P1;

[0075] Step 6, converting the image to be changed and the target color image to CIELab space, and obtaining a color changing image P2 by using Reinhard method;

[0076] Step 7, convert P1 and P2 to CIELab space, separate L component into low frequency and high frequency components using Gaussian filter, reconstruct new L component by combining low frequency component of P1 and high frequency component of P2;

[0077] Step 8, combine new L component with a, b component of P1 and convert to RGB space to get the color separation result;

[0078] Step 9, combine the color separation result of step 8 with other color separation results to get the complete color separation result image.

[0079] The following is described with a specific example, the embodiment of the present application is described as follows:

[0080] The embodiment uses a self-developed closed daylight illumination light box, Nikon D7200 digital camera, ColorChecker SG140 color card, ColorChecker 24 color card and textile fabric as the basis to test the method of the present application.

[0081] In step 1, the specific process of using a digital camera to shoot a digital image of a fabric sample in the experimental light box in the embodiment is as follows: install the digital camera on the top of the experimental light box to form an integrated system, connect the digital camera with the computer, then place the fabric sample in the effective shooting area of the experimental light box, close the drawer, adjust the camera shooting parameters, and press the shooting button to get the sample digital image. The experimental light box is a full-spectrum daylight light source illumination, which can meet the demand of full-spectrum illumination of visible light for photographic colorimetry; at the same time, the light box is a closed light box, which is not affected by the external light environment, and can ensure the uniformity of illumination in the imaging area at the bottom of the light box; and the light box uses completely diffuse reflection illumination, which can effectively avoid the shortcomings of the existing direct illumination of the light box. Then, the effective area of the obtained image is cropped. The experimental light box used in the present application is shown in FIG. 1. Figure 2

[0082] In step 2, standard color card digital images are shot in the closed light box to construct a color correction model. The XYZ three-stimulus value color data C of the color card is obtained by using a spectrophotometer, and the standard RGB data S of the color card is obtained according to the color space conversion matrix M from XYZ to RGB, and the formula is as follows:

[0083]

[0084] The standard RGB data S is obtained by matrix multiplication:

[0085] S = MC (2)

[0086] ​Using the captured digital image of the color chart, the RGB data D of each color patch is extracted. A polynomial model is then used to expand the obtained RGB data value matrix. Taking a second-order polynomial model as an example, the expanded form is as follows:

[0087] V = (1, R, G, B, R) 2 G 2 B 2 ,RG,RB,GB) T (3)

[0088] Where R, G, and B correspond to the values ​​of the three color channel components of the color patch, and V is the polynomial-expanded color value vector. Based on the RGB color data S from the color chart standard and the expanded matrix V obtained from the RGB data D captured by the color chart, the following mapping relationship is established:

[0089] S = V × Q T (4)

[0090] Where Q is the 3×K-dimensional color correction coefficient matrix to be determined, and K is the number of terms in the polynomial expansion. This matrix is ​​obtained by the least squares method, i.e.:

[0091]

[0092] Where J is the number of color blocks on the color chart, ∥∥ F The color correction model Q, obtained through the above process, can be used for color correction of digital images of textile fabrics obtained under the same shooting conditions, further improving color accuracy. The final correction method is as follows:

[0093] I c =IQ T (6)

[0094] Where I represents the color data of the captured digital image of the textile fabric, Q represents the color correction model, and I c This refers to the corrected color data of the digital image.

[0095] In this embodiment, digital images of the ColorChecker SG140 and ColorChecker 24 color cards are captured in a closed lightbox. The ColorChecker SG140 color card is used as the training sample, and the ColorChecker 24 color card is used as the test sample. The RGB data of all pixels in the m×m pixel area at the center of each color block are extracted, and the RGB data of the m×m pixels are averaged. The color vector V is obtained by expanding it with a third-order polynomial.

[0096] In step 3, the specific implementation method of using image decomposition technology to decompose the fabric image into cartoon and texture parts is as follows:

[0097] The goal of image decomposition is to decompose an image f e R n into a corresponding texture part and cartoon part, i.e.

[0098] f = u + v (7)

[0099] where f is the original image, u, v e R n , u is the cartoon part of the image, which contains the main structure and rough outline of the image, and v is the texture part, which contains the detailed information and noise in the image. The CLRP model (customized low-rank prior model) is used to decompose the fabric image into the cartoon part and the texture part, and the specific formula is as follows:

[0100]

[0101] where u is the cartoon part, v is the texture part, b0 is the input image, is the absolute value of the gradient of the cartoon part u, τ and μ are two regularization parameters used to balance the cartoon and texture parts. || ||1 is the l1 norm, and || ||2 is the L2 norm. * is the kernel norm. || ||2 is the L2 norm, which is used to measure the difference between two images. is the data fidelity term, which ensures that the decomposed image is as close to the original image as possible. From formula (8), it can be seen that this is an optimization problem, and the goal is to minimize the objective function to solve the variables u and v.

[0102] In step 4, the fabric image cartoon part is converted from the RGB color space to the CIELab color space, and the mean-shift algorithm is applied in the CIELab color space to cluster the cartoon part pixels, and then similar clusters are merged and morphological operations are used to obtain the final fabric image color separation chart. The specific implementation method is as follows:

[0103] Convert the cartoon part from the RGB color space to the CIELab color space, and apply the mean-shift algorithm in the CIELab color space to cluster the cartoon part pixels to obtain the color segmentation result. For each pixel point x i , calculate its mean shift vector:

[0104]

[0105] where x i represents the position of the i-th data point, and S = {x j e X | ||x i -x j || <= h} represents the neighborhood set, which contains all the data points within a distance of x ipoints no more than the bandwidth parameter h, X is the set of all pixel points of the image, K h (||x i -x j ||) is a Gaussian kernel function used to calculate the weight between data points, and its formula is as follows:

[0106]

[0107] where h is the bandwidth parameter. The algorithm iteratively updates the position of each data point until the moving distance of all data points is less than a set threshold:

[0108] x i t+1 =x i t +m(x i ) (11)

[0109] where t represents the number of iterations, and the updated position is the new position of the data point after offset. By adjusting the bandwidth parameter h, the degree of segmentation can be controlled to adapt to different image characteristics. Finally, similar cluster merging and morphological operation are used to obtain the final fabric image color separation map.

[0110] In step 5, the image is converted to YIQ color space, the Y component Yt(x,y) of the image to be color changed and the Y component Yc(x,y) of the target color image are extracted, and the Y component deviation of the image to be color changed is calculated:

[0111]

[0112] where YIQ color space represents a color image by decomposing color information into luminance (Y) and chrominance (IQ) components. Y represents luminance, I represents In-phase, color from orange to cyan, and Q represents Quadrature-phase, color from purple to yellow-green. is the average value of the Y component of the image to be color changed. Then, the deviation is superimposed on the Y component of the target color image to generate a new Y component:

[0113] Y′(x,y)=ΔY t (x,y)+Y c (x,y) (13)

[0114] Combined with the IQ components of the target color image, the output image P1 is obtained by converting to RGB color space after fusion.

[0115] In step 6, the image to be color changed and the target color image are converted to CIELab color space, denoted as L t , a t , bt and L c , a c , b c , respectively calculate the mean and standard deviation of the image to be color changed and the target color image in the Lab channel, then adjust the Lab channel of the image to be color changed according to the formula:

[0116]

[0117]

[0118] wherein, are the mean and standard deviation of the L, a, b channels of the image to be color changed, are the mean and standard deviation of the L, a, b channels of the target color image. r , a r , b r is the adjusted image, and the output image P2 is obtained by converting to the RGB space.

[0119] In step 7, the images P1 and P2 are converted to the CIELab color space to obtain their luminance components L1 and L2, respectively. The luminance components are decomposed into low-frequency and high-frequency components by a Gaussian filter, and the low-frequency component of P1 and the high-frequency component of P2 are used for luminance fusion to obtain a new luminance component:

[0120]

[0121] wherein, L(x,y) is the reconstructed new luminance component, is the low-frequency component of the L component of P1, is the high-frequency component of the L component of P2, and x, y are the horizontal and vertical coordinates, respectively.

[0122] In step 8, the specific implementation method of the fusion of the new L component with the a, b components of P1 in step 8 is as follows:

[0123] P(x,y)=Lab(L(x,y),a1(x,y),b1(x,y)) (16)

[0124] wherein, L(x,y) is the reconstructed L component, a1(x,y) and b1(x,y) are the a and b components of P1, respectively, and P(x,y) is the fusion result, x, y are the horizontal and vertical coordinates, respectively.

[0125] On the other hand, the embodiment of the present application provides a fabric high-fidelity color changing soft proofing system based on image segmentation, comprising:

[0126] The processor and the memory, the memory is used for storing program instructions, the processor is used for calling the storage instruction in the memory to execute the method for soft proofing of fabric high-fidelity color changing based on image segmentation as described in the above technical solutions.

[0127] The specific embodiments described herein merely illustrate the spirit of the present application. Those skilled in the art of the present application can make various modifications or supplements to the described specific embodiments or replace them with similar ways, but will not deviate from the spirit of the present application or exceed the scope defined by the appended claims.

Claims

1. A high-fidelity color-changing soft sampling method for fabrics based on image segmentation, characterized in that, Includes the following steps: Step 1: Take digital images of the fabric sample; Step 2: Perform color correction on the digital image of the fabric sample; Step 3: Decompose the color-corrected fabric image into cartoon and texture parts; Step 4: Cluster and segment the cartoon portion to obtain the color separation map of the fabric image; Step 5: Select the part to be replaced from the color separation image, convert the image to be replaced and the target color image to the YIQ space, and obtain the replacement image P1; Step 6: Convert the image to be recolored and the target color image to the CIELab space, and use the Reinhard method to obtain the recolored image P2; Step 7: Convert P1 and P2 to CIELab space, use Gaussian filtering to separate the L component into low-frequency and high-frequency components, and reconstruct the new L component by combining the low-frequency component of P1 with the high-frequency component of P2. The specific implementation method in step 7 is as follows: Images P1 and P2 are converted to the CIELab color space, and their luminance components L1 and L2 are obtained respectively. The luminance components are then decomposed into low-frequency and high-frequency components using a Gaussian filter. The low-frequency component of P1 and the high-frequency component of P2 are then fused to obtain a new luminance component. (15); Where L(x,y) represents the reconstructed luminance component. This is the low-frequency component of the L component of P1. Let x and y be the high-frequency components of the L component of P2, and let x and y be the horizontal and vertical coordinates, respectively. Step 8: Fuse the new L component with the a and b components of P1 and convert it to RGB space to obtain the color separation image color change result; Step 9: Merge the color-swapping result of the color separation image from Step 8 with the other color separation images to form a complete color-swapping result image.

2. The high-fidelity color-changing soft sampling method for fabrics based on image segmentation as described in claim 1, characterized in that: In step 1, a digital camera is used to take digital images of the fabric sample inside the experimental lightbox. The specific method is as follows: install the digital camera on the top of the experimental lightbox to form an integrated system, connect the digital camera to the computer, then place the fabric sample in the drawer of the experimental lightbox, close the drawer, adjust the camera shooting parameters, and press the shooting button to obtain the digital image of the sample.

3. The high-fidelity color-changing soft sampling method for fabrics based on image segmentation as described in claim 1, characterized in that: The specific implementation method for color correction of the digital image of the fabric sample in step 2 is as follows: A digital image of the standard color chart is captured inside a closed lightbox to construct a color correction model. The standard XYZ tristimulus color data C of the color chart is obtained using a spectrophotometer. The standard RGB data S of the color chart is obtained based on the XYZ to RGB color space transformation matrix M, as shown in the following formula: (1); Standard RGB data S is obtained through matrix multiplication: (2) Using the captured digital image of the color chart, the RGB data D of each color patch is extracted. A polynomial model is then used to expand the obtained RGB data value matrix. Taking a second-order polynomial model as an example, the expanded form is as follows: (3); Where R, G, and B correspond to the values ​​of the three color channel components of the color patch, and V is the polynomial-expanded color value vector; based on the RGB color data S of the color chart standard and the expanded matrix V obtained from the RGB data D captured by the color chart, the following mapping relationship is established: (4); Where Q is the 3×K dimensional color correction coefficient matrix to be determined, and K is the number of terms in the polynomial expansion. This correction coefficient matrix is ​​obtained by the least squares method, i.e.: (5); Where J is the number of color blocks on the color chart. Let F be the norm; the color correction model Q is obtained through equation (5), and the final correction method is as follows: (6); in, Color data for digital images of captured textile fabrics. This refers to the corrected color data of the digital image.

4. The high-fidelity color-changing soft sampling method for fabrics based on image segmentation as described in claim 1, characterized in that: In step 3, image decomposition technology is used to decompose the fabric image into cartoon and texture parts. The specific implementation method is as follows: The goal of image decomposition is to decompose an image It is broken down into corresponding texture parts and cartoon parts, that is (7); in, For the original image, , u represents the cartoon portion of the image, containing the main structure and general outline of the image, while v represents the texture portion, containing detailed information and noise in the image; the CLRP model is used for image decomposition, with the specific formula as follows: (8); Where τ and μ are two regularization parameters used to balance the cartoon and textured parts, and b0 is the input image. Let be the absolute value of the gradient of the cartoon portion u. for Norm, For nuclear norm, for Norms are used to measure the difference between two images.

5. The high-fidelity color-changing soft sampling method for fabrics based on image segmentation as described in claim 1, characterized in that: In step 4, the mean-shift clustering algorithm is used to cluster and segment the cartoon portion. The specific implementation method is as follows: The cartoon portion was converted from the RGB color space to the CIELab color space. Then, the mean-shift algorithm was applied in the CIELab color space to cluster the pixels of the cartoon portion, obtaining the color segmentation result. For each pixel... Calculate its mean offset vector: (9); in, This indicates the position of the i-th data point. Represents the neighborhood set, containing all distances x. i Points not exceeding the bandwidth parameter h are used to calculate the mean offset vector, where X is the set of all pixels in the image. Here is the Gaussian kernel function, used to calculate the weights between data points, and its formula is as follows: (10); Where h is the bandwidth parameter; the algorithm iteratively updates the position of each data point until the total distance moved by all data points is less than a set threshold: (11); Where t represents the number of iterations, the updated position is the new position of the data point after offset. By adjusting the bandwidth parameter h, the fineness of segmentation can be controlled to adapt to different image characteristics. Finally, similar cluster merging and morphological operations are used to obtain the final color separation map of the fabric image.

6. The high-fidelity color-changing soft sampling method for fabrics based on image segmentation as described in claim 1, characterized in that: The specific implementation method in step 5 is as follows: First, convert the image to the YIQ color space and extract the Y component of the image to be color-changed. t (x,y) and the Y component of the target color image c (x,y), calculate the Y component deviation of the image to be color-changed, as shown in equation (12): (12); The YIQ color space represents a color image by decomposing color information into luminance (Y) and chrominance (IQ) components. The average value of the Y component of the image to be color-changed is used; then, this deviation is superimposed on the Y component of the target color image to generate a new Y component: (13); By combining the IQ components of the target color image and converting it to the RGB color space, the output image P1 is obtained.

7. The high-fidelity color-changing soft sampling method for fabrics based on image segmentation as described in claim 1, characterized in that: The specific implementation method for obtaining the color-changing image P2 using the Reinhard method in step 6 is as follows: First, convert both the image to be recolored and the target color image to the CIELab color space, denoted as L. t a t b t and L c a c b c Calculate the mean and standard deviation of the Lab channel for both the image to be replaced and the target color image. Then, adjust the Lab channel of the image to be replaced according to the formula to match its mean and standard deviation with the target color image. ; ;(14) ; in, Here, represents the mean and standard deviation of the L, a, and b channels of the image to be recolored, respectively. The mean and standard deviation of the L, a, and b channels of the target color image; The adjusted image is converted to RGB space to obtain the output image P2.

8. The high-fidelity color-changing soft sampling method for fabrics based on image segmentation as described in claim 1, characterized in that: The specific implementation method for fusing the new L component with the a and b components of P1 in step 8 is as follows: (16); Where L(x,y) is the reconstructed L component, and a1(x,y) and b1(x,y) are the a and b components of P1, respectively. The result is a fusion diagram, where x and y are the horizontal and vertical coordinates, respectively.

9. A high-fidelity color-changing soft sampling system for fabrics based on image segmentation, characterized in that, include: The processor and memory, wherein the memory is used to store program instructions, and the processor is used to call the stored instructions in the memory to execute the high-fidelity color-changing soft sampling method for fabrics based on image segmentation as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Design method of fuzzy image fabric imitating the function and form of natural color

    CN109063781A

  • Printed fabric soft design-drawing method based on image processing

    CN113192044A