An online detection system, method and medium for color difference in printing and dyeing
Through the combination of multi-angle illumination and spectral acquisition modules, the image and spectral data are comprehensively evaluated, and the color difference detection problem of surface uneven fabric dyed samples is solved, achieving more accurate and efficient color difference detection.
Patent Information
- Application Number
- CN202411245230.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-09-06
AI Technical Summary
The prior art is difficult to accurately detect the color difference of fabric dyed samples with uneven surfaces, resulting in shadow effects and inaccurate color difference detection results.
The multi-angle lighting module and the multi-angle spectral acquisition module are adopted, combining image data processing and spectral data processing, and the comprehensive evaluation of multi-view images and multi-angle spectral data reduces the shadow effect and improves the accuracy of chromatic aberration detection.
It significantly improves the accuracy and reliability of chromatic aberration detection, is suitable for fabrics with complex three-dimensional structures, and improves the accuracy and efficiency of textile dyeing quality detection.
Smart Images

Figure CN118758429B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of printing and dyeing quality detection, and in particular to an online detection system, method and medium for printing and dyeing color difference. Background Art
[0002] With the rapid development of the textile industry and the growing demand for personalization from consumers, the printing and dyeing industry is facing unprecedented challenges and opportunities. In this context, dyeing quality has become one of the important indicators for measuring the competitiveness of textiles. Accurate color control can not only ensure the color consistency of products in the same batch, avoid returns and reduced customer satisfaction due to color difference, but also enhance the brand image and increase the added value of products.
[0003] However, for some fabrics with complex textures and three-dimensional structures, such as rough denim, delicate silk, and decorative fabrics with embossed patterns, achieving uniform dyeing effects is a difficult task. Due to their unique surface structure and texture, these fabrics are prone to produce different shades of color during the dyeing process, which in turn affects the aesthetics and quality consistency of the final product. Therefore, how to accurately detect the color differences of these fabrics becomes particularly important.
[0004] At present, when common dyeing color difference detection methods are used to process these fabric dyeing samples with uneven surfaces, due to their complex three-dimensional structure, shadow effects often occur under traditional detection methods. These shadows will obscure the true color of part of the fabric, resulting in inaccurate final color difference detection results, making it impossible to guarantee product quality. Summary of the invention
[0005] In order to improve the accuracy of color difference detection, the present invention provides an online detection system, method and medium for color difference in printing and dyeing.
[0006] In a first aspect, the present invention provides an online detection system for color difference in printing and dyeing, which adopts the following technical solution:
[0007] An online detection system for color difference in printing and dyeing, the detection system comprising:
[0008] A multi-angle lighting module, arranged around the stained sample to be detected, for irradiating the stained sample with light from multiple light source irradiation angles;
[0009] A multi-angle spectrum acquisition module is arranged around the dyed sample, and is used to receive the reflected light of the dyed sample from a plurality of illumination angles of the light source, and collect multi-angle spectrum data;
[0010] A multi-view image acquisition module is arranged around the dyed sample and is used to acquire image data of the dyed sample from a plurality of illumination angles of the light source to obtain multi-view image data;
[0011] A data preprocessing module, connected to the multi-angle spectrum acquisition module and the multi-viewing angle image acquisition module, respectively, for preprocessing the multi-angle spectrum data and the multi-viewing angle image data;
[0012] The image data processing module is connected to the data preprocessing module and is used to perform feature extraction and image fusion on the preprocessed multi-view image data to obtain comprehensive image data, and perform color difference comparison between the comprehensive image data and the standard image data to obtain an image comparison result;
[0013] The spectral data processing module is connected to the data preprocessing module and is used to fuse the preprocessed multi-angle spectral data to obtain comprehensive spectral data, and compare the comprehensive spectral data with the standard spectral data to obtain a spectral comparison result;
[0014] The comprehensive analysis module is connected to the image data processing module and the spectrum data processing module respectively, and is used to comprehensively analyze the image comparison result and the spectrum comparison result to obtain the color difference detection result of the dyed sample.
[0015] By adopting the above technical scheme, for fabric dyeing samples with uneven surfaces, irradiating the light source from different angles can reduce the shadow effect, ensuring that more surface details can be captured during the color difference detection process, which is very important for identifying the color changes on the fabric surface; at the same time, the image data captured from multiple angles provides the spatial distribution information of the fabric dyeing samples, and the spectral data collected from multiple angles provides the spectral characteristic information of the fabric dyeing samples. By comprehensively evaluating the two for color difference detection, the characteristics of the dyeing samples can be more comprehensively reflected, ensuring the accuracy and reliability of color difference detection, which is of great significance for improving the automation level and product quality of the printing and dyeing industry.
[0016] Optionally, the detection system further includes:
[0017] An ambient light monitoring module is arranged around the dyed sample to be detected and is used to monitor the ambient light intensity and color temperature data around the dyed sample;
[0018] An illumination compensation control module, connected to the multi-angle illumination module, for adjusting the illumination intensity and color temperature of the multi-angle illumination module in real time according to the ambient illumination intensity and color temperature data;
[0019] The spectrum acquisition control module is connected to the multi-angle spectrum acquisition module and is used to adjust the parameter configuration of the multi-angle spectrum acquisition module in real time according to the ambient light intensity.
[0020] By adopting the above technical solution, the ambient light monitoring module monitors the ambient light intensity and color temperature data in real time, and the light compensation control module dynamically adjusts the light intensity and color temperature of the multi-angle lighting module according to these data, ensuring the stability of the lighting conditions during the detection process; the spectrum acquisition control module adjusts the parameter configuration of the multi-angle spectrum acquisition module in real time according to the ambient light intensity, ensuring that the reflection spectrum data of the dyeing sample can be accurately collected even when the ambient light intensity changes; through the coordinated work of these modules, the accuracy and reliability of the detection are jointly improved, and it can be widely used in the field of textile dyeing quality detection, especially suitable for fabric dyeing samples with uneven surfaces, which significantly improves the accuracy and efficiency of detection.
[0021] Optionally, the multi-angle illumination module further comprises a light intensity distribution monitoring unit, which is used to monitor the light intensity distribution of each light source irradiated on the stained sample, obtain light intensity distribution data and establish a lighting model;
[0022] The image data processing module comprises:
[0023] An inverse illumination function construction unit, used for constructing an inverse illumination function according to the illumination intensity distribution data and the illumination model;
[0024] an illumination compensation unit, configured to calculate the actual illumination intensity of each pixel in the preprocessed multi-view image data based on the inverse illumination function, and perform illumination compensation processing on the multi-view image data according to the actual illumination intensity;
[0025] A color correction unit, configured to determine a color deviation of the multi-view image data after the illumination compensation processing based on a color correction algorithm, and correct a color value of the multi-view image data according to the color deviation;
[0026] An image feature extraction unit, used for extracting feature points from the color-corrected multi-view image data;
[0027] A feature matching unit, used to determine corresponding feature points between multi-view image data and establish a feature point matching relationship;
[0028] An image registration unit, configured to perform geometric correction on the multi-view image data according to the feature point matching relationship;
[0029] An image fusion unit, used for fusing color information of the geometrically corrected multi-view image data based on an image fusion algorithm to obtain comprehensive image data;
[0030] A color space conversion unit, used for performing color space conversion between the integrated image data and the standard image data;
[0031] A color difference calculation unit, used for calculating the color difference value between the comprehensive image data and the standard image data at each pixel position, and obtaining a color difference value matrix at each pixel position;
[0032] The image comparison result generating unit is used to count the color difference distribution according to the color difference value matrix at each pixel position, and calculate the average color difference value to obtain the image comparison result.
[0033] By adopting the above technical solution, the color deviation caused by uneven lighting can be effectively eliminated, the consistency and accuracy of the image can be improved, and finally a reliable comparison result can be obtained by calculating the color difference between the composite image and the standard image. This technical solution is very suitable for fields such as textile dyeing quality inspection, and can significantly improve the inspection accuracy and efficiency, especially when dealing with samples with complex surface structures.
[0034] Optionally, the spectral data processing module includes:
[0035] A spectral data adjustment unit, used for adjusting the pre-processed multi-angle spectral data according to the light intensity distribution data;
[0036] A spectral feature extraction unit, used for extracting spectral features at different angles from the adjusted multi-angle spectral data;
[0037] A data registration unit, used to align spectral features at different angles based on an image registration algorithm;
[0038] A spectral fusion unit, used to merge the aligned spectral features at different angles into comprehensive spectral data;
[0039] A spectral comparison unit, used to compare the comprehensive spectral data with the standard spectral data, and calculate the similarity based on the spectral difference obtained by comparison;
[0040] The spectrum comparison result generating unit is used to calculate the color difference value corresponding to the similarity to obtain the spectrum comparison result.
[0041] By adopting the above technical solution, key features can be effectively extracted and fused from multi-angle spectral data, and finally a comparison result with standard spectral data can be generated, thereby improving the accuracy and reliability of spectral data analysis and facilitating support for various decision-making and research work.
[0042] Optionally, the comprehensive analysis module includes:
[0043] A difference analysis unit, used for calculating the absolute value of the difference by combining the image comparison result and the spectrum comparison result;
[0044] The color difference detection result generating unit is used to calculate the average value of the image comparison result and the spectrum comparison result to obtain the color difference detection result when the absolute value of the difference is less than a preset difference threshold.
[0045] By adopting the above technical solution, a comprehensive and quantitative method is provided to evaluate color difference, especially when the difference is small, by combining the results of image comparison and spectral comparison, more accurate and stable detection results can be provided.
[0046] Optionally, the comprehensive analysis module further includes:
[0047] A device deviation analysis unit, configured to perform deviation analysis on the device calibration records of the multi-view image acquisition module and the multi-angle spectrum acquisition module respectively when the absolute value of the difference is greater than a preset difference threshold, to obtain corresponding device deviation analysis results;
[0048] an algorithm deviation analysis unit, configured to perform deviation analysis on the image processing algorithm of the image data processing module and the spectral data processing algorithm of the spectral data processing module respectively when the absolute value of the difference is greater than a preset difference threshold, to obtain corresponding algorithm deviation analysis results;
[0049] A data anomaly analysis unit, configured to perform data anomaly analysis on the image comparison result and the spectrum comparison result respectively when the absolute value of the difference is greater than a preset difference threshold, to obtain corresponding data anomaly analysis results;
[0050] a credibility evaluation unit, configured to respectively perform credibility evaluation on the image comparison result and the spectrum comparison result according to the device deviation analysis result, the algorithm deviation analysis result and the data anomaly analysis result;
[0051] A weight allocation unit, used to allocate preset weights to the image comparison result and the spectrum comparison result respectively according to the credibility evaluation result;
[0052] The color difference detection result generating unit is further used to perform weighted averaging on the image comparison result and the spectrum comparison result based on the preset weight, and calculate a weighted average color difference value as the color difference detection result.
[0053] By adopting the above technical solutions, the device deviation analysis unit helps to identify the deviation of the device itself, providing a more accurate basis for subsequent data processing and analysis; the algorithm deviation analysis unit helps to ensure that the algorithm used is accurate and reduces the detection error caused by algorithm deviation; the data anomaly analysis unit helps to detect whether there are abnormal values in the process of obtaining image comparison results and spectral comparison results. By introducing steps such as device deviation analysis, algorithm deviation analysis, data anomaly analysis, credibility assessment and weight allocation, the accuracy and reliability of color difference detection results are ensured, which can not only effectively identify and correct problems caused by device and algorithm deviations, but also optimize the final color difference detection results through credibility assessment and weight allocation mechanisms, so that even in the face of complex or inconsistent data, a high degree of accuracy can be maintained.
[0054] Optionally, the detection system further includes:
[0055] A device calibration feedback module, connected to the device deviation analysis unit, for generating a device calibration feedback signal according to the device deviation analysis result and sending the signal to the debugging terminal;
[0056] An algorithm adjustment feedback module, connected to the algorithm deviation analysis unit, for generating an algorithm adjustment feedback signal according to the algorithm deviation analysis result and sending the signal to the debugging terminal;
[0057] The data processing feedback module is connected to the data anomaly analysis unit and is used to generate a data processing feedback signal according to the data anomaly analysis result and send it to the debugging terminal.
[0058] By adopting the above technical solution, through the synergistic effect of the equipment calibration feedback module, the algorithm adjustment feedback module and the data processing feedback module, equipment deviations, algorithm deviations and data anomalies can be automatically detected and corrected, thereby significantly improving the accuracy, consistency and reliability of the test results.
[0059] Optionally, the detection system further includes:
[0060] A grayscale conversion module, connected to the image data processing module, for converting the comprehensive image data into a grayscale image;
[0061] A gray level co-occurrence matrix analysis module, used for applying a gray level co-occurrence matrix algorithm to the gray level image to calculate contrast and homogeneity features in multiple directions;
[0062] A texture complexity score calculation module, used to calculate the texture complexity score according to the contrast and homogeneity features in each direction;
[0063] A depth map construction module, connected to the image data processing module, for constructing a depth map from the integrated image data based on a stereo matching algorithm;
[0064] An average disparity value calculation module, used to calculate the average disparity value of each area in the depth map according to the depth map;
[0065] A three-dimensional structure complexity score calculation module, used for calculating the three-dimensional structure complexity score according to the average parallax value of each area;
[0066] A color difference threshold calculation module, used to calculate the dynamic color difference threshold of the dyed sample according to the basic color difference threshold, the texture complexity score and the three-dimensional structure complexity score;
[0067] A color difference comparison module, connected to the comprehensive analysis module, for comparing the color difference detection result of the dyed sample with the dynamic color difference threshold to obtain a color difference comparison result;
[0068] The parameter adjustment feedback module is connected to the color difference comparison module and is used to generate a parameter adjustment feedback signal according to the color difference comparison result and send it to the printing and dyeing control system.
[0069] By adopting the above technical solution, not only can the texture complexity and three-dimensional structure complexity of the sample be accurately quantified, but the color difference threshold can also be dynamically adjusted according to these quantitative indicators, thereby realizing real-time monitoring and adjustment of dyeing quality. This closed-loop control mechanism significantly improves the automation level of the printing and dyeing process and the consistency of product quality.
[0070] In a second aspect, the present invention provides an online detection method for color difference in printing and dyeing, which adopts the following technical solution:
[0071] An online detection method for color difference of printing and dyeing is applied to the online detection system for color difference of printing and dyeing described in the first aspect, and the detection method comprises:
[0072] Reflected light of the stained sample to be detected is received from multiple light source illumination angles, and multi-angle spectral data is collected; wherein light sources are arranged around the stained sample to be detected, irradiating the stained sample from multiple light source illumination angles;
[0073] Collect image data of the dyed sample from multiple light source illumination angles to obtain multi-view image data;
[0074] Preprocessing the multi-angle spectral data and the multi-viewing angle image data;
[0075] Performing feature extraction and image fusion on the preprocessed multi-view image data to obtain comprehensive image data, and performing color difference comparison between the comprehensive image data and the standard image data to obtain an image comparison result;
[0076] The pre-processed multi-angle spectral data are fused to obtain comprehensive spectral data, and the comprehensive spectral data are compared with the standard spectral data for color difference to obtain a spectral comparison result;
[0077] The image comparison result and the spectrum comparison result are combined to analyze and obtain the color difference detection result of the dyed sample.
[0078] In a third aspect, the present invention provides a computer-readable storage medium, which adopts the following technical solution:
[0079] A computer-readable storage medium stores a computer program that can be loaded by a processor and execute any method in the second aspect.
[0080] To sum up, the present invention includes at least one of the following beneficial technical effects: the present invention is mainly aimed at fabric dyeing samples with uneven surfaces, especially those with complex three-dimensional structures, and comprehensively utilizes the spatial distribution information provided by image data and the spectral characteristic information provided by spectral data. Through the comprehensive evaluation of image and spectral data, it can more comprehensively reflect the true characteristics of the dyeing samples, significantly improve the accuracy of color difference detection, effectively solve the problem of color difference detection of complex three-dimensional structure fabrics, and provide the textile industry with a more accurate and efficient online detection method, which is of great practical significance for improving product quality, reducing costs, and promoting industrial upgrading. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] Figure 1 It is a first structural schematic diagram of an online detection system for printing and dyeing color difference according to one embodiment of the present invention.
[0082] Figure 2 It is a schematic diagram of a physical structure for performing color difference detection on a dyed sample according to one embodiment of the present invention.
[0083] Figure 3 It is a second structural schematic diagram of an online detection system for printing and dyeing color difference according to one embodiment of the present invention.
[0084] Figure 4 It is a third structural schematic diagram of an online detection system for printing and dyeing color difference according to one embodiment of the present invention.
[0085] Figure 5 It is a fourth structural schematic diagram of an online detection system for printing and dyeing color difference according to one embodiment of the present invention.
[0086] Figure 6It is a schematic flow chart of an online detection method for color difference in printing and dyeing according to one embodiment of the present invention.
[0087] Explanation of the accompanying drawings: 100, fabric dyeing sample; 101, multi-angle lighting module; 102, multi-angle spectrum acquisition module; 103, multi-view image acquisition module; 104, data preprocessing module; 105, image data processing module; 106, spectrum data processing module; 107, comprehensive analysis module; 201, ambient light monitoring module; 202, illumination compensation control module; 203, spectrum acquisition control module; 301, equipment calibration feedback module; 302, algorithm adjustment feedback module; 303, data processing feedback module; 401, grayscale conversion module; 402, grayscale co-occurrence matrix analysis module; 403, texture complexity score calculation module; 404, depth map construction module; 405, average disparity value calculation module; 406, three-dimensional structure complexity score calculation module; 407, color difference threshold calculation module; 408, color difference comparison module; 409, parameter adjustment feedback module. DETAILED DESCRIPTION
[0088] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the following Figure 1-Figure 6 It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0089] With the rapid development of the textile industry, consumers have higher and higher requirements for the color quality of textiles. In the production process of textiles, the dyeing process is crucial, which directly determines the appearance quality of the final product. Traditional dyeing color difference detection methods have certain limitations, especially when dealing with fabric dyeing samples with uneven surfaces. Due to their complex three-dimensional structure, such fabrics often have shadow effects under traditional detection methods, resulting in inaccurate color evaluation. Therefore, how to overcome the shadow effect of uneven surface fabrics during the color difference detection process, while making full use of the spatial distribution information of the image and the spectral characteristic information of the spectral data, has become a problem that needs to be solved urgently.
[0090] The embodiment of the invention discloses an online detection system for color difference in printing and dyeing.
[0091] Reference Figure 1 , an online detection system for color difference in printing and dyeing, the detection system comprises:
[0092] A multi-angle lighting module 101 is disposed around the stained sample to be detected and is used to illuminate the stained sample from multiple light source illumination angles;
[0093] The dyed samples to be tested may be fabric dyed samples with an uneven surface and a complex three-dimensional structure, such as denim, rough cotton and linen fabrics, decorative fabrics with embossed patterns, and the like.
[0094] In one embodiment of the present invention, the multi-angle lighting module 101 can be configured as a ring-shaped LED array light, each LED light has a different tilt angle to ensure that the fabric is illuminated from different directions. During the illumination process, the brightness and switch state of each LED light can be controlled by software to adapt to the lighting requirements of different fabric characteristics.
[0095] It should be noted that the illumination angle of each light source has been carefully designed to ensure that all important areas of the sample surface are covered, making it easier to capture more surface details, helping to improve image quality, reduce shadow effects, and make the acquired images clearer.
[0096] The multi-angle spectrum acquisition module 102 is arranged around the dyed sample and is used to receive the reflected light of the dyed sample from multiple light source illumination angles and collect multi-angle spectrum data;
[0097] Specifically, the multi-angle spectral acquisition module 102 can be a spectrometer or a similar device. By adjusting the position and angle of the spectrometer to correspond to the illumination angle of the LED lamp in the multi-angle lighting module 101, the reflected light of the dyed sample can be received from the illumination angle of the light source, and the reflected spectrum data of the sample in the visible light range can be collected; each spectrometer is usually equipped with optical elements such as filters or gratings to accurately measure the spectral information within a specific wavelength range.
[0098] It can be understood that by collecting spectral data at different angles, a more comprehensive understanding of the color composition of the sample can be obtained, which helps to reduce measurement errors caused by changes in the sample surface structure and improve the accuracy of color difference detection.
[0099] The multi-view image acquisition module 103 is arranged around the dyed sample and is used to acquire image data of the dyed sample from multiple light source illumination angles to obtain multi-view image data;
[0100] The multi-view image acquisition module 103 can be configured as a plurality of cameras, which are usually equipped with high-resolution sensors and high-quality lenses to ensure image quality; the position and angle of the camera are adjusted to correspond to the illumination angle of the LED light in the multi-angle lighting module 101 to obtain the best image effect, thereby ensuring that all important angles of the fabric are covered;
[0101] It can be understood that by capturing image information from different angles and observing the color and texture details of the sample, it helps to reduce the visual differences caused by changes in viewing angles and improve the accuracy of image comparison.
[0102] The data preprocessing module 104 is connected to the multi-angle spectrum acquisition module 102 and the multi-view image acquisition module 103, respectively, and is used to preprocess the multi-angle spectrum data and the multi-view image data;
[0103] In some embodiments, for multi-angle spectral data, the data preprocessing step includes smoothing, denoising, and standardizing the spectral data to reduce measurement errors and improve the accuracy of subsequent analysis;
[0104] For multi-view image data, the data preprocessing steps include graying, denoising and smoothing the image to reduce the impact of noise on color evaluation; using edge detection algorithms (such as Canny edge detection) to identify the boundaries of the fabric and help locate the color area; and extracting color features through color space conversion (such as RGB to Lab) to prepare for subsequent image fusion.
[0105] The spectral data processing module 106 is connected to the data preprocessing module 104 and is used to fuse the preprocessed multi-angle spectral data to obtain comprehensive spectral data, and compare the comprehensive spectral data with the standard spectral data to obtain a spectral comparison result;
[0106] Among them, by fusing the pre-processed multi-angle spectral data, the noise in the spectral data can be reduced and the accuracy of color difference detection can be improved. Then, the comprehensive spectral data and the standard spectral data are compared for color difference. By providing objective color difference comparison results, it is helpful to quantitatively analyze the difference between the sample and the standard.
[0107] The image data processing module 105 is connected to the data preprocessing module 104 and is used to perform feature extraction and image fusion on the preprocessed multi-view image data to obtain comprehensive image data, and perform color difference comparison between the comprehensive image data and the standard image data to obtain an image comparison result;
[0108] Among them, the image data processing module 105 can use image processing algorithms to extract key features from the preprocessed multi-view image data and perform image fusion. By comparing the color difference of the fused comprehensive image data with the standard image data, the visual difference between the stained sample and the standard sample can be more accurately compared. By providing intuitive color difference comparison results, it is helpful to quickly locate the problem.
[0109] The comprehensive analysis module 107 is connected to the spectrum data processing module 106 and the image data processing module 105 respectively, and is used to comprehensively analyze the image comparison result and the spectrum comparison result to obtain the color difference detection result of the dyed sample.
[0110] Specifically, the comprehensive analysis module 107 can calculate the final color difference detection result by integrating the image comparison result and the spectrum comparison result, and using algorithms such as weighted average, so that the color difference detection is more comprehensive and accurate.
[0111] In the above-mentioned implementation mode, for fabric dyeing samples with uneven surfaces, irradiating the light source from different angles can reduce the shadow effect, thereby ensuring that more surface details can be captured during the color difference detection process, which is very important for identifying the color changes on the fabric surface; at the same time, the image data captured from multiple angles provides the spatial distribution information of the fabric dyeing samples, and the spectral data collected from multiple angles provides the spectral characteristic information of the fabric dyeing samples. By comprehensively evaluating the two for color difference detection, the characteristics of the dyeing samples can be more comprehensively reflected, ensuring the accuracy and reliability of color difference detection, which is of great significance for improving the automation level and product quality of the printing and dyeing industry.
[0112] Reference Figure 2 As shown, it is a schematic diagram of the physical structure of color difference detection of dyed samples according to one embodiment of the present invention. The central part is a fabric dyed sample 100 to be detected, whose surface is uneven and has a complex three-dimensional structure. The multi-angle lighting module 101 surrounding the fabric dyed sample 100 adopts a group of annular LED array lights, and these LED lights are arranged at different inclination angles to ensure that the sample can be evenly illuminated from multiple angles; the multi-angle spectrum acquisition module 102 adopts multiple spectrometers arranged around the fabric dyed sample 100, corresponding to the angle of the LED lights, to collect the reflection spectrum data of the fabric dyed sample 100 in the visible light range; the multi-view image acquisition module 103 adopts multiple cameras arranged around the fabric dyed sample 100, and the positions and angles also correspond to the LED lights, so as to capture the best image effect.
[0113] It should be noted that Figure 2 The placement positions and numbers of components in the structural schematic diagram are merely exemplary and may be configured and adjusted according to actual conditions during the actual detection process, and the embodiments of the present invention do not limit this.
[0114] Reference Figure 3 As a further embodiment of the detection system, the detection system further includes:
[0115] An ambient light monitoring module 201 is disposed around the dyed sample to be detected and is used to monitor the ambient light intensity and color temperature data around the dyed sample;
[0116] In some embodiments, the light intensity around the dyed sample to be tested can be monitored by a photosensitive sensor (such as a photodiode or a phototransistor). These sensors can convert light signals into electrical signals, and convert analog signals into digital signals through an analog-to-digital converter (ADC) for subsequent processing; at the same time, the spectral distribution of the ambient light can be monitored by a spectral sensor, and the corresponding color temperature value can be calculated. By real-time monitoring and recording the light intensity and color temperature data around the dyed sample, the necessary reference basis is provided for subsequent light compensation and spectrum acquisition.
[0117] The light compensation control module 202 is connected to the ambient light monitoring module 201 and the multi-angle lighting module 101, and is used to adjust the light intensity and color temperature of the multi-angle lighting module 101 in real time according to the ambient light intensity and color temperature data;
[0118] Specifically, according to the change of ambient light intensity, the brightness of the LED lamp in the multi-angle lighting module 101 is adjusted by a PID (proportional integral differential) controller to keep the light intensity at the dyed sample constant; at the same time, by adjusting the ratio of LED lamps of different colors, or using LED lamps with adjustable color temperature, the color temperature of the light source is adjusted according to the ambient color temperature data to ensure that the color temperature of the light source is close to or consistent with the ambient light.
[0119] It can be understood that by adjusting the light intensity and color temperature of the multi-angle lighting module 101 in real time, it is ensured that the stained sample is always under stable lighting conditions during the detection process, which effectively reduces the impact of ambient light changes on the detection results.
[0120] The spectrum acquisition control module 203 is connected to the multi-angle spectrum acquisition module 102 and is used to adjust the parameter configuration of the multi-angle spectrum acquisition module 102 in real time according to the ambient light intensity.
[0121] Specifically, according to the changes in ambient light intensity, by adjusting parameters such as the exposure time and gain of the spectrometer, it is ensured that the spectrometer can accurately collect the reflectance spectrum data of the stained sample; in addition, before starting each color difference detection, the spectrometer needs to be automatically calibrated to ensure that it works in the best condition to improve the accuracy of the collected data.
[0122] In the above embodiment, the ambient light monitoring module 201 monitors the ambient light intensity and color temperature data in real time, and the light compensation control module 202 dynamically adjusts the light intensity and color temperature of the multi-angle lighting module 101 according to these data, thereby ensuring the stability of the lighting conditions during the detection process; the spectrum acquisition control module 203 adjusts the parameter configuration of the multi-angle spectrum acquisition module 102 in real time according to the ambient light intensity, thereby ensuring that the reflected spectrum data of the dyeing sample can be accurately collected even when the ambient light intensity changes; through the coordinated work of these modules, the accuracy and reliability of the detection are jointly improved, and it can be widely used in the field of textile dyeing quality detection, and is particularly suitable for fabric dyeing samples with uneven surfaces, which significantly improves the accuracy and efficiency of detection.
[0123] As an implementation of the multi-angle lighting module 101, the multi-angle lighting module 101 also includes a light intensity distribution monitoring unit, which is used to monitor the light intensity distribution of each light source irradiating the stained sample, obtain light intensity distribution data and establish a lighting model.
[0124] In some embodiments, multiple photosensors (such as photodiode arrays) can be distributed at different angles around the stained sample to monitor the intensity distribution of light irradiated by each light source on the stained sample, and a lighting model that can reflect the intensity distribution of light at different angles is formed by mathematically modeling the monitored data.
[0125] In some embodiments, the illumination model can be established based on physical principles or statistical learning methods. In physical modeling, it is usually assumed that the illumination conforms to certain laws, such as the Lambertian illumination model or the Brin-Fresnel model, which take into account factors such as the direction and intensity of the light source and the reflective characteristics of the surface of the object.
[0126] Specifically, a model can be established through data analysis methods, such as polynomial regression, to describe the relationship between light intensity and angle. The model can take a simple polynomial form or be more complex, such as using deep learning methods to train a neural network to simulate the light intensity distribution. The model can accurately obtain the light intensity distribution of each light source on the stained sample, thereby providing basic data for the subsequent construction of the inverse illumination function.
[0127] As an implementation of the image data processing module 105, the image data processing module 105 includes:
[0128] The inverse illumination function construction unit is connected to the illumination intensity distribution monitoring unit and is used to construct an inverse illumination function according to the illumination intensity distribution data and the illumination model;
[0129] Specifically, based on the light intensity distribution data and the light model, an inverse illumination function can be constructed. This function can estimate the original light intensity distribution of the sample without external interference. This usually involves numerical methods or optimization algorithms to solve. By restoring lighting conditions close to reality, more accurate basic data can be provided for subsequent color correction and image fusion.
[0130] For example, suppose there is a set of illumination intensity data I(x,y) collected from multiple angles, x and y are pixel coordinates, and the Lambertian illumination model is expressed as: I(x,y)=L·cos(θ)·R(x,y), where L is the light intensity, θ is the angle of incidence, and R(x,y) is the reflectivity of the object surface at that point. First, it is necessary to estimate the light intensity L and the object surface reflectivity R(x,y), which can be done by the least squares method or other optimization methods; assuming that an estimated reflectivity R(x,y) is obtained, the inverse illumination function can be constructed as f(I(x,y))=I(x,y) / (L·cos(θ)), thereby estimating the real illumination intensity distribution that is not affected by illumination.
[0131] An illumination compensation unit, used to calculate the actual illumination intensity of each pixel in the preprocessed multi-view image data based on an inverse illumination function, and perform illumination compensation processing on the multi-view image data according to the actual illumination intensity;
[0132] Among them, based on the actual light intensity of each pixel calculated by the inverse illumination function, the pre-processed multi-view image data is subjected to illumination compensation processing to make the brightness of each pixel closer to its original state, thereby reducing the color deviation caused by uneven illumination and improving the consistency of the image.
[0133] A color correction unit, used to determine the color deviation of the multi-view image data after the illumination compensation processing based on a color correction algorithm, and correct the color value of the multi-view image data according to the color deviation;
[0134] In some embodiments, the grayscale world hypothesis algorithm or the maximum color constancy algorithm can be used to correct the color deviation of the multi-view image data to ensure that the color of the image at different viewing angles is as consistent as possible. The grayscale world hypothesis algorithm assumes that there are gray objects in the scene, and their average pixel values under different lighting should be close to the grayscale value, while the maximum color constancy algorithm selects the brightest color in the image as a reference point for color correction.
[0135] Understandably, color correction before fusing the data helps ensure that the data from each angle is as consistent as possible, reducing potential problems in subsequent processing and preventing errors caused by lighting differences from being amplified.
[0136] An image feature extraction unit, used for extracting feature points from the color-corrected multi-view image data;
[0137] Specifically, key feature points, such as edges and corners, can be extracted from the color-corrected multi-view image data to facilitate subsequent feature matching.
[0138] A feature matching unit, used to determine corresponding feature points between multi-view image data and establish a feature point matching relationship;
[0139] Among them, by comparing the feature points in image data from different perspectives and establishing the corresponding relationship between them, it is helpful for the subsequent image registration process.
[0140] An image registration unit, used for geometrically correcting multi-view image data according to a matching relationship of feature points;
[0141] Among them, all images are aligned to the same coordinate system through geometric correction (such as affine transformation or perspective transformation) to ensure the correct registration of image data from different perspectives.
[0142] An image fusion unit, used for fusing color information of the geometrically corrected multi-view image data based on an image fusion algorithm to obtain comprehensive image data;
[0143] In some embodiments, strategies such as weighted averaging and pyramid fusion may be used to merge multi-view images to form a composite image;
[0144] For example, by using the weighted average method, the same pixel position in each multi-view image can be weighted averaged according to a certain weight coefficient to generate the corresponding pixel value in the fused image, thereby effectively combining the advantages of each view image, reducing noise and blur, and improving the quality of the integrated image. It should be noted that the weight coefficient in this process can be determined based on a variety of factors, such as pixel clarity, contrast, or image signal-to-noise ratio, that is, if the image under a certain view angle is clearer in a specific area, the pixels in the area will be given a higher weight in the fusion process.
[0145] For example, a pyramid fusion method can also be used, which decomposes each multi-view image into different resolution levels (usually called a "pyramid"), and then fuses each layer separately, and finally recombine the fused layers to obtain the final fused image; in each layer, weighted averaging or other fusion strategies are usually used, such as gradient fusion (retaining the advantages of each view image in certain details), which can better retain the detail information in the image, while reducing artifacts in the fusion process, and generating a high-quality composite image.
[0146] A color space conversion unit, used for performing color space conversion between the integrated image data and the standard image data;
[0147] Specifically, the composite image and the standard image may be converted from the RGB color space to the CIELAB or CIELUV color space that is more consistent with the perception characteristics of the human eye, so as to facilitate color difference calculation.
[0148] A color difference calculation unit, used for calculating the color difference value at each pixel position between the comprehensive image data and the standard image data, and obtaining a color difference value matrix at each pixel position;
[0149] Specifically, the color difference value of the two images at each pixel position can be calculated using the CIEDE2000 color difference formula to obtain a color difference value matrix at each pixel position to quantify the color difference between the composite image and the standard image;
[0150] The image comparison result generating unit is used to count the color difference distribution according to the color difference value matrix at each pixel position, and calculate the average color difference value to obtain the image comparison result.
[0151] Specifically, a statistical analysis is performed on the color difference value matrix, including the calculation of the histogram, minimum, maximum, median and other statistics of the color difference distribution; finally, the average value of the color difference values of all pixel positions is calculated as the overall evaluation index of the image comparison to quantify the color difference between the composite image and the standard image, and then evaluate the quality of the composite image.
[0152] In the above implementation, the color deviation caused by uneven lighting is effectively eliminated to improve the consistency and accuracy of the image, and finally a reliable comparison result is obtained by calculating the color difference between the composite image and the standard image; this technical solution is very suitable for fields such as textile dyeing quality detection, and can significantly improve the detection accuracy and efficiency, especially when dealing with samples with complex surface structures.
[0153] As an implementation of the spectral data processing module 106, the spectral data processing module 106 includes:
[0154] A spectral data adjustment unit, used to adjust the pre-processed multi-angle spectral data according to the light intensity distribution data;
[0155] Specifically, the purpose of spectral data adjustment is to compensate for the spectral response differences caused by different light source intensities. By using light intensity distribution data to correct multi-angle spectral data, it can ensure comparability and consistency in the subsequent spectral feature extraction process, thereby improving the accuracy of the final analysis results.
[0156] The adjustment of the spectral data can be achieved by multiplying the spectral data at each angle by a corresponding correction factor, and the correction factor can be calculated according to the illumination model.
[0157] A spectral feature extraction unit, used for extracting spectral features at different angles from the adjusted multi-angle spectral data;
[0158] Specifically, spectral feature extraction is to extract meaningful features from the adjusted spectral data. These features can be used to describe the spectral characteristics of the object. Common spectral features include absorption peaks, reflectivity peaks, etc.
[0159] Among them, the feature extraction algorithm can use peak detection algorithm, curve fitting, principal component analysis and other methods to extract these features. By extracting key spectral features, the amount of data can be significantly reduced while retaining the most valuable information to facilitate subsequent data analysis and comparison.
[0160] A data registration unit, used to align spectral features at different angles based on an image registration algorithm;
[0161] Specifically, data registration refers to aligning spectral features from different angles into the same coordinate system to eliminate the deviation caused by the change in viewing angle, and to achieve the best matching state between spectral features at different angles by finding the best transformation parameters; in some embodiments, rigid body transformation, affine transformation or nonlinear transformation methods can be used to align spectral features at different angles;
[0162] A spectral fusion unit, used to merge the aligned spectral features at different angles into comprehensive spectral data;
[0163] Spectral fusion refers to combining spectral features at different angles into a comprehensive spectral data set to reflect the complete spectral characteristics of the target object. In some embodiments, weighted averaging, principal component analysis, and other methods can be used to combine these features to generate a comprehensive spectral data set containing all angle information.
[0164] A spectrum comparison unit is used to compare the comprehensive spectrum data with the standard spectrum data, and calculate the similarity based on the spectrum difference obtained by comparison;
[0165] Specifically, spectral comparison refers to comparing comprehensive spectral data with standard spectral data to evaluate the similarity between them. According to the similarity, the difference between the two spectral data can be understood, and the difference can be the difference at a specific wavelength point or the comprehensive difference in the entire spectral range;
[0166] In some embodiments, the difference between the integrated spectrum data and the standard spectrum data can be measured using methods such as Euclidean distance, correlation coefficient, and Mahalanobis distance. For example, assuming that the reflectivity of the integrated spectrum data at 550nm is 0.6, and the reflectivity of the standard spectrum data at the same wavelength is 0.65, then the spectrum difference at this wavelength is ;
[0167] The spectrum comparison result generating unit is used to calculate the color difference value corresponding to the similarity to obtain the spectrum comparison result.
[0168] The similarity calculated based on the difference between the comprehensive spectrum data and the standard spectrum data is further calculated to obtain the spectrum comparison result. Specifically, the color difference value between the comprehensive spectrum data and the standard spectrum data can be calculated using a color difference formula such as CIEDE2000, and the calculated color difference value is used as the final spectrum comparison result.
[0169] For example, assuming that the average color difference between the comprehensive spectrum data and the standard spectrum data at all wavelength points is 2.5, this value can be used to represent the spectrum comparison result between the two.
[0170] In the above implementation, by extracting and fusing key features from multi-angle spectral data, a comparison result with standard spectral data is finally generated, thereby improving the accuracy and reliability of spectral data analysis and facilitating support for various decision-making and research work.
[0171] As an implementation of the comprehensive analysis module 107, the comprehensive analysis module 107 includes:
[0172] A difference analysis unit, used to calculate the absolute value of the difference by integrating the image comparison result and the spectrum comparison result;
[0173] Among them, it is assumed that the average color difference value of the image comparison result is d image , the color difference value of the spectrum comparison result is d spectrum , then the absolute value of the difference is ; The average color difference value d of the image comparison result image Indicates the color difference calculated from the image perspective, the color difference value d of the spectral comparison result spectrum Indicates the calculated color difference based on spectral data.
[0174] The color difference detection result generating unit is used to calculate the average value of the image comparison result and the spectrum comparison result when the absolute value of the difference is less than a preset difference threshold value to obtain the color difference detection result.
[0175] The preset difference threshold is a pre-set value used to determine whether the difference between the image comparison result and the spectral comparison result is acceptable. It can be pre-configured and adjusted based on historical experience or historical data. The threshold is used to distinguish between small differences (higher consistency) and large differences (lower consistency).
[0176] Specifically, when the absolute value of the difference is lower than the preset threshold, it means that the difference between the image comparison result and the spectral comparison result is small. At this time, it can be considered that their results are similar and have good consistency. By averaging the results of the two, a more stable and reliable color difference detection result can be obtained, which simplifies the calculation process.
[0177] In the above embodiments, a comprehensive and quantitative method is provided to evaluate color difference, especially when the difference is small, by combining the results of image comparison and spectral comparison, a more accurate and stable detection result can be provided.
[0178] As a further implementation of the comprehensive analysis module 107, the comprehensive analysis module 107 further includes:
[0179] The device deviation analysis unit is used to perform deviation analysis on the device calibration records of the multi-view image acquisition module 103 and the multi-angle spectrum acquisition module 102 respectively when the absolute value of the difference is greater than a preset difference threshold, and obtain corresponding device deviation analysis results;
[0180] When the absolute value of the difference is greater than the preset difference threshold, the calibration records of the multi-view image acquisition module 103 (such as an image acquisition device such as a camera) and the multi-angle spectrum acquisition module 102 (such as a spectrometer) can be checked and compared to analyze whether there is a slight offset based on the device calibration records to determine whether there is a device error;
[0181] For example, assuming that the image acquisition device has a slight offset during the calibration process, resulting in a systematic color offset in the acquired image, such an offset can be found and recorded as a device deviation analysis result of the multi-view image acquisition module 103 by checking the calibration record;
[0182] It is understandable that if there is a problem with the equipment, timely adjustment or calibration should be carried out to ensure that the equipment operates in good working condition and avoid data deviation caused by equipment problems;
[0183] An algorithm deviation analysis unit, for performing deviation analysis on the image processing algorithm of the image data processing module 105 and the spectral data processing algorithm of the spectral data processing module 106 respectively when the absolute value of the difference is greater than a preset difference threshold, to obtain corresponding algorithm deviation analysis results;
[0184] Specifically, for the image data processing module 105, the image processing process can be reviewed to check whether the image processing algorithm (such as image preprocessing, feature extraction algorithm, etc.) therein has introduced a fixed deviation. For example, the image processing algorithm used and its version can be checked, and whether the algorithm parameter settings are consistent. The accuracy of the algorithm can also be tested through known standard samples to verify whether a fixed deviation exists.
[0185] For example, assuming that the image processing algorithm always produces a slight bluish cast when processing the red area, this may be due to a deviation in the specific version of the algorithm when processing the red channel. Through algorithm deviation analysis, this problem can be identified and recorded as the algorithm deviation analysis result of the image data processing module 105.
[0186] Specifically, for the spectral data processing module 106, the spectral data processing process can be reviewed to check whether the spectral data processing algorithm (such as data preprocessing and analysis algorithm) therein has introduced a fixed deviation. For example, the spectral data processing algorithm used and its version can be checked, and whether the algorithm parameter settings are consistent. The accuracy of the algorithm can also be tested using known standard samples to verify whether a fixed deviation exists.
[0187] It is understandable that by ensuring that the algorithm used is the latest and verified version and the parameters are set appropriately, the accuracy and consistency of the algorithm can be improved and data bias caused by algorithmic problems can be avoided.
[0188] A data anomaly analysis unit, used to perform data anomaly analysis on the image comparison result and the spectrum comparison result respectively when the absolute value of the difference is greater than a preset difference threshold, to obtain corresponding data anomaly analysis results;
[0189] Specifically, for image comparison results, the color difference distribution in the color difference value matrix can be analyzed to check whether there are outliers. For example, statistics such as standard deviation can be used to evaluate the degree of change between data points, and visualization tools such as histograms and box plots can be used to observe data distribution characteristics. For spectral comparison results, data anomalies can be identified by analyzing the stability of measured values at different wavelengths in the spectral data.
[0190] For example, suppose there is a particularly large value in a set of color difference values that far exceeds other values. This may be caused by noise or failure in the data acquisition process. Through data anomaly analysis, this abnormal value can be identified and recorded as a data anomaly analysis result.
[0191] It is understandable that when data anomalies are found, the impact of noise on the test results can be reduced by identifying and eliminating outliers, thereby improving the reliability and accuracy of the data and ensuring the credibility of the test results.
[0192] A credibility evaluation unit, used to respectively evaluate the credibility of the image comparison result and the spectrum comparison result according to the equipment deviation analysis result, the algorithm deviation analysis result and the data anomaly analysis result;
[0193] Among them, credibility assessment determines the reliability of data based on the results of deviation analysis and anomaly analysis. The final credibility score is obtained by comprehensively considering the impact of equipment deviation analysis results, algorithm deviation analysis results, and data anomaly analysis results on data credibility.
[0194] For example, assuming that a credibility assessment is performed on the image comparison results, it is found through device deviation analysis that the image acquisition device has a slight deviation, no obvious deviation is found through algorithm deviation analysis, and several abnormal values are found in the image data through data anomaly analysis. The credibility assessment unit can evaluate the credibility of the image comparison results based on this information.
[0195] A weight assignment unit, used to assign preset weights to the image comparison result and the spectrum comparison result respectively according to the credibility evaluation result;
[0196] Specifically, weight allocation is determined based on the credibility assessment results. Data with higher credibility will be assigned higher weights. Through weighted calculation, the impact of the party with larger deviation on the final result can be reduced, making the result more reliable.
[0197] For example, assuming that the credibility score of the image comparison result is 80% and the credibility score of the spectral comparison result is 90%, the weight allocation unit can assign a weight of 0.4 to the image comparison result and a weight of 0.6 to the spectral comparison result, to ensure that in the final result, data with higher credibility contributes more to the result.
[0198] The color difference detection result generating unit is further used to perform weighted averaging on the image comparison result and the spectrum comparison result based on a preset weight, and calculate a weighted average color difference value as the color difference detection result.
[0199] The calculation formula of the color difference detection result D is: D=W1·d image +W2·d spectrum ; In the above formula, W1+W2=1, W1 and W2 represent the preset weights of the image comparison results and the spectral comparison results respectively.
[0200] For example, assuming that the credibility score of the image comparison result is 80%, the credibility score of the spectral comparison result is 90%, the corresponding weights are 0.4 and 0.6 respectively, the color difference value of the image comparison result is 5.2, and the color difference value of the spectral comparison result is 3.8, then the color difference detection result is: D=0.4×5.2+0.6×3.8=2.08+2.28=4.36.
[0201] In the above implementation, the device deviation analysis unit helps to identify the deviation of the device itself, providing a more accurate basis for subsequent data processing and analysis; the algorithm deviation analysis unit helps to ensure that the algorithm used is accurate and reduces the detection error caused by algorithm deviation; the data anomaly analysis unit helps to detect whether there are abnormal values in the process of obtaining image comparison results and spectral comparison results. By introducing steps such as device deviation analysis, algorithm deviation analysis, data anomaly analysis, credibility assessment and weight allocation, the accuracy and reliability of color difference detection results are ensured, which can not only effectively identify and correct problems caused by device and algorithm deviations, but also optimize the final color difference detection results through credibility assessment and weight allocation mechanisms, so that even in the face of complex or inconsistent data, a high degree of accuracy can be maintained.
[0202] It can be understood that by comparing the absolute values of the differences between the image comparison results and the spectral comparison results in advance, directly taking the average value can quickly obtain a more accurate result when the difference is small, while in the case of a large difference, the weighted average can better reflect the true situation of the data, thereby improving the overall accuracy of the color difference detection results.
[0203] Reference Figure 4 As a further embodiment of the detection system, the detection system further includes:
[0204] The device calibration feedback module 301 is connected to the device deviation analysis unit and is used to generate a device calibration feedback signal according to the device deviation analysis result and send it to the debugging terminal;
[0205] Among them, after receiving the equipment deviation analysis results, if there is equipment deviation, the equipment calibration feedback signal can be used to notify the debugging terminal, and the debugging terminal will perform specific calibration operations. By timely discovering potential problems with the equipment and taking measures, data deviations caused by equipment problems can be avoided and rework costs caused by inaccurate equipment can be reduced.
[0206] For example, assuming that the measurement error of the spectrometer reaches ±2%, which exceeds the set threshold of ±1%, after the device calibration feedback module 301 receives this deviation information, it will generate a calibration instruction to instruct the debugging terminal to perform a recalibration operation. After receiving the instruction, the debugging terminal performs the operation according to the predetermined calibration procedure to restore the measurement error of the spectrometer to within the normal range.
[0207] The algorithm adjustment feedback module 302 is connected to the algorithm deviation analysis unit and is used to generate an algorithm adjustment feedback signal according to the algorithm deviation analysis result and send it to the debugging terminal;
[0208] Specifically, the results of the algorithm deviation analysis may include indicators such as the algorithm's accuracy, recall rate, F1 score, etc. When the algorithm deviation exceeds the allowable range, an algorithm adjustment feedback signal is sent to the debugging terminal, and the debugging terminal performs specific adjustment operations; wherein, the adjustment feedback signal includes specific adjustment suggestions, such as modifying algorithm parameters, upgrading algorithm versions, etc.
[0209] For example, assuming that after verification, the recall rate of the image processing algorithm is only 60%, which is lower than the expected 80%, the algorithm adjustment feedback module 302 will generate an adjustment instruction to instruct the debugging terminal to modify the algorithm parameters to improve the recall rate; after receiving the instruction, the debugging terminal performs corresponding adjustment operations, such as increasing the number of feature extractions or adjusting the threshold conditions, to timely improve the algorithm performance.
[0210] The data processing feedback module 303 is connected to the data anomaly analysis unit, and is used to generate a data processing feedback signal according to the data anomaly analysis result and send it to the debugging terminal.
[0211] Specifically, the results of data anomaly analysis may include the number, distribution, type, etc. of outliers. When the data deviation exceeds the allowable range, a data processing feedback signal is sent to the debugging terminal, and the debugging terminal performs specific data processing operations; wherein the processing feedback signal includes specific processing suggestions, such as removing outliers, replacing outliers, etc.
[0212] For example, assuming that 8% of the data points in the spectral data set are marked as outliers, exceeding the threshold of 5%, after the data processing feedback module 303 receives the deviation information, it will generate a processing instruction to instruct the debugging terminal to remove these outliers; after receiving the instruction, the debugging terminal performs a data cleaning operation to remove the outliers from the data set to ensure the accuracy of subsequent analysis.
[0213] In the above implementation, through the synergistic effect of the device calibration feedback module 301, the algorithm adjustment feedback module 302 and the data processing feedback module 303, device deviations, algorithm deviations and data anomalies can be automatically detected and corrected, thereby significantly improving the accuracy, consistency and reliability of the test results.
[0214] Reference Figure 5 As a further embodiment of the detection system, the detection system further includes:
[0215] A grayscale conversion module 401, connected to the image data processing module 105, for converting the comprehensive image data into a grayscale image;
[0216] Specifically, the color value of each pixel in the color integrated image data is mapped to a grayscale level. The weighted average method can be used to calculate the grayscale value by considering the brightness contribution of the three primary colors of red, green and blue. The grayscale processing can reduce the amount of image data, simplify the image processing process, and facilitate subsequent feature extraction and analysis.
[0217] A gray level co-occurrence matrix analysis module 402 is used to apply a gray level co-occurrence matrix algorithm to the gray level image to calculate contrast and homogeneity features in multiple directions;
[0218] Among them, the gray-level co-occurrence matrix (GLCM) is a statistical method used to describe the spatial distribution of gray levels in an image. By calculating the gray-level co-occurrence matrix of a gray-scale image in different directions, features such as contrast and homogeneity can be extracted from it. These features reflect the local changes and texture patterns of the image and can be used for subsequent texture complexity analysis.
[0219] A texture complexity score calculation module 403 is used to calculate the texture complexity score according to the contrast and homogeneity features in each direction;
[0220] Among them, the calculation formula of texture complexity score TCS is:
[0221] ;
[0222] In the above formula, N is the number of directions, Contrast i and Dissimilarity i are the contrast and homogeneity features in the i-th direction.
[0223] Specifically, the texture complexity score TCS is a comprehensive indicator used to evaluate the texture complexity of the quantified image, thereby providing a basis for the subsequent staining quality assessment.
[0224] A depth map construction module 404, connected to the image data processing module 105, for constructing a depth map from the integrated image data based on a stereo matching algorithm;
[0225] Specifically, the stereo matching algorithm estimates the depth of an object by comparing the differences in the positions of the same object in multi-view images. The constructed depth map provides relative depth information at each pixel, which can be used to evaluate the complexity of the image's three-dimensional structure. The depth map obtained by the stereo matching algorithm shows the concavity and convexity of the stained sample surface. If the depth of a certain area varies greatly, it indicates that the area has a complex three-dimensional structure.
[0226] The average disparity value calculation module 405 is used to calculate the average disparity value of each area in the depth map according to the depth map;
[0227] Specifically, in the process of calculating the stereo structure complexity score SCS, the region refers to a subset of the depth map, which can be a fixed-size window of the entire depth map (such as a 3x3 or 5x5 pixel block), or a region adaptively divided according to the image content. This division helps to capture the detailed features of different parts, especially when the image has different depth levels.
[0228] Among them, the larger the disparity value, the farther the object is from the camera. The average disparity value is the average of the disparity values of pixels in each area. The average disparity value reflects the average stereoscopic sense of the image and can be used to further calculate the stereoscopic structure complexity score.
[0229] A three-dimensional structure complexity score calculation module 406 is used to calculate a three-dimensional structure complexity score according to the average parallax value of each area;
[0230] Among them, the calculation formula of the three-dimensional structure complexity score SCS is:
[0231] ;
[0232] In the above formula, Disparity j is the average disparity value in the jth region, M is the number of regions;
[0233] It can be understood that by calculating the three-dimensional structure complexity score SCS to quantify the three-dimensional structure complexity of the stained sample, it is helpful for subsequent quality assessment.
[0234] A color difference threshold calculation module 407 is used to calculate a dynamic color difference threshold of the dyed sample according to the basic color difference threshold, the texture complexity score and the three-dimensional structure complexity score;
[0235] The calculation formula of the dynamic color difference threshold ΔEthresh is:
[0236] ;
[0237] In the above formula, ΔEbase is the basic color difference threshold, α and β are adjustment coefficients, TCS is the texture complexity score, and SCS is the three-dimensional structure complexity score;
[0238] It should be noted that the basic color difference threshold ΔEbase is a pre-set value, usually determined based on experience or experiments, and is a standard line for measuring whether the color difference is acceptable; for example, for a certain type of fabric, if it is found through testing that the human eye can hardly perceive the difference when the color difference value is lower than a certain value, then this value can be used as the basic color difference threshold. The adjustment coefficients α and β are used to adjust the influence of the texture complexity score TCS and the three-dimensional structure complexity score SCS on the final dynamic color difference threshold D, which also needs to be determined based on actual conditions, or set through experiments or expert experience; for example, if it is found that for a certain type of fabric, the texture complexity has a greater impact on its color difference perception, then the value of α can be increased, and vice versa.
[0239] It can be understood that the dynamic color difference threshold is an indicator that integrates multiple factors and is used to evaluate the staining quality. It can be dynamically adjusted according to the specific situation of the stained sample, so as to more accurately evaluate whether its color difference is within an acceptable range.
[0240] The color difference comparison module 408 is connected to the comprehensive analysis module 107 and is used to compare the color difference detection result of the dyed sample with the dynamic color difference threshold to obtain a color difference comparison result;
[0241] Among them, through the color difference comparison results, it can be determined whether the dyeing sample meets the predetermined quality standards. If the actual color difference reflected by the color difference detection result of the dyeing sample is less than or equal to the dynamic color difference threshold, it is judged as qualified; otherwise, it is judged as unqualified; by accurately distinguishing which fabric dyeing samples are qualified and which are unqualified, it is ensured that only high-quality products can enter the market.
[0242] The parameter adjustment feedback module 409 is connected to the color difference comparison module 408 and is used to generate a parameter adjustment feedback signal according to the color difference comparison result and send it to the printing and dyeing control system.
[0243] Specifically, if the dyeing sample is judged to be unqualified, a parameter adjustment feedback signal is generated through the feedback mechanism to adjust the parameters in the printing and dyeing process, such as reducing the dye concentration, temperature or extending the dyeing time, so as to optimize the subsequent printing and dyeing process, reduce the scrap rate, and improve product quality and production efficiency.
[0244] In the above implementation, not only can the texture complexity and three-dimensional structure complexity of the sample be accurately quantified, but the color difference threshold can also be dynamically adjusted according to these quantitative indicators, thereby realizing real-time monitoring and adjustment of dyeing quality. This closed-loop control mechanism significantly improves the automation level of the printing and dyeing process and the consistency of product quality.
[0245] In addition, by introducing the texture complexity score and the three-dimensional structure complexity score, the visual experience in the real world can be better simulated and the color difference threshold can be adjusted accordingly; by dynamically adjusting the color difference threshold, the actual situation of the fabric dyeing quality can be more accurately reflected, because the traditional static threshold may not be able to fully consider the different characteristics of the fabric, especially the fabric with an uneven surface and a complex three-dimensional structure such as the embodiment of the present invention.
[0246] The embodiment of the present invention also discloses an online detection method for color difference in printing and dyeing.
[0247] Reference Figure 6 , an online detection method for color difference of printing and dyeing, applied to the above-mentioned online detection system for color difference of printing and dyeing, the detection method comprises:
[0248] Step S1, receiving reflected light of a dyed sample to be detected from multiple light source illumination angles, and collecting multi-angle spectral data;
[0249] Wherein, light sources are arranged around the stained sample to be detected, irradiating the stained sample from multiple light source irradiation angles;
[0250] Step S2, collecting image data of the dyed sample from multiple light source illumination angles to obtain multi-view image data;
[0251] Step S3, preprocessing the multi-angle spectral data and the multi-viewing angle image data;
[0252] Step S4, performing feature extraction and image fusion on the preprocessed multi-view image data to obtain comprehensive image data, and performing color difference comparison between the comprehensive image data and the standard image data to obtain an image comparison result;
[0253] Step S5, fusing the preprocessed multi-angle spectral data to obtain comprehensive spectral data, and performing color difference comparison between the comprehensive spectral data and the standard spectral data to obtain a spectral comparison result;
[0254] Step S6, combining the image comparison result and the spectrum comparison result to analyze and obtain the color difference detection result of the dyed sample.
[0255] The technical solution of the present invention proposes an innovative online detection method for fabric dyeing samples with uneven surfaces, especially those with complex three-dimensional structures. Since the irregularities of these fabric surfaces usually lead to shadow effects, which in turn affect the accuracy of color difference detection, this solution effectively captures more surface details by illuminating the light source from multiple angles, reduces the impact of shadows on the detection results, makes the acquired images clearer, and further improves the image quality.
[0256] At the same time, the present invention makes comprehensive use of the spatial distribution information provided by the image data and the spectral characteristic information provided by the spectral data. Through the comprehensive evaluation of the image and spectral data, it can more comprehensively reflect the true characteristics of the dyed sample and significantly improve the accuracy of color evaluation. This innovative method can not only effectively solve the color difference detection problem of complex three-dimensional structure fabrics, but also provide the textile industry with a more accurate and efficient online detection method, which has important practical significance for improving product quality, reducing costs, and promoting industrial upgrading.
[0257] The online detection system for printing and dyeing color difference of the embodiment of the present invention can implement any one of the above-mentioned online detection methods, and the specific working process of each step in the online detection method can refer to the corresponding process in the above-mentioned system embodiment.
[0258] In the several embodiments provided by the present invention, it should be understood that the provided methods and systems can be implemented in other ways. For example, the system embodiments described above are only illustrative; for example, the division of a certain module is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.
[0259] The embodiment of the present invention also discloses a computer-readable storage medium.
[0260] A computer-readable storage medium stores a computer program that can be loaded by a processor and execute any one of the above-mentioned online detection methods for color difference in printing and dyeing.
[0261] Among them, computer-readable storage media can be any tangible medium that contains or stores a program, which can be used by or in conjunction with an instruction execution system, apparatus or device; the program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0262] It should be noted that in the above embodiments, the description of each embodiment has different emphases, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0263] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any feature disclosed in this specification (including the abstract and drawings), unless otherwise stated, can be replaced by other equivalent or alternative features with similar purposes. That is, unless otherwise stated, each feature is only an example of a series of equivalent or similar features.
Claims
1. An online detection system for color difference in printing and dyeing, characterized in that: The detection system comprises: A multi-angle lighting module (101), arranged around a stained sample to be detected, and used to illuminate the stained sample from a plurality of light source illumination angles; A multi-angle spectrum acquisition module (102), arranged around the dyed sample, is used to receive reflected light of the dyed sample from a plurality of illumination angles of the light source, and collect multi-angle spectrum data; A multi-view image acquisition module (103), arranged around the dyed sample, for acquiring image data of the dyed sample from a plurality of illumination angles of the light source to obtain multi-view image data; A data preprocessing module (104), connected to the multi-angle spectrum acquisition module (102) and the multi-viewing angle image acquisition module (103), respectively, and used for preprocessing the multi-angle spectrum data and the multi-viewing angle image data; An image data processing module (105) is connected to the data preprocessing module (104) and is used to perform feature extraction and image fusion on the preprocessed multi-view image data to obtain comprehensive image data, and to perform color difference comparison between the comprehensive image data and the standard image data to obtain an image comparison result; The spectral data processing module (106) is connected to the data preprocessing module (104) and is used to perform fusion processing on the preprocessed multi-angle spectral data to obtain comprehensive spectral data, and perform color difference comparison between the comprehensive spectral data and the standard spectral data to obtain a spectral comparison result; The comprehensive analysis module (107) is connected to the image data processing module (105) and the spectrum data processing module (106) respectively, and is used to combine the image comparison result and the spectrum comparison result to analyze and obtain the color difference detection result of the dyed sample.
2. The online detection system for color difference of printing and dyeing according to claim 1, characterized in that: The detection system also includes: An ambient light monitoring module (201), arranged around the dyed sample to be detected, and used to monitor ambient light intensity and color temperature data around the dyed sample; An illumination compensation control module (202), connected to the multi-angle illumination module (101), and used for adjusting the illumination intensity and color temperature of the multi-angle illumination module (101) in real time according to the ambient illumination intensity and color temperature data; The spectrum acquisition control module (203) is connected to the multi-angle spectrum acquisition module (102) and is used to adjust the parameter configuration of the multi-angle spectrum acquisition module (102) in real time according to the ambient light intensity.
3. The online detection system for color difference of printing and dyeing according to claim 1 is characterized in that: The multi-angle illumination module (101) further comprises a light intensity distribution monitoring unit, which is used to monitor the light intensity distribution of each light source irradiating the stained sample, obtain light intensity distribution data and establish a light model; The image data processing module (105) comprises: An inverse illumination function construction unit, used for constructing an inverse illumination function according to the illumination intensity distribution data and the illumination model; an illumination compensation unit, configured to calculate the actual illumination intensity of each pixel in the preprocessed multi-view image data based on the inverse illumination function, and perform illumination compensation processing on the multi-view image data according to the actual illumination intensity; A color correction unit, configured to determine a color deviation of the multi-view image data after the illumination compensation processing based on a color correction algorithm, and correct a color value of the multi-view image data according to the color deviation; An image feature extraction unit, used for extracting feature points from the color-corrected multi-view image data; A feature matching unit, used to determine corresponding feature points between multi-view image data and establish a feature point matching relationship; An image registration unit, configured to perform geometric correction on the multi-view image data according to the feature point matching relationship; An image fusion unit, used for fusing color information of the geometrically corrected multi-view image data based on an image fusion algorithm to obtain comprehensive image data; A color space conversion unit, used for performing color space conversion between the integrated image data and the standard image data; A color difference calculation unit, used for calculating the color difference value between the comprehensive image data and the standard image data at each pixel position, and obtaining a color difference value matrix at each pixel position; The image comparison result generating unit is used to count the color difference distribution according to the color difference value matrix at each pixel position, and calculate the average color difference value to obtain the image comparison result.
4. The online detection system for color difference of printing and dyeing according to claim 3 is characterized in that: The spectral data processing module (106) comprises: A spectral data adjustment unit, used for adjusting the pre-processed multi-angle spectral data according to the light intensity distribution data; A spectral feature extraction unit, used for extracting spectral features at different angles from the adjusted multi-angle spectral data; A data registration unit, used to align spectral features at different angles based on an image registration algorithm; A spectral fusion unit, used to merge the aligned spectral features at different angles into comprehensive spectral data; A spectral comparison unit, used to compare the comprehensive spectral data with the standard spectral data, and calculate the similarity based on the spectral difference obtained by comparison; The spectrum comparison result generating unit is used to calculate the color difference value corresponding to the similarity to obtain the spectrum comparison result.
5. The online detection system for color difference of printing and dyeing according to claim 1 is characterized in that: The comprehensive analysis module (107) comprises: A difference analysis unit, used for calculating the absolute value of the difference by combining the image comparison result and the spectrum comparison result; The color difference detection result generating unit is used to calculate the average value of the image comparison result and the spectrum comparison result to obtain the color difference detection result when the absolute value of the difference is less than a preset difference threshold.
6. The online detection system for color difference of printing and dyeing according to claim 5, characterized in that: The comprehensive analysis module (107) further includes: A device deviation analysis unit, configured to perform deviation analysis on the device calibration records of the multi-view image acquisition module (103) and the multi-angle spectrum acquisition module (102) respectively when the absolute value of the difference is greater than a preset difference threshold, to obtain corresponding device deviation analysis results; an algorithm deviation analysis unit, configured to perform deviation analysis on the image processing algorithm of the image data processing module (105) and the spectral data processing algorithm of the spectral data processing module (106) respectively when the absolute value of the difference is greater than a preset difference threshold, and obtain corresponding algorithm deviation analysis results; A data anomaly analysis unit, configured to perform data anomaly analysis on the image comparison result and the spectrum comparison result respectively when the absolute value of the difference is greater than a preset difference threshold, to obtain corresponding data anomaly analysis results; a credibility evaluation unit, configured to respectively perform credibility evaluation on the image comparison result and the spectrum comparison result according to the device deviation analysis result, the algorithm deviation analysis result and the data anomaly analysis result; A weight allocation unit, used to allocate preset weights to the image comparison result and the spectrum comparison result respectively according to the credibility evaluation result; The color difference detection result generating unit is further used to perform weighted averaging on the image comparison result and the spectrum comparison result based on the preset weight, and calculate a weighted average color difference value as the color difference detection result.
7. The online detection system for color difference of printing and dyeing according to claim 6, characterized in that: The detection system also includes: A device calibration feedback module (301), connected to the device deviation analysis unit, is used to generate a device calibration feedback signal according to the device deviation analysis result and send it to the debugging terminal; An algorithm adjustment feedback module (302), connected to the algorithm deviation analysis unit, is used to generate an algorithm adjustment feedback signal according to the algorithm deviation analysis result and send it to the debugging terminal; A data processing feedback module (303) is connected to the data anomaly analysis unit and is used to generate a data processing feedback signal according to the data anomaly analysis result and send it to the debugging terminal.
8. An online detection system for color difference in printing and dyeing according to any one of claims 1 to 7, characterized in that: The detection system also includes: A grayscale conversion module (401), connected to the image data processing module (105), for converting the integrated image data into a grayscale image; A gray level co-occurrence matrix analysis module (402) is used to apply a gray level co-occurrence matrix algorithm to the gray level image to calculate contrast and homogeneity features in multiple directions; A texture complexity score calculation module (403), used to calculate the texture complexity score according to the contrast and homogeneity features in each direction; A depth map construction module (404), connected to the image data processing module (105), for constructing a depth map from the integrated image data based on a stereo matching algorithm; An average disparity value calculation module (405), used to calculate the average disparity value of each area in the depth map according to the depth map; A three-dimensional structure complexity score calculation module (406), used for calculating the three-dimensional structure complexity score according to the average parallax value of each area; A color difference threshold calculation module (407) is used to calculate the dynamic color difference threshold of the dyed sample according to the basic color difference threshold, the texture complexity score and the three-dimensional structure complexity score; A color difference comparison module (408), connected to the comprehensive analysis module (107), is used to compare the color difference detection result of the dyed sample with the dynamic color difference threshold value to obtain a color difference comparison result; The parameter adjustment feedback module (409) is connected to the color difference comparison module (408) and is used to generate a parameter adjustment feedback signal according to the color difference comparison result and send it to the printing and dyeing control system.
9. An online detection method for color difference in printing and dyeing, characterized in that: An online detection system for color difference in printing and dyeing applied to any one of claims 1 to 8, wherein the detection method comprises: Reflected light of the stained sample to be detected is received from multiple light source illumination angles, and multi-angle spectral data is collected; wherein light sources are arranged around the stained sample to be detected, irradiating the stained sample from multiple light source illumination angles; Collect image data of the dyed sample from multiple light source illumination angles to obtain multi-view image data; Preprocessing the multi-angle spectral data and the multi-viewing angle image data; Performing feature extraction and image fusion on the preprocessed multi-view image data to obtain comprehensive image data, and performing color difference comparison between the comprehensive image data and the standard image data to obtain an image comparison result; The pre-processed multi-angle spectral data are fused to obtain comprehensive spectral data, and the comprehensive spectral data are compared with the standard spectral data for color difference to obtain a spectral comparison result; The image comparison result and the spectrum comparison result are combined to analyze and obtain the color difference detection result of the dyed sample.
10. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the method as claimed in claim 9.
