A color measurement method based on hyperspectral imaging
Through the acquisition and correction algorithm of hyperspectral imaging equipment, the instability problem of traditional color measurement methods is solved, and high-precision and consistent color measurement is achieved, which is suitable for real-time and large-scale detection.
Patent Information
- Application Number
- CN202411932347.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-12-26
AI Technical Summary
Traditional color measurement methods are susceptible to lighting changes, background interference, and equipment noise, and lack sufficient color information, resulting in unstable measurement results and large errors. It is especially difficult to ensure consistency during batch control and large-scale testing.
Hyperspectral imaging equipment is used to collect dark background hyperspectral data of the sample to be tested and reflectance calibration plate data. The correction algorithm is used to eliminate environmental and equipment noise interference, calculate standard real-time hyperspectral data and calculate color difference values.
It improves the accuracy and stability of color measurement, reduces environmental and equipment noise interference, ensures the accuracy and consistency of measurement results, and is suitable for real-time monitoring and large-scale detection.
Smart Images

Figure CN119714539B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of color measurement, and in particular to a color measurement method based on hyperspectral imaging. Background Art
[0002] Hyperspectral imaging is a technology that obtains spectral information on the surface of an object. It combines imaging technology and spectral analysis and can obtain image data in multiple continuous spectral bands. Unlike traditional RGB imaging, hyperspectral imaging not only captures visible light information, but also covers other bands such as infrared and ultraviolet, thereby obtaining richer spectral characteristics.
[0003] Traditional methods usually rely on relatively simple equipment (such as colorimeters or photometers) for measurement, which are easily affected by changes in lighting, background interference and the noise of the equipment itself. These factors may cause unstable measurement results and make it difficult to reflect the true spectral characteristics of the sample. Traditional methods usually do not have the background correction function of hyperspectral imaging systems and cannot effectively eliminate the interference of background light sources, changes in environmental conditions and equipment noise. This makes the measurement results likely to be affected by environmental fluctuations, resulting in large differences in measurement results at different times and under different conditions. Traditional methods usually use simple color difference calculation formulas and may only be based on a few color channels (such as RGB or XYZ models) for measurement. These methods often lack sufficient color information and are difficult to fully and accurately reflect the color characteristics of the sample. Moreover, traditional methods often rely on manual setting of standard colors and judgment of color differences, which is subjective and prone to errors, especially in batch control and large-scale testing. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to overcome the shortcomings of the above-mentioned prior art and provide a color measurement method based on hyperspectral imaging.
[0005] The technical solution adopted to solve the above technical problems is: a color measurement method based on hyperspectral imaging, including:
[0006] Determine whether it is necessary to calculate the color difference of the sample to be measured. If it is necessary to calculate the color difference of the sample to be measured, pre-set the standard color value and collect the dark background hyperspectral data of the sample to be measured based on the hyperspectral imaging device; otherwise, directly collect the dark background hyperspectral data of the sample to be measured based on the hyperspectral imaging device;
[0007] Based on the preset target light source irradiating a preset reflectance calibration plate, the hyperspectral imaging device collects the reflectance calibration plate hyperspectral data of the sample to be measured in the reflectance calibration plate;
[0008] The real-time hyperspectral data of the sample to be measured is collected based on the hyperspectral imaging device, and the real-time hyperspectral data of the sample to be measured is corrected based on the dark background hyperspectral data of the sample to be measured and the hyperspectral data of the reflectance calibration plate to obtain standard real-time hyperspectral data of the sample to be measured;
[0009] Calculating the reflectance spectrum of the standard real-time hyperspectral data of the sample to be measured;
[0010] The color value of the sample to be measured is calculated based on the reflectance spectrum of the standard real-time hyperspectral data of the sample to be measured, and the color difference value of the sample to be measured is calculated based on a preset standard color value and the color value of the sample to be measured.
[0011] Preferably, the dark background hyperspectral data of the sample to be measured is expressed as follows:
[0012] ;
[0013] in, represents dark background hyperspectral data, Represents the number of spatial sampling points in the FOV direction of the dark background hyperspectral data, Indicates the number of sampling frames in the time dimension of dark background hyperspectral data, Represents the number of sampling points in the wavelength dimension of dark background hyperspectral data.
[0014] Preferably, the expression of the hyperspectral data of the reflectivity calibration plate of the sample to be measured is as follows:
[0015] ;
[0016] in, Represents the hyperspectral data of the reflectance calibration plate, Indicates the number of spatial sampling points in the FOV direction of the reflectance calibration plate hyperspectral data, Indicates the number of spatial sampling points in the push-scan direction of the reflectance calibration plate hyperspectral data, Indicates the number of sampling points in the wavelength dimension of the reflectance calibration plate hyperspectral data.
[0017] Preferably, the expression of the real-time hyperspectral data of the sample to be measured is as follows:
[0018] ;
[0019] in, represents the real-time hyperspectral data at time t, Represents the number of spatial sampling points in the FOV direction of the real-time hyperspectral data at time t, Indicates the number of spatial sampling points in the push-scan direction of real-time hyperspectral data at time t, Indicates the number of sampling points in the wavelength dimension of the real-time hyperspectral data at time t.
[0020] Preferably, the real-time hyperspectral data of the sample to be measured is corrected based on the dark background hyperspectral data of the sample to be measured and the hyperspectral data of the reflectance calibration plate to obtain the standard real-time hyperspectral data of the sample to be measured, including:
[0021] Calculating average frame dark background hyperspectral data of the dark background hyperspectral data;
[0022] Calculating first average frame reflectance calibration plate hyperspectral data of the reflectance calibration plate hyperspectral data;
[0023] Calculating second average frame reflectance calibration plate hyperspectral data of the reflectance calibration plate hyperspectral data;
[0024] The real-time hyperspectral data of the sample to be measured is corrected based on the average frame dark background hyperspectral data, the first average frame reflectivity calibration plate hyperspectral data and the second average frame reflectivity calibration plate hyperspectral data to obtain standard real-time hyperspectral data of the sample to be measured.
[0025] Preferably, the calculation formula of the average frame dark background hyperspectral data is as follows:
[0026] ;
[0027] in, represents the average frame dark background hyperspectral data;
[0028] The calculation formula of the first average frame reflectance calibration plate hyperspectral data is as follows:
[0029] ;
[0030] in, represents the first average frame reflectance calibration plate hyperspectral data;
[0031] The calculation formula of the second average frame reflectance calibration plate hyperspectral data is as follows:
[0032] ;
[0033] in, Represents the second average frame reflectance calibration plate hyperspectral data.
[0034] Preferably, the correction formula for the real-time hyperspectral data of the sample to be measured is as follows:
[0035] ;
[0036] in, Represents the real-time hyperspectral data of the sample to be measured after correction
[0037] Preferably, the calculation formula for the reflectance spectrum of the standard real-time hyperspectral data of the sample to be measured is as follows:
[0038] ;
[0039] in, represents the reflectance spectrum of the standard real-time hyperspectral data of the sample to be measured, Indicates the true reflectivity of the reflectivity calibration plate.
[0040] Preferably, the calculation formula for the color value of the sample to be measured is as follows:
[0041] ;
[0042] in, 、 and The three components representing the color value of the sample to be measured, Indicates the magnification correction coefficient, 、 and The response coefficients of the three components representing the color value of the sample to be measured.
[0043] The beneficial effects of the present invention are as follows: (1) The present invention can significantly improve the accuracy of color measurement by collecting dark background hyperspectral data, reflectance calibration plate data and real-time hyperspectral data of the sample and correcting them. By eliminating the interference of ambient light source and equipment noise, it is ensured that the final standard real-time hyperspectral data reflects the true spectral characteristics of the sample to be measured, and the corrected standard real-time hyperspectral data can more accurately reflect the reflectance spectrum of the sample to be measured, thereby making the calculation of color value more accurate; (2) The present invention can effectively reduce the interference caused by background light source, environmental conditions or equipment noise by collecting and using dark background hyperspectral data. This background correction method makes the color measurement results more stable and reliable, and is suitable for measurement needs in different environments. The standard color value is set and compared with the color value of the sample to be tested, and the color difference is calculated. By comparing the standard color value, the difference between the sample to be tested and the standard color can be quantified, thereby providing an objective and quantitative basis for color control and ensuring color consistency and comparability in different batches and different scenes; (3) The present invention can collect the hyperspectral data of the sample in real time, so the method is suitable for occasions requiring real-time monitoring and dynamic control. By timely correcting and calculating the reflectance spectrum of the sample, the standard color value of the sample can be obtained in a short time, and the accurate color difference can be calculated, providing support for applications such as online quality inspection and production line color control. Moreover, due to the high degree of automation of the hyperspectral imaging system, combined with the correction process, the method can complete the color measurement task without a lot of manual intervention, which reduces human errors and subjective judgments, improves measurement efficiency and accuracy, and is particularly suitable for large-scale production inspection or batch quality control. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A schematic flow chart of the steps of the overall method in one embodiment of the present invention;
[0045] Figure 2 A schematic diagram of dark background hyperspectral data in an embodiment of the present invention;
[0046] Figure 3 A schematic diagram of a light intensity distribution curve of a reflectivity calibration plate in one embodiment of the present invention;
[0047] Figure 4 This is a schematic diagram of a hyperspectral data curve of a second average frame reflectance calibration plate in an embodiment of the present invention. DETAILED DESCRIPTION
[0048] Example 1, as Figure 1 As shown, the present invention proposes a color measurement method based on hyperspectral imaging, comprising:
[0049] S1. Determine whether it is necessary to calculate the color difference of the sample to be measured. If it is necessary to calculate the color difference of the sample to be measured, pre-set the standard color value and collect dark background hyperspectral data of the sample to be measured based on the hyperspectral imaging device. Otherwise, directly collect dark background hyperspectral data of the sample to be measured based on the hyperspectral imaging device.
[0050] It should be noted that if Figure 2 Shown are dark background hyperspectral data;
[0051] S2, irradiating a preset reflectance calibration plate with a preset target light source, and collecting reflectance calibration plate hyperspectral data of the sample to be measured in the reflectance calibration plate using a hyperspectral imaging device;
[0052] S3. collecting real-time hyperspectral data of the sample to be measured based on the hyperspectral imaging device, and correcting the real-time hyperspectral data of the sample to be measured based on the dark background hyperspectral data of the sample to be measured and the hyperspectral data of the reflectance calibration plate to obtain standard real-time hyperspectral data of the sample to be measured;
[0053] S4, calculating the reflectance spectrum of the standard real-time hyperspectral data of the sample to be measured;
[0054] S5. Calculate the color value of the sample to be measured based on the reflectance spectrum of the standard real-time hyperspectral data of the sample to be measured, and calculate the color difference value of the sample to be measured based on the preset standard color value and the color value of the sample to be measured.
[0055] In the present invention, the sample to be measured refers to an object or surface that needs to be measured and color analyzed, for example, it can be food, plants, clothing, paint or any other items that need to be evaluated by color; a hyperspectral imaging device is a device used to obtain reflectance data of an object at multiple wavelengths (usually hundreds to thousands of continuous bands). Unlike traditional RGB images, hyperspectral imaging not only captures images in the visible light range, but also includes data at wavelengths such as infrared and ultraviolet, thereby providing more detailed spectral information for applications such as material identification and quality analysis; dark background refers to the background signal captured by the hyperspectral device when the sample is not irradiated. The dark background data is used in the subsequent correction process to remove the influence of environmental noise, instrument noise, etc., to ensure that the collected data reflects only the true signal of the target sample; the reflectance calibration plate is a standard plate with a known reflectance, which is usually used to calibrate hyperspectral imaging equipment. The reflectance of the calibration plate is at each wavelength The following is known, which can help the device perform spectral calibration when collecting data to ensure the accuracy of the measurement results; the hyperspectral data obtained from the reflectance calibration plate, since the reflectance of the calibration plate is known, by comparing these data with the actual data collected by the device, the device can be calibrated, thereby converting the measured data into a standard reflectance value; real-time hyperspectral data This refers to the hyperspectral data of the sample to be tested obtained by the device during the real-time acquisition process, that is, the reflectance information at each wavelength captured by the device under the irradiation of the light source. These data contain the reflection characteristics of the sample to be tested at different wavelengths for subsequent analysis; reflectance spectrum refers to the reflectance value of the sample to be tested at different wavelengths. Reflectance is the proportion of incident light reflected by the surface of an object, usually a value between 0 and 1. By measuring the reflectance of the sample at multiple wavelengths, its complete spectral curve can be obtained; color value refers to the numerical representation of the sample in a specific color space.
[0056] Example 2, as Figure 3-Figure 4 As shown, the present invention proposes a color measurement method based on hyperspectral imaging. Compared with the first embodiment, this embodiment further includes: the expression of the dark background hyperspectral data of the sample to be measured is as follows:
[0057] ;
[0058] in, represents dark background hyperspectral data, Represents the number of spatial sampling points in the FOV direction of the dark background hyperspectral data, Indicates the number of sampling frames in the time dimension of dark background hyperspectral data, Represents the number of sampling points in the wavelength dimension of dark background hyperspectral data.
[0059] In this embodiment, FOV (Field of View) refers to the spatial range that a hyperspectral imaging system can capture. In hyperspectral imaging, the FOV direction generally refers to the direction in which the imaging device collects samples in space. For example, the FOV can be the horizontal or vertical field of view of the device, which affects the spatial resolution of the data. The number of spatial sampling points in the FOV direction refers to the number of data points collected when sampling the samples in the spatial dimension in the FOV direction. This represents the spatial resolution obtained by the imaging device. The more sampling points, the higher the spatial resolution. The number of sampling frames in the time dimension refers to the number of hyperspectral data frames collected by the system from different time points within a period of time. Each frame of data corresponds to data at a time point, which is very important for dynamic monitoring or studying time-varying processes. The number of sampling points in the wavelength dimension refers to the number of data points collected in the wavelength dimension. Typically, hyperspectral imaging devices sample at multiple wavelengths, which can range from ultraviolet to visible light, to near-infrared or mid-infrared ranges. The more sampling points in the wavelength dimension, the more refined the data, and the more information can be provided.
[0060] In an optional embodiment, the expression of the hyperspectral data of the reflectance calibration plate of the sample to be measured is as follows:
[0061] ;
[0062] in, Represents the hyperspectral data of the reflectance calibration plate, Indicates the number of spatial sampling points in the FOV direction of the reflectance calibration plate hyperspectral data, Indicates the number of spatial sampling points in the push-scan direction of the reflectance calibration plate hyperspectral data, Indicates the number of sampling points in the wavelength dimension of the reflectance calibration plate hyperspectral data.
[0063] In an optional embodiment, the expression of the real-time hyperspectral data of the sample to be measured is as follows:
[0064] ;
[0065] in, represents the real-time hyperspectral data at time t, Represents the number of spatial sampling points in the FOV direction of the real-time hyperspectral data at time t, Indicates the number of spatial sampling points in the push-scan direction of real-time hyperspectral data at time t, Indicates the number of sampling points in the wavelength dimension of the real-time hyperspectral data at time t.
[0066] In an optional embodiment, the real-time hyperspectral data of the sample to be measured is corrected based on the dark background hyperspectral data of the sample to be measured and the hyperspectral data of the reflectance calibration plate to obtain standard real-time hyperspectral data of the sample to be measured, including:
[0067] Calculate the average frame dark background hyperspectral data of the dark background hyperspectral data;
[0068] Calculating first average frame reflectance calibration plate hyperspectral data;
[0069] Calculating the second average frame reflectance calibration plate hyperspectral data;
[0070] The real-time hyperspectral data of the sample to be measured is corrected based on the average frame dark background hyperspectral data, the first average frame reflectivity calibration plate hyperspectral data and the second average frame reflectivity calibration plate hyperspectral data to obtain standard real-time hyperspectral data of the sample to be measured.
[0071] In an optional embodiment, the calculation formula for the average frame dark background hyperspectral data is as follows:
[0072] ;
[0073] in, represents the average frame dark background hyperspectral data;
[0074] The calculation formula for the first average frame reflectance calibration plate hyperspectral data is as follows:
[0075] ;
[0076] in, represents the first average frame reflectance calibration plate hyperspectral data;
[0077] The calculation formula for the second average frame reflectance calibration plate hyperspectral data is as follows:
[0078] ;
[0079] in, Represents the second average frame reflectance calibration plate hyperspectral data.
[0080] In an optional embodiment, the correction formula for the real-time hyperspectral data of the sample to be measured is as follows:
[0081] ;
[0082] in, Represents the real-time hyperspectral data of the sample to be measured after correction
[0083] In an optional embodiment, the calculation formula for the reflectance spectrum of the standard real-time hyperspectral data of the sample to be measured is as follows:
[0084] ;
[0085] in, represents the reflectance spectrum of the standard real-time hyperspectral data of the sample to be measured, Indicates the true reflectivity of the reflectivity calibration plate.
[0086] In an optional embodiment, the calculation formula for the color value of the sample to be measured is as follows:
[0087] ;
[0088] in, 、 and The three components representing the color value of the sample to be measured, Indicates the magnification correction coefficient, 、 and The response coefficients of the three components representing the color value of the sample to be measured.
[0089] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited thereto. Various changes can be made within the scope of knowledge possessed by those skilled in the art without departing from the spirit of the present invention.
Claims
1. A color measurement method based on hyperspectral imaging, characterized in that: include: Determine whether it is necessary to calculate the color difference of the sample to be measured. If it is necessary to calculate the color difference of the sample to be measured, pre-set the standard color value and collect the dark background hyperspectral data of the sample to be measured based on the hyperspectral imaging device; otherwise, directly collect the dark background hyperspectral data of the sample to be measured based on the hyperspectral imaging device; Based on the preset target light source irradiating a preset reflectance calibration plate, the hyperspectral imaging device collects the reflectance calibration plate hyperspectral data of the sample to be measured in the reflectance calibration plate; The real-time hyperspectral data of the sample to be measured is collected based on the hyperspectral imaging device, and the real-time hyperspectral data of the sample to be measured is corrected based on the dark background hyperspectral data of the sample to be measured and the hyperspectral data of the reflectance calibration plate to obtain standard real-time hyperspectral data of the sample to be measured; Calculating the reflectance spectrum of the standard real-time hyperspectral data of the sample to be measured; Calculating a color value of the sample to be measured based on a reflectance spectrum of the standard real-time hyperspectral data of the sample to be measured, and calculating a color difference value of the sample to be measured based on a preset standard color value and the color value of the sample to be measured; The expression of the dark background hyperspectral data of the sample to be measured is as follows: ; in, represents dark background hyperspectral data, Represents the number of spatial sampling points in the FOV direction of the dark background hyperspectral data, Indicates the number of sampling frames in the time dimension of dark background hyperspectral data, Represents the number of sampling points in the wavelength dimension of dark background hyperspectral data; The expression of the hyperspectral data of the reflectivity calibration plate of the sample to be measured is as follows: ; in, Represents the hyperspectral data of the reflectance calibration plate, Indicates the number of spatial sampling points in the FOV direction of the reflectance calibration plate hyperspectral data, Indicates the number of spatial sampling points in the push-scan direction of the reflectance calibration plate hyperspectral data, Indicates the number of sampling points in the wavelength dimension of the reflectance calibration plate hyperspectral data; The expression of the real-time hyperspectral data of the sample to be measured is as follows: ; in, represents the real-time hyperspectral data at time t, Indicates the number of spatial sampling points in the FOV direction of the real-time hyperspectral data at time t, Indicates the number of spatial sampling points in the push-scan direction of real-time hyperspectral data at time t, Indicates the number of sampling points in the wavelength dimension of real-time hyperspectral data at time t; Correcting the real-time hyperspectral data of the sample to be measured based on the dark background hyperspectral data of the sample to be measured and the hyperspectral data of the reflectance calibration plate to obtain standard real-time hyperspectral data of the sample to be measured, including: Calculating average frame dark background hyperspectral data of the dark background hyperspectral data; Calculating first average frame reflectance calibration plate hyperspectral data of the reflectance calibration plate hyperspectral data; Calculating second average frame reflectance calibration plate hyperspectral data of the reflectance calibration plate hyperspectral data; The real-time hyperspectral data of the sample to be measured is corrected based on the average frame dark background hyperspectral data, the first average frame reflectivity calibration plate hyperspectral data and the second average frame reflectivity calibration plate hyperspectral data to obtain standard real-time hyperspectral data of the sample to be measured.
2. The color measurement method based on hyperspectral imaging according to claim 1, characterized in that: The calculation formula of the average frame dark background hyperspectral data is as follows: ; in, represents the average frame dark background hyperspectral data; The calculation formula of the first average frame reflectance calibration plate hyperspectral data is as follows: ; in, represents the first average frame reflectance calibration plate hyperspectral data; The calculation formula of the second average frame reflectance calibration plate hyperspectral data is as follows: ; in, Represents the second average frame reflectance calibration plate hyperspectral data.
3. The color measurement method based on hyperspectral imaging according to claim 2, characterized in that: The correction formula for the real-time hyperspectral data of the sample to be measured is as follows: ; in, Represents the real-time hyperspectral data of the sample to be measured after correction.
4. The color measurement method based on hyperspectral imaging according to claim 3, characterized in that: The calculation formula of the reflectance spectrum of the standard real-time hyperspectral data of the sample to be measured is as follows: ; in, represents the reflectance spectrum of the standard real-time hyperspectral data of the sample to be measured, Indicates the true reflectivity of the reflectivity calibration plate.
5. The color measurement method based on hyperspectral imaging according to claim 4, characterized in that: The calculation formula of the color value of the sample to be measured is as follows: ; in, 、 and The three components representing the color value of the sample to be measured, Indicates the magnification correction coefficient, 、 and The response coefficients of the three components representing the color value of the sample to be measured.
Citation Information
Patent Citations
Microscopic hyperspectral imaging system for micron-scale color measurement and color measurement method
CN112710395A