An ethnic costume color matching auxiliary generation method based on multi-scale feature fusion
By constructing a five-dimensional tensor bipartite graph and an alternating direction multiplier algorithm, the problems of material reflection misjudgment and insufficient adaptability to ambient light sources in ethnic costume color matching are solved, achieving high-precision re-rendering effects for ethnic costumes and supporting digital protection and intelligent color matching.
Patent Information
- Application Number
- CN202611666335.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-27
- Publication Date
- 2026-11-24
AI Technical Summary
Existing technologies cannot effectively distinguish the geometric reflection of materials in the color matching process of ethnic costumes, resulting in the misjudgment of Miao silver highlights as white, ignoring the nonlinear absorption and scattering of dyes inside the fabric fibers, and lacking a dynamic adaptation mechanism to the spectral power distribution of ambient light sources, leading to inaccurate color extraction and distortion in re-rendering.
By constructing a five-dimensional tensor bipartite graph, combining the Kubelka-Munk mesoscopic dye mixing model and the Ashikhmin-Shirley microscopic anisotropic BRDF model, and employing the alternating direction multiplier algorithm to unmix the specular and shadow components, the system monitors environmental spectral changes in real time and resets optimization constraints to generate a high-precision physical imaging model and outputs a re-rendered image under target illumination.
It achieves accurate extraction of high-purity intrinsic spectral reflectance, eliminates color distortion in traditional color matching methods, ensures the realism and accuracy of re-rendering effects under complex lighting conditions, and supports the digital protection and intelligent color matching design of ethnic costumes.
Smart Images

Figure CN123160746A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision, spectral image processing and digital color matching of textiles, and in particular to a method for auxiliary generation of ethnic costume color matching based on multi-scale feature fusion. Background Technology
[0002] Ethnic costumes (such as those of the Miao and Dong ethnic groups) feature rich color combinations and complex material craftsmanship. Their characteristics exhibit typical multi-scale features: macroscopically, they include complex cultural totems and patterns; mesoscopically, they involve the dye mixing effects formed by traditional dyeing techniques such as indigo and cinnabar dyeing; and microscopically, they encompass the strong mirror-like gloss of Miao silver ornaments and the anisotropic reflection of silk satin.
[0003] In traditional color matching and digital reconstruction, colors are typically extracted directly from the RGB color space. However, existing technologies have the following drawbacks: First, they cannot effectively distinguish material geometric reflections, easily misjudging silver highlights as white dye, resulting in a whitish extraction of the inherent color; second, they ignore the physical laws of nonlinear absorption and scattering of dyes within fabric fibers, simply treating color mixing as a linear superposition of the three primary colors, leading to extracted colors that cannot match the actual dyeing formula (i.e., the color matching is muddy); third, they lack an adaptation mechanism to the dynamic drift of the spectral power distribution (SPD) of ambient light sources, causing color distortion in re-rendered images due to metamerism when ambient light changes. Summary of the Invention
[0004] The purpose of this application is to at least solve one of the above-mentioned technical defects, in particular the technical defects in the prior art, such as the yellowing and whitening of the inherent spectrum extraction of ethnic costumes under complex dynamic lighting and specular / shadow interference, the large deviation of physical dyeing formula mapping caused by nonlinear color mixing, and the easy divergence of decoupling algorithm when the ambient light changes abruptly.
[0005] Firstly, this application provides a method for assisting in the generation of ethnic costume color schemes based on multi-scale feature fusion, the method comprising the following steps: Step S1: Collect hyperspectral image data of ethnic costumes and construct a five-dimensional tensor bipartite graph based on it. The five-dimensional tensor bipartite graph includes a set of costume state nodes and a set of environment state nodes. Step S2: After mapping the clothing state node set and the environment state node set to the same spectral space, calculate the sampling spectral angle distance, solve the graph topological similarity matrix under simplex constraint and structural sparsity constraint, and obtain the bipartite graph structure matrix by threshold truncation; Step S3: Based on the fixed constraints of the bipartite graph structure matrix, the first augmented graph matrix and the second mapping graph matrix are solved element by element using the alternating direction multiplier algorithm. A physical imaging model is constructed and spectral unmixing is performed. The dye concentration vector and material roughness parameters are extracted, the specular and shadow components are stripped, and the final fabric spectral reflectance is updated and calculated. Step S4: Extract the real-time dynamic spectral components, recursively update and calculate the spectral drift index using rank-one addition and subtraction, compare the spectral drift index with the preset control limit, and dynamically reset or maintain the state of the Lagrange multiplier matrix in the alternating direction multiplier algorithm based on the comparison result. Step S5: Generate a standard intrinsic spectral color card image based on the final fabric spectral reflectance, map the dye concentration vector to the pre-stored base dye spectral database, export the dye mass ratio formula for dyeing and sampling, input the target illumination and viewing angle, calculate the target wavelength radiance using the physical imaging model and perform color space integration, and output a re-rendered image of the clothing under the target illumination environment.
[0006] As an optional implementation, in step S1, hyperspectral image data of ethnic costumes under multi-time period illumination environments are collected, and the dimensions of the five-dimensional tensor specifically include: The dimensions include the horizontal axis of the image space, the vertical axis of the image space, the sampling point dimension of the spectral wavelength, the geometric angle dimension of illumination and viewing angle, and the time slice dimension of multi-time period acquisition.
[0007] As an optional implementation, in step S2, the node feature vector of the clothing state node set is composed of a concatenation of a base dye concentration vector, a microscopic material parameter vector, and a cultural semantic feature vector. The cultural semantic feature vectors are used to provide edge prior constraints for the topological connections of clothing embroidery patterns in projection space learning; The node feature vectors included in the environmental state node set are composed of a concatenation of the ambient light source spectral power distribution vector, the light incident angle vector, the imaging device spectral response function vector, and the nonlinear correction feature vector of the sensor lookup table.
[0008] As an optional implementation, step S2, obtaining the bipartite graph structure matrix, specifically includes: By projecting linear spectral features, the clothing state node set and the environment state node set are mapped to the same-dimensional spectral feature space, respectively. The inverse cosine of the cosine of the vector angle between the two vectors after mapping is calculated as the physical distance of the sampled spectral angle. Ignoring physical decoupling parameters, a sparse graph topology optimization objective function is constructed based solely on observed changes. The construction process of the sparse graph topology optimization objective function includes: The graph transmission reconstruction error of the observed changes in clothing state nodes and the driven changes in environmental state nodes under multiple time slices is used as the data fitting term. It is combined with the trace penalty term based on the physical distance of the sampling spectral angle, the L1 norm sparse constraint term of the graph topological similarity matrix, and the Frobenius norm regularization term of the weighted graph structure matrix for weighted accumulation to construct the sparse graph topology optimization objective function. The graph topological similarity matrix included in the objective function of sparse graph topology optimization is updated by the proximal gradient descent method, and the updated vector is projected onto the probability simplex space where the sum of the elements is one and the elements are non-negative.
[0009] As an optional implementation, a threshold truncation process is performed on the updated converged graph topological similarity matrix, the logic of which includes: When an element of the graph topological similarity matrix is greater than or equal to a preset truncation threshold, the edge weight is retained. If an element of the graph topological similarity matrix is less than a preset truncation threshold, then that element is set to zero. Generate a sparse bipartite graph structure matrix.
[0010] As an optional implementation, step S3, which involves solving the first augmented graph matrix and the second mapping graph matrix of the bipartite graph structure matrix element-wise using the alternating direction multiplier algorithm, includes: With the bipartite graph structure matrix fixed, construct an augmented Lagrange function that includes the first augmented graph matrix, the second mapping graph matrix, and the Lagrange multiplier matrix; Based on the augmented Lagrange function, the least-squares solution of the first augmented graph matrix, the closed-form solution of the second mapping graph matrix, and the recursive update of the Lagrange multiplier matrix are solved alternately, specifically including: With the second mapping matrix and the Lagrange multiplier matrix fixed, the first augmented graph matrix is updated using the least squares method; With the first augmented graph matrix and the Lagrange multiplier matrix fixed, solve for the scalar elements of the second mapping graph matrix element by element, using the following calculation rules: The numerator is the product of the coefficient of the alternating direction multiplier algorithm penalty term and the sum of the corresponding elements of the first augmented graph matrix and the multiplier matrix. The denominator is the sum of twice the sparse penalty coefficient and the coefficient of the alternating direction multiplier algorithm penalty term, multiplied by the corresponding element of the graph structure matrix, and updated by element-wise scalar division. Update the Lagrange multiplier matrix based on the residual of multiplying the graph structure matrix by the first augmented graph matrix and the second mapping graph matrix; When the alternating solution converges, stop the iteration and output the solved first augmented graph matrix and second mapping graph matrix; otherwise, stop the iteration counter. .
[0011] As an optional implementation, step S3, constructing the physical imaging model, specifically includes: Combining the Kubelka-Munk dye mixing model with the microscopic anisotropic bidirectional reflectance distribution function, the observed total spectral radiance is defined as the product of the device spectral response function, the environmental spectral power distribution irradiance, and the reflected radiation term. The reflected radiation term is the sum of the diffuse reflection radiation component and the specular highlight reflection component; The diffuse reflection radiation component is the product of the spectral reflectance of the first fabric and the cosine of the normal incident angle divided by pi. The spectral reflectance of the first fabric is calculated by the absorption and scattering ratio, and the absorption and scattering ratio satisfies the sum of the absorption coefficients of the undyed base fabric and each base dye in proportion to their concentrations divided by the sum of the scattering coefficients. The specular highlight reflection component is obtained by using a microscopic anisotropic bidirectional reflection distribution function, which is calculated using the surface fabric warp tangent roughness coefficient, weft secondary tangent roughness coefficient, the cosine of the angle between the half-angle vector and the normal vector, and the Fresnel reflection coefficient. This function is used to fit the metallic highlight and satin anisotropic reflection.
[0012] As an optional implementation, step S3 further includes: Based on the physical imaging model, a nonlinear least squares spectral unmixing objective function is constructed for the full-band observed radiometric data at each pixel point, and the dye concentration vector and material roughness parameters are extracted by optimizing the solution. The specular highlight and geometric shadow separation and peeling operations are performed sequentially to calculate the spectral reflectance of the second fabric; Simultaneously, the dye concentration vector is directly substituted into the calculation of the spectral reflectance of the first fabric to obtain the noise-free spectral reflectance of the third fabric. The absolute difference between the spectral reflectance of the third fabric and the spectral reflectance of the second fabric is calculated and compared with a preset tolerance. When the absolute difference is less than the preset tolerance, the spectral reflectance of the third fabric is updated to the final spectral reflectance of the fabric. When the absolute difference is greater than or equal to the preset tolerance, the second fabric spectral reflectance is updated to the final fabric spectral reflectance.
[0013] As an optional implementation, step S4 specifically includes the following sub-steps: Step S41: Calculate the dynamic spectral component vector of the current state; Step S42: Set the total length of the sliding window, which is the sum of the lengths of the first and second sub-windows; Step S43: Based on the outer product of the current dynamic spectral component and its transpose, subtract the outer product of the dynamic spectral component and its transpose from the total length time backward from the current time, divide by the scalar after subtracting one from the total length, and recursively update the spectral covariance matrix of the previous time by adding and subtracting rank one. Step S44: Solve for each eigenvalue of the updated spectral covariance matrix, calculate the sum of squares of the differences between each eigenvalue and the reference value of 0.5, multiply by four and divide by the dimension to obtain the spectral drift index. Step S45: Compare and determine the magnitude of the spectral drift index calculated in real time with the preset control limit. When the spectral drift index is greater than the preset control limit, it is determined that the ambient light source has drifted, the spectral power distribution of the ambient light source is re-estimated, the Lagrange multiplier matrix included in the alternating direction multiplier algorithm in step S3 is cleared and reset, and the algorithm iteration calculation is restarted by returning to step S3. When the spectral drift index is less than or equal to the preset control limit, the current state is maintained.
[0014] As an optional implementation, step S5 specifically includes the following sub-steps: Step S51: Combine the final fabric spectral reflectance, standard D65 daylight spectral power distribution, and CIE standard observer color matching function integral to generate a standard intrinsic color card image; Step S52: The dye concentration vector corresponding to each substrate is compared with the corresponding unit absorption coefficient and scattering coefficient recorded in the pre-stored substrate dye physical spectrum database to derive the fabric dyeing sample formulation. The formulation includes the required dye mass and dye volume percentage. Step S53: When generating the re-rendered image, the extracted fabric spectral reflectance, material roughness parameters, target illumination spectral power distribution and target geometric angle are substituted into the physical imaging model to calculate the target wavelength radiance. The target wavelength radiance is multiplied by the camera's three-channel spectral response function and then numerically integrated in the wavelength integration domain, mapped to the standard three primary color space, and the clothing re-rendered image is output.
[0015] As can be seen from the above technical solutions, the embodiments of this application have the following advantages: This invention establishes a high-precision physical imaging mechanism by constructing a five-dimensional tensor bipartite graph and solving for the illumination-invariant bipartite graph structure matrix W. This is combined with the internal Kubelka-Munk mesoscopic dye mixing theory and the surface Ashikhmin-Shirley microscopic anisotropic BRDF model. This mechanism can completely eliminate interference from the strong highlights of silver, the anisotropic luster of satin, fabric wrinkles and shadows, and color casts from the imaging equipment. It fundamentally solves the industry pain point of traditional color matching methods, which often result in yellowing, dirtiness, or whitening of inherent colors under complex lighting conditions, achieving accurate inversion of high-purity inherent spectral reflectance.
[0016] By inversely calculating the dimensionless relative dye concentration vector through a physical imaging model and combining it with the unit absorption / scattering coefficients and inherent fixation rates from a pre-stored base dye spectral database, a formula for correcting feed quality directly applicable to physical production was established. This completely eliminates dyeing and mixing deviations caused by metamerism in traditional RGB / Lab color spaces, achieving seamless integration and millisecond-level high-precision export from hyperspectral images to actual industrial dyeing sample quality formulations.
[0017] This system pioneered an ambient light abrupt change perception and dual variable reset mechanism, ensuring the instantaneous convergence and robustness of the algorithm's online decoupling. By extracting dynamic spectral components and constructing an eigenvalue drift index for the spectral covariance matrix based on a sliding window rank-one update, it can achieve highly sensitive real-time monitoring of spectral shape changes and energy abrupt changes in ambient light sources. When a sudden change in illumination is detected to exceed the control limit, the system actively resets the Lagrange multiplier matrix of the ADMM algorithm and re-estimates the light source, cutting off the failure history gradients accumulated under the old constraints. This prevents the optimization algorithm from numerically diverging or getting trapped in local pseudo-minimal values when physical conditions change abruptly, ensuring millisecond-level real-time response and convergence of the global optimal solution in complex outdoor or dynamic lighting scenarios.
[0018] It possesses high-fidelity re-rendering capabilities with realistic physical luster and no metamerism distortion. Based on decoupled derived intrinsic spectral reflectance and 3D microscopic material roughness parameters, it can strictly follow the physical radiative transfer law to perform full-band spectral radiance calculation and three-channel response integration after inputting any target lighting spectrum and viewing angle. The output re-rendered image not only has a strong sense of three-dimensional wrinkles and realistic and natural Miao silver and satin luster, but also does not exhibit metamerism color distortion under any complex lighting conditions, providing strong technical support for the digital protection, intelligent color matching design, and high-fidelity e-commerce display of ethnic costumes. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0020] Figure 1 A flowchart illustrating an auxiliary generation method for ethnic costume color matching based on multi-scale feature fusion, provided in an embodiment of the present invention; Figure 2 Line graph showing the trend analysis of color matching re-rendering accuracy test of complex ethnic costume materials under different target light sources, provided in the embodiments of the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0022] Furthermore, the technical features in the various embodiments or individual embodiments provided in this application can be arbitrarily combined with each other to form a feasible technical solution. Such combination is not constrained by the order of steps and / or the structural composition mode, but must be based on the ability of those skilled in the art to implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0023] In the embodiments provided in this application, it should be understood that the disclosed methods and systems can be implemented in other ways. The system embodiments described below are merely illustrative. For example, the division of units and modules is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or modules can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling communication connection between the various components shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, and can be electrical, mechanical or other forms.
[0024] In addition, each functional unit in the various embodiments of this application can be integrated into a single processor, or each unit can be a separate device, or two or more units can be integrated into a single device; each functional unit in the various embodiments of this application can be implemented in hardware or in the form of hardware plus software functional units.
[0025] Those skilled in the art will understand that all or part of the steps of the following method embodiments can be implemented by program instructions and related hardware. The aforementioned program instructions can be stored in a computer-readable storage medium. When executed, the program instructions perform the steps of the following method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks. It should be understood that the use of terms such as "system," "device," "unit," and / or "module" in this application is merely to distinguish different components, elements, parts, sections, or assemblies at different levels. However, if other terms can achieve the same purpose, they can be replaced by other expressions.
[0026] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature marked "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" or "several" means two or more, unless otherwise explicitly specified. It should be understood that the structures, proportions, sizes, etc., depicted in the accompanying drawings are only for illustrative purposes and to aid those skilled in the art, and are not intended to limit the implementation conditions of this application. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in proportions, or adjustments to size, without affecting the effects and objectives of this application, should still fall within the scope of the technical content disclosed in this application.
[0027] If a flowchart is used in this application, it is used to illustrate the operations performed by the system according to embodiments of this application. It should be understood that the preceding or following operations are not necessarily performed in exact order. Instead, the steps can be processed in reverse order or simultaneously. Furthermore, other operations can be added to these processes, or one or more steps can be removed from them.
[0028] It should also be noted that, in this document, terms such as “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, such that an article or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such an article or device. Without further limitation, an element defined by the phrase “comprising one…” does not exclude the presence of other identical elements in the article or device that includes the aforementioned element.
[0029] like Figure 1 As shown, a method for assisting in the generation of ethnic costume color schemes based on multi-scale feature fusion includes the following steps: Step S1: Collect hyperspectral image data of ethnic costumes and construct a five-dimensional tensor bipartite graph based on it. The five-dimensional tensor bipartite graph includes a set of costume state nodes and a set of environment state nodes. Step S2: After mapping the clothing state node set and the environment state node set to the same spectral space, calculate the sampling spectral angle distance, solve the graph topological similarity matrix under simplex constraint and structural sparsity constraint, and obtain the bipartite graph structure matrix that is invariant across illumination by threshold truncation. Step S3: Based on the fixed constraints of the bipartite graph structure matrix, the first augmented graph matrix and the second mapping graph matrix are solved element by element using the alternating direction multiplier algorithm. The physical imaging model is constructed and the spectrum is unmixed. The dye concentration vector and material roughness parameters are extracted, the specular and shadow components are stripped, and the final fabric spectral reflectance is updated and calculated. Step S4: Extract the real-time dynamic spectral components, recursively update and calculate the spectral drift index using rank-one addition and subtraction, compare the spectral drift index with the preset control limit, and dynamically reset or maintain the state of the Lagrange multiplier matrix in the alternating direction multiplier algorithm based on the comparison result. Step S5: Generate a standard intrinsic spectral color card image based on the final fabric spectral reflectance, map the dye concentration vector to the pre-stored base dye spectral database, export the dye mass ratio formula for dyeing and sampling, input the target illumination and viewing angle, calculate the target wavelength radiance using the physical imaging model and perform color space integration, and output a re-rendered image of the clothing under the target illumination environment.
[0030] By constructing a five-dimensional tensor bipartite graph composed of clothing state node sets and environment state node sets, a unified modeling of the inherent attributes of ethnic clothing and environmental lighting information is achieved. Furthermore, combining graph topology optimization and alternating direction multiplier algorithms, efficient decoupling of environmental factors and inherent spectral characteristics of clothing is achieved under fixed bipartite graph structure constraints. A physical imaging model is established by integrating the Kubelka-Munk dye mixing model and the microscopic anisotropic bidirectional reflectance distribution function, enabling joint inversion of fabric spectral reflectance, dye concentration, and material parameters. Simultaneously, a dynamic spectral drift monitoring mechanism detects real-time changes in the environmental spectrum, adaptively resetting optimization constraints when lighting changes abruptly, improving the solution stability and robustness under complex dynamic lighting conditions. Finally, a standard inherent spectral color card, dyeing quality ratio formula, and high-fidelity re-rendered images under target lighting conditions are generated, effectively reducing the impact of environmental lighting, highlights, and shadows on the color matching results of ethnic clothing, improving the accuracy of inherent color extraction, the accuracy of dyeing formula generation, and the realism of re-rendering across lighting scenarios, providing reliable technical support for the digital protection, color matching design, and intelligent dyeing of ethnic clothing.
[0031] In one embodiment of the present invention, in step S1, hyperspectral image data of ethnic costumes under multi-time period illumination environments are collected, and the dimensions of the five-dimensional tensor specifically include: The dimensions include the horizontal axis of the image space, the vertical axis of the image space, the sampling point dimension of the spectral wavelength, the geometric angle dimension of illumination and viewing angle, and the time slice dimension of multi-time period acquisition.
[0032] In one specific embodiment of the present invention, hyperspectral image data of ethnic costumes are collected. These are hyperspectral images of multi-slice scenes, with a wavelength range covering 380nm to 780nm, a sampling interval of 10nm, and a spectral wavelength sampling point dimension of 41.
[0033] In one embodiment of the present invention, in step S2, the node feature vector of the clothing state node set is composed of a concatenation of a base dye concentration vector, a microscopic material parameter vector, and a cultural semantic feature vector. Among them, the cultural semantic feature vector is used to provide edge prior constraints for the topological connection of clothing embroidery patterns in the projection space learning, and does not directly participate in the physical spectral radiation calculation; The node feature vectors of the environmental state node set are composed of the cascaded vectors of the ambient light source spectral power distribution, the incident light angle vector, the spectral response function vector of the imaging device, and the nonlinear correction feature vectors of the sensor lookup table.
[0034] In a specific embodiment of the present invention, the clothing state node set includes a dye concentration vector, a material parameter vector, and a cultural semantic feature vector. The dye concentration vector is the dimensionless relative concentration at pixel (x,y) of the base dyes indigo, cinnabar, madder, gamboge, and black ink. Specifically, in the offline stage, the above five natural dyes are used to manually dye and sample standard undyed fabrics according to known mass ratios (e.g., pure color, 1:1 mixture, 1:2 mixture) to prepare sample color cards. The absorption-to-scattering ratio of the undyed fabric and the unit absorption-to-scattering ratio of the five dyes are measured using a standard spectrophotometer (e.g., X-RiteCi7800). In the initial stage of online acquisition, after acquiring images using a hyperspectral camera, the observed reflectance is converted into the K / S ratio according to the Kubelka-Munk formula. The initial 5-dimensional concentration vector of each pixel is calculated by inverse inversion using a nonlinear least squares unmixing algorithm. Material parameters include the roughness of the warp tangent, the roughness of the weft subtangent, and the perpendicular incident Fresnel reflectance. Specifically, in a laboratory environment, clothing material samples (such as Miao silver jewelry, satin, and linen) are placed in a variable angle photometer with a fixed light source. The reflected radiance is measured at different observation angles (such as 0°, 15°, 30°, 45°, and 60°). The multi-angle measured data are input into the specular reflection formula of the Ashikhmin-Shirley model. The Levenberg-Marquardt nonlinear optimization algorithm is used to fit the roughness parameters of the warp and weft that best match the anisotropic specular distribution of the material. When the incident angle is 0° (perpendicular incidence), the relative reflectance of the material to a known calibration white board is measured, and the perpendicular incident Fresnel reflectance is directly obtained.
[0035] The cultural semantic feature vector includes 32-dimensional embroidery pattern edge prior features, specifically including clothing embroidery patterns, edge topology, and totem prior features, used to constrain the boundary between the embroidery and the base fabric from being mistakenly smoothed. For the acquired hyperspectral images, spatial high-resolution single-band images or RGB composite images are taken, and traditional multi-scale edge filters (such as Gabor filter group combined with HOG gradient direction histogram) are used to extract the spatial edge and topology of the embroidery pattern. The extracted high-dimensional spatial pattern features are compressed and reduced to a fixed 32-dimensional vector through principal component analysis (PCA) and then L2 normalized.
[0036] The total dimension of the clothing status node set is 40.
[0037] The environmental state node set includes an ambient light source spectral power distribution vector (41-dimensional), an incident angle vector (2-dimensional), a device spectral response vector (41-dimensional), and a sensor lookup table nonlinear correction feature vector (16-dimensional), for a total of 100 dimensions. The 41-dimensional ambient light source spectral power distribution vector represents the absolute value of the ambient light source's irradiance in the range of 380nm to 780nm, with a sampling interval of 10nm and a total of 41 points. The 2D incident angle vector is the polar angle (incident angle) and azimuth angle of the incident ray relative to the normal of the clothing surface; The 41-dimensional device spectral response vector is the product of the photon conversion efficiency and transmittance of the hyperspectral camera sensor and optical lens at 41 points in the full 380nm~780nm band. The 16-dimensional sensor lookup table (LUT) nonlinear correction eigenvector represents the nonlinear hardware correction parameters for CMOS / CCD sensors under different exposure times, gains, dark currents, and edge illumination attenuation (vignetting).
[0038] In one embodiment of the present invention, step S2, obtaining the bipartite graph structure matrix specifically includes: By projecting linear spectral features, the clothing state node set and the environment state node set are mapped to the same-dimensional spectral feature space, respectively. The inverse cosine of the cosine of the vector angle between the two vectors after mapping is calculated as the physical distance of the sampled spectral angle. In a specific embodiment of the present invention, by mapping the first node matrix Perform matrix multiplication with the clothing state node set, and map the second node to the matrix. Matrix multiplication with the environmental state node set maps both the clothing state node set and the environmental state node set to a unified 41-dimensional spectral feature space. The first node mapping matrix is structurally composed of three sub-matrices concatenated according to the dimensions of the input features, including: The base matrix of the dye spectrum, the nth column of which (n=1, 2, 3, 4, 5) is the ratio curve vector of the unit spectral absorption to scattering ratio of the nth base dye (indigo, cinnabar, madder, gamboge, black ink) measured under a spectrophotometer. The material physical correction sub-matrix, through microscopic angle-modulated photometry experimental data, uses principal component analysis (PCA) to extract the top three spectral feature vectors that control the attenuation of anisotropic spectra at different wavelengths; The cultural semantic projection sub-matrix is learned from offline training data: High-resolution images of embroidery patterns from different ethnic costumes were collected. Gabor filter banks were used to extract texture responses in different directions. HOG gradient orientation histograms were combined to extract the topological features of the pattern edges. The texture features and edge features were concatenated to form high-dimensional cultural semantic features. PCA was used for dimensionality reduction, retaining principal components with a cumulative contribution rate of over 95%. The projection matrix was learned using a least-squares objective to ensure that the projected cultural semantic features maintain maximum correlation with the corresponding spectral space. After training convergence, a fixed cultural semantic projection sub-matrix was obtained and saved for use in the online phase.
[0039] The second node mapping matrix is structurally composed of four sub-matrices, including: The light source spectral perception submatrix is an initial 41×41 unit diagonal matrix, or a diagonal matrix weighted based on the human visual standard observer response function.
[0040] The geometric angle amplitude modulation submatrix expands the 2D incident angle into a Lambert cosine attenuation factor at 41 wavelengths. It is composed of discrete sampling of Lambert cosine law and Fresnel angle attenuation polynomial at 41 wavelength points, with each row corresponding to the angle attenuation coefficient at one wavelength. The device response matching sub-matrix consists of a diagonal matrix whose diagonal elements are the reciprocals of the quantum photosensitive efficiencies of each wavelength of the hyperspectral camera as determined in the laboratory.
[0041] The sensor hardware correction submatrix maps the 16-dimensional LUT nonlinear correction parameters to full-band gain compensation, and is composed of the sampling coefficients of the exposure-gain polynomial basis function at 41 wavelengths: Multiple exposure times were set, such as 2ms, 5ms, 10ms, 20ms, and 40ms, and multiple analog gains were set, such as 1x, 2x, 4x, and 8x. The response in the 380nm to 780nm band was collected using a standard integrating sphere. The response error of each wavelength under different exposure and gain conditions was statistically analyzed. The exposure-gain response curve was fitted using a third-order polynomial. The fitted polynomial was discretized at 41 sampling wavelengths to construct a 41-dimensional wavelength compensation coefficient, forming a sensor hardware correction sub-matrix.
[0042] Within the spectral feature space, the inverse cosine of the cosine of the angle between two vectors is calculated as the physical distance of the sampled spectral angle, and then arranged by node index to construct a dimension-... Sampling spectral angle physical distance matrix ,in The total number of clothing nodes. This represents the total number of environmental nodes. Ignoring physical decoupling parameters, a sparse graph topology optimization objective function is constructed based solely on observed changes. The construction process of the sparse graph topology optimization objective function includes: The graph transmission reconstruction error of the observed changes in clothing state nodes and the driven changes in environmental state nodes under multiple time slices is used as the data fitting term. It is combined with the trace penalty term based on the physical distance of the sampling spectral angle, the L1 norm sparse constraint term of the graph topological similarity matrix, and the Frobenius norm regularization term of the weighted graph structure matrix for weighted accumulation to construct the sparse graph topology optimization objective function. In one specific embodiment of the present invention, during the offline phase, complex physical decoupling parameters are ignored, and a sparse graph topology optimization objective function is constructed solely based on the observed changes. Its mathematical expression is: ; in, This represents the objective function value for sparse graph topology optimization. The second mapping matrix to be optimized. Let be the graph topological similarity matrix to be optimized. The dimension of the l-th slice is... The matrix of observed feature changes of clothing state nodes. The environment dimension of the l-th slice is... The matrix of changes in the driving characteristics of state nodes. and are the transposes of the first and second node mapping matrices of dimensions 40×41 and 100×41, respectively, and ⊙ is the element-wise matrix multiplication operator. Denotes the Frobenius norm of a matrix. This is the physical distance matrix of the sampling spectral angle. The trace operator represents a matrix. The hyperparameter scalar representing the physical distance penalty term for spectral angle. The hyperparameter scalar representing the L1 sparse regularization penalty term. This represents the sum of the absolute values of all elements in matrix S. The hyperparameter scalar represents the regularization of the Frobenius norm of the weighted graph structure matrix; Let represent the observed feature change matrix of the clothing state node in the l-th slice. Specifically, in the acquired multi-slice hyperspectral images, the time slice under standard daylight conditions is set as the reference time slice. For any non-reference time slice l, for each spatial pixel node, the clothing inherent feature vector at the current time is subtracted from the clothing inherent feature vector at the reference time according to their components. This yields a 40-dimensional differential observation vector composed of the concatenation of the dye reflection amplitude modulation response difference, the micro-highlight shadow reflection component difference, and the spatial gradient difference of the embroidery pattern topological edge. The 40-dimensional differential observation vectors of all inherent pixel nodes are stacked row-wise to construct an inherent node observed feature change matrix with the number of rows equal to the total number of inherent nodes and 40 columns. ; Let represent the driving feature change matrix of the l-th slice environment node. Specifically, it is obtained as follows: For any non-reference time slice l, for each environment sensor node, subtract the current environmental driving feature vector from the reference time's environmental driving feature vector component by component. This yields a 100-dimensional differential driving vector composed of the cascaded differences in light source spectral power distribution drift, incident light geometric position variation, device hardware response drift, and sensor lookup table nonlinear response correction. Stack the 100-dimensional differential driving vectors of all environment nodes row-wise to construct an environment node driving feature change matrix with the total number of rows and 100 columns. By constructing the differential change matrix and This eliminates static texture background and sensor DC bias noise, transforming nonlinear physical imaging into linear differential map transmission; Referring to Table 1, the hyperparameters for sparse graph topology optimization are ( , , Grid search and optimization process data table: Table 1
[0043] After grid search and multi-objective balancing, the optimal solution is determined. =0.15, =0.05, =0.010, at which point the sparsity of the bipartite graph reaches 81.5%, maintaining the backbone connection across the illumination graph structure, and the average number of convergence iterations of ADMM is reduced to 42.
[0044] The graph topological similarity matrix included in the objective function of sparse graph topology optimization is updated by the proximal gradient descent method, and the updated vector is projected onto the probability simplex space where the sum of the elements is one and the elements are non-negative.
[0045] The graph topological similarity matrix S is updated using proximal gradient descent and projected onto a probabilistic simplex, where the constraints of the probabilistic simplex space are: the row vectors of S satisfy... and .
[0046] In one embodiment of the present invention, a threshold truncation process is performed on the updated converged graph topological similarity matrix, the logic of which includes: When an element of the graph topological similarity matrix is greater than or equal to a preset truncation threshold, the edge weight is retained; that is, the elements of the bipartite graph structure matrix are set to... ; If an element in the graph topological similarity matrix is less than a preset truncation threshold, that element is set to zero; the edge is determined to be noise interference and physical edge trimming is performed, letting... ; Generate a sparse bipartite graph structure matrix.
[0047] In one specific embodiment of the present invention, after the solution converges, The edge weights are removed and reduced to zero by setting a preset soft threshold truncation parameter. This preserves the edge weight information and achieves structural sparsity, generating a bipartite graph structure matrix that is invariant across illumination. The structure is then locked for online decoupling in step S3.
[0048] In one embodiment of the present invention, step S3, which involves solving the first augmented graph matrix and the second mapping graph matrix of the bipartite graph structure matrix element-wise using the alternating direction multiplier algorithm, includes: With the bipartite graph structure matrix fixed, construct an augmented Lagrange function that includes the first augmented graph matrix, the second mapping graph matrix, and the Lagrange multiplier matrix; In one specific embodiment of the present invention, the bipartite graph structure matrix W is locked, and an equality constraint is established by introducing the first augmented graph matrix A. Constructing an augmented Lagrange objective function Its mathematical expression is: ; in, The first augmented graph matrix derived from the Alternating Direction Multiplier (ADMM) decomposition. Let be the second mapping graph matrix to be solved. To lock the unchanging bipartite graph structure matrix, For Lagrange multiplier matrices, This represents the matrix of observed feature changes for the clothing state node of the l-th slice in real-time online sampling. This represents the matrix of driving feature changes for the l-th slice of the environment state node sampled in real-time online sampling. This represents the sparse regularization penalty hyperparameter. The scalar parameter representing the quadratic penalty term in the alternating direction multiplier algorithm; It should be noted that the sparse regularization penalty hyperparameter The physical meaning of the weighted graph structure matrix, Frobenius norm, and regularization hyperparameter scalar of the objective function for sparse graph topology optimization The difference lies in the fact that, during the online decoupling phase, the topology is already locked as a bipartite graph structure matrix W, therefore the regularization term is derived from... Natural evolution into... Energy constraints are used to ensure numerical stability when solving the second mapping matrix B online element-wise.
[0049] Based on the augmented Lagrange function, the least-squares solution of the first augmented graph matrix, the closed-form solution of the second mapping graph matrix, and the recursive update of the Lagrange multiplier matrix are solved alternately, specifically including: With the second mapping matrix and the Lagrange multiplier matrix fixed, the first augmented graph matrix is updated using the least squares method; Specifically, in the (k+1)th iteration, the second mapping matrix B(k) and multiplier matrix M(k) obtained in the kth iteration are fixed, and the partial derivative of the augmented Lagrangian function with respect to the first augmented matrix A is calculated and the derivative is set to... Zero: ; Export the first augmented graph matrix The least squares closed-form update formula: ; Where I represents the identity matrix for dimension matching, The matrix inversion operator is represented, and k represents the counter exponent for the iterative steps of the alternating direction multiplier algorithm. This represents the first graph estimation matrix obtained in the (k+1)th iteration. This represents the matrix of observed feature changes for clothing status nodes sampled in real time. This represents the matrix of driving feature changes of environmental state nodes sampled in real time. This represents the second mapping matrix in the k-th iteration. Let represent the scaling Lagrange multiplier matrix for the k-th iteration. This embodiment is preferably... ; With the first augmented graph matrix and the Lagrange multiplier matrix fixed, solve for the scalar elements of the second mapping graph matrix element by element, using the following calculation rules: The numerator is the product of the coefficient of the alternating direction multiplier algorithm penalty term and the sum of the corresponding elements of the first augmented graph matrix and the multiplier matrix. The denominator is the sum of twice the sparse penalty coefficient and the coefficient of the alternating direction multiplier algorithm penalty term, multiplied by the corresponding element of the graph structure matrix, and updated by element-wise scalar division. Specifically, in the (k+1)th iteration, the updated first augmented graph matrix is fixed. With multiplier matrix Because the Adamar product is element-wise decoupling, the augmented Lagrangian function is applied to the scalar element in the i-th row and j-th column of the second mapping matrix B. Taking the partial derivative and setting it equal to zero, its mathematical expression is: ; when At that time, eliminate non-zero factors on both sides. The elements of the second mapping graph matrix are derived through sorting and derivation. Element-wise scalar update closed-form solution: ; in, This represents the scalar element value in the i-th row and j-th column of the second mapping matrix B after the (k+1)-th iteration update. Representation matrix The value of the element in the i-th row and j-th column. Represents the multiplier matrix The value of the element in the i-th row and j-th column. This represents the value of the element in the i-th row and j-th column of the locked graph structure matrix W; when When this occurs, it indicates that the edge weights of the bipartite graph structure matrix have been truncated and removed. The optimization variable at that location is then fixed at zero, and the settings are directly applied. =0; By updating all elements of the second mapping graph matrix element by element according to the above rules, the second mapping graph matrix for the (k+1)th iteration is constructed. .
[0050] Update the Lagrange multiplier matrix based on the residual of multiplying the graph structure matrix by the first augmented graph matrix and the second mapping graph matrix; Specifically, using the updated first augmented graph matrix With the second mapping matrix Update the recursive Lagrange multiplier matrix according to the dual ascent rule. Its mathematical expression is: ; When the alternating solution converges, stop the iteration and output the solved first augmented graph matrix and second mapping graph matrix; otherwise, stop the iteration counter. .
[0051] Calculate the residual of the original problem in the current iteration. With dual problem residual When both the residuals of the original problem and the residuals of the dual problem are less than the preset convergence threshold scalar, the alternating direction multiplier algorithm is considered to have converged, the iteration stops, and the first augmented graph matrix of the solution is output. With the second mapping matrix ; Otherwise, set the iteration counter Then return to continue iteratively solving and updating alternately.
[0052] The preferred range for the preset convergence threshold scalar is: When the convergence threshold scalar is greater than Premature termination of the iteration can lead to insufficient accuracy in solving the second mapping matrix B, causing residual fluctuations in subsequent dye concentration unmixing. When the convergence threshold scalar is greater than At that time, due to the lower limit of hardware noise, the algorithm will oscillate at small residuals, increasing the time for meaningless iterations.
[0053] In one embodiment of the present invention, step S3, constructing the physical imaging model specifically includes: Combining the Kubelka-Munk dye mixing model with the microscopic anisotropic bidirectional reflectance distribution function, the observed total spectral radiance is defined as the product of the device spectral response function, the environmental spectral power distribution irradiance, and the reflected radiation term. In one specific embodiment of the present invention, the physical imaging model characterizes the observed total spectral radiance as an amplitude-modulated sum of the internal diffuse reflection radiation component and the surface specular highlight reflection component, the specific physical expression of which is radiative transfer. for: ; in, Indicates the shooting device at the pixel level Location, wavelength is Geometric angle is The total spectral radiance scalar obtained from the time observation, Represents the two-dimensional pixel coordinates in the spatial plane of a hyperspectral image. This represents a spectral wavelength variable covering the range of 380nm to 780nm, with a sampling interval of 10nm and a total of 41 sampling points. A unit three-dimensional vector representing the direction of the incident ray. A unit three-dimensional vector representing the direction of the line of sight. Indicates the ambient light source at wavelength The spectral power distribution at a given location is a scalar of SPD irradiance. Represents pixels The unit vector of the three-dimensional normal to the surface of the clothing at that location. The dot product of the surface normal vector and the incident ray vector, i.e., the cosine of the angle of incidence, is used to characterize the shadow amplitude component generated by macroscopic wrinkles and geometric undulations in clothing. Pi is a constant. Indicates the fabric at the pixel. At wavelength The spectral reflectance of the first fabric without highlights or shadows is determined by the nested Kubelka-Munk two-stream radiative transfer theory. This represents the anisotropic specular reflectance function generated by the micro-geometry of the fabric surface.
[0054] in, The response scalar represents the product of the transmittance of the optical system of a hyperspectral camera and the photoelectric quantum conversion efficiency of the sensor chip, and is used to eliminate wavelength-selective color bias in the hardware of the imaging device itself; In this embodiment, Specific values within the 380nm to 780nm wavelength range were obtained through offline spectral calibration: a standard integrating sphere was illuminated with monochromatic light of continuously adjustable wavelength output from a monochromator. The absolute irradiance of the monochromatic light at each wavelength was measured using a high-precision spectroradiometer. Simultaneously, the original grayscale value of the hyperspectral camera at the corresponding wavelength, after deducting dark current, was recorded. The grayscale value of the response was divided by the product of the corresponding absolute irradiance and the exposure time, and then normalized to derive a fixed 41-dimensional device spectral response function vector. And store it in the system hardware parameter library for later use.
[0055] The reflected radiation term is the sum of the diffuse reflection radiation component and the specular highlight reflection component; The diffuse reflectance component is the product of the spectral reflectance of the first fabric and the cosine of the normal incident angle divided by pi. The spectral reflectance of the first fabric is calculated by the absorption and scattering ratio, and the absorption and scattering ratio satisfies the sum of the absorption coefficients of the undyed base fabric and each base dye in proportion to their concentrations divided by the sum of the scattering coefficients. In this physical imaging model, the spectral reflectance of the first fabric is... This can be expressed using the Kubelka-Munk nonlinear absorption-scattering two-current theory as follows: ; Total absorption and scattering ratio of fabric The physical law of nonlinear linear superposition of undyed base fabric with five base dyes (K=5 indigo, cinnabar, madder, gamboge, and jet black) in concentration ratio is satisfied: ; in, and These represent the wavelengths of the undyed fabric substrate, pre-calibrated using a spectrophotometer. The unit absorption coefficient and unit scattering coefficient at that location and These represent the wavelengths of the nth base dye as measured by pre-calibration. The standard unit absorption coefficient and standard unit scattering coefficient are given at n=1 for indigo, n=2 for cinnabar, n=3 for madder, n=4 for gamboge, and n=5 for jet black. This indicates the nth base dye at the pixel. The dimensionless relative concentration scalar at the location, the dimensionless relative concentration scalars of these 5 dyes are cascaded together in sequence to form the pixel. 5-dimensional dye concentration vector at the location ; The specular highlight reflection component is obtained by using a microscopic anisotropic bidirectional reflection distribution function, which is calculated using the surface fabric warp tangent roughness coefficient, weft secondary tangent roughness coefficient, the cosine of the angle between the half-angle vector and the normal vector, and the Fresnel reflection coefficient. This function is used to fit the metallic highlight and satin anisotropic reflection.
[0056] Specular specular reflection function The Ashikhmin-Shirley microanisotropic model was used to accurately fit the strong gold reflection of Miao silver and the anisotropic luster of silk satin along the warp and weft directions. Its mathematical expression is as follows: ; ; ; in, This represents the 3D microscopic material parameter vector to be extracted. This indicates the roughness of the warp tangent on the surface of the garment. This represents the surface roughness of the weft subtangent of the garment, where u and v represent the unit vectors of the surface tangent and subtangent determined by the direction of the embroidery pattern, respectively, satisfying the following conditions: orthogonal relation This represents the half-angle unit vector resulting from the combination of the incident light direction and the observation direction. Represents Fresnel reflectivity based on perpendicular incidence Calculated Fresnel reflection amplitude modulation coefficient.
[0057] In one embodiment of the present invention, step S3 further includes: Based on the physical imaging model, a nonlinear least squares spectral unmixing objective function is constructed for the full-band observed radiometric data at each pixel point, and the dye concentration vector and material roughness parameters are extracted by optimization solution. In one specific embodiment of the present invention, a nonlinear least-squares spectral unmixing objective function is constructed for the full-band observed radiometric data at each pixel (x,y) based on a physical imaging model; During the solution process, the Levenberg-Marquardt nonlinear optimization algorithm with boundary constraints is used for iterative solution. The theoretical radiance calculated by substituting the parameters to be determined into the physical imaging model is denoted as . By minimizing the actual observed radiance Compared with theoretical radiance The residual energy is solved; The mathematical expression for the nonlinear least-squares spectral unmixing objective function is: ; The constraints are: ; in, This represents the target residual energy for spectral unmixing. This indicates that the parameters to be determined are... , , The theoretical radiation value obtained by substituting it into the physical imaging model , express The square of the norm; The final convergent solution yields a 5-dimensional dye concentration vector at pixel (x, y). and 3D microscopic material parameter vector .
[0058] The specular highlight and geometric shadow separation and peeling operations are performed sequentially to calculate the spectral reflectance of the second fabric; Specifically, the separation and peeling operation of specular highlights includes: Extracted material roughness parameters Substituting the Ashikhmin-Shirley microanisotropy model, calculate the specular reflection radiance contribution of this pixel at various wavelengths. Its mathematical expression is: ; From the original observed total radiance Subtract the contribution of specular reflection radiance By stripping away strong high-intensity interference, a pure diffuse reflection radiance signal is obtained. ; The separation and stripping operation of geometric shadows includes: Eliminate ambient light spectrum Equipment response and the cosine shadow term of the normal incident angle generated by the geometric undulations of the fabric. The multiplicative amplitude modulation effect, through the normalization by division using the following formula, yields the ideal second fabric spectral reflectance, which is the pure fabric spectral reflectance free from any environmental highlights and shadows: ; Simultaneously, the dye concentration vector is directly substituted into the calculation of the spectral reflectance of the first fabric to obtain the noise-free spectral reflectance of the third fabric. The maximum absolute difference between the spectral reflectance of the third fabric and the spectral reflectance of the second fabric at all sampling points in the whole band is calculated and compared with the preset tolerance. When the absolute difference is less than the preset tolerance, the spectral reflectance of the third fabric is updated to the final spectral reflectance of the fabric. If the unmixing model is determined to be well fitted, the ideal noise-free spectral reflectance of the third fabric is updated to the final spectral reflectance of the fabric. When the absolute difference is greater than or equal to the preset tolerance, the second fabric spectral reflectance is updated to the final fabric spectral reflectance. If complex patterns and special materials are detected in a local area, the second fabric spectral reflectance after removing highlights and shadows is updated to the final fabric spectral reflectance to ensure that complex materials and embroidery details are not overly smoothed.
[0059] In this embodiment, the preset tolerance is a dimensionless spectral reflectance residual threshold, which ranges from 0.01 to 0.05, corresponding to a full-band spectral reflectance error range of 1% to 5%, and is preferably set to 0.02. Calculate the maximum absolute residual between the spectral reflectance of the third fabric and the spectral reflectance of the second fabric at all sampling points across the entire band. When the residual is less than the preset tolerance, it is determined that the dye concentration calculation result is in high agreement with the physical imaging model. The ideal noise-free spectral reflectance of the third fabric is then updated to the final fabric spectral reflectance output. When the residual is greater than or equal to the preset tolerance, the second fabric spectral reflectance after the stripping of highlights and shadows is updated to the final fabric spectral reflectance output after smoothing and filtering, so as to ensure that extremely complex material and pattern details are not accidentally smoothed.
[0060] It should be noted that this invention does not simply employ the traditional anisotropic BRDF model, but rather constructs a physical imaging model that deeply integrates the isotropic absorption / scattering transport theory within the Kubelka-Munk with the surface anisotropic micro-geometric BRDF theory. This model achieves physical decoupling between mesoscopic dye nonlinear mixing and microscopic surface geometric reflection, fundamentally solving the problems of color whitening caused by specular interference and the inability to mix dyes due to nonlinear color mixing.
[0061] In one embodiment of the present invention, step S4 specifically includes the following sub-steps: Step S41: Calculate the dynamic spectral component vector of the current state; The column vector of driving feature changes of the environment node at time k+1. Multiplying by the second mapping matrix on the left yields a 100-dimensional real-time dynamic spectral component vector. ; Step S42: Set the total length of the sliding window, which is the sum of the lengths of the first and second sub-windows; Set the sliding window to the length of the first child window Length of the second child window The total sample length of the sliding window is composed of additions. ; Step S43: Based on the outer product of the current dynamic spectral component and its transpose, subtract the outer product of the dynamic spectral component and its transpose from the total length time backward from the current time, divide by the scalar after subtracting one from the total length, and recursively update the spectral covariance matrix of the previous time by adding and subtracting rank one. To avoid performing repeated matrix multiplication calculations on all historical data within the sliding window, a rank-one addition / subtraction correction rule is adopted to perform unbiased recursive updates on the spectral covariance matrix at time k+1: ; in, This represents the spectral covariance matrix with a dimension of 100×100 obtained at time k+1. This represents the spectral covariance matrix with a dimension of 100×100 that is retained from the previous state at time k. This represents the total sample length of the sliding window. This represents the normalized scalar divisor for the unbiased covariance estimate. This represents the dynamic spectral component vector at time k+1. Let represent a 100×100 positive rank-one outer product matrix formed by multiplying the dynamic spectral component vector at time k+1 of the newly entered window with its transpose. This represents the matrix transpose operator. The matrix represents a negative rank-one outer product matrix of dimension 100×100 formed by multiplying the historical dynamic spectral component vector of the sliding window backwards w sampling points (i.e., at time k-w+1) with its transpose.
[0062] By using the above rank-one addition and subtraction recursion, the system can achieve real-time dynamic updating of the covariance matrix with low computational complexity.
[0063] Step S44: Solve for each eigenvalue of the updated spectral covariance matrix, calculate the sum of squares of the differences between each eigenvalue and the reference value of 0.5, multiply by four and divide by the dimension to obtain the spectral drift index. The updated spectral covariance matrix at time k+1 Perform eigenvalue decomposition to obtain 100 spectral energy eigenvalues. Using the baseline distribution point (set to 0.5) as the central reference point, calculate the scalar spectral drift index based on the eigenvalue spatial offset. Its mathematical expression is as follows: ; in, A dimensionless scalar spectral drift index that represents the degree of drastic anisotropy fluctuations in the spectral energy distribution of current ambient light sources. =100 represents the eigenvector dimension, and 0.5 represents the baseline distribution point of the principal eigenvalues of the ideal steady-state normalized spectral covariance. It represents the sum of squared variances of all eigenvalues deviating from the steady-state reference point.
[0064] Step S45: Compare and determine the magnitude of the spectral drift index calculated in real time with the preset control limit. Based on the hyperspectral test set data under historical normal illumination fluctuation conditions, and based on the principle of three times the standard deviation statistical control limit, the preset control limit scalar threshold was set to 0.15.
[0065] When the spectral drift index exceeds the preset control limit, it is determined that the ambient light source has drifted, the spectral power distribution of the ambient light source is re-estimated, the Lagrange multiplier matrix included in the alternating direction multiplier algorithm in step S3 is cleared and reset, and the algorithm iteration calculation is restarted by returning to step S3. If a drastic shift in the spectral power distribution (SPD) of the current ambient light source is detected, such as due to cloud cover, light source switching, or sudden changes in strong outdoor light, the spectral power distribution of the ambient light source is re-estimated. The spectral power distribution vector of the ambient light source at the current moment is re-measured and updated using a standard diffuse whiteboard or a spectroradiometer. Due to the sudden change in the physical constraints of the ambient light, the equality constraint A=B⊙W corresponding to the Lagrange multiplier matrix accumulated by the Alternating Direction Multiplier Algorithm (ADMM) in the previous round has become invalid. Directly using the old multiplier matrix will lead to divergence in the optimization calculation. Therefore, all elements of the Lagrange multiplier matrix are forcibly cleared and reset to an all-zero matrix. After resetting the Lagrange multiplier matrix and updating the spectral power distribution vector of the ambient light source, the Alternating Direction Multiplier Algorithm in step S3 is restarted to ensure that the algorithm quickly converges to the new global optimum under the new physical constraints of the illumination.
[0066] When the spectral drift index is less than or equal to the preset control limit, maintain the current state.
[0067] When the spectral drift index is less than or equal to the preset control limit, it is determined that the current ambient light is in a stable state or there are only minor noise fluctuations. The current decoupling state is maintained, and the light source re-estimation and multiplier reset are not triggered. The Lagrange multiplier matrix from the previous moment is used to smoothly update the parameters to ensure the continuity and real-time performance of the color matching decoupling process.
[0068] It should be noted that during online decoupling, the spectral power distribution (SPD) of the ambient light source is prone to dynamic drift due to factors such as cloud cover, changes in the sun's angle, or dimming of artificial light sources. If the Lagrange multiplier matrix from the previous decoupling round is used after the ambient light source changes, the Alternating Direction Multiplier (ADMM) algorithm will diverge or the decoupling results will be severely distorted. The recursive weighted sliding window dissimilarity monitoring mechanism constructed in this embodiment can solve the above problems. It breaks the limitation of traditional algorithms that rely solely on passive iteration of data residuals. It directly uses the ambient light physical drift index as the reset trigger condition for the dual variable of the optimization algorithm. When the spectral drift index is detected to exceed the preset control limit, the Lagrange multiplier matrix is forcibly cleared and reset. This actively cuts off and removes the failed historical dual gradients accumulated under the old lighting physical constraints, avoiding numerical divergence or getting trapped in local pseudo-minimal values caused by the ADMM algorithm using the old multipliers after a sudden change in physical conditions. This ensures that the algorithm can instantly reconverge to the global optimum under the new lighting constraints.
[0069] Unlike traditional, crude methods that only monitor changes in scalar total light intensity, this mechanism performs eigenvalue space decomposition on the spectral covariance matrix derived from the environmental state node. It constructs a spectral drift index using the sum of squared quadratic residuals of spectral eigenvalues deviating from the ideal variance benchmark. This index exhibits extremely high physical sensitivity to changes in the spectral shape and energy intensity fluctuations of ambient light. Simultaneously, by combining the rank-one addition and subtraction correction rules of the sliding window, it avoids the repeated calculation of covariance from historical data, significantly reducing the computational complexity of full-band spectral drift detection, greatly saving computing power, and ensuring millisecond-level real-time response for online color matching decoupling.
[0070] By setting statistical control limits based on three standard deviations, this mechanism endows the color matching generation system with adaptive robustness: when ambient light fluctuates slightly, it maintains smooth recursion of the multiplier matrix, ensuring the continuity of intrinsic color extraction and dye concentration calculation; when ambient light changes abruptly, it instantaneously resets the multipliers and triggers light source re-evaluation. This mechanism fundamentally solves industry pain points such as yellowing or smudged intrinsic color card extraction caused by dynamic drift of ambient light, mapping deviation of actual dyeing formulas, and metamerism color distortion in re-rendered images, significantly improving the practicality and reliability of color matching-assisted generation methods in complex dynamic lighting scenarios.
[0071] In one embodiment of the present invention, step S5 specifically includes the following sub-steps: Step S51: Combine the final fabric spectral reflectance, standard D65 daylight spectral power distribution, and CIE standard observer color matching function integral to generate a standard intrinsic color card image; The final fabric spectral reflectance is obtained through decoupling in step S3. After eliminating interference from ambient highlights, wrinkle shadows, and color cast from the imaging equipment, a standard physically intrinsic spectral color chart image is generated by combining the CIE standard D65 daylight spectral power distribution with the CIE 1931 standard chromaticity observer spectral color matching function. The fabric spectral reflectance at pixel (x,y) is calculated using a definite integral within the wavelength range of 380nm to 780nm, deriving the CIE-XYZ tristimulus value, whose mathematical expression is: ; ; in, =10nm represents the spectral sampling interval scalar. This represents the final spectral reflectance of the fabric. This indicates that standard D65 sunlight is at a wavelength of Scalar of spectral power distribution at , , and These represent the wavelengths of the CIE 1931 standard colorimetric observer. The three scalar functions for matching the red, green, and blue spectra at that location. This represents the normalization constant factor used to normalize the white point stimulus values to 100. , and These represent the CIE-XYZ tristimulus scalar values at pixel (x, y).
[0072] Using the CIE-XYZ standard color transformation matrix, the derived CIE-XYZ tristimulus values are linearly mapped to the standard red, green, and blue primary color space, resulting in a linear color component set. Nonlinear Gamma correction is then performed on this linear color component set. The pixel grayscale value component set is obtained, and its mathematical expression is: ; ; in, This represents the set of pixel grayscale value components derived after nonlinear Gamma correction. A general scalar variable representing any color channel in a linear color component set. This represents the scalar value of the final displayed pixel component corresponding to the color channel in the pixel grayscale value component set, calculated as follows. Mapped to an 8-bit integer space of [0,255], the output is a standard intrinsic spectral color chart image that completely eliminates the highlights of silver, shadows of fabric wrinkles, and color cast interference from the shooting equipment.
[0073] Step S52: The dye concentration vector corresponding to each substrate is compared with the corresponding unit absorption coefficient and scattering coefficient recorded in the pre-stored substrate dye physical spectrum database to derive the fabric dyeing sample formulation. The formulation includes the required dye mass and dye volume percentage. The formula calculation logic for fabric dyeing sampling includes: based on the dye concentration vector at pixel (x,y), calculate the ratio of the dye concentration of the nth base dye to the corresponding fixation rate, the sum of the ratios of the dye concentration to the average fixation rate of all base dyes, and multiply it by the pre-input target total mass or total volume to obtain the dye mass or dye volume percentage formula. Referring to Table 2, there is a pre-stored physical spectrum database of base dyes, including the unit absorption coefficients and scattering coefficients of indigo, cinnabar, madder, gamboge, and black ink that have been pre-determined. Table 2
[0074] The full-band data includes all 41 wavelength points sampled at 10nm intervals from 380nm to 780nm. The table above lists representative wavelength point data. The data in Table 2 shows the strong absorption of indigo in the red light band of 620~660nm, the strong absorption of cinnabar and gamboge in the short-wave blue-violet light band, and the flat high absorption characteristics of black ink across the entire band, which are consistent with the physical transmission law.
[0075] Step S53: When generating the re-rendered image, the extracted fabric spectral reflectance, material roughness parameters, target illumination spectral power distribution and target geometric angle are substituted into the physical imaging model to calculate the target wavelength radiance. The target wavelength radiance is multiplied by the camera's three-channel spectral response function and then numerically integrated in the wavelength integration domain, mapped to the standard three primary color space, and the clothing re-rendered image is output.
[0076] The target observation radiance is multiplied by the red, green and blue three-channel spectral response function vector of the camera, and numerically integrated in the full 380nm to 780nm band domain. The result is mapped to the standard RGB color space and outputs a high-fidelity re-rendered image with realistic physical highlights, wrinkles and shadows and complex material gloss.
[0077] Through the above integral mapping, a high-fidelity re-rendered image of ethnic costumes under a specified target lighting environment is output, featuring realistic physical highlights of Miao silver, anisotropic satin sheen, three-dimensional wrinkle shadows, and complete elimination of metamerism color distortion; (Refer to...) Figure 2 A line graph showing the trend analysis of color matching re-rendering accuracy test for complex ethnic costume materials under different target light sources.
[0078] Referring to Table 3, a comparison table of errors between the inversion mass ratios of the five base dyes and the actual dyeing sample formulations is provided (target sample total mass 100.00g). Table 3
[0079] By introducing color fixation rate After correction and calculation, the absolute error between the material mass exported by the system and the actual chemical standard formula is no more than 0.32g, with a total weight of 100g. The color difference between the final sample fabric and the original garment is only 0.38 (far below the human eye's perceptible color difference threshold of 1.0), proving the effectiveness of physical decoupling and formula derivation.
[0080] This invention establishes a high-precision physical imaging mechanism by constructing a five-dimensional tensor bipartite graph and solving for the illumination-invariant bipartite graph structure matrix W. This is combined with the internal Kubelka-Munk mesoscopic dye mixing theory and the surface Ashikhmin-Shirley microscopic anisotropic BRDF model. This mechanism can completely eliminate interference from the strong highlights of silver, the anisotropic luster of satin, fabric wrinkles and shadows, and color casts from the imaging equipment. It fundamentally solves the industry pain point of traditional color matching methods, which often result in yellowing, dirtiness, or whitening of inherent colors under complex lighting conditions, achieving accurate inversion of high-purity inherent spectral reflectance.
[0081] By inversely calculating the dimensionless relative dye concentration vector through a physical imaging model and combining it with the unit absorption / scattering coefficients and inherent fixation rates from a pre-stored base dye spectral database, a formula for correcting feed quality directly applicable to physical production was established. This completely eliminates dyeing and mixing deviations caused by metamerism in traditional RGB / Lab color spaces, achieving seamless integration and millisecond-level high-precision export from hyperspectral images to actual industrial dyeing sample quality formulations.
[0082] This system pioneered an ambient light abrupt change perception and dual variable reset mechanism, ensuring the instantaneous convergence and robustness of the algorithm's online decoupling. By extracting dynamic spectral components and constructing an eigenvalue drift index for the spectral covariance matrix based on a sliding window rank-one update, it can achieve highly sensitive real-time monitoring of spectral shape changes and energy abrupt changes in ambient light sources. When a sudden change in illumination is detected to exceed the control limit, the system actively resets the Lagrange multiplier matrix of the ADMM algorithm and re-estimates the light source, cutting off the failure history gradients accumulated under the old constraints. This prevents the optimization algorithm from numerically diverging or getting trapped in local pseudo-minimal values when physical conditions change abruptly, ensuring millisecond-level real-time response and convergence of the global optimal solution in complex outdoor or dynamic lighting scenarios.
[0083] It possesses high-fidelity re-rendering capabilities with realistic physical luster and no metamerism distortion. Based on decoupled derived intrinsic spectral reflectance and 3D microscopic material roughness parameters, it can strictly follow the physical radiative transfer law to perform full-band spectral radiance calculation and three-channel response integration after inputting any target lighting spectrum and viewing angle. The output re-rendered image not only has a strong sense of three-dimensional wrinkles and realistic and natural Miao silver and satin luster, but also does not exhibit metamerism color distortion under any complex lighting conditions, providing strong technical support for the digital protection, intelligent color matching design, and high-fidelity e-commerce display of ethnic costumes.
[0084] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0085] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0086] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for assisting in the generation of ethnic costume color schemes based on multi-scale feature fusion, characterized in that, Includes the following steps: Step S1: Collect hyperspectral image data of ethnic costumes and construct a five-dimensional tensor bipartite graph based on it. The five-dimensional tensor bipartite graph includes a set of costume state nodes and a set of environment state nodes. Step S2: After mapping the clothing state node set and the environment state node set to the same spectral space, calculate the sampling spectral angle distance, solve the graph topological similarity matrix under simplex constraint and structural sparsity constraint, and obtain the bipartite graph structure matrix by threshold truncation; Step S3: Based on the fixed constraints of the bipartite graph structure matrix, the first augmented graph matrix and the second mapping graph matrix are solved element by element using the alternating direction multiplier algorithm. A physical imaging model is constructed and spectral unmixing is performed. The dye concentration vector and material roughness parameters are extracted, the specular and shadow components are stripped, and the final fabric spectral reflectance is updated and calculated. Step S4: Extract the real-time dynamic spectral components, recursively update and calculate the spectral drift index using rank-one addition and subtraction, compare the spectral drift index with the preset control limit, and dynamically reset or maintain the state of the Lagrange multiplier matrix in the alternating direction multiplier algorithm based on the comparison result. Step S5: Generate a standard intrinsic spectral color card image based on the final fabric spectral reflectance, map the dye concentration vector to the pre-stored base dye spectral database, export the dye mass ratio formula for dyeing and sampling, input the target illumination and viewing angle, calculate the target wavelength radiance using the physical imaging model and perform color space integration, and output a re-rendered image of the clothing under the target illumination environment.
2. The method for auxiliary generation of ethnic costume color schemes based on multi-scale feature fusion according to claim 1, characterized in that: In step S1, hyperspectral image data of ethnic costumes under multi-time period lighting conditions are collected. The dimensions of the five-dimensional tensor specifically include: The dimensions include the horizontal axis of the image space, the vertical axis of the image space, the sampling point dimension of the spectral wavelength, the geometric angle dimension of illumination and viewing angle, and the time slice dimension of multi-time period acquisition.
3. The method for auxiliary generation of ethnic costume color schemes based on multi-scale feature fusion according to claim 1, characterized in that: In step S2, the node feature vector of the clothing state node set is composed of a concatenation of a base dye concentration vector, a microscopic material parameter vector, and a cultural semantic feature vector. The cultural semantic feature vectors are used to provide edge prior constraints for the topological connections of clothing embroidery patterns in projection space learning; The node feature vectors included in the environmental state node set are composed of a concatenation of the ambient light source spectral power distribution vector, the light incident angle vector, the imaging device spectral response function vector, and the nonlinear correction feature vector of the sensor lookup table.
4. The method for auxiliary generation of ethnic costume color schemes based on multi-scale feature fusion according to claim 3, characterized in that: In step S2, obtaining the bipartite graph structure matrix specifically includes: By projecting linear spectral features, the clothing state node set and the environment state node set are mapped to the same-dimensional spectral feature space, respectively. The inverse cosine of the cosine of the vector angle between the two vectors after mapping is calculated as the physical distance of the sampled spectral angle. Ignoring physical decoupling parameters, a sparse graph topology optimization objective function is constructed based solely on observed changes. The construction process of the sparse graph topology optimization objective function includes: The graph transmission reconstruction error of the observed changes in clothing state nodes and the driven changes in environmental state nodes under multiple time slices is used as the data fitting term. It is combined with the trace penalty term based on the physical distance of the sampling spectral angle, the L1 norm sparse constraint term of the graph topological similarity matrix, and the Frobenius norm regularization term of the weighted graph structure matrix for weighted accumulation to construct the sparse graph topology optimization objective function. The graph topological similarity matrix included in the objective function of sparse graph topology optimization is updated by the proximal gradient descent method, and the updated vector is projected onto the probability simplex space where the sum of the elements is one and the elements are non-negative.
5. The method for auxiliary generation of ethnic costume color schemes based on multi-scale feature fusion according to claim 1, characterized in that: The logic for performing threshold truncation on the updated converged graph topological similarity matrix includes: When the elements of the graph topological similarity matrix are greater than or equal to a preset truncation threshold, edge weights are retained; If an element of the graph topological similarity matrix is less than a preset truncation threshold, then that element is set to zero. Generate a sparse bipartite graph structure matrix.
6. The method for auxiliary generation of ethnic costume color schemes based on multi-scale feature fusion according to claim 1, characterized in that: In step S3, solving the first augmented graph matrix and the second mapping graph matrix of the bipartite graph structure matrix element-wise using the alternating direction multiplier algorithm includes: With the bipartite graph structure matrix fixed, construct an augmented Lagrange function that includes the first augmented graph matrix, the second mapping graph matrix, and the Lagrange multiplier matrix; Based on the augmented Lagrange function, the least-squares solution of the first augmented graph matrix, the closed-form solution of the second mapping graph matrix, and the recursive update of the Lagrange multiplier matrix are solved alternately, specifically including: With the second mapping matrix and the Lagrange multiplier matrix fixed, the first augmented graph matrix is updated using the least squares method; With the first augmented graph matrix and the Lagrange multiplier matrix fixed, solve for the scalar elements of the second mapping graph matrix element by element, using the following calculation rules: The numerator is the product of the coefficient of the alternating direction multiplier algorithm penalty term and the sum of the corresponding elements of the first augmented graph matrix and the multiplier matrix. The denominator is the sum of twice the sparse penalty coefficient and the coefficient of the alternating direction multiplier algorithm penalty term, multiplied by the corresponding element of the graph structure matrix, and updated by element-wise scalar division. Update the Lagrange multiplier matrix based on the residual of the multiplication of the first augmented graph matrix and the second mapping graph matrix into the graph structure matrix; When the alternating solution converges, stop the iteration and output the solved first augmented graph matrix and second mapping graph matrix; otherwise, stop the iteration counter. .
7. The method for auxiliary generation of ethnic costume color schemes based on multi-scale feature fusion according to claim 1, characterized in that: In step S3, constructing the physical imaging model specifically includes: Combining the Kubelka-Munk dye mixing model with the microscopic anisotropic bidirectional reflectance distribution function, the observed total spectral radiance is defined as the product of the device spectral response function, the environmental spectral power distribution irradiance, and the reflected radiation term. The reflected radiation term is the sum of the diffuse reflection radiation component and the specular highlight reflection component; The diffuse reflection radiation component is the product of the spectral reflectance of the first fabric and the cosine of the normal incident angle divided by pi. The spectral reflectance of the first fabric is calculated by the absorption and scattering ratio, and the absorption and scattering ratio satisfies the sum of the absorption coefficients of the undyed base fabric and each base dye in proportion to their concentrations divided by the sum of the scattering coefficients. The specular highlight reflection component is obtained by using a microscopic anisotropic bidirectional reflection distribution function, which is calculated using the surface fabric warp tangent roughness coefficient, weft secondary tangent roughness coefficient, the cosine of the angle between the half-angle vector and the normal vector, and the Fresnel reflection coefficient. This function is used to fit the metallic highlight and satin anisotropic reflection.
8. The method for auxiliary generation of ethnic costume color schemes based on multi-scale feature fusion according to claim 1, characterized in that: Step S3 further includes: Based on the physical imaging model, a nonlinear least squares spectral unmixing objective function is constructed for the full-band observed radiometric data at each pixel point, and the dye concentration vector and material roughness parameters are extracted by optimizing the solution. The specular highlight and geometric shadow separation and peeling operations are performed sequentially to calculate the spectral reflectance of the second fabric; Simultaneously, the dye concentration vector is directly substituted into the calculation of the spectral reflectance of the first fabric to obtain the noise-free spectral reflectance of the third fabric. The absolute difference between the spectral reflectance of the third fabric and the spectral reflectance of the second fabric is calculated and compared with a preset tolerance. When the absolute difference is less than the preset tolerance, the spectral reflectance of the third fabric is updated to the final spectral reflectance of the fabric. When the absolute difference is greater than or equal to the preset tolerance, the second fabric spectral reflectance is updated to the final fabric spectral reflectance.
9. The method for auxiliary generation of ethnic costume color schemes based on multi-scale feature fusion according to claim 1, characterized in that: Step S4 specifically includes the following sub-steps: Step S41: Calculate the dynamic spectral component vector of the current state; Step S42: Set the total length of the sliding window, which is the sum of the lengths of the first and second sub-windows; Step S43: Based on the outer product of the current dynamic spectral component and its transpose, subtract the outer product of the dynamic spectral component and its transpose from the total length time backward from the current time, divide by the scalar after subtracting one from the total length, and recursively update the spectral covariance matrix of the previous time by adding and subtracting rank one. Step S44: Solve for each eigenvalue of the updated spectral covariance matrix, calculate the sum of squares of the differences between each eigenvalue and the reference value of 0.5, multiply by four and divide by the dimension to obtain the spectral drift index. Step S45: Compare and determine the magnitude of the spectral drift index calculated in real time with the preset control limit. When the spectral drift index is greater than the preset control limit, it is determined that the ambient light source has drifted, the spectral power distribution of the ambient light source is re-estimated, the Lagrange multiplier matrix included in the alternating direction multiplier algorithm in step S3 is cleared and reset, and the algorithm iteration calculation is restarted by returning to step S3. When the spectral drift index is less than or equal to the preset control limit, the current state is maintained.
10. The method for auxiliary generation of ethnic costume color schemes based on multi-scale feature fusion according to claim 1, characterized in that: Step S5 specifically includes the following sub-steps: Step S51: Combine the final fabric spectral reflectance, standard D65 daylight spectral power distribution, and CIE standard observer color matching function integral to generate a standard intrinsic color card image; Step S52: The dye concentration vector corresponding to each substrate is compared with the corresponding unit absorption coefficient and scattering coefficient recorded in the pre-stored substrate dye physical spectrum database to derive the fabric dyeing sample formulation. The formulation includes the required dye mass and dye volume percentage. Step S53: When generating the re-rendered image, the extracted fabric spectral reflectance, material roughness parameters, target illumination spectral power distribution and target geometric angle are substituted into the physical imaging model to calculate the target wavelength radiance. The target wavelength radiance is multiplied by the camera's three-channel spectral response function and then numerically integrated in the wavelength integration domain, mapped to the standard three primary color space, and the clothing re-rendered image is output.
