Towel intelligent customization design method and system
By generating mesh pattern matrices for each layer, calculating yarn color attenuation mapping tables, and optimizing the exposure ratio, the problems of interlayer interference and gradient color imbalance in multi-layer jacquard weaving were solved, achieving color uniformity and coordinated correction of floats after weaving.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-16
- Publication Date
- 2026-07-10
AI Technical Summary
Existing intelligent custom design methods for towels cannot adapt to the weaving characteristics of cross-layer color mixing in multi-layer jacquard weaving, resulting in interlayer interference and color deviation. Furthermore, due to the different dye systems of the yarns in different layers, the gradient pattern becomes unbalanced and the gradient breaks occur after washing.
By acquiring user-uploaded gradient custom patterns and multi-layer jacquard weaving parameters, a meshed pattern matrix for each layer is generated, a yarn color attenuation mapping table is calculated, non-negative least squares decomposition and cross-layer floating line coupling detection are performed, the exposure ratio and floating line constraints are optimized, and a cross-layer collaborative correction weaving control matrix is generated.
After the target number of washes, the color of the multi-layer mixed surface approaches the target color, the hue distribution of the gradient transition zone tends to be uniform, and the color balance is not destroyed during the cross-layer floating thread correction process, thus solving the problems of color imbalance and gradient discontinuity in multi-layer jacquard weaving.
Smart Images

Figure CN122365890A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent customized design technology for textiles, and more specifically, to an intelligent customized design method and system for towels. Background Technology
[0002] Multi-layer jacquard weaving simulates a gradient color effect by alternating the exposure of yarns from different weaving layers on the towel surface, with each layer using yarns of different colors and dye systems. In existing intelligent custom towel design methods, the system resamples the user-uploaded custom pattern to a weaving pixel grid, maps the pixels to available yarn colors using a color quantization algorithm, performs floating thread length detection and correction, and filters small color blocks to generate a single-layer weaving control matrix. For wash durability processing involving multi-color gradient patterns, the system uniformly simulates wash attenuation across the entire image, independently calculates the attenuation color difference pixel by pixel, and performs inverse compensation.
[0003] The existing methods have the following shortcomings: First, color quantization and floating thread detection for single-layer weaving cannot adapt to the weaving characteristics of cross-layer color mixing in multi-layer jacquard. The surface color of multi-layer jacquard is generated by the mixing of the exposure ratio of each layer of yarn at the same pixel position. Single-layer independent floating thread detection cannot detect cross-layer floating thread conflicts, resulting in inter-layer interference and color deviation in the weaving data on multi-layer looms. Second, different layers of yarn have different washing attenuation rates due to the use of different dye systems. The existing pixel-by-pixel independent compensation strategy only focuses on local color differences and does not consider the global color balance shift after differential attenuation of multi-layer mixed colors, resulting in the collapse of the overall color balance of the pattern. In addition, in the gradient transition zone, the dyes used in some hue segments of the yarn fade faster, resulting in gradient discontinuity after attenuation. Summary of the Invention
[0004] This invention provides a smart custom design method and system for towels, which solves the technical problems in related technologies where the gradient color pattern of multi-layer jacquard woven towels becomes unbalanced, the gradient breaks are broken, and the constraints of floating threads are difficult to satisfy across layers after multiple washes.
[0005] This invention discloses a smart custom towel design method, including: acquiring a gradient color custom pattern uploaded by a user, multi-layer jacquard weaving parameters and target number of washes, wherein the multi-layer jacquard weaving parameters include the number of weaving layers, the set of available yarn colors for each layer and the warp and weft density values for each layer, and performing gridded resampling on the custom pattern according to the warp and weft density values of each layer to generate a gridded pattern matrix for each layer; Based on the dye system type corresponding to each color in the available yarn color set for each layer, the color component attenuation function of each yarn color under the target number of washes is retrieved from the washing attenuation database to generate a color attenuation mapping table for each layer of yarn. Based on the color attenuation mapping table of each layer of yarn, calculate the color parameter changes before and after the attenuation of each color region cluster in the pattern and the hue step uniformity changes after the attenuation of each gradient transition zone, and generate a color balance shift report and a list of fault risk gradient zones. Using the attenuated color value of each layer of yarn as the decomposition basis, non-negative least squares decomposition is performed on the target color at each pixel position in the meshed pattern matrix of each layer to solve the exposure ratio of each layer that satisfies the non-negative constraint and the normalization constraint, and an attenuation-aware multilayer exposure ratio matrix is generated. The attenuation-sensing multi-layer exposure ratio matrix is transformed into a binary exposure pattern diagram of each layer. Cross-layer floating line coupling detection is performed simultaneously on each layer. For ultra-long floating line segments, the anchoring position is selected based on minimizing the local mixed color offset after attenuation, and the floating line constraints of other layers are corrected simultaneously to generate the exposure pattern diagram of each layer after cross-layer collaborative correction. Color difference verification is performed on the corrected layer exposure pattern diagrams in the initial state and after decay state. Local exposure ratio fine-tuning is performed on areas where the color difference exceeds the tolerance threshold. The layer exposure pattern diagrams that meet the global color difference requirements are transformed into the final layer weaving control matrix and integrated to output the towel customization design scheme.
[0006] Furthermore, after generating the meshed pattern matrices for each layer, the process also includes: The custom pattern is segmented into color regions by using a clustering algorithm in the CIELab color space to divide the hue channel values of each pixel, resulting in multiple color region clusters. The main hue value, average saturation value, average brightness value, and area ratio of each color region cluster are extracted to generate an initial color balance feature vector. Scan along the direction where the hue value changes continuously and monotonically and crosses a preset hue range in the pattern, extract the position of the gradient transition zone and the hue change sequence along the gradient direction, and generate a gradient hue sequence set.
[0007] Furthermore, the color component attenuation function is an exponential attenuation function. For the L component of the j-th yarn color in the n-th layer, the attenuated value is obtained by multiplying the initial L component value of the yarn color by a negative exponential function value with the product of the attenuation rate coefficient and the number of washes as the exponent, plus the limit value of the L component when the number of washes approaches infinity. The attenuation functions of the a component and the b component have the same form and each corresponds to an independent attenuation rate coefficient and limit value parameter. The attenuation rate coefficient and limit value are stored in the washing attenuation database after nonlinear least square fitting of the colorimetric measurements of the standard color card sample at multiple preset washing times.
[0008] Furthermore, the generation of the color balance shift report and the fault risk gradient list includes: based on the color attenuation mapping table of each layer of yarn, applying the corresponding attenuation function to the pixels in each color region cluster to obtain the attenuated color value, taking the arithmetic mean in the hue, saturation and lightness channels respectively, and generating the attenuated color balance feature vector. Calculate the relative hue difference, relative saturation ratio, and relative lightness ratio changes for each color region cluster between the initial color balance feature vector and the attenuated color balance feature vector, and generate a color balance offset report. For each gradient band in the gradient band hue sequence set, calculate the standard deviation of adjacent hue step values in the initial and attenuated states respectively. Divide the absolute value of the difference between the attenuated standard deviation and the initial standard deviation by the initial standard deviation to obtain the standard deviation change rate. Gradient bands with a standard deviation change rate exceeding a preset threshold are marked as fault risk gradient bands and included in the fault risk gradient band list.
[0009] Furthermore, the generation of the attenuation-sensing multilayer exposure ratio matrix also includes: The initial mixed color is obtained by back-mixing the initial yarn colors of each layer with the obtained exposure ratios of each layer. The Euclidean distance between the initial mixed color and the target color is calculated as the initial deviation value, and an initial deviation map is generated. For the pixel positions in the initial deviation map where the deviation exceeds the tolerance threshold, constrained optimization is performed with the exposure ratio of each layer as the decision variable and the weighted sum of the color difference between the attenuated mixed color and the target color and the color difference between the initial mixed color and the target color as the objective function. The weight of the attenuated color difference is greater than the weight of the initial color difference. The compromise exposure ratio that takes into account both the attenuated state and the initial state is solved, and the attenuation-aware multilayer exposure ratio matrix is updated.
[0010] Furthermore, for the pixel positions covered by the gradient bands in the fault risk gradient band list, a gradient uniformity penalty term is added to the objective function. The gradient uniformity penalty term is the penalty weight multiplied by the sum of the squares of the difference between the attenuated hue step value of all adjacent pixel pairs within the gradient band and the arithmetic mean of the attenuated hue step values within the gradient band. The attenuated hue step value is obtained by extracting the hue angle after weighted summation of the attenuated yarn color values of each layer with the current exposure ratio and calculating the hue angle difference between adjacent pixels. The arithmetic mean is recalculated according to the current exposure ratio in each optimization iteration.
[0011] Furthermore, the attenuation-sensing multi-layer exposure ratio matrix is transformed into a binary exposure pattern map of each layer using an error diffusion jitter algorithm. The input of the error diffusion jitter algorithm is the continuous exposure ratio value of each pixel position, and the output is the exposed or hidden binary exposure state. The quantization error diffuses to the adjacent unprocessed pixels according to a predetermined diffusion kernel, so that the exposure density of the binary exposure pattern in the local area is approximately equal to the original continuous exposure ratio.
[0012] Furthermore, the cross-layer floating line coupling detection includes: traversing the continuously exposed pixel segments and continuously hidden pixel segments on each row of weft yarn in each layer, and calculating the length of each floating line segment; when the length of a certain floating line segment in a certain layer exceeds the maximum floating line length threshold of that layer, generating candidate anchoring positions in the segment at equal intervals, and calculating the arithmetic mean of the color difference change between the mixed color and the target color after attenuation of each pixel in the position and its neighborhood for each candidate anchoring position after inverting the yarn exposure state of that layer, using the color difference increment as the color difference increment, and selecting the candidate position with the smallest color difference increment to insert the interlacing anchoring point; After inserting the anchor point, synchronously verify whether the floating line constraints of other layers at the corresponding positions are violated. If they are violated, perform the same anchor point selection strategy based on minimizing the color difference after attenuation in other layers to correct them. Repeat the detection and correction until all floating line lengths of all layers meet their respective maximum floating line length thresholds.
[0013] Furthermore, after generating the final weaving control matrices for each layer, the process also includes: Based on the final layer exposure pattern diagram, the color balance feature vectors in the initial state and the attenuated state, as well as the hue step standard deviation of each gradient band in the attenuated state, are re-extracted. It is verified that the relative hue difference, relative saturation ratio, and relative brightness ratio changes of each color region cluster between the color balance feature vectors before and after attenuation are all within the preset acceptable range, and the standard deviation change rate of each gradient band in the fault risk gradient band list is lower than the preset threshold. If there are color region clusters or gradient bands that do not meet the conditions, the corresponding regions will be backtracked to perform local exposure ratio adjustments and then regenerate the final weaving control matrix for each layer until global verification is passed.
[0014] This invention provides a smart custom towel design system, comprising: The pattern acquisition and grid resampling module is used to acquire the gradient color custom pattern, multi-layer jacquard weaving parameters and target washing number uploaded by the user, and to perform grid resampling on the custom pattern according to the warp and weft density values of each layer to generate grid pattern matrices for each layer. The attenuation mapping table generation module is used to retrieve the color component attenuation function of each yarn color under the target number of washes from the washing attenuation database based on the dye system type corresponding to each color in the available yarn color set of each layer, and generate the attenuation mapping table of each layer of yarn color. The color balance offset analysis module is used to calculate the color parameter changes before and after the decay of each color area cluster in the pattern and the hue step uniformity changes after the decay of each gradient transition zone based on the color decay mapping table of each layer of yarn, and to generate a color balance offset report and a list of fault risk gradient zones. The attenuation-aware exposure ratio decomposition module is used to perform non-negative least squares decomposition on the target color at each pixel position in the mesh pattern matrix of each layer, based on the attenuated color value of each layer of yarn color as the decomposition base, to generate an attenuation-aware multilayer exposure ratio matrix. The cross-layer floating line coupling detection and correction module is used to convert the attenuation-sensing multi-layer exposure ratio matrix into a binary exposure pattern diagram of each layer, perform cross-layer floating line coupling detection on each layer simultaneously, select the anchoring position for ultra-long floating line segments based on minimizing the local mixed color offset after attenuation, and simultaneously correct the floating line constraints of other layers, generating the exposure pattern diagram of each layer after cross-layer collaborative correction. The color verification and output module is used to perform color difference verification and local exposure ratio fine-tuning on the corrected layer exposure pattern diagrams. It transforms the layer exposure pattern diagrams that meet the global color difference requirements into the final layer weaving control matrix and integrates and outputs the towel customization design scheme.
[0015] This invention solves the technical problems of existing methods, such as the inability of single-layer independent processing to adapt to the cross-layer coupling characteristics of multi-layer jacquard, and the inability of pixel-by-pixel independent compensation to cope with the global color relationship shift caused by multi-layer differential fading, by extracting the initial color balance feature vector and gradient hue sequence set, calculating the color balance feature vector after attenuation and the list of gradient bands with fault risk, performing multi-layer exposure ratio decomposition and applying hue step uniformity constraints based on the attenuated yarn color, and performing cross-layer floating line coupling detection and correction. It achieves the technical effects of making the multi-layer mixed surface color approach the target color after the target number of washes, making the hue step distribution of the gradient transition band after attenuation tend to be uniform, and not destroying the color balance during the cross-layer floating line correction process. Attached Figure Description
[0016] Figure 1 This is a flowchart of the intelligent customized towel design method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram comparing the L component of each layer of yarn before and after washing color attenuation, provided in an embodiment of the present invention. Figure 3 This is a schematic diagram comparing the a and b components of the color attenuation of each layer of yarn before and after washing, provided in an embodiment of the present invention. Figure 4 This is a schematic diagram comparing the hue offset of three color region clusters provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the saturation retention rate and brightness retention rate of the three color region clusters provided in the embodiments of the present invention; Figure 6 This is a schematic diagram of the typical pixel position exposure ratio decomposition results provided in the embodiments of the present invention; Figure 7This is a schematic diagram showing the comparison before and after the gradient band hue step standard deviation optimization provided in an embodiment of the present invention; Figure 8 This is a schematic diagram of the distribution of heddle raising and non-heddle raising instructions in the weaving control matrix of each layer provided in the embodiment of the present invention. Detailed Implementation
[0017] Multi-layer jacquard weaving is a technique that simulates a gradient color effect by alternating layers of yarn on the surface of a towel. Each layer uses yarns of different colors and dye systems (such as reactive dyes and vat dyes). In existing intelligent custom towel design methods, the system resamples the user-uploaded custom pattern to a weaving pixel grid, maps the pixels to available yarn colors using a color quantization algorithm, performs floating thread length detection and correction, and filters small color blocks to generate a single-layer weaving control matrix. For wash durability processing involving multi-color gradient patterns, the system uniformly simulates wash attenuation across the entire image, independently calculates the attenuation color difference for each pixel, and performs inverse compensation.
[0018] The existing methods described above have two shortcomings.
[0019] Firstly, color quantization and float detection for single-layer weaving cannot adapt to the cross-layer color mixing characteristics of multi-layer jacquard weaving. The surface color of multi-layer jacquard is generated by the mixing of the exposure ratios of yarns in each layer at the same pixel position. Therefore, the target color needs to be decomposed into a weighted combination of the exposure ratios of multiple layers, rather than a simple single-layer color mapping. Simultaneously, the float constraints of different layers are mutually coupled. An interlacing anchor point inserted in one layer to meet float length limitations may cause changes in the exposure state of other layers at the corresponding positions. Independent float detection for a single layer cannot detect such cross-layer conflicts, leading to inter-layer interference and color deviation in the layered weaving data on multi-layer looms.
[0020] Secondly, different layers of yarn exhibit varying rates of color decay during washing due to the use of different dye systems. Existing pixel-by-pixel independent compensation strategies only address local color differences, neglecting the global color balance shift after differential decay of multi-layered mixed colors. Even if the initial exposure ratio is accurately decomposed, the different colors in each layer fade at varying rates after washing, leading to a non-linear shift in the mixed surface color and a collapse of the overall color balance of the pattern. Furthermore, in the gradient transition zone, the accelerated fading of dyes used in some hue segments of the yarn results in an uneven distribution of step values between adjacent hues after decay, producing a gradient discontinuity phenomenon.
[0021] According to an embodiment of this invention, a method for intelligent custom towel design is provided, which is executed on a computer system. The computer system includes a processor, a memory, an image acquisition interface, and a loom control data output interface. The memory pre-stores a washing attenuation database, which records the color component attenuation functions of various dye systems under different washing cycles.
[0022] At least one embodiment of the present invention discloses a smart custom towel design method, such as... Figure 1 As shown, it includes the following steps: Step 1: Obtain the custom pattern and multi-layer jacquard weaving parameters, perform gridded resampling on each layer of the custom pattern, and generate gridded pattern matrices for each layer; The image acquisition interface obtains the user-uploaded gradient color custom pattern, multi-layer jacquard weaving parameters, and target number of washes. The multi-layer jacquard weaving parameters include the number of weaving layers. Each layer can use a collection of yarn colors. and latitude and longitude density values of each layer ,in For the number of weaving layers, The first Layer to the first The available yarn color set for the layer and They represent the first The longitudinal and latitudinal densities of the layers, The layer number has a value range of 1. to .
[0023] Based on the warp and weft density values of each layer and the finished towel size, calculate the pixel grid resolution of each layer's weaving. The layer's grid resolution is:
[0024] in For the first Layer grid resolution, For the first The warp density of the layer, For the first latitudinal density of the layer and These represent the width and height of the finished towel, respectively. The custom pattern is resampled to the grid resolution of each layer to generate a gridded pattern matrix for each layer. ,in The first Layer to the first The gridded pattern matrix of the layer.
[0025] It should be noted that the resampling process described above performs resampling on each layer separately because the latitude and longitude density values of different layers may differ, resulting in variations in the grid resolution of each layer. When the latitude and longitude density values of each layer are the same, the gridded pattern matrix of each layer is consistent, and in this case, only one resampling operation is required.
[0026] In this embodiment of the application, in order to quantify the impact of washing attenuation on the global color relationship of the pattern in subsequent steps, the following processing is further included in step 1: The customized pattern is segmented into color regions using K-means clustering or mean-shift clustering algorithms in the CIELab color space, wherein the input to the clustering is the hue channel value of each pixel in the pattern, and the output is... Clusters of color areas ,in The number of color region clusters, The first The first to the second Number of color region clusters, number of clusters The color complexity can be adaptively determined based on the pattern's color complexity or specified by the user. Extract the dominant hue value of each color region cluster. Average saturation value Average brightness value and area ratio ,in For the first The dominant hue value of each color region cluster For the first The average saturation value of each color region cluster For the first The average brightness value of each color region cluster For the first The area percentage of each color region cluster The color region cluster number is assigned, with a value range of [value range missing]. to Generate initial color balance feature vectors. ,in This serves as the initial color balance feature vector. Simultaneously, the positions of gradient transition zones and the hue change sequence along the gradient direction are extracted from the pattern to generate a gradient zone hue sequence set. ,in The number of gradient transition zones in the pattern. The first Article to No. A sequence of hue changes in a gradient band.
[0027] Furthermore, the primary hue value By analyzing color region clusters The arithmetic mean of the hue channel values of all pixels is used to obtain the average saturation value. and average lightness value By respectively analyzing color region clusters The arithmetic mean of the saturation and brightness channel values of all pixels within the area is obtained; area ratio For color area clusters The ratio of the number of pixels within the pattern to the total number of pixels in the pattern. The method for extracting the gradient transition zone is as follows: scan along the direction in which the hue value changes continuously in the pattern, and identify the pixel sequence whose hue value increases or decreases monotonically and crosses the preset hue range as a gradient zone. The hue change sequence is the arrangement of the hue values of the pixel sequence along the gradient direction.
[0028] Step 2: Based on the dye system type corresponding to the color of each layer of yarn, retrieve the washing attenuation function and generate a color attenuation mapping table for each layer of yarn; Based on the dye system type corresponding to each color in the available yarn color set for each layer, the washing attenuation database is used to retrieve the target number of washes for each yarn color. Below , , Component attenuation function, where The target number of washes. For the first... The first in the layer Yarn color Its color value after attenuation is:
[0029] in For the first Layer The color value after the color of the yarn has faded. , and These are the colors of the yarn. , , The decay function of the component with respect to the number of washes. The target number of washes is defined as a piecewise linear or exponential decay function stored in a wash decay database. The function parameters are pre-fitted to colorimetric measurements of a standard color chart at different wash cycles and then stored in the wash decay database. Taking the component attenuation function as an example, its form is:
[0030] in For the first Layer Initial color of the yarn Component value, Represents an exponential function. This represents the decay rate coefficient of the dye system corresponding to the yarn color. For the number of washes, When the number of washes approaches infinity Component limit value. Components and The component attenuation functions have the same form, each corresponding to an independent attenuation rate coefficient and limit parameter. A color attenuation mapping table for each layer is generated by iterating through all yarn colors in each layer. ,in Record number Initial color value for each yarn color in the layer and the color value after attenuation The correspondence.
[0031] It should be noted that the decay rate coefficient of the reactive dye system The decay rate coefficient of the vat dye system is relatively small, so the decay functions corresponding to different dye systems produce different degrees of color change under the same number of washes.
[0032] Furthermore, the attenuation rate coefficient and limit value The specific values are obtained in the following way: Select the value related to the first... Layer Standard color card samples with the same dye system for yarn color were tested under standard washing conditions. After the second wash, its value was measured using a spectrophotometer. Component values are used to obtain a sequence of measurement data points, where Sampling points for the preset number of washes, Given the number of sampling points, a nonlinear least squares fitting algorithm is used to estimate the parameters of the exponential decay function, and the fitted decay rate coefficients are then used. and limit value Store in the washing degradation database.
[0033] Step 3: Based on the color attenuation mapping table of each layer of yarn and the initial color balance feature vector, calculate the color balance offset report and the fault risk gradient list; Based on the color attenuation mapping table of each yarn layer, the attenuation function of the corresponding dye system is applied to the principal hue value, average saturation value, and average brightness value of each color region cluster to calculate the color parameters of each color region cluster after attenuation, and generate the color balance feature vector after attenuation. ,in This is the color balance feature vector after attenuation. For the first The attenuated primary hue value of each color region cluster. For the first The average saturation value of each color region cluster after attenuation. For the first The average brightness value of each color region cluster after attenuation.
[0034] Furthermore, the attenuated primary hue value Average saturation value and average lightness value The calculation method is as follows: for color region clusters For each pixel within the color region, based on its weaving layer and corresponding yarn color, the attenuated color value of that yarn color is looked up from the yarn color attenuation mapping table of each layer, and the color regions are clustered together. The attenuated color values of all pixels within the range are taken as the arithmetic mean across the hue, saturation, and lightness channels to obtain the attenuated primary hue value. Average saturation value and average lightness value .
[0035] Calculate the initial color balance feature vector With the attenuated color balance feature vector The relative hue difference between each color region cluster The change in relative saturation and relative brightness ratio change Generate a color balance shift report. For the first The difference in primary hue value before and after attenuation of a color region cluster It is the ratio of the average saturation value after attenuation to the average saturation value before attenuation. This is the ratio of the average brightness value after attenuation to that before attenuation. Because... The difference between hue values of the same dimension. and For ratios with the same dimensions, all dimensions are consistent, and the calculation is valid.
[0036] For each gradient band in the gradient band hue sequence set Calculate the standard deviation of adjacent hue step values after attenuation. Standard deviation of hue step values adjacent to the initial state rate of change:
[0037] in For the first The rate of change of the standard deviation of the gradient band For the first The standard deviation of the adjacent hue step values after the gradient band attenuates. For the first The standard deviation of the adjacent hue step values in the initial state of a gradient band. The gradient band number is used for the adjacent hue step value, which refers to the hue difference between adjacent pixel positions along the gradient direction. molecules With denominator All are hue standard deviations, with the same dimensions. The rate of change is a dimensionless measure. The rate of change of standard deviation... Exceeding the preset threshold The gradient zones are marked as fault risk gradient zones, and a list of fault risk gradient zones is generated. ,in This is the preset threshold for the rate of change of standard deviation.
[0038] Furthermore, the standard deviation of adjacent hue step values in the initial state. and the standard deviation of adjacent hue step values after attenuation The calculation method is as follows: for gradient bands For the pixel sequence along the gradient direction, extract the hue difference sequences between adjacent pixels in the initial state and the attenuated state respectively. Calculate the standard deviation of this difference sequence to obtain the standard deviation of the adjacent hue step values in the initial state. and the standard deviation of adjacent hue step values after attenuation The hue value of each pixel in the attenuated state is obtained by looking up the attenuated color value of the corresponding yarn color in the color attenuation mapping table of each yarn layer and extracting its hue channel.
[0039] Furthermore, preset threshold A pre-defined dimensionless threshold is used to distinguish between acceptable fluctuations and significant fault risks in the hue step distribution of the attenuated gradient band. When the uniformity change of the hue step distribution after the attenuation of the gradient band is considered to be within an acceptable range, no tomographic correction is required; when At that time, it was determined that the hue step distribution showed a significant increase in non-uniformity after the gradient band decayed, posing a risk of gradient faulting. Therefore, it was included in the fault risk gradient band list for targeted optimization in subsequent steps. Preset threshold. The specific value can be specified by the user according to the visual quality requirements of the pattern gradient continuity, or preset according to the experimental evaluation results.
[0040] It should be noted that, initially, the hue step values of adjacent pixels in the gradient transition band are approximately uniform. When using dye systems with different decay rates, the step values of some hue segments deviate significantly from the mean after decay, increasing the standard deviation and thus the rate of change of standard deviation. The increase indicates that there is a risk of faulting in this gradient zone.
[0041] Step 4: Based on the color attenuation mapping table of each layer of yarn, perform attenuation-aware multilayer exposure ratio decomposition on each pixel position in the meshed pattern matrix of each layer to generate attenuation-aware multilayer exposure ratio matrix and initial deviation map. For each pixel position in the meshed pattern matrix of each layer Get the target color (Represented in CIELab color space), color values after attenuation of the color of each layer of yarn. Using the base case, a non-negative least squares algorithm is used to decompose the target color into a weighted mixture of the attenuated yarn colors of each layer. The input to the non-negative least squares algorithm is the target color. and the color values of the yarn after attenuation of each layer The output is the exposure ratio of each layer that satisfies the nonnegativity constraint and the normalization constraint. Specifically, solve the following optimization problem:
[0042]
[0043] in This represents the exposure ratio of each layer at this pixel location. For the first Layer at pixel position The exposure ratio, For the number of weaving layers, The layer number has a value range of 1. to , For the first The attenuated color value of the selected yarn color in the layer that is being mixed. For the first The color index of the yarn selected to participate in the blending within the layer. In the optimization problem described above, the target color... Compared with the color value of the yarn after attenuation All are represented in the CIELab color space, with consistent dimensions and display ratios. The weights are dimensionless, ensuring the calculation is valid. When a layer has multiple available yarn colors, the combination with the smallest residual is selected after solving for each combination separately.
[0044] The exposure ratio obtained from the solution Reverse mapping to the initial state to reveal the scale. Calculate the initial mixed color by mixing the initial yarn colors of each layer:
[0045] in pixel position The initial mixed color, For the first The initial color value (CIELab color space) of the selected yarn color in the layer. The proportion is dimensionless. For the number of weaving layers, The layer number has a value range of 1. to All dimensions are consistent. Record the initial deviation between the initial mixed color and the target color. ,in pixel position The initial deviation value is used to generate the attenuation sensing multilayer exposure ratio matrix. and initial deviation diagram ,in To attenuate the perception of multi-layer exposure ratio matrix, This is the initial deviation plot.
[0046] It should be noted that the above decomposition replaces the initial yarn color with the attenuated yarn color. This means that when the yarn layers are mixed according to this exposure ratio, the color of each yarn layer will attenuate to [a certain value] after the target number of washes. At this point, the mixed color directly approximates the target color. Therefore, the color accuracy of the attenuated state is prioritized. However, the mixed color in the initial state may deviate somewhat from the target color; this deviation is recorded in the initial deviation map. middle.
[0047] In this embodiment of the application, in order to achieve a trade-off between initial appearance quality and color retention after decay, the following processing is further included in step 4: processing the initial deviation map. medium deviation Exceeding the tolerance threshold The pixel position, in proportion to the exposure ratio of each layer. For the decision variables, the objective function is to minimize the following:
[0048] in Let be the objective function. The color difference between the attenuated mixed color and the target color is calculated based on the exposure ratio. Color values of yarns after attenuation in each layer After weighted summation, the attenuated mixed color is obtained, which is then compared with the target color. Calculate the Euclidean distance, i.e. ; The color difference between the initial mixed color and the target color is calculated based on the exposure ratio. Initial yarn color values for each layer After performing a weighted summation, the initial mixed color is obtained, which is then combined with the target color. Calculate the Euclidean distance, i.e. ; and These are the attenuated color difference weights and the initial color difference weights, respectively. This is to ensure that color retention after decay has a higher priority than the initial state. and All distances are Euclidean distances in the CIELab color space, with the same dimensions, and weighted summation is valid.
[0049] Furthermore, tolerance threshold A pre-defined tolerance threshold is used to distinguish between acceptable deviations between the mixed color and the target color in the initial state and deviations requiring joint optimization of both objectives. When the initial blend color and the target color at that pixel location are considered to be within an acceptable range, no dual-objective joint optimization is required; when When the initial deviation of the pixel position is considered to exceed the acceptable range, it needs to be adjusted using the objective function. Perform constrained optimization on the objective function to solve for the compromise exposure ratio. Tolerance threshold. The specific value can be specified by the user based on the visual tolerance requirements of the towel product for the initial appearance quality, or preset based on experimental evaluation results. Its dimension is consistent with the Euclidean distance in the CIELab color space. The above-mentioned constrained optimization problem has the same non-negativity constraints and normalization constraints as the non-negative least squares problem in step 4, and can be solved using a sequential quadratic programming algorithm or the interior point method.
[0050] Furthermore, the attenuated color difference weight and initial color difference weight The value of determines the difference between the attenuated color difference and the initial color difference in the objective function. The relative weight ratio in the attenuation color difference weight and initial color difference weight All are positive real numbers and satisfy The specific value can be specified by the user based on the product's comprehensive requirements for color retention and initial appearance quality over its service life, or preset based on experimental evaluation results.
[0051] Constrained optimization algorithms are used to find a compromise exposure ratio that balances the two states, and the attenuation-sensing multilayer exposure ratio matrix is updated. .
[0052] In this embodiment of the application, in order to eliminate gradient faults caused by differential fading, based on the above-mentioned dual-objective joint optimization, for the pixel positions covered by gradient bands located in the fault risk gradient band list, a constraint on the uniformity of hue stepping after attenuation between adjacent pixels is added to the optimization objective function. Specifically, for the fault risk gradient bands... Adjacent pixel pairs along the gradient direction and The following penalties will be added:
[0053] in This is a penalty term for gradual uniformity. Adjacent pixels after attenuation and The hue step value between them is calculated as follows: based on the current display ratio. The weighted sum of the color values of the yarns after attenuation in each layer is used to obtain the pixel values. and After attenuation, the mixed colors are then extracted, and the hue angles of the two colors in the CIELab color space are extracted and the difference is calculated. Gradient band The arithmetic mean of the attenuated hue step values of all adjacent pixel pairs within the same area; The penalty weights are for uniformity constraints. In the penalty term... and All values are differences in hue angle, have the same dimensions, and are valid for subtraction and squaring operations. This constraint causes the hue step values of the attenuated gradient transition zone to return to a uniform distribution, updating the attenuation-sensing multilayer exposure ratio matrix. .
[0054] Furthermore, In each round of optimization iteration, based on the current exposure ratio Recalculate: for gradient bands All adjacent pixel pairs within, at the current exposure ratio The weighted sum of the attenuated yarn color values of each layer is used to obtain the attenuated mixed color of each pixel. After extracting the hue angle, the hue difference between adjacent pixel pairs is calculated, and the arithmetic mean of all hue differences is taken to obtain the final color. Penalty weight The value of determines the weight ratio of the hue step uniformity constraint to the color difference constraint, and the penalty weight. The specific values can be specified by the user based on the visual quality requirements of the gradient continuity or preset based on experimental evaluation results.
[0055] Step 5: Convert the attenuation-sensing multilayer exposure ratio matrix into a binary exposure pattern diagram for each layer, perform cross-layer floating line coupling detection and correction, and generate cross-layer collaboratively corrected exposure pattern diagrams for each layer. Attenuation sensing multi-layer exposure ratio matrix The error diffusion jitter algorithm is used to transform the data into binary display pattern diagrams for each layer. ,in The first Layer to the first The binarized exposure pattern diagram of the layer. The input of the error diffusion dithering algorithm is the continuous exposure ratio value of each pixel position, and the output is the binarized exposure state (exposed or hidden). The quantization error is diffused to the adjacent unprocessed pixels according to the predetermined diffusion kernel, so that the exposure density of the binarized exposure pattern in the local area is approximately equal to the original continuous exposure ratio.
[0056] Simultaneously perform cross-layer floating line coupling detection on each layer's exposure pattern diagram. Traverse the continuously exposed and continuously hidden pixel segments on each row of weft yarns in each layer, and calculate the floating line length. ,in For layer numbering, For row numbering, Segment number. When the first Length of a certain section of floating line Exceeding the maximum floating line length threshold of this layer At that time, select the position from the candidate anchoring position set of the floating line segment that minimizes the local mixed color offset after attenuation and insert the interlacing anchor point.
[0057] Specifically, for each candidate anchoring position in the ultra-long floating segment Calculate at candidate anchoring positions Candidate anchoring positions after inserting interlaced anchor points The color difference increment between the mixed color and the target color after attenuation of pixels in its neighborhood. Select color difference increment The smallest candidate position is used as the anchor point. After inserting the anchor point, it is simultaneously verified whether the exposure state of other layers at the corresponding position changes due to the insertion of the anchor point. If the floating line constraints of other layers at the corresponding position are violated as a result, the same anchor point selection strategy based on minimizing the color difference after attenuation is applied to other layers for correction. Candidate anchor positions are generated in an equally spaced manner within the floating line segment. The role of the anchor point is to forcibly change the exposure / concealment state of the yarn in that layer at that position, causing it to interweave with the adjacent weaving layer to fix the yarn, thereby dividing the excessively long floating line segment into multiple short floating line segments that meet the length constraints.
[0058] Furthermore, the maximum floating line length threshold For the first The maximum floating thread length threshold for a layer limits the maximum number of pixels that can continuously float or sink the yarn in that layer onto the fabric surface. The value is determined by the mechanical properties of the yarn used in this layer and the weaving process requirements. The specific value can be preset and stored in the system parameter table according to the yarn specifications and fabric structure of the weaving layer. When the float length... Exceeding the maximum floating line length threshold At this time, there is a risk of yarn slack or snagging during the weaving process of this floating section, which needs to be divided by inserting interlacing anchor points.
[0059] Furthermore, color difference increment The calculation method is as follows: at the candidate anchor position The exposed state of the yarn layer is reversed, and the candidate anchoring position is adjusted. The attenuated yarn color is obtained by weighting and summing the attenuated yarn color values with respect to the current exposure state of each layer, and calculating the Euclidean distance between the attenuated mixed color and the target color. The color difference increment is obtained by taking the arithmetic mean of the color difference changes of all pixels in the neighborhood. The neighborhood radius can be preset according to the yarn specifications of the weave layer.
[0060] Repeat the above detection and correction process until all floating line lengths of all layers meet their respective maximum floating line length thresholds, generating layer exposure pattern diagrams after cross-layer collaborative floating line correction. ,in The first Layer to the first The revealed pattern diagram after the cross-layer collaborative floating line correction.
[0061] In this embodiment of the application, in order to maintain the effect of attenuated color balance optimization after cross-layer floating line correction, the color difference increment in the above anchor point selection strategy is... The color values are calculated using the attenuated state, not the initial state. Therefore, the color accuracy after attenuation is prioritized during structural correction to avoid disrupting the color balance achieved in step 4 through attenuation-aware multi-layer exposure ratio decomposition and dual-objective joint optimization due to floating line correction.
[0062] Step 6: Perform color verification and local fine-tuning on the revised layer exposure pattern diagrams, generate the final layer weaving control matrix, and integrate and output the towel customization design scheme; Exposure pattern diagram of each layer after cross-layer collaborative correction Calculate the position of each pixel in the initial state and the decayed state respectively. The mixed surface color. In the initial state, the mixed color is the result of a weighted mixture of the initial yarn colors of each layer according to their exposure mode. In the attenuated state, the mixed color is the result of a weighted mixture of the attenuated yarn colors of each layer according to their exposure mode. If the color difference between the mixed color and the target color in the attenuated state exceeds the tolerance threshold... Within a specific pixel region, local exposure ratio fine-tuning and dithering redistribution are performed to adjust the binarized exposure state of each layer within that region until the global color difference is within the tolerance threshold. Inside.
[0063] Furthermore, the specific method for fine-tuning the local exposure ratio is as follows: for color differences exceeding the tolerance threshold... For each pixel position, the exposed state of each layer is flipped one by one in its neighborhood. The change in color difference between the mixed color and the target color after each flip is calculated. The flip operation with the largest reduction in color difference is selected and executed. The generated quantization error is spread to the unprocessed pixels in the neighborhood through the error diffusion dithering algorithm. The above process is repeated until the color difference of the pixel meets the tolerance requirements.
[0064] The layer exposure pattern diagrams that meet the global color difference requirements are transformed into the final layer weaving control matrix. ,in The first Layer to the first The final weaving control matrix for each layer. Each element in the final weaving control matrix for each layer corresponds to the heddle lifting control command (lifting heddle or not lifting heddle) for the corresponding layer at that pixel position on the loom. This is directly mapped from the binarized exposure state in the exposure pattern diagram of each layer. The exposure state corresponds to the heddle lifting command, and the hidden state corresponds to the not lifting heddle command.
[0065] The final weaving control matrix of each layer is integrated with the initial state preview image, the state preview image after attenuation, and the color balance offset comparison data to output a customized towel design scheme.
[0066] In this embodiment of the application, in order to perform end-to-end verification of the final scheme's global color balance, step 6 further includes the following processing: re-extracting the color balance feature vectors of the initial state and the attenuated state based on the final exposure pattern diagrams of each layer. and And the standard deviation of hue step for each gradient band in the decayed state. ,in This is the initial state color balance feature vector extracted based on the final revealed pattern diagrams of each layer. This refers to the attenuated state color balance feature vector extracted based on the final revealed pattern diagrams of each layer. The first layer is calculated based on the final layer exposure pattern diagram. The standard deviation of the hue step of the gradient band in the attenuated state. Verify that the changes in relative hue difference, relative saturation ratio, and relative lightness ratio of each color region cluster between the color balance feature vectors before and after attenuation are all within the preset acceptable range, and that the standard deviation change rate of each gradient band in the fault risk gradient band list is [not specified]. All are below the preset threshold ,in The first layer is calculated based on the final layer exposure pattern diagram. The standard deviation rate of change of the gradient band. If there are color region clusters or gradient bands that do not meet the conditions, the corresponding regions are backtracked to perform local exposure ratio adjustments and then the final weaving control matrix for each layer is regenerated until global verification is passed.
[0067] This embodiment addresses the technical problems of color balance collapse and gradient discontinuity in gradient patterns after washing in multi-layer jacquard weaving by employing the following technical means.
[0068] Because step 1 performs hue-based color region segmentation on the pattern and extracts the initial color balance feature vector and gradient hue sequence set, and step 3 calculates the color balance feature vector and color balance offset report after attenuation based on the color attenuation mapping table of each layer of yarn, the impact analysis of washing attenuation is elevated from the pixel-by-pixel independent level to the global color relationship level. Therefore, it can accurately quantify the degree of damage to the relative hue, saturation and brightness relationship between each color region cluster by the differential fading of different dye systems, and pre-identify the gradient risk gradient zone by the standard deviation change rate of gradient hue step, providing a clear global constraint target for subsequent optimization.
[0069] Because step 4, the attenuation-sensing multilayer exposure ratio decomposition replaces the decomposition substrate from the initial yarn color to the attenuated yarn color, towels woven according to this exposure ratio, after the target number of washes, will have a mixed surface color of attenuated yarn layers that directly approximates the target color, thus prioritizing color accuracy in the attenuated state throughout their lifespan. Furthermore, for initial deviations exceeding the tolerance threshold... The pixels undergo dual-objective joint optimization, achieving a weighted trade-off between the attenuated color difference and the initial color difference, avoiding excessive sacrifice of initial appearance quality in pursuit of attenuated accuracy alone. A hue step uniformity constraint is added to the gradient band with fault risk, ensuring that the step values of adjacent hues in the attenuated gradient transition band return to a uniform distribution, thereby eliminating gradient faulting caused by differential fading.
[0070] Because in step 5, when the cross-layer floating line coupling detection synchronously traverses the floating lines of each layer, the candidate anchoring position of the ultra-long floating line segment is selected based on minimizing the local mixed color offset after attenuation. Furthermore, after inserting the anchoring point, the floating line constraints of other layers are simultaneously verified and corrected. Therefore, the cross-layer floating line conflict problem is solved during the structural correction process, and the color balance results achieved by the attenuation-sensing multi-layer exposure ratio decomposition and dual-objective joint optimization are avoided due to the introduction of the anchoring point.
[0071] Therefore, this implementation overcomes the shortcomings of existing methods, such as the inability of single-layer independent processing to adapt to the cross-layer coupling characteristics of multi-layer jacquard, and the inability of pixel-by-pixel independent compensation to cope with the global color relationship shift caused by multi-layer differential fading. It can maintain the global color balance and gradient continuity of multi-layer jacquard gradient towels throughout their entire lifespan.
[0072] The following is an example of an application of the present invention, such as Figure 2-8 As shown, the implementation process is as follows: A home textile customization platform (code name: Platform HT) received a batch of customized orders for high-end hotel room towels in the spring of 20XX. The client required the towels to feature a horizontal gradient pattern from coral orange to sea blue on the front, maintaining color balance and gradient continuity after 50 standard washes. Platform HT used a two-layer jacquard loom for production: the first layer (top layer) used reactive dye yarns, including coral orange (color A) and transitional beige (color B); the second layer (bottom layer) used vat dye yarns, including deep sea blue (color C) and medium gray-blue (color D). The finished towel dimensions were [width missing]. cm, height cm, target number of washes Second-rate.
[0073] The HT platform system receives user-uploaded horizontal gradient patterns from coral orange to sea blue via an image acquisition interface, and simultaneously records two layers of jacquard weaving parameters. The warp density of the first layer (reactive dye layer) is also recorded. Roots / cm, latitudinal density Roots / cm; Meridional density of the second layer (vabyl dye layer) Roots / cm, latitudinal density Roots / cm. The two layers have different densities and need to be resampled separately.
[0074] The resolution of the first layer mesh is calculated as follows:
[0075] The resolution of the second-layer mesh is calculated as follows:
[0076] Resample the original patterns to and ,generate and Two-layer gridded pattern matrix.
[0077] Subsequently, the system performs K-means clustering of the pattern in the CIELab color space based on hue channels. The scanner identified three color region clusters: coral orange (cluster 1), intermediate transition zone (cluster 2), and sea blue (cluster 3). Simultaneously, a gradient transition band with a monotonously decreasing hue was identified along the horizontal scan. , recorded as Its hue sequence starts from approximately Continuous change to .
[0078] Table 1. Color region clustering results and initial color balance feature vector
[0079] Initial color balance feature vector The gradient band consists of the three sets of data in the table above. The initial hue sequence is uniformly stepped from 24.3° to 209.6° across 560 pixel columns, with adjacent step values approximately... Initial step standard deviation (Approximately uniform distribution).
[0080] The system retrieves the decay function parameters of each yarn color from the washing decay database based on the dye system types of the first layer (reactive dyes) and the second layer (vapor dyes). Reactive dyes have a larger decay rate coefficient ( The decay rate coefficient of vat dyes is approximately 0.018–0.022, and the decay rate coefficient is relatively small. (Approximately 0.006 to 0.009).
[0081] Color A (coral orange, reactive dye, layer 1) Taking component attenuation as an example, substituting... :
[0082] Color C (deep sea blue, vat dye, second layer) Taking component attenuation as an example, substituting... :
[0083] Table 2 Color decay mapping table for each layer of yarn (CIELab, 50 washes)
[0084] As shown in Table 2, the reactive dye layers (colors A and B) showed improvement after 50 washes. The decrease in concentration was significant (approximately 28-34%), while the vat dye layers (colors C and D) showed a similar decrease. The component decreases very little (about 1-2%), and the difference in attenuation rates between the two layers is significant, which is the root cause of the subsequent color balance shift.
[0085] The system queries the attenuated color value of each pixel in the three color region clusters according to its corresponding texture layer, and takes the average value in the hue, saturation, and lightness channels to obtain the attenuated color balance feature vector. .
[0086] Taking cluster 1 (coral orange area) as an example, the pixels in this area are mainly covered by the first layer color A, after attenuation The amount decreased significantly, and the hue was affected. , The components decay synchronously and shift towards lower saturation, as calculated. Cluster 3 (aquamarine region) is dominated by color C from the second layer, with minimal attenuation. .
[0087] Example of offset calculation for each color region cluster (taking cluster 1 as an example):
[0088] The saturation retention rate and lightness retention rate are calculated as follows:
[0089]
[0090] Table 3 Color Balance Shift Report
[0091] The saturation retention rate and brightness retention rate of clusters 1 and 2 are both much lower than 1, indicating that the significant fading of the reactive dye layer has led to a significant decrease in the saturation and brightness of the coral orange and transition areas, while the aqua blue area (vapor dye) remains almost unchanged. The color balance of the three areas has been severely shifted.
[0092] Gradient band Calculating the risk of color fading: After attenuation, the reactive dye yarns in the coral orange segment (around 24° hue) faded significantly, causing a significant increase in the step value of adjacent colors in this hue segment; the step value in the sea blue segment (around 210° hue) remained almost unchanged. The standard deviation of the step value after attenuation was calculated. Initial standard deviation .
[0093]
[0094] Set a preset threshold ,but Gradient band It has been marked as a fault risk gradient zone and included in the list of fault risk gradient zones.
[0095] The system positions each pixel Using the attenuated yarn color as a base, the exposure ratio is decomposed using a non-negative least squares algorithm. The target color is then determined using a pixel in the transition zone of the gradient band. Taking inCIELab as an example, the system at color B (after attenuation: ) and color D (after decay: Solving under the combination:
[0096] satisfy Solving for the given information, we can obtain the following results: .
[0097] Reverse mapping to the initial state, the initial blend color is:
[0098] Initial deviation value .
[0099] Set tolerance threshold ,but This pixel triggers dual-target joint optimization. The system uses... Solve the objective function Prioritizing accuracy after attenuation while also considering the initial appearance, the exposure ratio of this pixel is updated to... .
[0100] because The gradient zone, which has been marked as a fault risk zone, has a gradient uniformity penalty term added to all pixels within the gradient zone during the dual-objective joint optimization. (Penalty weight) After constraint decay, the adjacent hue step values move towards the mean. Convergence, thereby suppressing hue faulting in the transition zone from coral orange to the hue.
[0101] Table 4. Decomposition results of typical pixel location exposure ratios (updated)
[0102] The system uses a multi-layer exposure ratio matrix for attenuation sensing. Using the error diffusion jitter algorithm (Floyd-Steinberg diffusion kernel), the continuous exposure ratio is transformed into a binary exposure pattern map. ( )and ( ).
[0103] In cross-layer floating line coupling detection, a threshold for the maximum floating line length of the first layer is set. Pixel, Layer 2 Pixels. While scanning row 320 of layer 1, a continuous exposed segment length was found. For pixels exceeding the threshold of 5, anchor points need to be inserted. The system generates three candidate anchor positions within this segment (located at columns 184, 188, and 192), and calculates the color difference increment of the local mixed color after attenuation after inserting the anchor point at each candidate position. Select the position with the smallest color difference increment (column 188). Insert anchor point.
[0104] After inserting the anchor point, the system synchronously checks the exposure status of the second layer at the corresponding position (mapped to approximately row 141 and column 141 of the second layer). It finds that the continuous hidden segment of the second layer at this position is forced to flip due to the introduction of the anchor point, resulting in a new floating line constraint conflict (the length of the hidden segment changes from 6 to 8, exceeding the threshold of 7). The system then applies the same anchor point correction strategy based on minimizing the color difference after attenuation to the second layer and inserts a corrected anchor point in the corresponding row of the second layer.
[0105] Table 5. Cross-layer floating line coupling detection and correction records (partial)
[0106] After iterative correction, all floating line lengths in all layers meet their respective thresholds, generating a cross-layer collaborative correction exposure pattern diagram. and .
[0107] The system and The color difference between the attenuated blend color and the target color is calculated pixel by pixel. Scanning revealed that several pixels in the middle section of the gradient band (column 240 to column 320) had color differences exceeding the tolerance threshold. The system performs local exposure ratio fine-tuning on these pixels: it attempts to flip the exposure state of each layer in the neighborhood one by one, selects the flip operation with the largest reduction in color difference, and spreads the quantization error to the neighborhood. After local iterative adjustment, the global color difference converges to within the threshold.
[0108] The system then performs end-to-end global verification, re-extracting the data based on the final revealed pattern diagram. and The relative hue difference, saturation retention, and lightness retention of the three color region clusters were verified to be within acceptable ranges, and the gradient band... rate of change of final standard deviation The fault risk has been eliminated, and the global verification has been passed.
[0109] Will and Directly mapped to weaving control matrix ( )and ( The exposed state is mapped to the heddle lifting instruction, and the hidden state is mapped to the no-heddle lifting instruction. The data is integrated with the initial state preview image, the attenuated state preview image, and the color balance offset comparison data to output the final towel customization design scheme.
[0110] Table 6. Basic Information of the Final Weaving Control Matrix
[0111] Throughout the implementation process, the data starts with a user-uploaded coral orange to sea blue gradient pattern. Step 1 decomposes the data into a layered mesh matrix and a color balance feature vector. Step 2 transforms the differences in the dye system into a quantized attenuation mapping table, revealing the difference in fading rates between reactive and vat dyes. Step 3 calculates a global color balance shift report (including hue shift, saturation retention rate, and brightness retention rate for each cluster) based on the attenuation mapping table and identifies gradient break risks, providing a clear target for subsequent optimization. Step 4 decomposes the exposure ratio based on the attenuated color, performs dual-objective joint optimization on out-of-tolerance pixels, adds uniformity constraints to the break risk area, and generates an exposure ratio matrix that balances color retention and initial appearance over the service life. Step 5 quantizes the continuous ratio into a binary exposure mode and simultaneously handles cross-layer floating line coupling conflicts to ensure that structural modifications do not disrupt the attenuation color balance. Step 6 outputs the final weaving control matrix after completing local fine-tuning and end-to-end global verification. The output data of each step (attenuation mapping table → color offset report → exposure ratio matrix → exposure pattern diagram → weaving control matrix) are passed down step by step, which together ensures the global color balance and gradient continuity of the multi-layer jacquard gradient towel after 50 washes.
[0112] The embodiments of the present invention have been described above. However, the embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.
Claims
1. A method for intelligent custom towel design, characterized in that, Includes the following steps: The system obtains the gradient color custom pattern, multi-layer jacquard weaving parameters, and target number of washes uploaded by the user. The multi-layer jacquard weaving parameters include the number of weaving layers, the set of available yarn colors for each layer, and the warp and weft density values for each layer. The system then performs gridded resampling on the custom pattern according to the warp and weft density values of each layer to generate a gridded pattern matrix for each layer. Based on the dye system type corresponding to each color in the available yarn color set for each layer, the color component attenuation function of each yarn color under the target number of washes is retrieved from the washing attenuation database to generate a color attenuation mapping table for each layer of yarn. Based on the color attenuation mapping table of each layer of yarn, calculate the color parameter changes before and after the attenuation of each color region cluster in the pattern and the hue step uniformity changes after the attenuation of each gradient transition zone, and generate a color balance shift report and a list of fault risk gradient zones. Using the attenuated color value of each layer of yarn as the decomposition basis, non-negative least squares decomposition is performed on the target color at each pixel position in the meshed pattern matrix of each layer to solve the exposure ratio of each layer that satisfies the non-negative constraint and the normalization constraint, and an attenuation-aware multilayer exposure ratio matrix is generated. The attenuation-sensing multi-layer exposure ratio matrix is transformed into a binary exposure pattern diagram of each layer. Cross-layer floating line coupling detection is performed simultaneously on each layer. For ultra-long floating line segments, the anchoring position is selected based on minimizing the local mixed color offset after attenuation, and the floating line constraints of other layers are corrected simultaneously to generate the exposure pattern diagram of each layer after cross-layer collaborative correction. Color difference verification is performed on the corrected layer exposure pattern diagrams in the initial state and after decay state. Local exposure ratio fine-tuning is performed on areas where the color difference exceeds the tolerance threshold. The layer exposure pattern diagrams that meet the global color difference requirements are transformed into the final layer weaving control matrix and integrated to output the towel customization design scheme.
2. The intelligent customized towel design method according to claim 1, characterized in that, After generating the mesh pattern matrices for each layer, the following is also included: The custom pattern is segmented into color regions by using a clustering algorithm in the CIELab color space to divide the hue channel values of each pixel, resulting in multiple color region clusters. The main hue value, average saturation value, average brightness value, and area ratio of each color region cluster are extracted to generate an initial color balance feature vector. Scan along the direction where the hue value changes continuously and monotonically and crosses a preset hue range in the pattern, extract the position of the gradient transition zone and the hue change sequence along the gradient direction, and generate a gradient hue sequence set.
3. The intelligent customized towel design method according to claim 1, characterized in that, The color component decay function is an exponential decay function. For the L component of the j-th yarn color in the n-th layer, the decayed value is obtained by multiplying the initial L component value of the yarn color by the negative exponential function value with the product of the decay rate coefficient and the number of washes as the exponent, plus the limit value of the L component when the number of washes approaches infinity. The decay functions of the a component and the b component have the same form and each corresponds to an independent decay rate coefficient and limit value parameter. The attenuation rate coefficient and limit value are stored in the washing attenuation database after nonlinear least square fitting of the colorimetric measurements of the standard color card sample at multiple preset washing times.
4. The intelligent customized towel design method according to claim 2, characterized in that, The generation of the color balance offset report and the fault risk gradient list includes: based on the color attenuation mapping table of each layer of yarn, applying the corresponding attenuation function to the pixels in each color region cluster to obtain the attenuated color value, taking the arithmetic mean of the hue, saturation and lightness channels respectively, and generating the attenuated color balance feature vector. Calculate the relative hue difference, relative saturation ratio, and relative lightness ratio changes for each color region cluster between the initial color balance feature vector and the attenuated color balance feature vector, and generate a color balance offset report. For each gradient band in the gradient band hue sequence set, calculate the standard deviation of adjacent hue step values in the initial and attenuated states respectively. Divide the absolute value of the difference between the attenuated standard deviation and the initial standard deviation by the initial standard deviation to obtain the standard deviation change rate. Gradient bands with a standard deviation change rate exceeding a preset threshold are marked as fault risk gradient bands and included in the fault risk gradient band list.
5. The intelligent customized towel design method according to claim 1, characterized in that, The generation of the attenuation-sensing multilayer exposure ratio matrix also includes: The initial mixed color is obtained by back-mixing the initial yarn colors of each layer with the obtained exposure ratios of each layer. The Euclidean distance between the initial mixed color and the target color is calculated as the initial deviation value, and an initial deviation map is generated. For the pixel positions in the initial deviation map where the deviation exceeds the tolerance threshold, constrained optimization is performed with the exposure ratio of each layer as the decision variable and the weighted sum of the color difference between the attenuated mixed color and the target color and the color difference between the initial mixed color and the target color as the objective function. The weight of the attenuated color difference is greater than the weight of the initial color difference. The compromise exposure ratio that takes into account both the attenuated state and the initial state is solved, and the attenuation-aware multilayer exposure ratio matrix is updated.
6. The intelligent customized towel design method according to claim 5, characterized in that, For the pixel positions covered by the gradient band in the fault risk gradient band list, a gradient uniformity penalty term is added to the objective function. The gradient uniformity penalty term is the penalty weight multiplied by the sum of the squares of the difference between the attenuated hue step value of all adjacent pixel pairs in the gradient band and the arithmetic mean of the attenuated hue step value in the gradient band. The attenuated hue step value is obtained by extracting the hue angle after weighted summation of the attenuated yarn color values of each layer with the current exposure ratio and calculating the hue angle difference between adjacent pixels. The arithmetic mean is recalculated according to the current exposure ratio in each optimization iteration.
7. The intelligent customized towel design method according to claim 1, characterized in that, The attenuation-sensing multi-layer exposure ratio matrix is transformed into a binary exposure pattern map of each layer using an error diffusion dithering algorithm. The input of the error diffusion dithering algorithm is the continuous exposure ratio value of each pixel position, and the output is the exposed or hidden binary exposure state. The quantization error is diffused to the adjacent unprocessed pixels according to a predetermined diffusion kernel, so that the exposure density of the binary exposure pattern in the local area is approximately equal to the original continuous exposure ratio.
8. The intelligent customized towel design method according to claim 1, characterized in that, The cross-layer floating line coupling detection includes: traversing the continuously exposed and continuously hidden pixel segments on each row of weft yarn in each layer, and calculating the length of each floating line segment; when the length of a certain floating line segment in a certain layer exceeds the maximum floating line length threshold of that layer, generating candidate anchoring positions in the segment at equal intervals, and calculating the arithmetic mean of the color difference changes between the mixed color and the target color after attenuation of each pixel in the position and its neighborhood as the color difference increment for each candidate anchoring position after inverting the yarn exposure state of that layer, and selecting the candidate position with the smallest color difference increment to insert the interlacing anchoring point; After inserting the anchor point, synchronously verify whether the floating line constraints of other layers at the corresponding positions are violated. If they are violated, perform the same anchor point selection strategy based on minimizing the color difference after attenuation in other layers to correct them. Repeat the detection and correction until all floating line lengths of all layers meet their respective maximum floating line length thresholds.
9. The intelligent customized towel design method according to claim 1, characterized in that, After generating the final weaving control matrices for each layer, the following is also included: Based on the final layer exposure pattern diagram, the color balance feature vectors in the initial state and the attenuated state, as well as the hue step standard deviation of each gradient band in the attenuated state, are re-extracted. It is verified that the relative hue difference, relative saturation ratio, and relative brightness ratio changes of each color region cluster between the color balance feature vectors before and after attenuation are all within the preset acceptable range, and the standard deviation change rate of each gradient band in the fault risk gradient band list is lower than the preset threshold. If there are color region clusters or gradient bands that do not meet the conditions, the corresponding regions will be backtracked to perform local exposure ratio adjustments and then regenerate the final weaving control matrix for each layer until global verification is passed.
10. A smart towel customization design system, used to execute the smart towel customization design method according to any one of claims 1 to 9, characterized in that, include: The pattern acquisition and grid resampling module is used to acquire the gradient color custom pattern, multi-layer jacquard weaving parameters and target washing number uploaded by the user, and to perform grid resampling on the custom pattern according to the warp and weft density values of each layer to generate grid pattern matrices for each layer. The attenuation mapping table generation module is used to retrieve the color component attenuation function of each yarn color under the target number of washes from the washing attenuation database based on the dye system type corresponding to each color in the available yarn color set of each layer, and generate the attenuation mapping table of each layer of yarn color. The color balance offset analysis module is used to calculate the color parameter changes before and after the decay of each color area cluster in the pattern and the hue step uniformity changes after the decay of each gradient transition zone based on the color decay mapping table of each layer of yarn, and to generate a color balance offset report and a list of fault risk gradient zones. The attenuation-aware exposure ratio decomposition module is used to perform non-negative least squares decomposition on the target color at each pixel position in the mesh pattern matrix of each layer, based on the attenuated color value of each layer of yarn color as the decomposition base, to generate an attenuation-aware multilayer exposure ratio matrix. The cross-layer floating line coupling detection and correction module is used to convert the attenuation-sensing multi-layer exposure ratio matrix into a binary exposure pattern diagram of each layer, perform cross-layer floating line coupling detection on each layer simultaneously, select the anchoring position for ultra-long floating line segments based on minimizing the local mixed color offset after attenuation, and simultaneously correct the floating line constraints of other layers, generating the exposure pattern diagram of each layer after cross-layer collaborative correction. The color verification and output module is used to perform color difference verification and local exposure ratio fine-tuning on the corrected layer exposure pattern diagrams. It transforms the layer exposure pattern diagrams that meet the global color difference requirements into the final layer weaving control matrix and integrates and outputs the towel customization design scheme.