A method and system for calculating and optimizing color difference of antique linen viscose reactive dyeing
By using real-time monitoring of fabric movement and spectral data acquisition technology, combined with polarized light and ultraviolet light sources, a hierarchical weighting system was constructed. This solved the problems of inaccurate spectral measurement and difficulty in distinguishing fiber components in the dyeing and testing of antique linen-viscose blended textiles, and achieved high-precision color difference calculation and antique effect evaluation.
Patent Information
- Application Number
- CN202511573367.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2045-10-31
AI Technical Summary
Existing color difference measurement technologies suffer from problems such as inaccurate spectral measurements, difficulty in distinguishing fiber components, and poor measurement stability during dynamic dyeing in the dyeing detection of antique linen-viscose blended fabrics, making it difficult to meet the accuracy and reliability requirements of real-time detection.
By monitoring the fabric's motion in real time, calculating its speed and displacement, acquiring spectral data using polarized and ultraviolet light sources, identifying fiber regions, constructing a hierarchical weighting system, calculating the color difference of fiber regions, and setting a weighted calculation based on the antique quantification results to set a color difference threshold.
It achieves stability and accuracy of spectral data during dynamic dyeing, improves the accuracy of fiber region identification and the precision of color difference calculation, and enhances the credibility and application value of antique dyeing effects.
Smart Images

Figure CN121048753B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of color detection technology, specifically to a method and system for calculating and optimizing color difference in antique flax adhesive reactive dyeing. Background Technology
[0002] Color measurement technology is based on the principles of spectroscopy, and it quantitatively describes color by measuring the reflection or transmission characteristics of an object to light of different wavelengths. Traditional color difference measurement mainly uses spectrophotometry, which uses a spectrophotometer to measure the spectral reflectance of a sample in the visible spectrum, and then calculates the color coordinates according to CIE colorimetric theory to obtain the color difference value. Existing colorimeters typically use an integrating sphere illumination system, which illuminates the sample surface with a standard light source, receives the reflected light, and analyzes it with a spectrometer to obtain spectral data.
[0003] However, existing color difference measurement techniques have significant limitations in the dyeing detection of antique-style linen-viscose blended fabrics. The naturally rough surface structure of linen fibers causes irregular light scattering, affecting the accuracy and reproducibility of spectral measurements. The differences in optical properties between linen and viscose fibers in blended fabrics make it impossible for traditional integrating sphere measurement methods to effectively distinguish the color contributions of different fiber components. Furthermore, the non-uniform effect sought in antique dyeing processes contradicts the standardized measurement point selection required by traditional color difference measurements, making it difficult to establish a unified measurement standard. During dynamic dyeing, the movement of the fabric further increases the technical difficulty of real-time color difference detection. Existing static measurement equipment cannot meet the stability requirements of online detection, severely affecting the accuracy and practicality of color difference detection.
[0004] To address this, a method and system for calculating and optimizing color difference in antique flax adhesive reactive dyeing are proposed. Summary of the Invention
[0005] The purpose of this invention is to provide a method and system for optimizing color difference calculation in antique-style flax adhesive reactive dyeing. The method includes real-time monitoring of fabric movement, calculation of movement speed and displacement, and determination of the timing and location compensation parameters for spectral acquisition. A polarized light source is used to illuminate the surface of the fabric under test at the acquisition location, and polarized spectral data is acquired along the normal direction of the fabric surface to obtain reflectance spectral information. An ultraviolet light source is used to excite the surface of the fabric under test, and fluorescence spectral data is acquired to identify different fiber regions. The fiber density distribution within the fiber regions is calculated, and a hierarchical weighting system is constructed. Based on the reflectance spectral information, the color difference of the fiber regions is calculated, color difference features are extracted, and the antique-style quantification result is measured. A color difference threshold standard is set according to the antique-style quantification result, and the color difference threshold is adjusted according to the evolution trend. Based on the hierarchical weighting system and the color difference threshold, the color difference values of the fiber regions are weighted and calculated to obtain a comprehensive color difference evaluation result.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] A method and system for calculating and optimizing color difference in antique flax viscose reactive dyeing, comprising:
[0008] Real-time monitoring of fabric movement, calculation of movement speed and displacement, and determination of the timing of spectral acquisition and location compensation parameters;
[0009] The surface of the fabric under test is illuminated at the acquisition location by a polarized light source, and polarized spectral data is acquired in the normal direction of the fabric surface. The spectral shift caused by the displacement of the fabric under test is corrected based on differential operation processing and position compensation parameters to obtain the reflectance spectral information.
[0010] The surface of the fabric under test is excited by an ultraviolet light source, and fluorescence spectral data is collected to identify different fiber regions. The fiber density distribution within the fiber region is calculated, and a hierarchical weighting system is constructed. Specifically, the fiber region is divided into a core antique region, a transitional fusion region, and a background stable region based on the fiber density distribution, and weighting coefficients are set.
[0011] The color difference of the fiber region is calculated based on the reflectance spectrum information. The spatial variation coefficient of the color difference, the color gradient distribution entropy and the fiber interface clarity index are extracted to measure the antique measurement results. The color difference threshold standard is set according to the antique measurement results.
[0012] Based on a hierarchical weighting system and color difference threshold, the color difference values of the fiber regions are weighted and calculated to obtain a comprehensive color difference evaluation result.
[0013] Preferably, the timing of spectral acquisition is the advance time parameter for triggering spectral acquisition;
[0014] Determining the timing and location compensation parameters for spectral acquisition includes: continuously capturing images of marker points on the fabric surface at a preset frame rate, analyzing the displacement changes of marker points between consecutive frames to calculate the fabric's motion speed; calculating the lead time parameter for triggering spectral acquisition based on the fabric's motion speed and response time data; and calculating the spatial location compensation parameters based on the expected and actual displacement distances of the fabric during spectral acquisition.
[0015] Preferably, the polarization spectral data acquisition in the normal direction of the fabric surface includes: acquiring polarization spectral data at different angular positions in the normal direction of the fabric surface; performing differential operations on the spectral data of orthogonal polarization direction and parallel polarization direction to separate the surface reflected light and scattered light components, and obtaining initial reflection spectral data.
[0016] Preferably, the method of correcting the spectral shift caused by the displacement of the fabric under test based on the position compensation parameter includes: calculating the wavelength shift caused by the displacement according to the fabric displacement distance and spectral resolution; performing wavelength correction on the initial reflectance spectral data through the wavelength shift, remapping the shifted spectral data to the standard wavelength coordinate system, and compensating for the loss of initial reflectance spectral data caused by the displacement through an interpolation algorithm to obtain continuous and complete reflectance spectral information.
[0017] Preferably, the fluorescence spectral data acquisition process includes: irradiating the fabric surface with an ultraviolet light source within a safe power density range and collecting fluorescence emission spectra in the wavelength range; the process of identifying different fiber regions includes: calculating the fluorescence intensity ratio of characteristic peaks, identifying flax fiber regions when the ratio is greater than a preset threshold, and identifying viscose fiber regions when the ratio is not greater than the preset threshold.
[0018] Preferably, the fiber density distribution acquisition process includes: based on the fluorescence spectral recognition results, counting the number of pixels of flax fibers and viscose fibers within the fiber region area, and calculating the flax fiber density ratio; the weighting coefficient setting process includes: when the flax fiber density ratio is greater than a first ratio, it is set as the core antique area, and the weighting coefficient is the first coefficient; when the density ratio is less than or equal to the first ratio but greater than the second ratio, it is set as the transition fusion area, and the weighting coefficient is the second coefficient; when the density ratio is less than or equal to the second ratio, it is set as the background stable area, and the weighting coefficient is the third coefficient; and a weighted gradient transition is established at the boundary of adjacent regions using a Gaussian distance decay function.
[0019] Preferably, the process of obtaining the antique quantization results includes: calculating the L*, a*, b* chromaticity values and color difference value ΔE of each fiber region based on the reflectance spectrum information through CIELab color space conversion; calculating the standard deviation of the color difference value in the spatial distribution as the spatial variation coefficient; calculating the color gradient between adjacent pixels through the gradient operator, and statistically calculating the information entropy of the gradient distribution as the color gradient distribution entropy; and calculating the smoothness of the color transition at the fiber interface as the fiber interface sharpness index.
[0020] Preferably, the process of obtaining the comprehensive color difference evaluation result includes: setting a first multiple of the benchmark color difference threshold for the core antique area as the allowable color difference threshold based on the antique quantification result; setting decreasing threshold coefficients for the transition fusion area and the background stable area respectively; multiplying the color difference value of each fiber area with the corresponding weight coefficient and the area ratio of the area; summing the weighted color difference values of all areas to obtain the comprehensive color difference evaluation result.
[0021] A color difference calculation and optimization system for antique flax viscose reactive dyeing includes:
[0022] Real-time monitoring of fabric movement, calculation of movement speed and displacement, and determination of the timing of spectral acquisition and location compensation parameters;
[0023] The surface of the fabric under test is illuminated at the acquisition location by a polarized light source, and polarized spectral data is acquired in the normal direction of the fabric surface. The spectral shift caused by the displacement of the fabric under test is corrected based on differential operation processing and position compensation parameters to obtain the reflectance spectral information.
[0024] The surface of the fabric under test is excited by an ultraviolet light source, and fluorescence spectral data is collected to identify different fiber regions. The fiber density distribution within the fiber region is calculated, and a hierarchical weighting system is constructed. Specifically, the fiber region is divided into a core antique region, a transitional fusion region, and a background stable region based on the fiber density distribution, and weighting coefficients are set.
[0025] The color difference of the fiber region is calculated based on the reflectance spectrum information. The spatial variation coefficient of the color difference, the color gradient distribution entropy and the fiber interface clarity index are extracted to measure the antique measurement results. The color difference threshold standard is set according to the antique measurement results.
[0026] Based on a hierarchical weighting system and color difference threshold, the color difference values of the fiber regions are weighted and calculated to obtain a comprehensive color difference evaluation result.
[0027] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0028] 1. This invention effectively corrects spectral acquisition offset caused by fabric displacement by real-time monitoring of the fabric in motion and calculating position compensation parameters based on motion speed and displacement. The invention introduces a dynamic compensation mechanism during spectral acquisition and utilizes continuous frame rate shooting and trigger lead parameters to precisely control the acquisition timing, thereby ensuring the spatial and temporal consistency of spectral data. This not only guarantees measurement stability under dynamic conditions but also obtains more spatially continuous reflectance spectral information through spectral fusion of adjacent measurement points, improving the accuracy and robustness of real-time color difference calculation during dyeing.
[0029] 2. This invention achieves dual utilization of the reflectance characteristics of fabric surfaces and the fluorescence characteristics of fibers through the joint acquisition of polarization spectroscopy and fluorescence spectroscopy. Polarization spectra are acquired at different angles along the normal direction of the fabric surface. By performing differential calculations on orthogonal and parallel polarized light, the surface reflection and scattering components are effectively separated, thus obtaining purer reflectance spectral information. Simultaneously, by combining ultraviolet-excited fluorescence spectral data, the intensity ratio of characteristic peaks is analyzed to accurately distinguish between flax and viscose fiber regions. This not only improves the accuracy of fiber region identification but also provides a scientific basis for subsequent layered weighting, enabling color difference calculations to better reflect the different roles of various fibers in the antique dyeing effect.
[0030] 3. This invention establishes a three-tiered partitioning system—a core antique area, a transition and fusion area, and a stable background area—by quantifying the density distribution of fiber regions. A Gaussian distance decay function is used to achieve a smooth transition of weights between regions. By considering the differences in importance among different fiber regions, the color difference calculation not only reflects the overall visual effect but also highlights the key contribution of the core antique area. Furthermore, this invention calculates the spatial variation coefficient of color difference, the color gradient distribution entropy, and the fiber interface clarity index based on reflectance spectral information, thereby obtaining multi-dimensional quantified results of the antique effect and dynamically adjusting the color difference threshold standard. It can predictively correct the allowable color difference range based on the evolution trend of the antique effect, making the optimization process more adaptive. Finally, the color difference evaluation results obtained through comprehensive weighted calculation enhance the application value and reliability of color difference calculation in the antique dyeing process. Attached Figure Description
[0031] Figure 1 A flowchart of a method for calculating and optimizing color difference in antique flax adhesive reactive dyeing provided by the present invention;
[0032] Figure 2 A flowchart for determining the acquisition timing and location compensation parameters provided in an embodiment of the present invention;
[0033] Figure 3 A flowchart of the hierarchical weighting system provided in this embodiment of the invention;
[0034] Figure 4 The present invention provides a structural diagram of a color difference calculation and optimization system for retro-style flax adhesive reactive dyeing. Detailed Implementation
[0035] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention.
[0036] Example 1:
[0037] Please see Figure 1 This invention provides a method for optimizing color difference calculation in antique flax adhesive reactive dyeing, the technical solution of which is as follows:
[0038] Real-time monitoring of fabric movement, calculation of velocity and displacement, determination of spectral acquisition timing and location compensation parameters, as detailed in [reference needed]. Figure 2 ;
[0039] The timing of spectral acquisition is the advance time parameter for triggering spectral acquisition;
[0040] Determining the timing and location compensation parameters for spectral acquisition includes: continuously capturing images of marker points on the fabric surface at a preset frame rate, analyzing the displacement changes of the marker points between consecutive frames to calculate the fabric's motion speed; calculating the lead time parameter for triggering spectral acquisition based on the fabric's motion speed and response time data; and calculating the spatial location compensation parameters based on the expected and actual displacement distances of the fabric during spectral acquisition. The expected displacement distance is obtained through predicted location.
[0041] The determination of the position compensation parameters also includes a multi-sensor fusion mechanism: real-time acceleration data of fabric motion is collected by an accelerometer and fused with displacement data obtained by an image sensor using Kalman filtering; a motion prediction model is established to predict the future position of the fabric based on historical motion trajectories and current acceleration change trends; and the position compensation parameters are dynamically corrected based on the deviation between the predicted position and the actual measured position to improve the spatial positioning accuracy of spectral acquisition.
[0042] The motion prediction model includes a multi-layer neural network architecture:
[0043] The input layer receives historical motion trajectory data, current acceleration data, velocity data, and fabric tension parameters. It performs normalization and feature engineering transformation on the input data to obtain standardized motion feature vectors.
[0044] The feature extraction layer uses a Long Short-Term Memory (LSTM) network to perform deep feature extraction on temporal motion data and a Convolutional Neural Network (CNN) to encode features on spatial location data. The temporal and spatial features are then fused to obtain comprehensive motion state features.
[0045] The prediction layer uses a fully connected network combined with an attention mechanism to perform regression prediction of the fabric position within the next 0.1 to 2.0 seconds, and outputs the predicted position coordinates, confidence score and prediction error range.
[0046] The correction layer dynamically adjusts the model parameters using a Kalman filter algorithm based on the deviation between the actual measured position and the predicted position. The corrected position information is fed back to the spectral acquisition module for accurate positioning, and the prediction error information is transmitted to the position compensation parameter calculation module for dynamic compensation.
[0047] In this embodiment, by monitoring the fabric's motion state in real time and combining velocity and displacement calculations, the triggering timing and position compensation parameters for spectral acquisition are determined, avoiding spectral acquisition deviations caused by high-speed fabric movement. Through the coordinated optimization of lead time and spatial compensation, more stable spectral signal acquisition is ensured, improving the reliability and accuracy of the fabric detection process. Furthermore, through multi-sensor fusion and motion prediction, the accuracy and stability of dynamic fabric position detection are significantly improved, reducing spectral shifts caused by positional errors and enhancing the accuracy of color difference measurement.
[0048] The surface of the fabric under test is illuminated at the acquisition location by a polarized light source, and polarized spectral data is acquired in the normal direction of the fabric surface. The spectral shift caused by the displacement of the fabric under test is corrected based on differential operation processing and position compensation parameters to obtain the reflectance spectral information.
[0049] The acquisition of polarization spectral data in the normal direction of the fabric surface includes: acquiring polarization spectral data at different angular positions in the normal direction of the fabric surface; performing differential operations on the spectral data in the orthogonal polarization direction and the parallel polarization direction to separate the surface reflected light and scattered light components and obtain the initial reflection spectral data.
[0050] In this embodiment, multi-angle spectral acquisition is performed using a polarized light source along the normal direction of the fabric surface. Differential calculations are then performed on the data from orthogonal and parallel polarization directions to effectively separate the reflected and scattered light components, resulting in purer initial reflectance spectral data. Simultaneously, position compensation parameters are used to correct spectral shifts caused by motion, ensuring the accuracy and stability of the spectral information, thereby improving the precision and reliability of spectral feature extraction during fabric detection.
[0051] Correcting the spectral shift caused by the displacement of the fabric under test based on the position compensation parameter includes: calculating the wavelength shift caused by the displacement according to the fabric displacement distance and spectral resolution; performing wavelength correction on the initial reflectance spectral data using the wavelength shift; remapping the shifted spectral data to the standard wavelength coordinate system; and compensating for the loss of initial reflectance spectral data caused by the displacement using an interpolation algorithm to obtain continuous and complete reflectance spectral information.
[0052] In this embodiment, the wavelength offset is calculated by combining the fabric displacement distance and spectral resolution, and the initial reflectance spectral data is corrected for wavelength and mapped to standard coordinates to ensure accurate alignment of the spectral data. Furthermore, an interpolation algorithm is used to compensate for spectral gaps caused by displacement, obtaining continuous and complete reflectance spectral information, thereby effectively improving the stability and reliability of spectral analysis.
[0053] The surface of the fabric under test is excited by an ultraviolet light source, and fluorescence spectral data are collected to identify different fiber regions. The fiber density distribution within the fiber regions is calculated, and a hierarchical weighting system is constructed, as detailed in [reference needed]. Figure 3 Specifically, based on the fiber density distribution, the fiber region is divided into a core antique area, a transitional fusion area, and a background stable area, and weighting coefficients are set.
[0054] The process of acquiring fluorescence spectral data includes: irradiating the fabric surface with an ultraviolet light source within a safe power density range, and collecting fluorescence emission spectra in a wavelength range using a fluorescence spectrometer equipped with a safety protection device; the process of identifying different fiber regions includes: calculating the ratio of fluorescence intensity of characteristic peaks, identifying flax fiber regions when the ratio is greater than a preset threshold, and identifying viscose fiber regions when the ratio is not greater than the preset threshold.
[0055] In this embodiment, an ultraviolet light source excites the fabric surface and collects fluorescence spectral data. The intensity ratio of characteristic peaks is then used to accurately identify different fiber regions. Furthermore, a hierarchical weighting system is constructed based on fiber density distribution, dividing the region into a core antique area, a transitional fusion area, and a stable background area, and assigning weight coefficients accordingly. This enables refined differentiation and quantitative characterization of the fabric's fiber structure, effectively improving the accuracy and scientific rigor of antique fabric detection and analysis.
[0056] The fiber density distribution acquisition process includes: based on the fluorescence spectral recognition results, counting the number of pixels of flax fibers and viscose fibers within the fiber region area, and calculating the flax fiber density ratio; the weighting coefficient setting process includes: when the flax fiber density ratio is greater than a first ratio, it is set as the core antique area, and the weighting coefficient is the first coefficient; when the density ratio is less than or equal to the first ratio but greater than the second ratio, it is set as the transition fusion area, and the weighting coefficient is the second coefficient; when the density ratio is less than or equal to the second ratio, it is set as the background stable area, and the weighting coefficient is the third coefficient; and a weighted gradient transition is established at the boundary of adjacent regions using a Gaussian distance decay function. The methods for obtaining the first and second proportions include: collecting fiber density distribution data of standard antique-style samples, statistically analyzing the range of flax fiber density proportion in the core antique-style area, and setting the lower limit of the proportion range as the first proportion; statistically analyzing the range of flax fiber density proportion in the transition and fusion areas, and setting the lower limit of the proportion range as the second proportion; the methods for obtaining the first, second, and third coefficients include: based on the importance analysis of the antique-style effect, setting the first coefficient of the core antique-style area to 1.0; determining the range of the second coefficient through expert evaluation and experimental verification based on the contribution of the transition and fusion areas to the overall antique-style effect; determining the range of the third coefficient based on the influence weight of the background stable area on the color difference evaluation; and ensuring that each coefficient satisfies the normalization constraint conditions.
[0057] The hierarchical weighting system has a dynamic adaptive adjustment mechanism: a correlation model between the dyeing process and the weight coefficient is established, and the weight coefficient of each region is dynamically adjusted according to the dyeing time process and the current color difference change rate of the region; when the color difference change rate of the core antique area exceeds the preset threshold, the weight coefficient of the region is automatically increased, and when the transition fusion area achieves the target antique effect, its weight coefficient is reduced; the sliding window averaging method is used to smooth the weight change process and avoid the impact of sudden weight changes on the evaluation results.
[0058] The correlation model between the coloring process and the weight coefficients includes a multidimensional mapping network:
[0059] The data input layer receives staining time progress data, current color difference value of each region, color difference change rate, staining solution concentration, temperature parameters and pH value data, performs time alignment and data cleaning on multi-source heterogeneous data, and obtains a synchronized staining state feature matrix.
[0060] The process analysis layer uses a recurrent neural network (RNN) to model the staining time series, uses principal component analysis (PCA) to reduce the dimensionality of high-dimensional staining parameters, and uses a clustering algorithm to identify the characteristic patterns of different staining stages, thereby obtaining the stage division results and feature weights of the staining process.
[0061] The association modeling layer adopts a multi-task learning framework to establish a nonlinear mapping relationship between the coloring process parameters and the weight coefficients of each region. The gradient boosting algorithm is used to optimize the weight allocation strategy and obtain the dynamic weight coefficients of the core antique region, the transition fusion region, and the background stable region.
[0062] The adaptive adjustment layer dynamically adjusts the weight coefficients using a fuzzy control algorithm based on the real-time color difference change rate exceeding a preset threshold. It avoids sudden weight changes by smoothing the process through a sliding window, and then passes the adjusted weight coefficients to the comprehensive evaluation module for weighted calculation. The weight change trend information is fed back to the dyeing control system for process optimization.
[0063] In this embodiment, the density ratio is calculated and precise partitioning is achieved by statistically analyzing the number of pixels of flax and viscose fibers within the fiber region. Weight coefficients are then set for the core antique area, transition blending area, and background stable area based on different ratios. Furthermore, a Gaussian distance decay function is used to establish a smooth weight gradient transition at the boundaries of adjacent regions, effectively avoiding partition discontinuities caused by abrupt changes. This achieves refined characterization of fiber distribution and scientific setting of regional weights, improving the accuracy and robustness of fabric detection and analysis. Simultaneously, by establishing a correlation model between the dyeing process and weight coefficients, intelligent dynamic adjustment of the weight system is achieved, making color difference evaluation more adaptable to actual changes in the dyeing process, improving the accuracy of antique effect control and the automation level of the dyeing process.
[0064] The color difference of the fiber region is calculated based on the reflectance spectrum information. The spatial variation coefficient of the color difference, the color gradient distribution entropy and the fiber interface clarity index are extracted to measure the antique measurement results. The color difference threshold standard is set according to the antique measurement results.
[0065] The process of obtaining the antique quantization results includes: calculating the L*, a*, b* chromaticity values and color difference value ΔE of each fiber region based on the reflectance spectrum information through CIELab color space conversion; calculating the standard deviation of the color difference value in the spatial distribution as the spatial variation coefficient; calculating the color gradient between adjacent pixels through the gradient operator, and statistically calculating the information entropy of the gradient distribution as the color gradient distribution entropy; and calculating the smoothness of the color transition at the fiber interface as the fiber interface sharpness index.
[0066] The color difference threshold standard has an adaptive learning mechanism based on historical data: a dyeing batch database is established to store the evolution history of color difference under different process parameters and the final antique effect evaluation; a deep learning algorithm is used to analyze the correlation between process parameters, intermediate color difference values and final antique quality in historical data; based on the process parameters of the current batch and real-time color difference data, the optimal color difference threshold range is predicted; and the threshold prediction model is optimized based on the actual dyeing effect of the current batch through an online learning mechanism.
[0067] The threshold prediction model includes a deep learning prediction network:
[0068] The historical data layer extracts process parameters, intermediate color difference evolution sequences, and final antique effect evaluation data from the dyeing batch database. It performs data cleaning, outlier detection, and feature standardization on the historical data to obtain a structured training dataset.
[0069] The feature learning layer uses a deep neural network to learn the relationship between process parameters and color difference, uses a temporal convolutional network (TCN) to extract the temporal features of color difference evolution, and learns the latent representation of antique quality through an autoencoder to obtain a multi-dimensional associated feature vector.
[0070] The predictive inference layer uses an ensemble learning method to fuse multiple basic predictors, employs a Bayesian optimization algorithm to adjust the model hyperparameters, and performs threshold range prediction based on the current batch process parameters and real-time color difference data. It outputs the expected value, confidence interval, and prediction reliability index of the optimal color difference threshold.
[0071] The online learning layer uses an incremental learning algorithm to update the model based on the actual staining effect of the current batch. It uses a reinforcement learning mechanism to optimize the threshold selection strategy, passes the predicted threshold parameters to the color difference analysis module for dynamic threshold setting, and stores the learned optimized parameters in the database for prediction improvement in subsequent batches.
[0072] In this embodiment, color difference is calculated based on reflectance spectral information of the fiber region, and L*, a*, b* values and ΔE are obtained through the CIELab color space. Combined with the spatial coefficient of variation, color gradient distribution entropy, and fiber interface clarity index, a quantitative result for antique fabric quantification is formed. Furthermore, a color difference threshold standard is set based on this quantification result, and predictive adjustments are made according to its evolution trend during the dynamic dyeing process. This achieves quantitative evaluation and real-time optimization control of the antique fabric effect, improving the accuracy and artistic effect of the dyeing process. Through historical data learning and intelligent prediction, adaptive optimization of the color difference threshold is achieved, significantly improving the consistency and controllability of dyeing quality, reducing manual adjustment time, and increasing production efficiency.
[0073] Based on a hierarchical weighting system and color difference threshold, the color difference values of the fiber regions are weighted and calculated to obtain a comprehensive color difference evaluation result.
[0074] The process of obtaining the comprehensive color difference evaluation result includes: setting a first multiple of the baseline color difference threshold for the core antique area as the allowable color difference threshold based on the quantification results of the antique reproduction; setting decreasing threshold coefficients for the transition and blending areas and the background stable area respectively; multiplying the color difference value of each fiber area with the corresponding weight coefficient and the area ratio of the area; summing the weighted color difference values of all areas to obtain the comprehensive color difference evaluation result. The method of obtaining the first multiple includes: collecting color difference data of multiple sets of standard antique reproduction samples and calculating the baseline color difference threshold; determining the color difference distribution range of qualified antique reproduction products through statistical analysis, and using the ratio of the upper limit of the color difference distribution range to the baseline color difference threshold as the first multiple.
[0075] In this embodiment, by combining a hierarchical weighting system and regional color difference thresholds, the color difference values of different fiber regions are weighted and calculated to obtain a more objective comprehensive color difference evaluation result. By setting differentiated threshold coefficients for the core antique area, transition and fusion area, and background stable area, and normalizing the comprehensive weights and area, the zoning and overall unification of color difference evaluation is achieved, effectively improving the scientificity and accuracy of the fabric antique effect assessment.
[0076] This invention proposes an optimized method and system for calculating color difference in reactive dyeing of antique flax and viscose. The system achieves comprehensive optimization across the entire process, including dynamic fabric monitoring, precise spectral acquisition, fine fiber region segmentation, adaptive weight adjustment, and intelligent color difference evaluation. By monitoring the fabric's motion in real time, combined with speed and displacement calculations, and employing a lead time and position compensation mechanism, it effectively avoids spectral acquisition deviations caused by high-speed movement, ensuring stable and reliable spectral signals. Multi-sensor fusion and neural network prediction models further improve dynamic positioning accuracy, guaranteeing the accuracy of spectral information. At the spectral analysis level, multi-angle acquisition of polarized light and differential calculations effectively separate reflectance and scattering components. Combined with wavelength correction and interpolation compensation, continuous and complete reflectance spectral information is obtained. Regarding fiber structure identification and weight construction, fluorescence spectroscopy is used to distinguish between flax and viscose fibers. A hierarchical weight system is constructed based on density distribution, comprising a core antique region, a transitional fusion region, and a stable background region. A Gaussian function is used to achieve smooth transition and dynamic adaptive adjustment, making the weight allocation more consistent with the changes in the dyeing process. At the color difference evaluation level, a quantitative index for antique fabric detection is formed by combining CIELab color space calculations with spatial variation coefficients, color gradient distribution entropy, and interface clarity index. An adaptive threshold model is then established through historical data learning and a deep prediction network to intelligently optimize the color difference threshold. Finally, a weighted calculation of regional color differences is performed using a hierarchical weighting system and differentiated thresholds to obtain an objective and comprehensive overall color difference result. This overall solution effectively improves the accuracy, stability, and intelligence level of antique fabric detection and color difference assessment, providing reliable support for the automation of dyeing processes and the control of artistic effects.
[0077] Example 2:
[0078] As another embodiment of the present invention, refer to Figure 4 This invention provides a method for calculating and optimizing the color difference in antique flax viscose reactive dyeing. The specific technical solution is a data acquisition module that monitors the fabric movement state in real time, calculates the movement speed and displacement, and determines the timing of spectral acquisition and position compensation parameters.
[0079] The data acquisition module illuminates the surface of the fabric under test at the acquisition location using a polarized light source, acquires polarized spectral data in the normal direction of the fabric surface, and corrects the spectral shift caused by the displacement of the fabric under test based on differential operation processing and position compensation parameters to obtain reflectance spectral information.
[0080] The fabric partitioning module uses an ultraviolet light source to excite the surface of the fabric under test, collects fluorescence spectral data, and identifies different fiber regions; it calculates the fiber density distribution within the fiber regions and constructs a hierarchical weighting system; specifically, based on the fiber density distribution, the fiber regions are divided into a core antique region, a transitional fusion region, and a background stable region, and weighting coefficients are set.
[0081] The color difference threshold setting module calculates the color difference of the fiber region based on the reflectance spectrum information, extracts the spatial variation coefficient of the color difference, the color gradient distribution entropy and the fiber interface clarity index, and measures the antique measurement results; and sets the color difference threshold standard based on the antique measurement results.
[0082] The color difference result acquisition module, based on a hierarchical weighting system and a color difference threshold, performs weighted calculations on the color difference values of fiber regions to obtain a comprehensive color difference evaluation result. This embodiment uses an automated production line for reactive dyeing of antique-style flax in a textile factory as an application scenario to detail the specific implementation process of the technical solution of this invention.
[0083] The production line is equipped with continuously operating dyeing equipment, with the fabric passing through the dyeing area at a speed of fifteen meters per minute. At the exit of the dyeing area, the color difference calculation and optimization system of this invention is installed, including a motion monitoring module, a polarization spectrum acquisition module, a fluorescence spectrum acquisition module, a data processing module, and an evaluation output module.
[0084] First, the fabric surface markers are continuously photographed at a preset frame rate. These markers use the natural fiber structure characteristics of the fabric surface as identification marks. By analyzing the displacement changes of the markers between consecutive frames, the fabric movement speed is calculated in real time to be 0.25 meters per second.
[0085] Based on the fabric's movement speed and system response time data, the lead time parameter for triggering spectral acquisition was calculated to be 0.08 seconds; this ensures that the fabric can accurately reach the predetermined spectral acquisition position when the system issues the acquisition command. Simultaneously, based on the expected and actual displacement distances of the fabric during spectral acquisition, a spatial position compensation parameter of 2 millimeters was calculated to correct for positional deviations during the acquisition process.
[0086] To further improve positioning accuracy, the system adopts a multi-sensor fusion mechanism. It collects acceleration data of fabric movement in real time through an accelerometer and combines it with displacement data obtained from an image sensor using Kalman filtering. The established motion prediction model includes a multi-layer neural network architecture, which can predict the future position of the fabric based on historical motion trajectories and current acceleration change trends, with prediction accuracy reaching the millimeter level.
[0087] At the designated acquisition location, the fabric surface was illuminated in the normal direction using a polarized light source. The polarized light source was a broadband LED array with wavelengths covering the visible light range of 380 to 780 nanometers. Polarized spectral data were acquired at four different angular positions along the normal direction of the fabric surface: 0 degrees, 15 degrees, 30 degrees, and 45 degrees.
[0088] For each acquisition angle, spectral data from both orthogonal and parallel polarization directions are simultaneously acquired. By performing differential operations on the spectral data from these two polarization directions, the surface reflected light and scattered light components are effectively separated to obtain initial reflectance spectral data, significantly reducing light scattering interference caused by the rough surface structure of flax fibers.
[0089] Based on the position compensation parameters, the spectral shift caused by the displacement of the fabric under test is corrected. According to the fabric displacement distance of 2 mm and the spectral resolution of 1 nm, the wavelength shift caused by the displacement is calculated to be 0.5 nm. The initial reflectance spectral data is corrected by the wavelength shift, and the shifted spectral data is remapped to the standard wavelength coordinate system. The cubic spline interpolation algorithm is used to compensate for the loss of initial reflectance spectral data caused by the displacement, and finally, continuous and complete reflectance spectral information is obtained.
[0090] The fabric surface was irradiated with an ultraviolet light source at a safe power density of 5 milliwatts per square centimeter. Fluorescence emission spectra in the wavelength range of 300 to 600 nanometers were collected using a fluorescence spectrometer equipped with a safety protection device. Flax fibers exhibited a characteristic fluorescence peak at 350 nanometers, while viscose fibers exhibited a characteristic fluorescence peak at 420 nanometers.
[0091] The ratio of fluorescence intensity at 350 nm to 420 nm is calculated as the basis for fiber identification. When the ratio is greater than a preset threshold of 1.5, the region is identified as a flax fiber region. When the ratio is less than or equal to the preset threshold of 1.5, the region is identified as a viscose fiber region. In this way, the distribution of different fiber components in blended fabrics can be accurately distinguished.
[0092] Based on the fluorescence spectral recognition results, the number of pixels of flax fibers and viscose fibers in each square centimeter of fiber area is counted, and the density ratio of flax fibers is calculated. In this embodiment, when the density ratio of flax fibers is greater than 70%, it is set as the core antique area with a weight coefficient of 0.6; when the density ratio is between 30% and 70%, it is set as the transition blending area with a weight coefficient of 0.3; when the density ratio is less than 30%, it is set as the background stable area with a weight coefficient of 0.1.
[0093] To avoid abrupt weight changes, a Gaussian distance decay function is used to establish a weight gradient transition at the boundary of adjacent regions, with the decay coefficient set to 0.8. The hierarchical weight system has a dynamic adaptive adjustment mechanism, establishing a correlation model between the dyeing process and the weight coefficients, and dynamically adjusting the weight coefficients of each region according to the dyeing time process and the current color difference change rate of the region.
[0094] Based on the reflectance spectral information, the L*, a*, b chromaticity values and color difference ΔE of each fiber region are calculated using CIELab color space conversion. For the antique linen-viscose blend fabric in this embodiment, the target chromaticity values are set as L = 45, a = 8, and b = 20.
[0095] The standard deviation of the color difference value in the spatial distribution is calculated as the spatial variation coefficient. The color gradient between adjacent pixels is calculated by the gradient operator, and the information entropy of the gradient distribution is calculated as the color gradient distribution entropy. The smoothness of the color transition at the fiber interface is also calculated as the fiber interface sharpness index. These three indicators together constitute the antique quantification result.
[0096] It has an adaptive learning mechanism based on historical data, and establishes a database containing data from 5,000 dyeing batches to store the evolution history of color difference under different process parameters and the final antique effect evaluation. By analyzing the correlation between process parameters, intermediate color difference values and final antique quality in historical data through deep learning algorithms, it can predict the optimal color difference threshold range.
[0097] Based on the results of the antique quantification, a base color difference threshold of 3.2 times, or 3.6, is set for the core antique area as the allowable color difference threshold. Decreasing threshold coefficients of 0.8 times and 0.6 times are set for the transition blending area and the background stable area, respectively. The color difference value of each fiber area is multiplied by the corresponding weight coefficient and the area ratio of the area. The weighted color difference values of all areas are summed to obtain the comprehensive color difference evaluation result.
[0098] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for calculating and optimizing color difference in antique flax adhesive reactive dyeing, characterized in that, include: Real-time monitoring of fabric movement, calculation of movement speed and displacement, and determination of the timing of spectral acquisition and location compensation parameters; The surface of the fabric under test is illuminated at the acquisition location by a polarized light source, and polarized spectral data is acquired in the normal direction of the fabric surface. The spectral shift caused by the displacement of the fabric under test is corrected based on differential operation processing and position compensation parameters to obtain the reflectance spectral information. The surface of the fabric under test is excited by an ultraviolet light source, and fluorescence spectral data is collected to identify different fiber regions. The fiber density distribution within the fiber region is calculated, and a hierarchical weighting system is constructed. Specifically, the fiber region is divided into a core antique region, a transitional fusion region, and a background stable region based on the fiber density distribution, and weighting coefficients are set. The color difference of the fiber region is calculated based on the reflectance spectrum information. The spatial variation coefficient of the color difference, the color gradient distribution entropy and the fiber interface clarity index are extracted to measure the antique measurement results. The color difference threshold standard is set according to the antique measurement results. Based on a hierarchical weighting system and color difference threshold, the color difference values of the fiber regions are weighted and calculated to obtain a comprehensive color difference evaluation result.
2. The method for calculating and optimizing color difference in antique flax adhesive reactive dyeing according to claim 1, characterized in that: The timing of spectral acquisition is the advance time parameter for triggering spectral acquisition; Determining the timing and location compensation parameters for spectral acquisition includes: continuously capturing images of marker points on the fabric surface at a preset frame rate, analyzing the displacement changes of marker points between consecutive frames to calculate the fabric's motion speed; calculating the lead time parameter for triggering spectral acquisition based on the fabric's motion speed and response time data; and calculating the spatial location compensation parameters based on the expected and actual displacement distances of the fabric during spectral acquisition.
3. The method for calculating and optimizing color difference in antique flax adhesive reactive dyeing according to claim 1, characterized in that: The acquisition of polarization spectral data in the normal direction of the fabric surface includes: acquiring polarization spectral data at different angular positions in the normal direction of the fabric surface; performing differential operations on the spectral data in the orthogonal polarization direction and the parallel polarization direction to separate the surface reflected light and scattered light components and obtain the initial reflection spectral data.
4. The method for calculating and optimizing color difference in antique flax adhesive reactive dyeing according to claim 3, characterized in that: Correcting the spectral shift caused by the displacement of the fabric under test based on the position compensation parameter includes: calculating the wavelength shift caused by the displacement according to the fabric displacement distance and spectral resolution; performing wavelength correction on the initial reflectance spectral data using the wavelength shift; remapping the shifted spectral data to the standard wavelength coordinate system; and compensating for the loss of initial reflectance spectral data caused by the displacement using an interpolation algorithm to obtain continuous and complete reflectance spectral information.
5. The method for calculating and optimizing color difference in antique flax adhesive reactive dyeing according to claim 1, characterized in that: The process of acquiring fluorescence spectral data includes: irradiating the fabric surface with an ultraviolet light source within a safe power density range and collecting fluorescence emission spectra in a wavelength range; the process of identifying different fiber regions includes: calculating the ratio of fluorescence intensity of characteristic peaks, identifying flax fiber regions when the ratio is greater than a preset threshold, and identifying viscose fiber regions when the ratio is not greater than the preset threshold.
6. The method for calculating and optimizing color difference in antique flax adhesive reactive dyeing according to claim 1, characterized in that: The fiber density distribution acquisition process includes: based on the fluorescence spectral recognition results, counting the number of pixels of flax fibers and viscose fibers within the fiber region area, and calculating the flax fiber density ratio; the weighting coefficient setting process includes: when the flax fiber density ratio is greater than a first ratio, it is set as the core antique area, and the weighting coefficient is the first coefficient; when the density ratio is less than or equal to the first ratio but greater than the second ratio, it is set as the transition fusion area, and the weighting coefficient is the second coefficient; when the density ratio is less than or equal to the second ratio, it is set as the background stable area, and the weighting coefficient is the third coefficient; and a weighted gradient transition is established at the boundary of adjacent regions using a Gaussian distance decay function.
7. The method for calculating and optimizing color difference in antique flax adhesive reactive dyeing according to claim 1, characterized in that: The process of obtaining the antique quantization results includes: calculating the L*, a*, b* chromaticity values and color difference value ΔE of each fiber region based on the reflectance spectrum information through CIELab color space conversion; calculating the standard deviation of the color difference value in the spatial distribution as the spatial variation coefficient; calculating the color gradient between adjacent pixels through the gradient operator, and statistically calculating the information entropy of the gradient distribution as the color gradient distribution entropy; and calculating the smoothness of the color transition at the fiber interface as the fiber interface sharpness index.
8. The method for calculating and optimizing color difference in antique flax adhesive reactive dyeing according to claim 1, characterized in that: The process of obtaining the comprehensive color difference evaluation result includes: taking the antique quantification result as the core, setting the first multiple of the benchmark color difference threshold of the antique area as the allowable color difference threshold, and setting decreasing threshold coefficients for the transition fusion area and the background stable area respectively; multiplying the color difference value of each fiber area with the corresponding weight coefficient and the area ratio of the area, and summing the weighted color difference values of all areas to obtain the comprehensive color difference evaluation result.
9. A color difference calculation and optimization system for antique flax adhesive reactive dyeing, characterized in that, A method for optimizing color difference calculation in an antique flax viscose reactive dyeing process as described in claim 1, comprising: The acquisition position module monitors the fabric's motion state in real time, calculates its speed and displacement, and determines the timing of spectral acquisition and position compensation parameters. The data acquisition module illuminates the surface of the fabric under test at the acquisition position using a polarized light source, acquires polarized spectral data in the normal direction of the fabric surface, and corrects the spectral shift caused by the fabric's displacement based on differential processing and position compensation parameters to obtain reflectance spectral information. The fabric partitioning module uses an ultraviolet light source to excite the surface of the fabric under test, collects fluorescence spectral data, and identifies different fiber regions; it calculates the fiber density distribution within the fiber regions and constructs a hierarchical weighting system; specifically, based on the fiber density distribution, the fiber regions are divided into a core antique region, a transitional fusion region, and a background stable region, and weighting coefficients are set. The color difference threshold setting module calculates the color difference of the fiber region based on the reflectance spectrum information, extracts the spatial variation coefficient of the color difference, the color gradient distribution entropy and the fiber interface clarity index, and measures the antique measurement results; and sets the color difference threshold standard based on the antique measurement results. The color difference result acquisition module calculates the color difference value of the fiber area by weighting it based on the hierarchical weighting system and color difference threshold, and obtains the comprehensive color difference evaluation result.
Citation Information
Patent Citations
Online detection system and method for printing and dyeing chromatic aberration and medium
CN118758429A
Garden plant environment ecological assessment method and system
CN120198809A