Calibration method and device, electronic equipment and computer readable storage medium
Patent Information
- Application Number
- CN202311170546.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-11
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2043-09-11
AI Technical Summary
The traditional spectral sensor calibration method requires the acquisition of a large amount of light source data, which is prone to errors and has the problem of inaccurate calibration.
By irradiating a flat light source, the response intensity difference is determined based on the first response intensity and the second response intensity for the response channel of the first spectral sensor and the reference spectral sensor at each same position; then the response intensity of the response channel is determined under the irradiation of different LED light sources, and the target frequency deviation is determined based on the frequency deviation and ratio relationship, and finally the spectral reconstruction parameters of the first spectral sensor are calibrated based on these parameters.
It improves the calibration accuracy of the spectral sensor, reduces the acquisition amount of light source data, and improves calibration efficiency and accuracy.
Smart Images

Figure CN119595560A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of imaging technology, and in particular to a calibration method, device, electronic device and computer-readable storage medium. Background Art
[0002] Spectral sensors can measure the spectral information of substances, thereby analyzing the composition and structure of the substances. They are widely used in scientific research and industrial applications. They are basic and important tools in food testing, environmental monitoring, biochemical analysis, lighting monitoring, biometric identification and other fields.
[0003] Before using the spectral sensor, it needs to be calibrated. However, the traditional method of calibrating the spectral sensor requires collecting a large amount of light source data, which is often prone to errors and inaccurate calibration. Summary of the invention
[0004] The embodiments of the present application provide a calibration method, device, electronic device, computer-readable storage medium, and computer program product, which can improve the accuracy of calibration.
[0005] In a first aspect, the present application provides a calibration method. The method comprises:
[0006] Under the illumination of a flat light source, for the response channels of the first spectrum sensor and the reference spectrum sensor at each identical position, a difference in response intensity of the first spectrum sensor relative to the reference spectrum sensor is determined based on a first response intensity and a second response intensity; the response intensity in the light spectrum of the flat light source is within a target intensity range, the first response intensity is obtained by the response channel of the first spectrum sensor, and the second response intensity is obtained by the response channel of the reference spectrum sensor;
[0007] For each response channel of the first spectrum sensor, a third response intensity of the response channel is determined under the illumination of a first LED light source, a fourth response intensity of the response channel is determined under the illumination of a second LED light source, and a target ratio between the third response intensity and the fourth response intensity is determined; a target frequency deviation corresponding to the target ratio is determined according to a corresponding relationship between the frequency deviation and the ratio at the position of the response channel; the wavelength at which the power peak of the first LED light source is located is different from the wavelength at which the power peak of the second LED light source is located;
[0008] Based on the response intensity difference of the response channel at each same position, the target frequency deviation, and the illumination data obtained by the reference spectral sensor under the irradiation of light of different wavelengths, the spectral reconstruction parameters of the first spectral sensor are calibrated; the spectral reconstruction parameters are used to fit the spectrum obtained by the first spectral sensor under the irradiation of light.
[0009] In a second aspect, the present application also provides a calibration device. The device comprises:
[0010] a response intensity difference determination module, for determining, under illumination of a flat light source, a response intensity difference of the first spectrum sensor relative to the reference spectrum sensor based on a first response intensity and a second response intensity for a response channel at each identical position of the first spectrum sensor and the reference spectrum sensor; the response intensity in the light spectrum of the flat light source is within a target intensity range, the first response intensity is obtained by the response channel of the first spectrum sensor, and the second response intensity is obtained by the response channel of the reference spectrum sensor;
[0011] A target frequency deviation determination module, for each response channel of the first spectrum sensor, determining a third response intensity of the response channel under the illumination of a first LED light source, determining a fourth response intensity of the response channel under the illumination of a second LED light source, and determining a target ratio between the third response intensity and the fourth response intensity; determining a target frequency deviation corresponding to the target ratio according to a correspondence between the frequency deviation and the ratio at the position of the response channel; the wavelength at which the power peak of the first LED light source is located is different from the wavelength at which the power peak of the second LED light source is located;
[0012] A spectral reconstruction parameter calibration module is used to calibrate the spectral reconstruction parameters of the first spectral sensor based on the response intensity difference of the response channels at each same position, the target frequency deviation, and the illumination data obtained by the reference spectral sensor under the irradiation of light of different wavelengths; the spectral reconstruction parameters are used to fit the spectrum obtained by the first spectral sensor under the irradiation of light.
[0013] In a third aspect, the present application further provides an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0014] Under the illumination of a flat light source, for the response channels of the first spectrum sensor and the reference spectrum sensor at each identical position, a difference in response intensity of the first spectrum sensor relative to the reference spectrum sensor is determined based on a first response intensity and a second response intensity; the response intensity in the light spectrum of the flat light source is within a target intensity range, the first response intensity is obtained by the response channel of the first spectrum sensor, and the second response intensity is obtained by the response channel of the reference spectrum sensor;
[0015] For each response channel of the first spectrum sensor, a third response intensity of the response channel is determined under the illumination of a first LED light source, a fourth response intensity of the response channel is determined under the illumination of a second LED light source, and a target ratio between the third response intensity and the fourth response intensity is determined; a target frequency deviation corresponding to the target ratio is determined according to a corresponding relationship between the frequency deviation and the ratio at the position of the response channel; the wavelength at which the power peak of the first LED light source is located is different from the wavelength at which the power peak of the second LED light source is located;
[0016] Based on the response intensity difference of the response channel at each same position, the target frequency deviation, and the illumination data obtained by the reference spectral sensor under the irradiation of light of different wavelengths, the spectral reconstruction parameters of the first spectral sensor are calibrated; the spectral reconstruction parameters are used to fit the spectrum obtained by the first spectral sensor under the irradiation of light.
[0017] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0018] Under the illumination of a flat light source, for the response channels of the first spectrum sensor and the reference spectrum sensor at each identical position, a difference in response intensity of the first spectrum sensor relative to the reference spectrum sensor is determined based on a first response intensity and a second response intensity; the response intensity in the light spectrum of the flat light source is within a target intensity range, the first response intensity is obtained by the response channel of the first spectrum sensor, and the second response intensity is obtained by the response channel of the reference spectrum sensor;
[0019] For each response channel of the first spectrum sensor, a third response intensity of the response channel is determined under the illumination of a first LED light source, a fourth response intensity of the response channel is determined under the illumination of a second LED light source, and a target ratio between the third response intensity and the fourth response intensity is determined; a target frequency deviation corresponding to the target ratio is determined according to a corresponding relationship between the frequency deviation and the ratio at the position of the response channel; the wavelength at which the power peak of the first LED light source is located is different from the wavelength at which the power peak of the second LED light source is located;
[0020] Based on the response intensity difference of the response channel at each same position, the target frequency deviation, and the illumination data obtained by the reference spectral sensor under the irradiation of light of different wavelengths, the spectral reconstruction parameters of the first spectral sensor are calibrated; the spectral reconstruction parameters are used to fit the spectrum obtained by the first spectral sensor under the irradiation of light.
[0021] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0022] Under the illumination of a flat light source, for the response channels of the first spectrum sensor and the reference spectrum sensor at each identical position, a difference in response intensity of the first spectrum sensor relative to the reference spectrum sensor is determined based on a first response intensity and a second response intensity; the response intensity in the light spectrum of the flat light source is within a target intensity range, the first response intensity is obtained by the response channel of the first spectrum sensor, and the second response intensity is obtained by the response channel of the reference spectrum sensor;
[0023] For each response channel of the first spectrum sensor, a third response intensity of the response channel is determined under the illumination of a first LED light source, a fourth response intensity of the response channel is determined under the illumination of a second LED light source, and a target ratio between the third response intensity and the fourth response intensity is determined; a target frequency deviation corresponding to the target ratio is determined according to a corresponding relationship between the frequency deviation and the ratio at the position of the response channel; the wavelength at which the power peak of the first LED light source is located is different from the wavelength at which the power peak of the second LED light source is located;
[0024] Based on the response intensity difference of the response channel at each same position, the target frequency deviation, and the illumination data obtained by the reference spectral sensor under the irradiation of light of different wavelengths, the spectral reconstruction parameters of the first spectral sensor are calibrated; the spectral reconstruction parameters are used to fit the spectrum obtained by the first spectral sensor under the irradiation of light.
[0025] The calibration method, device, electronic device, computer-readable storage medium and computer program product determine the difference in response intensity of the first spectrum sensor relative to the reference spectrum sensor based on the first response intensity and the second response intensity for the response channels at each identical position of the first spectrum sensor and the reference spectrum sensor under the illumination of a flat light source, wherein the response intensity in the light spectrum of the flat light source is within the target intensity range, the first response intensity is obtained by the response channel of the first spectrum sensor, and the second response intensity is obtained by the response channel of the reference spectrum sensor; for each response channel of the first spectrum sensor, a third response intensity of the response channel is determined under the illumination of the first LED light source, Under the irradiation of the second LED light source, the fourth response intensity of the response channel is determined, and the target ratio between the third response intensity and the fourth response intensity is determined, and according to the correspondence between the frequency deviation and the ratio at the position of the response channel, the target frequency deviation corresponding to the target ratio is determined, and the wavelength at which the power peak of the first LED light source is located is different from the wavelength at which the power peak of the second LED light source is located; then, based on the response intensity difference of the response channel at each same position, the target frequency deviation, and the illumination data obtained by the reference spectral sensor under the irradiation of light of different wavelengths, the spectral reconstruction parameters of the first spectral sensor can be accurately calibrated, and the spectral reconstruction parameters are used to fit the spectrum obtained by the first spectral sensor under the irradiation of light. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0027] Figure 1 is a flow chart of a calibration method in one embodiment;
[0028] Figure 2 is a response intensity curve diagram of a flat light source in one embodiment;
[0029] Figure 3 is a structural diagram of a spectral sensor in one embodiment;
[0030] Figure 4 is a response intensity curve of each response channel of a spectral sensor in an embodiment to light of different wavelength bands;
[0031] Figure 5 is a schematic diagram of a difference in response intensity between a first spectral sensor and a reference spectral sensor in one embodiment;
[0032] Figure 6 is an error model of frequency deviation in one embodiment;
[0033] Figure 7 is a response intensity curve diagram of a narrow-band LED light source in one embodiment;
[0034] Figure 8 is a response intensity curve diagram of the first LED light source and the second LED light source in one embodiment;
[0035] Fig. 9 A flow chart of determining a response strength difference and a target frequency deviation in one embodiment;
[0036] Fig.10 is a schematic diagram of a method for extracting a first response sequence in one embodiment;
[0037] Fig.11 A schematic diagram of performing offset processing on a first response sequence in one embodiment;
[0038] Fig.12 is a flow chart of a calibration method in another embodiment;
[0039] Fig.13 A schematic diagram of calibrating a device group in one embodiment;
[0040] Fig.14 A schematic diagram of the spectrum of a monochromator light source in one embodiment;
[0041] Fig.15 A flowchart for collecting standard response intensity and standard spectrum data in one embodiment;
[0042] Fig.16 is a schematic diagram of standard spectrum data and standard response intensity in one embodiment;
[0043] Fig.17 A flowchart of determining spectrum reconstruction parameters of a reference spectrum sensor in one embodiment;
[0044] Fig.18 A flowchart for determining a reference spectral sensor in one embodiment;
[0045] Fig.19 is a structural block diagram of a calibration device in one embodiment;
[0046] Fig. 20 FIG. 4 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0048] In one embodiment, Figure 1 As shown, a calibration method is provided. This embodiment uses the method applied to an electronic device as an example. The electronic device can be a terminal or a server. It can be understood that the method can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. Among them, the terminal can be but not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, smart cars, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server can be implemented as an independent server or a server cluster consisting of multiple servers.
[0049] In this embodiment, the calibration method includes the following steps:
[0050] Step S102, under the illumination of a flat light source, for the response channels of the first spectrum sensor and the reference spectrum sensor at each identical position, determine the response intensity difference of the first spectrum sensor relative to the reference spectrum sensor based on the first response intensity and the second response intensity; the response intensity in the light spectrum of the flat light source is within the target intensity range, the first response intensity is obtained by the response channel of the first spectrum sensor, and the second response intensity is obtained by the response channel of the reference spectrum sensor.
[0051] The response intensity in the light spectrum of the flat light source is within a target intensity range, and the target intensity range can be set as required. Figure 2 Shown is a graph of the response intensity of a flat light source.
[0052] The first spectral sensor is a spectral sensor to be calibrated, and the reference spectral sensor is a spectral sensor used as a reference when the first spectral sensor is calibrated. Figure 3 The structure diagram of a spectral sensor in an embodiment is shown, and the spectral sensor has many small partitions inside, each of which is a response channel, and each response channel responds to different wavelength bands of light. Optionally, the positions and numbers of the response channels of the first spectral sensor and the reference spectral sensor are the same.
[0053] like Figure 4The figure shows the response intensity curves of each response channel in a spectrum sensor to light of different wavelengths in one embodiment, indicating that the spectrum sensor has 13 response channels. Each response intensity curve corresponds to a response channel of the spectrum sensor. From the response intensity curves, it can be seen that different response channels respond to different wavelengths of light.
[0054] Optionally, under the illumination of a flat light source, the first spectral sensor collects a first response intensity of each response channel, and the reference spectral sensor collects a second response intensity of each response channel; for the response channels of the first spectral sensor and the reference spectral sensor at each identical position, the electronic device determines the difference in response intensity of the first spectral sensor relative to the reference spectral sensor based on the first response intensity and the second response intensity.
[0055] like Figure 5 As shown, taking a response channel that responds to the same position as an example, under the illumination of a flat light source, the second response intensity of each response channel collected by the reference spectral sensor is higher than the first response intensity of each response channel collected by the first spectral sensor, and based on the first response intensity and the second response intensity, the response intensity difference of the first spectral sensor relative to the reference spectral sensor is determined.
[0056] Optionally, the electronic device divides the first response intensity by the second response intensity to determine a response intensity ratio between the first response intensity and the second response intensity, wherein the response intensity ratio represents a response intensity difference between the first spectrum sensor and the reference spectrum sensor, wherein the response intensity ratio is also a gain value between the first response intensity and the second response intensity.
[0057] Exemplarily, the electronic device uses the following formula to determine the difference in response intensity between the first spectral sensor and the reference spectral sensor: in, represents the first response intensity of the i-th response channel of the reference spectral sensor, represents the second response intensity of the i-th response channel of the first spectral sensor, Represents the response intensity difference of the i-th response channel.
[0058] Step S104, for each response channel of the first spectral sensor, determine the third response intensity of the response channel under the illumination of the first LED light source, determine the fourth response intensity of the response channel under the illumination of the second LED light source, and determine the target ratio between the third response intensity and the fourth response intensity; determine the target frequency deviation corresponding to the target ratio according to the correspondence between the frequency deviation and the ratio at the position of the response channel; the wavelength at which the power peak of the first LED light source is located is different from the wavelength at which the power peak of the second LED light source is located.
[0059] Among them, frequency deviation is the amplitude of the FM wave frequency swing, generally speaking, it refers to the maximum frequency deviation, which affects the spectrum bandwidth of the FM wave. Figure 6 The figure shows the error model of frequency deviation. There is an offset (in nm) between the response intensity curves of the first spectrum sensor and the reference spectrum sensor.
[0060] Optionally, the first LED light source and the second LED light source are both narrow-band LED (Light Emitting Diode) light sources. It is understandable that if there is a difference in the sampling frequency of a certain response channel, the narrow-band LED light source will be more sensitive and prone to differences in response intensity, so the difference in sampling frequency, that is, frequency deviation, is calculated based on the difference in response intensity corresponding to the narrow-band LED light source.
[0061] Take a response channel as an example, Figure 7 Shown is a response intensity curve diagram of a narrow-band LED light source, indicating the light source characteristics of the narrow-band LED light source.
[0062] Take a response channel as an example, Figure 8 The response intensity curve of the first LED light source and the second LED light source is shown in FIG. Figure 8 The two peaks in represent the first LED light source and the second LED light source. The energy peaks (power peaks) of the two LED light sources are on the left and right sides of the peak of the response intensity curve, that is, the wavelength where the power peak of the first LED light source is located is different from the wavelength where the power peak of the second LED light source is located. For each response channel, two LED light sources need to be matched to collect the response intensity of each response channel of the first LED light source and the second LED light source respectively.
[0063] Optionally, for each response channel of the first spectral sensor, a third response intensity of the response channel is collected under the illumination of the first LED light source, and a fourth response intensity of the response channel is collected under the illumination of the second LED light source; the electronic device obtains the third response intensity and the fourth response intensity, and determines a target ratio between the third response intensity and the fourth response intensity; the target ratio is used to determine the target frequency deviation.
[0064] Optionally, the electronic device calculates the target ratio using the following formula: Ratio=R1 / R2; wherein R1 is the third response intensity of the response channel determined under the illumination of the first LED light source, R2 is the fourth response intensity of the response channel determined under the illumination of the second LED light source, and Ratio is the target ratio.
[0065] Optionally, the electronic device obtains the correspondence between the frequency deviation and the ratio at the position of each response channel of the first spectral sensor; for each response channel of the first spectral sensor, the electronic device searches for the target frequency deviation corresponding to the target ratio from the correspondence between the frequency deviation and the ratio at the position of the response channel.
[0066] Optionally, the correspondence between the frequency deviation and the ratio may be a lookup table; using the lookup table, the electronic device may search for the target frequency deviation closest to the target ratio in the lookup table according to the target ratio actually calculated by the first spectral sensor to be calibrated.
[0067] Step S106, based on the response intensity difference of the response channel at each same position, the target frequency deviation, and the illumination data obtained by the reference spectral sensor under the irradiation of light of different wavelengths, calibrate the spectral reconstruction parameters of the first spectral sensor; the spectral reconstruction parameters are used to fit the spectrum obtained by the first spectral sensor under the irradiation of light.
[0068] The illumination data obtained by the reference spectrum sensor under the irradiation of light of different wavelengths include a first response sequence and standard spectrum data. The first response sequence is obtained by the response channel of the reference spectrum sensor under the irradiation of light of different wavelengths, that is, the first response sequence is the different response intensities obtained by the same response channel under the irradiation of light of different wavelengths.
[0069] The spectrum reconstruction parameter may be a spectrum reconstruction matrix, and the spectrum reconstruction matrix is used to fit a real spectrum obtained by the first spectrum sensor under light irradiation.
[0070] Optionally, the electronic device adjusts the illumination data obtained by the reference spectral sensor under the irradiation of light of different wavelengths based on the response intensity difference of the response channels at each same position and the target frequency deviation, and calibrates to obtain calibrated illumination data of each response channel of the first spectral sensor; and determines the spectral reconstruction parameters of the first spectral sensor based on the calibrated illumination data of each response channel of the first spectral sensor.
[0071] Optionally, the calibration illumination data includes a calibration response sequence and standard spectral data; based on the response intensity difference and target frequency deviation of the response channel at each same position, the illumination data obtained by the reference spectral sensor under the irradiation of light of different wavelengths is adjusted to calibrate the calibration illumination data of each response channel of the first spectral sensor, including: for each response channel at the same position, adjusting the first response sequence based on the response intensity difference and the target frequency deviation to obtain a calibrated response sequence of the response channel; based on the calibrated response sequence of each response channel of the first spectral sensor and the standard spectral data of the reference spectral sensor, determining the spectral reconstruction parameters of the first spectral sensor.
[0072] The calibration method is to determine the difference in response intensity of the first spectrum sensor relative to the reference spectrum sensor based on the first response intensity and the second response intensity for the response channels of the first spectrum sensor and the reference spectrum sensor at each identical position under the illumination of a flat light source, wherein the response intensity in the light spectrum of the flat light source is within the target intensity range, the first response intensity is obtained by the response of the response channel of the first spectrum sensor, and the second response intensity is obtained by the response of the response channel of the reference spectrum sensor; for each response channel of the first spectrum sensor, the third response intensity of the response channel is determined under the illumination of the first LED light source, and the third response intensity of the response channel is determined under the illumination of the second LED light source. The fourth response intensity of the response channel is determined, and the target ratio between the third response intensity and the fourth response intensity is determined, and the target frequency deviation corresponding to the target ratio is determined according to the corresponding relationship between the frequency deviation and the ratio at the position of the response channel. The wavelength at which the power peak of the first LED light source is located is different from the wavelength at which the power peak of the second LED light source is located; then, based on the response intensity difference of each response channel at the same position, the target frequency deviation, and the illumination data obtained by the reference spectrum sensor under the irradiation of light of different wavelengths, the spectrum reconstruction parameters of the first spectrum sensor can be accurately calibrated, and the spectrum reconstruction parameters are used to fit the spectrum obtained by the first spectrum sensor under the irradiation of light. In addition, the electronic device uses less light source data, and can calibrate (model) the mass-produced spectrum sensor to be calibrated more quickly through the target frequency deviation and response intensity difference between the spectrum sensor to be calibrated and the reference spectrum sensor, thereby ensuring the timeliness of mass production.
[0073] In one embodiment, Fig. 9 As shown, the electronic device uses the first spectral sensor as the device to be calibrated, and uses a flat light source to collect the first response intensity and the second response intensity; the first response intensity is obtained by the response channel of the first spectral sensor, and the second response intensity is obtained by the response channel of the reference spectral sensor; the response intensity difference of each response channel is calculated; the third response intensity and the fourth response intensity are collected by using the first LED light source and the second LED light source; the target ratio of each response channel is calculated, and the target frequency deviation of each response channel is obtained by looking up the corresponding relationship table between the frequency deviation and the ratio.
[0074] In one embodiment, the method further includes: for each response channel of the second spectral sensor, obtaining first spectral data corresponding to the response channel under the illumination of the first LED light source, and obtaining second spectral data corresponding to the response channel under the illumination of the second LED light source; for each response channel of the reference spectral sensor, performing an offset process on the first response sequence of the response channel to obtain a second response sequence; the first response sequence is obtained when the response channel of the reference spectral sensor is illuminated by light of different wavelengths; for each response channel at the same position of the second spectral sensor and the reference spectral sensor, determining a ratio corresponding to the frequency deviation based on the second response sequence, the first spectral data and the second spectral data, and determining a corresponding relationship between the frequency deviation and the ratio at the position of the response channel; the frequency deviation is an offset distance for which the first response sequence of the response channel of the reference spectral sensor is offset.
[0075] The second spectrum sensor is a spectrum sensor used to generate a corresponding relationship between the frequency deviation and the ratio. The second spectrum sensor may be the same as the first spectrum sensor or may be different.
[0076] Optionally, under the illumination of the first LED light source, the first spectrum data corresponding to each response channel of the second spectrum sensor is obtained by a spectrometer, and under the illumination of the second LED light source, the second spectrum data corresponding to each response channel of the second spectrum sensor is obtained by a spectrometer. The spectrometer can directly measure the light source spectrum sequence.
[0077] Optionally, the electronic device obtains a first response sequence of each response channel of the reference spectral sensor, where the first response sequence is obtained when the response channel of the reference spectral sensor is irradiated by light of different wavelengths of a monochromator light source; and performs an offset process on the first response sequence to obtain a second response sequence.
[0078] Optionally, the first response sequence includes at least two response elements, and the at least two response elements are arranged in order of wavelength; the first response sequence of the response channel is offset to obtain a second response sequence, including: if the frequency deviation is a positive number, the first response sequence of the response channel is offset in a first direction to obtain a second response sequence; the first direction is the direction of the wavelength of the response element from small to large; if the frequency deviation is a negative number, the first response sequence of the response channel is offset in a second direction to obtain a second response sequence; the second direction is the direction of the wavelength of the response element from large to small.
[0079] Optionally, if there is a blank position in the second response sequence, 0 is filled in the blank position as the response element of the blank position; by continuously setting different values of the frequency deviation, the corresponding relationship between the frequency deviation and the ratio at the position of the current response channel can be generated.
[0080] It can be understood that the electronic device performs an offset process (frequency offset simulation) on the first response sequence, that is, the response intensity value of each position of the original spectral response sequence is shifted to the front or back of the sequence.
[0081] like Fig.10 As shown, taking response channel 1 as an example, the electronic device obtains the first response sequence obtained by response channel 1 of the reference spectrum sensor under the irradiation of light of different wavelengths; Fig.11 As shown, if the frequency deviation is a positive number, such as frequency deviation x=2, each response intensity value in the first response sequence is shifted by 2 positions in the first direction, that is, shifted by 2 positions in the direction from small to large wavelength of the response element.
[0082] In other embodiments, if the frequency deviation is a negative number, such as x=-2, each response strength value in the first response sequence is shifted by 2 positions in the second direction.
[0083] Optionally, taking one of the response channels of the second spectrum sensor as an example, the electronic device uses the following formula to determine the ratio corresponding to the frequency deviation at the position of the response channel:
[0084]
[0085] in, The kth value obtained after the first response sequence of the response channel representing the reference spectral sensor is simulated and shifted by x (nm, nanometers), that is, the kth value in the second response sequence; represents the kth value in the first spectrum data; represents the kth value of the second spectrum data; ratio_shift_x is the ratio when the frequency deviation is x. Wherein, the first spectrum data and the second spectrum data are both sequences.
[0086] In this embodiment, for each response channel of the second spectral sensor, first spectral data corresponding to the response channel is obtained under the illumination of the first LED light source, and second spectral data corresponding to the response channel is obtained under the illumination of the second LED light source; for each response channel of the reference spectral sensor, the first response sequence of the response channel is offset to obtain a second response sequence, and the first response sequence is obtained when the response channel of the reference spectral sensor is illuminated by light of different wavelengths; then, for each response channel of the second spectral sensor and the reference spectral sensor at the same position, based on the second response sequence, the first spectral data and the second spectral data, the ratio corresponding to the frequency deviation can be accurately determined, thereby accurately determining the corresponding relationship between the frequency deviation and the ratio at the position of the response channel.
[0087] Furthermore, the electronic device can also perform a shift process in a more accurate direction when the frequency deviation is a positive number or a negative number, so as to obtain a more accurate second sequence.
[0088] In one embodiment, illumination data obtained by a reference spectral sensor under irradiation with light of different wavelengths include a first response sequence and standard spectral data, wherein the first response sequence is obtained by a response channel of the reference spectral sensor under irradiation with light of different wavelengths; based on a response intensity difference of each response channel at the same position, a target frequency deviation, and illumination data obtained by the reference spectral sensor under irradiation with light of different wavelengths, spectral reconstruction parameters of the first spectral sensor are calibrated, including: for each response channel at the same position, adjusting the first response sequence based on the response intensity difference and the target frequency deviation to obtain a calibrated response sequence of the response channel; determining the spectral reconstruction parameters of the first spectral sensor based on the calibrated response sequences of each response channel of the first spectral sensor and the standard spectral data of the reference spectral sensor.
[0089] The calibration response sequence is data used to calibrate the first spectral sensor.
[0090] Optionally, the first response sequence is adjusted based on the response strength difference and the target frequency deviation to obtain a calibrated response sequence of the response channel, including: based on the response strength difference, adjusting the response strength of the first response sequence to obtain an intermediate response sequence; based on the target frequency deviation, offsetting the intermediate response sequence to obtain a calibrated response sequence of the response channel.
[0091] Optionally, based on each response channel at the same position, the electronic device multiplies the response intensity difference by the first response sequence to obtain an intermediate response sequence; and performs an offset process corresponding to the target frequency deviation on the intermediate response sequence to obtain a calibrated response sequence.
[0092] Optionally, if the target frequency deviation is a positive number, the intermediate response sequence of the response channel is offset in a first direction to obtain a calibrated response sequence; the first direction is the direction of the wavelength of the response element from small to large; if the frequency deviation is a negative number, the intermediate response sequence of the response channel is offset in a second direction to obtain a calibrated response sequence; the second direction is the direction of the wavelength of the response element from large to small.
[0093] Exemplarily, taking response channel 1 as an example, the response strength difference of the response channel is G1, and the target frequency deviation is X1; the electronic device first takes out the first response sequence of the response sequence, multiplies each value in the first response sequence by G1, and obtains an intermediate response sequence; then, according to the frequency deviation X1, the intermediate response sequence is offset by X1 positions in the first direction or the second direction to obtain a calibrated response sequence.
[0094] like Fig.12As shown, the first spectral sensor is the device to be calibrated, and the electronic device calculates the response intensity difference and the target frequency deviation of the first spectral sensor; based on the response intensity difference and the target frequency deviation, the illumination data of the reference spectral sensor is adjusted to obtain the illumination data of the first spectral sensor; and the least squares method is used to calculate and calibrate the spectral reconstruction matrix of the first spectral sensor.
[0095] The electronic device calculates the spectrum reconstruction parameter of the first spectrum sensor using the following formula: Among them, Raw i represents the response intensity of the i-th response channel in the calibration response sequence of the first spectral sensor, expressed as a row vector; S i represents the i-th standard spectrum data of the reference spectrum sensor, also represented by a row vector, and Raw i is a pair of data from a unified light source; n represents the total number of light source data collected for calibration; CM is the spectrum reconstruction parameter, expressed as a matrix, the number of rows of the matrix is the same as the number of response channels of the first spectrum sensor or the reference spectrum sensor, and the number of columns of the matrix is the same as the length of the spectrum array. i *CM is matrix multiplication, and the result is the reconstructed spectrum, S i It is equivalent to the true value of the spectrum, so the value of this formula is minimized, that is, the sum of squares of the errors between the obtained spectrum reconstruction parameters and the actual data is minimized, and then the spectrum reconstruction parameters are determined by the least squares method.
[0096] Among them, the least squares method can solve linear fitting problems and find the best function matching of data by minimizing the sum of squares of errors. The least squares method can be used to easily obtain unknown data and minimize the sum of squares of errors between the obtained data and the actual data.
[0097] In this embodiment, for each response channel at the same position, the first response sequence is adjusted based on the response intensity difference and the target frequency deviation to obtain a calibrated response sequence of the response channel; based on the calibrated response sequences of each response channel of the first spectral sensor and the standard spectral data of the reference spectral sensor, the spectral reconstruction parameters of the first spectral sensor can be accurately determined.
[0098] Furthermore, the electronic device adjusts the response strength of the first response sequence based on the response strength difference to obtain an intermediate response sequence; and performs offset processing on the intermediate response sequence based on the target frequency deviation to accurately obtain a calibrated response sequence of the response channel.
[0099] In one embodiment, the above method also includes: obtaining the original response intensity of the reference spectrum sensor, the original spectrum data of the spectrometer and the optical power value of the optical power meter under the irradiation of different wavelengths of light from the monochromator light source; adjusting the original response intensity to the standard response intensity per unit optical power based on the original response intensity and the optical power value, and determining the first response sequence of each response channel in the reference spectrum sensor based on the standard response intensities corresponding to different wavelengths; and adjusting the original spectrum data to the standard spectrum data per unit optical power based on the original spectrum data and the optical power value.
[0100] It is understandable that if Fig.13 The figure shows a schematic diagram of the calibration equipment group, which includes an integrating sphere, a monochromator light source, a spectrometer, a reference spectrum sensor, and an optical power meter. The integrating sphere is equivalent to a light homogenizing device, which evenly reflects the light source to the integrating sphere outlet. The monochromator light source is used to generate a narrow-band light source with a step length of 1nm. There are three devices at the integrating sphere outlet, namely, a spectrometer, a reference spectrum sensor, and an optical power meter. The spectrometer is used to detect the output spectrum, the reference spectrum sensor is the device to be calibrated, and the optical power meter is used to detect the current optical power. Fig.14 Shown is a schematic diagram of the spectrum of a monochromator light source in one embodiment.
[0101] Optionally, the monochromator continuously switches the wavelength of the light source, and under the irradiation of the monochromator with different wavelengths, the reference spectrum sensor collects the original response intensity, the spectrometer collects the original spectrum data, and the optical power meter collects the optical power value; the electronic device obtains the reference spectrum sensor to collect the original response intensity, the spectrometer collects the original spectrum data, and the optical power meter collects the optical power value.
[0102] Optionally, the electronic device divides the original response intensity by the optical power value to obtain a standard response intensity per unit optical power, and the standard response intensities corresponding to different wavelengths of each response channel constitute a first response sequence; the electronic device divides the original spectral data by the optical power value to obtain standard spectral data per unit optical power.
[0103] In this embodiment, under the irradiation of light of different wavelengths of the monochromator light source, the original response intensity of the reference spectral sensor, the original spectral data of the spectrometer and the optical power value of the optical power meter are obtained; based on the original response intensity and the optical power value, the original response intensity is adjusted to the standard response intensity per unit optical power, and based on the standard response intensities corresponding to different wavelengths, the first response sequence of each response channel in the reference spectral sensor can be accurately determined; based on the original spectral data and the optical power value, the original spectral data can be accurately adjusted to the standard spectral data per unit optical power, so that based on the first response sequence and the standard spectral data, the spectral reconstruction parameters of the first spectral sensor can be more accurately determined.
[0104] In one embodiment, Fig.15 As shown, the monochromator is used as the light source. According to the design range of the spectrum sensor, the wavelength of the light source is continuously switched from the beginning to the end (such as 350nm-1000nm); at the same time, the spectrum sensor continuously collects all response channel data, the spectrometer continuously collects spectrum data, and the optical power meter continuously records the optical power value; for each collected response channel intensity, it is divided by the optical power value recorded at the same time to obtain the standard response intensity per unit optical power; for each collected spectrum data, it is divided by the optical power value recorded at the same time to obtain the standard spectrum data per unit optical power. Fig.16 As shown, the standard spectrum data and the standard response intensity recorded simultaneously are taken as a pair of data.
[0105] In another embodiment, other methods may be used to determine the spectrum reconstruction parameters of the reference spectrum sensor, such as Fig.17 As shown, the electronic device selects a reference spectral sensor; collects calibration data of the reference spectral sensor, the calibration data including the response intensity of each response channel of the reference spectral sensor, and spectral data; and uses the least square method to calculate the calibrated spectral reconstruction matrix.
[0106] To use the least squares method, construct the expression that minimizes the error: Among them, Raw i It represents the response intensity of the i-th response channel in the standard response intensity of the reference spectral sensor, expressed as a row vector; S i represents the i-th standard spectrum data of the reference spectrum sensor, also represented by a row vector, and Raw i is a pair of data from a unified light source; n represents the total number of light source data collected for calibration; CM is the spectrum reconstruction parameter, expressed as a matrix, the number of rows of the matrix is the same as the number of response channels of the reference spectrum sensor, and the number of columns of the matrix is the same as the length of the spectrum array. i *CM is matrix multiplication, and the result is the reconstructed spectrum, S i It is equivalent to the true value of the spectrum, so the value of this formula is minimized, that is, the sum of squares of the errors between the obtained spectrum reconstruction parameters and the actual data is minimized, and then the spectrum reconstruction parameters are determined by the least squares method.
[0107] In one embodiment, a method for determining a reference spectral sensor includes: determining a reference response intensity based on response intensities respectively collected by at least two third spectral sensors under illumination of a flat light source; determining, for each third spectral sensor, a degree of deviation between the response intensity of the third spectral sensor and the reference response intensity; and determining a reference spectral sensor from at least two third spectral sensors based on the degree of deviation corresponding to each third spectral sensor.
[0108] The third spectral sensor, the second spectral sensor and the first spectral sensor may be the same, different, or partially the same and partially different.
[0109] The reference response intensity is used to select the response intensity of the reference spectrum sensor. Optionally, the electronic device can use the average value of the response intensities collected by at least two third spectrum sensors as the reference response intensity, or the median of the response intensities collected by at least two third spectrum sensors as the reference response intensity, or other methods can be used to determine the reference response intensity, which are not limited here.
[0110] Optionally, for each third spectral sensor, the electronic device determines the Euler distance between the third spectral sensor and the reference response intensity; the Euler distance represents the degree of deviation between the third spectral sensor and the reference response intensity; based on the Euler distance corresponding to each third spectral sensor, the reference spectral sensor is determined.
[0111] Optionally, the electronic device may calculate the Euler distance between the third spectral sensor and the reference response intensity using the following formula: Among them, X i (a) represents the response intensity of the ith channel of the third spectral sensor a, Represents the reference response intensity of the ith channel.
[0112] Optionally, the electronic device may use the third spectral sensor with the smallest Euler distance as the reference spectral sensor, or may use the third spectral sensor with the second smallest Euler distance as the reference spectral sensor, which is not limited here.
[0113] In this embodiment, under the illumination of a flat light source, the electronic device determines a reference response intensity based on the response intensities respectively collected by at least two third spectral sensors; for each third spectral sensor, the degree of deviation between the response intensity of the third spectral sensor and the reference response intensity is determined; then, based on the degree of deviation corresponding to each third spectral sensor, the reference spectral sensor can be more accurately determined from the at least two third spectral sensors.
[0114] In one embodiment, Fig.18As shown, firstly, a number of third spectral sensors are selected for testing, such as 100; a light source with a continuous and flat spectrum is used to test the third spectral sensors, and the response intensity of each response channel of all the third spectral sensors is obtained; the response intensity of each third spectral sensor module can be represented by an array with a length of n, where n represents the number of response channels of the spectral sensor; the average value of each response intensity is calculated as a reference response intensity; the Euler distance between each response intensity and the average value is calculated; and the third spectral sensor with the smallest Euler distance is selected as the reference spectral sensor.
[0115] In one embodiment, another calibration method is provided, which is applied to an electronic device and includes the following steps:
[0116] Step A1, determining a reference spectral sensor; the method for determining the reference spectral sensor includes: determining a reference response intensity based on response intensities respectively collected by at least two third spectral sensors under the illumination of a flat light source; determining, for each third spectral sensor, a degree of deviation between the response intensity of the third spectral sensor and the reference response intensity; and determining a reference spectral sensor from at least two third spectral sensors based on the degree of deviation corresponding to each third spectral sensor.
[0117] Step A2, under the illumination of a flat light source, for the response channels of the first spectrum sensor and the reference spectrum sensor at each identical position, determine the response intensity difference of the first spectrum sensor relative to the reference spectrum sensor based on the first response intensity and the second response intensity; the response intensity in the light spectrum of the flat light source is within the target intensity range, the first response intensity is obtained by the response channel of the first spectrum sensor, and the second response intensity is obtained by the response channel of the reference spectrum sensor.
[0118] Step A3, for each response channel of the first spectral sensor, determine the third response intensity of the response channel under the illumination of the first LED light source, determine the fourth response intensity of the response channel under the illumination of the second LED light source, and determine the target ratio between the third response intensity and the fourth response intensity; determine the target frequency deviation corresponding to the target ratio according to the correspondence between the frequency deviation and the ratio at the position of the response channel; the wavelength at which the power peak of the first LED light source is located is different from the wavelength at which the power peak of the second LED light source is located.
[0119] Step A4, obtaining the correspondence between the frequency deviation and the ratio at the position of the response channel; the method for determining the correspondence between the frequency deviation and the ratio at the position of the response channel includes: for each response channel of the second spectrum sensor, obtaining the first spectrum data corresponding to the response channel under the irradiation of the first LED light source, and obtaining the second spectrum data corresponding to the response channel under the irradiation of the second LED light source; the first response sequence includes at least two response elements, and the at least two response elements are arranged in order of wavelength; if the frequency deviation is a positive number, the first response sequence of the response channel is offset in the first direction to obtain the second response sequence; the first direction is the wavelength of the response element from small to large; if the frequency deviation is a negative number, the first response sequence of the response channel is offset in the second direction to obtain a second response sequence; the second direction is the direction of the wavelength of the response element from large to small; the first response sequence is obtained by the response channel of the reference spectrum sensor under the irradiation of light of different wavelengths; for the response channels of the second spectrum sensor and the reference spectrum sensor at each same position, based on the second response sequence, the first spectrum data and the second spectrum data, the ratio corresponding to the frequency deviation is determined, and the corresponding relationship between the frequency deviation and the ratio at the position of the response channel is determined; the frequency deviation is the offset distance of the first response sequence of the response channel of the reference spectrum sensor for the offset processing.
[0120] Step A5, obtaining illumination data obtained by the reference spectrum sensor under the irradiation of light of different wavelengths, the illumination data including a first response sequence and standard spectrum data; a method for determining the first response sequence and the standard spectrum data, including: obtaining the original response intensity of the reference spectrum sensor, the original spectrum data of the spectrometer and the optical power value of the optical power meter under the irradiation of light of different wavelengths of the monochromator light source; adjusting the original response intensity to the standard response intensity per unit optical power based on the original response intensity and the optical power value, and determining the first response sequence of each response channel in the reference spectrum sensor based on the standard response intensities corresponding to different wavelengths; adjusting the original spectrum data to the standard spectrum data per unit optical power based on the original spectrum data and the optical power value.
[0121] Step A6, for each response channel at the same position, based on the response intensity difference, the response intensity of the first response sequence is adjusted to obtain an intermediate response sequence; based on the target frequency deviation, the intermediate response sequence is offset processed to obtain a calibrated response sequence of the response channel; based on the calibrated response sequences of each response channel of the first spectral sensor and the standard spectral data of the reference spectral sensor, the spectral reconstruction parameters of the first spectral sensor are determined; the spectral reconstruction parameters are used to fit the spectrum obtained by the first spectral sensor under light irradiation.
[0122] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0123] Based on the same inventive concept, the embodiment of the present application also provides a calibration device for implementing the calibration method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more calibration device embodiments provided below can refer to the limitations on the calibration method above, and will not be repeated here.
[0124] In one embodiment, Fig.19 As shown, a calibration device is provided, including: a response intensity difference determination module 1902, a target frequency deviation determination module 1904 and a spectrum reconstruction parameter calibration module 1906, wherein:
[0125] The response intensity difference determination module 1902 is used to determine the response intensity difference of the first spectrum sensor relative to the reference spectrum sensor based on the first response intensity and the second response intensity for the response channels of the first spectrum sensor and the reference spectrum sensor at each identical position under the illumination of the flat light source; the response intensity in the light spectrum of the flat light source is within the target intensity range, the first response intensity is obtained by the response channel of the first spectrum sensor, and the second response intensity is obtained by the response channel of the reference spectrum sensor.
[0126] The target frequency deviation determination module 1904 is used to determine, for each response channel of the first spectral sensor, a third response intensity of the response channel under the illumination of the first LED light source, determine a fourth response intensity of the response channel under the illumination of the second LED light source, and determine a target ratio between the third response intensity and the fourth response intensity; determine a target frequency deviation corresponding to the target ratio according to a correspondence between the frequency deviation and the ratio at the position of the response channel; the wavelength at which the power peak of the first LED light source is located is different from the wavelength at which the power peak of the second LED light source is located.
[0127] The spectral reconstruction parameter calibration module 1906 is used to calibrate the spectral reconstruction parameters of the first spectral sensor based on the response intensity difference of the response channel at each same position, the target frequency deviation, and the illumination data obtained by the reference spectral sensor under the irradiation of light of different wavelengths; the spectral reconstruction parameters are used to fit the spectrum obtained by the first spectral sensor under the irradiation of light.
[0128] The calibration device, under the illumination of a flat light source, determines the difference in response intensity of the first spectrum sensor relative to the reference spectrum sensor based on the first response intensity and the second response intensity for the response channels of the first spectrum sensor and the reference spectrum sensor at each identical position, wherein the response intensity in the light spectrum of the flat light source is within the target intensity range, the first response intensity is obtained by the response of the response channel of the first spectrum sensor, and the second response intensity is obtained by the response of the response channel of the reference spectrum sensor; for each response channel of the first spectrum sensor, the third response intensity of the response channel is determined under the illumination of the first LED light source, and the third response intensity of the response channel is determined under the illumination of the second LED light source. A fourth response intensity of the response channel is determined, and a target ratio between the third response intensity and the fourth response intensity is determined, and a target frequency deviation corresponding to the target ratio is determined according to the correspondence between the frequency deviation and the ratio at the position of the response channel, and the wavelength at which the power peak of the first LED light source is located is different from the wavelength at which the power peak of the second LED light source is located; then, based on the response intensity difference of each response channel at the same position, the target frequency deviation, and the illumination data obtained by the reference spectrum sensor under the irradiation of light of different wavelengths, the spectrum reconstruction parameters of the first spectrum sensor can be accurately calibrated, and the spectrum reconstruction parameters are used to fit the spectrum obtained by the first spectrum sensor under the irradiation of light.
[0129] In one embodiment, the above-mentioned device also includes a correspondence determination module; the correspondence determination module is used to obtain, for each response channel of the second spectral sensor, first spectral data corresponding to the response channel under the irradiation of the first LED light source, and to obtain second spectral data corresponding to the response channel under the irradiation of the second LED light source; for each response channel of the reference spectral sensor, the first response sequence of the response channel is offset to obtain a second response sequence; the first response sequence is obtained by the response channel of the reference spectral sensor under the irradiation of light of different wavelengths; for each response channel at the same position of the second spectral sensor and the reference spectral sensor, based on the second response sequence, the first spectral data and the second spectral data, determine the ratio corresponding to the frequency deviation, and determine the correspondence between the frequency deviation and the ratio at the position of the response channel; the frequency deviation is the offset distance of the first response sequence of the response channel of the reference spectral sensor for the offset processing.
[0130] In one embodiment, the first response sequence includes at least two response elements, and the at least two response elements are arranged in order of wavelength; the above-mentioned correspondence determination module is also used to, if the frequency deviation is a positive number, shift the first response sequence of the response channel in a first direction to obtain a second response sequence; the first direction is the direction of the wavelength of the response element from small to large; if the frequency deviation is a negative number, the first response sequence of the response channel is shifted in a second direction to obtain a second response sequence; the second direction is the direction of the wavelength of the response element from large to small.
[0131] In one embodiment, the illumination data obtained by the reference spectral sensor under the irradiation of light of different wavelengths include a first response sequence and standard spectral data, wherein the first response sequence is obtained by the response channel of the reference spectral sensor under the irradiation of light of different wavelengths; the spectral reconstruction parameter calibration module 1906 is also used to adjust the first response sequence for each response channel at the same position based on the response intensity difference and the target frequency deviation to obtain a calibrated response sequence of the response channel; based on the calibrated response sequences of each response channel of the first spectral sensor and the standard spectral data of the reference spectral sensor, determine the spectral reconstruction parameters of the first spectral sensor.
[0132] In one embodiment, the spectrum reconstruction parameter calibration module 1906 is further used to adjust the response intensity of the first response sequence based on the response intensity difference to obtain an intermediate response sequence; and to offset the intermediate response sequence based on the target frequency deviation to obtain a calibrated response sequence of the response channel.
[0133] In one embodiment, the above-mentioned device also includes a light data determination module; the light data determination module is used to obtain the original response intensity of the reference spectrum sensor, the original spectrum data of the spectrometer and the optical power value of the optical power meter under the irradiation of different wavelengths of light from the monochromator light source; based on the original response intensity and the optical power value, the original response intensity is adjusted to the standard response intensity per unit optical power, and based on the standard response intensities corresponding to different wavelengths, the first response sequence of each response channel in the reference spectrum sensor is determined; based on the original spectrum data and the optical power value, the original spectrum data is adjusted to the standard spectrum data per unit optical power.
[0134] In one embodiment, the above-mentioned device also includes a reference spectral sensor determination module; the reference spectral sensor determination module is used to determine a reference response intensity based on the response intensities respectively collected by at least two third spectral sensors under the illumination of a flat light source; for each third spectral sensor, determine the degree of deviation between the response intensity of the third spectral sensor and the reference response intensity; based on the degree of deviation corresponding to each third spectral sensor, determine a reference spectral sensor from at least two third spectral sensors.
[0135] Each module in the above calibration device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in an electronic device in the form of hardware, or can be stored in a memory in an electronic device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0136] In one embodiment, an electronic device is provided. The electronic device may be a terminal, and its internal structure diagram may be as follows: Fig. 20 As shown. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used to exchange information between the processor and an external device. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a calibration method is implemented. The display unit of the electronic device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the electronic device casing, or an external keyboard, touchpad or mouse.
[0137] Those skilled in the art will understand that Fig. 20 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0138] The embodiment of the present application also provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, the processors execute the steps of the calibration method.
[0139] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the calibration method.
[0140] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0141] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0142] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0143] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A calibration method, characterized in that: include: Under the illumination of a flat light source, for the response channels of the first spectrum sensor and the reference spectrum sensor at each identical position, determining a response intensity difference of the first spectrum sensor relative to the reference spectrum sensor based on a first response intensity and a second response intensity; The response intensity in the light spectrum of the flat light source is within a target intensity range, the first response intensity is obtained by the response of the response channel of the first spectrum sensor, and the second response intensity is obtained by the response of the response channel of the reference spectrum sensor; For each response channel of the first spectral sensor, determine a third response intensity of the response channel under illumination by a first LED light source, determine a fourth response intensity of the response channel under illumination by a second LED light source, and determine a target ratio between the third response intensity and the fourth response intensity; Determine the target frequency deviation corresponding to the target ratio according to the corresponding relationship between the frequency deviation and the ratio at the position of the response channel; the wavelength at which the power peak of the first LED light source is located is different from the wavelength at which the power peak of the second LED light source is located; Based on the response intensity difference of the response channel at each same position, the target frequency deviation, and the illumination data obtained by the reference spectral sensor under the irradiation of light of different wavelengths, the spectral reconstruction parameters of the first spectral sensor are calibrated; the spectral reconstruction parameters are used to fit the spectrum obtained by the first spectral sensor under the irradiation of light.
2. The method according to claim 1, characterized in that The method further comprises: For each response channel of the second spectrum sensor, first spectrum data corresponding to the response channel is acquired under the illumination of the first LED light source, and second spectrum data corresponding to the response channel is acquired under the illumination of the second LED light source; For each response channel of the reference spectrum sensor, a first response sequence of the response channel is offset to obtain a second response sequence; the first response sequence is obtained when the response channel of the reference spectrum sensor is irradiated with light of different wavelengths; For each response channel of the second spectral sensor and the reference spectral sensor at the same position, a ratio corresponding to the frequency deviation is determined based on the second response sequence, the first spectral data and the second spectral data, and a corresponding relationship between the frequency deviation and the ratio at the position of the response channel is determined; the frequency deviation is an offset distance for performing an offset processing on the first response sequence of the response channel of the reference spectral sensor.
3. The method according to claim 2, characterized in that The first response sequence includes at least two response elements, and the at least two response elements are arranged in order of wavelength; The step of performing offset processing on the first response sequence of the response channel to obtain a second response sequence includes: If the frequency deviation is a positive number, the first response sequence of the response channel is shifted in a first direction to obtain a second response sequence; the first direction is the direction from small to large wavelength of the response element; If the frequency deviation is a negative number, the first response sequence of the response channel is shifted toward a second direction to obtain a second response sequence; the second direction is a direction in which the wavelengths of the response elements are from large to small.
4. The method according to claim 1, characterized in that: The illumination data obtained by the reference spectrum sensor under the irradiation of light of different wavelengths include a first response sequence and standard spectrum data, wherein the first response sequence is obtained by the response channel of the reference spectrum sensor under the irradiation of light of different wavelengths; The spectral reconstruction parameters of the first spectral sensor are calibrated based on the response intensity difference of the response channels at each same position, the target frequency deviation, and the illumination data obtained by the reference spectral sensor under the irradiation of light of different wavelengths, including: For each response channel at the same position, adjusting the first response sequence based on the response intensity difference and the target frequency deviation to obtain a calibrated response sequence of the response channel; Based on the calibrated response sequences of the respective response channels of the first spectral sensor and the standard spectral data of the reference spectral sensor, spectral reconstruction parameters of the first spectral sensor are determined.
5. The method according to claim 4, characterized in that The adjusting the first response sequence based on the response intensity difference and the target frequency deviation to obtain a calibrated response sequence of the response channel includes: Based on the response strength difference, adjusting the response strength of the first response sequence to obtain an intermediate response sequence; Based on the target frequency offset, the intermediate response sequence is subjected to an offset process to obtain a calibrated response sequence of the response channel.
6. The method according to claim 4, characterized in that The method further comprises: Under the irradiation of light of different wavelengths of the monochromator light source, obtaining the original response intensity of the reference spectrum sensor, the original spectrum data of the spectrometer and the optical power value of the optical power meter; Based on the original response intensity and the optical power value, adjusting the original response intensity to a standard response intensity per unit optical power, and determining a first response sequence for each response channel in the reference spectrum sensor based on the standard response intensities corresponding to different wavelengths; Based on the original spectrum data and the optical power value, the original spectrum data is adjusted to standard spectrum data with unit optical power.
7. The method according to any one of claims 1 to 6, characterized in that: The method for determining the reference spectrum sensor includes: Under the illumination of the flat light source, determining a reference response intensity based on response intensities respectively collected by at least two third spectral sensors; For each third spectral sensor, determining a deviation degree between a response intensity of the third spectral sensor and the reference response intensity; A reference spectral sensor is determined from the at least two third spectral sensors based on the deviation degree corresponding to each third spectral sensor.
8. A calibration device, characterized in that: include: a response intensity difference determination module, configured to determine, under illumination of a flat light source, a response intensity difference of the first spectrum sensor relative to the reference spectrum sensor based on a first response intensity and a second response intensity for a response channel at each identical position of the first spectrum sensor and the reference spectrum sensor; The response intensity in the light spectrum of the flat light source is within a target intensity range, the first response intensity is obtained by the response of the response channel of the first spectrum sensor, and the second response intensity is obtained by the response of the response channel of the reference spectrum sensor; a target frequency deviation determination module, configured to determine, for each response channel of the first spectrum sensor, a third response intensity of the response channel under the illumination of the first LED light source, determine a fourth response intensity of the response channel under the illumination of the second LED light source, and determine a target ratio between the third response intensity and the fourth response intensity; Determine the target frequency deviation corresponding to the target ratio according to the corresponding relationship between the frequency deviation and the ratio at the position of the response channel; the wavelength at which the power peak of the first LED light source is located is different from the wavelength at which the power peak of the second LED light source is located; A spectral reconstruction parameter calibration module is used to calibrate the spectral reconstruction parameters of the first spectral sensor based on the response intensity difference of the response channels at each same position, the target frequency deviation, and the illumination data obtained by the reference spectral sensor under the irradiation of light of different wavelengths; the spectral reconstruction parameters are used to fit the spectrum obtained by the first spectral sensor under the irradiation of light.
9. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the computer program is executed by the processor, the processor is caused to perform the steps of the calibration method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method, device and mobile terminal for calibrating light sensor
CN109059987A
Spectral reconstruction of detector sensitivity
CN114026396A
LIBS (laser-induced breakdown spectroscopy) detection system and online spectral quality calibration method
CN115876750A
Wavelength calibration method, device and equipment of spectrograph and readable storage medium
CN116429260A
System calibration method and device for dual-rotation compensator type Mueller matrix ellipsometer
CN116519605A