Calibration methods, apparatus, electronic devices and computer-readable storage media

By determining the response intensity difference and frequency offset of the spectral sensor under a flat light source, and calibrating the spectral reconstruction parameters using the LED light source ratio, the problem of inaccurate calibration of traditional spectral sensors is solved, achieving more efficient and accurate spectral sensor calibration.

CN119595560BActive Publication Date: 2025-10-28GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311170546.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-11
Publication Date
2025-10-28
Estimated Expiration
2043-09-11

AI Technical Summary

Technical Problem

Traditional methods for calibrating spectral sensors require the collection of a large amount of light source data, which is prone to errors and leads to inaccurate calibration.

Method used

Under a flat light source, the spectrum reconstruction parameters are calibrated and the spectrum is fitted by determining the difference in response intensity between the first spectral sensor and the reference spectral sensor, and by using the response intensity ratio and frequency offset of different LED light sources.

Benefits of technology

This improved the accuracy and efficiency of spectral sensor calibration, reduced the amount of light source data acquisition, and ensured timely mass production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119595560B_ABST
    Figure CN119595560B_ABST
Patent Text Reader

Abstract

This application relates to a calibration method, apparatus, electronic device, storage medium, and computer program product. The method includes: under illumination from a flat light source, determining the difference in response intensity between the first spectral sensor and the reference spectral sensor based on a first response intensity of the first spectral sensor and a second response intensity of the reference spectral sensor; under illumination from a first LED light source and a second LED light source, determining a third and a fourth response intensity of the first spectral sensor, and determining a target ratio between the third and fourth response intensities; determining a target frequency offset corresponding to the target ratio based on the correspondence between frequency offset and the ratio; and calibrating the spectral reconstruction parameters of the first spectral sensor based on the difference in response intensity of each response channel at the same location, the target frequency offset, and illumination data obtained from the reference spectral sensor under illumination of light of different wavelengths. This method can improve the accuracy of calibration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of imaging technology, and in particular to a calibration method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] Spectral sensors can measure the spectral information of substances, thereby analyzing their composition and structure. They are widely used in scientific research and industrial applications and are essential tools in fields such as food testing, environmental monitoring, biochemical analysis, lighting monitoring, and biometric identification.

[0003] Before using a spectral sensor, it needs to be calibrated. However, traditional methods for calibrating spectral sensors require collecting a large amount of light source data, which is prone to errors and results in inaccurate calibration. Summary of the Invention

[0004] This application provides a calibration method, apparatus, electronic device, computer-readable storage medium, and computer program product that can improve calibration accuracy.

[0005] Firstly, this application provides a calibration method. The method includes:

[0006] Under illumination by a flat light source, for the response channels of a first spectral sensor and a reference spectral sensor at each same location, the difference in response intensity between the first spectral sensor and the reference spectral 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 spectral sensor, and the second response intensity is obtained by the response channel of the reference spectral sensor.

[0007] For each response channel of the first spectral sensor, a third response intensity of the response channel is determined under the illumination of a first LED light source, and a fourth response intensity of the response channel is determined under the illumination of a second LED light source. A target ratio between the third response intensity and the fourth response intensity is then determined. Based on the correspondence between the frequency offset and the ratio at the location of the response channel, a target frequency offset corresponding to the target ratio is determined. 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 each response channel at the same location, the target frequency offset, and the illumination data obtained by the reference spectral sensor under illumination of different wavelengths of light, 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 illumination.

[0009] Secondly, this application also provides a calibration device. The device includes:

[0010] The response intensity difference determination module is used to determine the response intensity difference between the first spectral sensor and the reference spectral sensor at each same position under illumination from a flat light source, 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 spectral sensor, and the second response intensity is obtained by the response channel of the reference spectral sensor.

[0011] The target frequency offset determination module is used to determine the third response intensity of each response channel of the first spectral sensor under the illumination of the first LED light source, and the fourth response intensity of the response channel under the illumination of the second LED light source, and to determine the target ratio between the third response intensity and the fourth response intensity; based on the correspondence between the frequency offset and the ratio at the location of the response channel, the target frequency offset corresponding to the target ratio is determined; the wavelength of the power peak of the first LED light source and the wavelength of the power peak of the second LED light source are different;

[0012] The 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 channel at each same position, the target frequency offset, and the illumination data obtained by the reference spectral sensor under illumination of different wavelengths of light; the spectral reconstruction parameters are used to fit the spectrum obtained by the first spectral sensor under illumination.

[0013] Thirdly, this application also provides an electronic device. The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0014] Under illumination by a flat light source, for the response channels of a first spectral sensor and a reference spectral sensor at each same location, the difference in response intensity between the first spectral sensor and the reference spectral 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 spectral sensor, and the second response intensity is obtained by the response channel of the reference spectral sensor.

[0015] For each response channel of the first spectral sensor, a third response intensity of the response channel is determined under the illumination of a first LED light source, and a fourth response intensity of the response channel is determined under the illumination of a second LED light source. A target ratio between the third response intensity and the fourth response intensity is then determined. Based on the correspondence between the frequency offset and the ratio at the location of the response channel, a target frequency offset corresponding to the target ratio is determined. 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 each response channel at the same location, the target frequency offset, and the illumination data obtained by the reference spectral sensor under illumination of different wavelengths of light, 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 illumination.

[0017] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0018] Under illumination by a flat light source, for the response channels of a first spectral sensor and a reference spectral sensor at each same location, the difference in response intensity between the first spectral sensor and the reference spectral 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 spectral sensor, and the second response intensity is obtained by the response channel of the reference spectral sensor.

[0019] For each response channel of the first spectral sensor, a third response intensity of the response channel is determined under the illumination of a first LED light source, and a fourth response intensity of the response channel is determined under the illumination of a second LED light source. A target ratio between the third response intensity and the fourth response intensity is then determined. Based on the correspondence between the frequency offset and the ratio at the location of the response channel, a target frequency offset corresponding to the target ratio is determined. 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 each response channel at the same location, the target frequency offset, and the illumination data obtained by the reference spectral sensor under illumination of different wavelengths of light, 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 illumination.

[0021] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0022] Under illumination by a flat light source, for the response channels of a first spectral sensor and a reference spectral sensor at each same location, the difference in response intensity between the first spectral sensor and the reference spectral 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 spectral sensor, and the second response intensity is obtained by the response channel of the reference spectral sensor.

[0023] For each response channel of the first spectral sensor, a third response intensity of the response channel is determined under the illumination of a first LED light source, and a fourth response intensity of the response channel is determined under the illumination of a second LED light source. A target ratio between the third response intensity and the fourth response intensity is then determined. Based on the correspondence between the frequency offset and the ratio at the location of the response channel, a target frequency offset corresponding to the target ratio is determined. 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 each response channel at the same location, the target frequency offset, and the illumination data obtained by the reference spectral sensor under illumination of different wavelengths of light, 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 illumination.

[0025] The aforementioned calibration method, apparatus, electronic device, computer-readable storage medium, and computer program product, under illumination by a flat light source, determine the difference in response intensity between the first spectral sensor and the reference spectral sensor at each corresponding position, based on a first response intensity and a second response intensity, for the response channels of the first spectral sensor and the reference spectral 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 from the response channel of the first spectral sensor, and the second response intensity is obtained from the response channel of the reference spectral sensor. For each response channel of the first spectral sensor, a third response intensity is determined under illumination by a first LED light source. 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 and fourth response intensities is determined. Based on the correspondence between the frequency offset and the ratio at the location of the response channel, the target frequency offset corresponding to the target ratio is determined. The wavelength of the peak power of the first LED light source is different from that of the peak power of the second LED light source. Therefore, based on the difference in response intensity of the response channel at each same location, the target frequency offset, and the illumination data obtained by the reference spectral sensor under illumination of light of different wavelengths, the spectral reconstruction parameters of the first spectral sensor can be accurately calibrated. These spectral reconstruction parameters are used to fit the spectrum obtained by the first spectral sensor under illumination. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 Here is a flowchart of the calibration method in one embodiment;

[0028] Figure 2 This is a response intensity curve of a flat light source in one embodiment;

[0029] Figure 3 This is a structural diagram of a spectral sensor in one embodiment;

[0030] Figure 4 This is a response intensity curve of each response channel of the spectral sensor in one embodiment to light of different wavelengths;

[0031] Figure 5 This is a schematic diagram illustrating the difference in response intensity between a first spectral sensor and a reference spectral sensor in one embodiment;

[0032] Figure 6 This is an example of a frequency offset error model.

[0033] Figure 7 This is a response intensity curve of a narrowband LED light source in one embodiment;

[0034] Figure 8 This is a graph showing the response intensity of the first LED light source and the second LED light source in one embodiment;

[0035] Figure 9 This is a flowchart illustrating the determination of response intensity differences and target frequency offset in one embodiment;

[0036] Figure 10 This is a schematic diagram illustrating the extraction method of the first response sequence in one embodiment;

[0037] Figure 11 This is a schematic diagram illustrating the offset processing of the first response sequence in one embodiment;

[0038] Figure 12 Here is a flowchart of the calibration method in another embodiment;

[0039] Figure 13 This is a schematic diagram of a group of calibrated devices in one embodiment;

[0040] Figure 14 This is a schematic diagram of the spectrum of the monochromator light source in one embodiment;

[0041] Figure 15 This is a flowchart illustrating the acquisition of standard response intensity and standard spectral data in one embodiment;

[0042] Figure 16 This is a schematic diagram of standard spectral data and standard response intensity in one embodiment;

[0043] Figure 17 This is a flowchart illustrating the determination of spectral reconstruction parameters for a reference spectral sensor in one embodiment;

[0044] Figure 18 This is a flowchart illustrating the determination of a reference spectral sensor in one embodiment;

[0045] Figure 19 This is a structural block diagram of the calibration device in one embodiment;

[0046] Figure 20 This is a diagram of the internal structure of an electronic device in one embodiment. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0048] In one embodiment, such as Figure 1 As shown, a calibration method is provided. This embodiment illustrates the application of this method to an electronic device, which can be a terminal or a server. It is understood that this method can also be applied to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, smart cars, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. The server can be a standalone 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 spectral sensor and the reference spectral sensor at each same position, based on the first response intensity and the second response intensity, determine the difference in response intensity between the first spectral sensor and the reference spectral sensor; 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 spectral sensor, and the second response intensity is obtained by the response channel of the reference spectral sensor.

[0051] The response intensity of the light spectrum from the flat light source falls within the target intensity range, which can be set as needed. For example... Figure 2 The figure shows the response intensity curve of a flat light source.

[0052] The first spectral sensor is the spectral sensor to be calibrated, and the reference spectral sensor is the spectral sensor used as a reference during the calibration of the first spectral sensor. For example... Figure 3 The diagram shows the structure of a spectral sensor in one embodiment. The sensor contains many small partitions, each of which is a response channel. Each response channel responds to different wavelengths of light. Optionally, the positions and number of response channels in the first spectral sensor and the reference spectral sensor are the same.

[0053] like Figure 4The image shows the response intensity curves of each response channel in a spectral sensor in one embodiment for light of different wavelengths, indicating that the spectral sensor has 13 response channels. Each response intensity curve corresponds to one response channel of the spectral sensor. The response intensity curves show that different response channels respond to different wavelengths of light.

[0054] Optionally, under illumination by a flat light source, the first spectral sensor acquires the first response intensity of each response channel, and the reference spectral sensor acquires the second response intensity of each response channel; for the response channels of the first spectral sensor and the reference spectral sensor at each same location, the electronic device determines the difference in response intensity between the first spectral sensor and 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 with the same response 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. Based on the first response intensity and the second response intensity, the difference in response intensity between the first spectral sensor and 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 and second response intensities. This response intensity ratio represents the difference in response intensity between the first spectral sensor and the reference spectral sensor. This response intensity ratio is also the gain value between the first and second response intensities.

[0057] For example, the electronic device uses the following formula to determine the difference in response intensity of the first spectral sensor relative to the reference spectral sensor: in, This represents the first response intensity of the i-th response channel of the reference spectral sensor. The second response intensity represents the i-th response channel of the first spectral sensor. This represents the difference in response intensity 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 offset corresponding to the target ratio based on the correspondence between the frequency offset and the ratio at the location of the response channel; the wavelength of the power peak of the first LED light source is different from the wavelength of the power peak of the second LED light source.

[0059] Frequency offset is the amplitude of the frequency swing of a frequency-modulated wave, usually referring to the maximum frequency offset, which affects the spectral bandwidth of the frequency-modulated wave. For example... Figure 6 The error model for frequency offset is shown, and there is a shift (in nm) between the response intensity curves of the first spectral sensor and the reference spectral sensor.

[0060] Optionally, both the first and second LED light sources are narrowband LED (Light Emitting Diode) light sources. It is understandable that if the sampling frequency of a certain response channel differs, the narrowband LED light source will be more sensitive, easily resulting in differences in response intensity. Therefore, the difference in sampling frequency, i.e., frequency offset, can be calculated based on the difference in response intensity corresponding to the narrowband LED light source.

[0061] Taking a response channel as an example, such as Figure 7 The figure shows the response intensity curve of a narrowband LED light source, representing the light source characteristics of the narrowband LED light source.

[0062] Taking a response channel as an example, such as Figure 8 The figure shows the response intensity curves of the first LED light source and the second LED light source. Figure 8 The two peaks in the graph represent the first and second LED light sources. The peak power of the two LED light sources is located to the left and right of the peak in the response intensity curve, meaning that the wavelengths of the peak power of the first and second LED light sources are different. For each response channel, two LED light sources are required to collect the response intensity of each response channel of the first and second LED light sources respectively.

[0063] Optionally, for each response channel of the first spectral sensor, a third response intensity of the response channel is acquired under the illumination of a first LED light source, and a fourth response intensity of the response channel is acquired under the illumination of a second LED light source; the electronic device acquires 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 offset.

[0064] Optionally, the electronic device calculates the target ratio using the following formula: Ratio = R1 / R2; where 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 acquires the correspondence between frequency offset and ratio at the location of each response channel of the first spectral sensor; for each response channel of the first spectral sensor, the electronic device finds the target frequency offset corresponding to the target ratio from the correspondence between frequency offset and ratio at the location of the response channel.

[0066] Optionally, the correspondence between frequency offset and ratio can be a lookup table; using this lookup table, the electronic device can find the target frequency offset that is closest to the target ratio in the lookup table based on the target ratio actually calculated by the first spectral sensor to be calibrated.

[0067] Step S106: Based on the response intensity difference of each response channel at the same location, the target frequency offset, and the illumination data obtained by the reference spectral sensor under illumination of different wavelengths of light, 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 illumination.

[0068] The illumination data obtained by the reference spectral sensor under illumination of light at different wavelengths includes a first response sequence and standard spectral data. The first response sequence is obtained by the response channel of the reference spectral sensor under illumination of light at different wavelengths; that is, the first response sequence consists of different response intensities obtained by the same response channel under illumination of light at different wavelengths.

[0069] The spectral reconstruction parameter can be a spectral reconstruction matrix, which is used to fit the true spectrum obtained by the first spectral sensor under light illumination.

[0070] Optionally, the electronic device adjusts the illumination data obtained by the reference spectral sensor under illumination of light of different wavelengths based on the difference in response intensity of each response channel at the same location and the target frequency offset, and calibrates the calibrated illumination data of each response channel of the first spectral sensor; based on the calibrated illumination data of each response channel of the first spectral sensor, the spectral reconstruction parameters of the first spectral sensor are determined.

[0071] Optionally, the calibration illumination data includes a calibration response sequence and standard spectral data; based on the response intensity difference and target frequency offset of the response channels at each same location, the illumination data obtained by the reference spectral sensor under illumination of different wavelengths of light are adjusted to calibrate the calibration illumination data of each response channel of the first spectral sensor, including: adjusting the first response sequence based on the response intensity difference and target frequency offset for each response channel at the same location to obtain the calibration response sequence of the response channel; and determining the spectral reconstruction parameters of the first spectral sensor based on the calibration response sequences of each response channel of the first spectral sensor and the standard spectral data of the reference spectral sensor.

[0072] The above calibration method, under illumination by a flat light source, determines the difference in response intensity between the first spectral sensor and the reference spectral sensor at each corresponding position, based on the first and second response intensities, for the response channels of the first and reference spectral sensors. The response intensity in the light spectrum of the flat light source is within the target intensity range. The first response intensity is obtained from the response channel of the first spectral sensor, and the second response intensity is obtained from the response channel of the reference spectral sensor. For each response channel of the first spectral sensor, a third response intensity is determined under illumination by the first LED light source, and under illumination by the second LED light source... The fourth response intensity of the response channel is determined, and the target ratio between the third and fourth response intensities is identified. Based on the correspondence between the frequency offset and the ratio at the location of the response channel, the target frequency offset corresponding to the target ratio is determined. The wavelength of the peak power of the first LED light source differs from that of the second LED light source. Therefore, based on the difference in response intensity of each response channel at the same location, the target frequency offset, and the illumination data obtained by the reference spectral sensor under illumination at different wavelengths, the spectral reconstruction parameters of the first spectral sensor can be accurately calibrated. These spectral reconstruction parameters are used to fit the spectrum obtained by the first spectral sensor under illumination. Furthermore, the electronic device uses less light source data to more quickly calibrate (model) the mass-produced spectral sensor by using the target frequency offset and response intensity difference between the spectral sensor to be calibrated and the reference spectral sensor, ensuring timely mass production.

[0073] In one embodiment, such as Figure 9 As shown, the electronic device uses a 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 responding to the response channel of the first spectral sensor, and the second response intensity is obtained by responding to 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 using a first LED light source and a second LED light source. The target ratio of each response channel is calculated, and the target frequency offset of each response channel is obtained by looking up the correspondence table between frequency offset and ratio.

[0074] In one embodiment, the method further includes: for each response channel of the second spectral sensor, acquiring first spectral data corresponding to the response channel under illumination by a first LED light source, and acquiring second spectral data corresponding to the response channel under illumination by a second LED light source; for each response channel of the reference spectral sensor, performing offset processing on the first response sequence of the response channel to obtain a second response sequence; the first response sequence is obtained by the response channel of the reference spectral sensor under illumination by light of different wavelengths; for the response channels of the second spectral sensor and the reference spectral sensor at each same position, determining the ratio corresponding to the frequency offset based on the second response sequence, the first spectral data, and the second spectral data, and determining the correspondence between the frequency offset and the ratio at the position of the response channel; the frequency offset is the offset distance of the first response sequence of the response channel of the reference spectral sensor after offset processing.

[0075] The second spectral sensor is used to generate the correspondence between frequency offset and ratio. The second spectral sensor can be the same as or different from the first spectral sensor.

[0076] Optionally, under the illumination of the first LED light source, the first spectral data corresponding to each response channel of the second spectral sensor is acquired by a spectrometer, and under the illumination of the second LED light source, the second spectral data corresponding to each response channel of the second spectral sensor is acquired by a spectrometer. The spectrometer can directly measure the spectral sequence of the light source.

[0077] Optionally, the electronic device acquires a first response sequence for each response channel of the reference spectral sensor, the first response sequence being obtained by irradiating the response channel of the reference spectral sensor with light of different wavelengths from a monochromator light source; and then performs an offset processing 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 magnitude; the first response sequence of the response channel is shifted to obtain the second response sequence, including: if the frequency offset is positive, the first response sequence of the response channel is shifted in a first direction to obtain the second response sequence; the first direction is the direction in which the wavelengths of the response elements increase from small to large; if the frequency offset is negative, the first response sequence of the response channel is shifted in a second direction to obtain the second response sequence; the second direction is the direction in which the wavelengths of the response elements decrease from large to small.

[0079] Optionally, if there are blank positions in the second response sequence, 0 is filled into the blank positions as the response elements of the blank positions; by continuously setting different values ​​of frequency offset, the correspondence between frequency offset and ratio at the current position of the response channel can be generated.

[0080] Understandably, the electronic device performs offset processing (frequency offset simulation) on the first response sequence, that is, shifts the response intensity value at each position of the original spectral response sequence to the front or back of the sequence.

[0081] like Figure 10 As shown, taking response channel 1 as an example, the electronic device acquires the first response sequence obtained by response channel 1 of the reference spectral sensor under illumination of light of different wavelengths; as shown Figure 11 As shown, if the frequency offset is positive, such as when the frequency offset x = 2, then each response intensity value in the first response sequence will be shifted 2 positions in the first direction, that is, shifted 2 positions in the direction from small to large wavelength of the response element.

[0082] In other embodiments, if the frequency offset is negative, such as x = -2, then each response intensity value in the first response sequence is shifted 2 positions in the second direction.

[0083] Optionally, taking one of the response channels of the second spectral sensor as an example, the electronic device uses the following formula to determine the ratio corresponding to the frequency offset at the location of the response channel:

[0084]

[0085] in, The first response sequence of the reference spectral sensor, after being simulated and shifted by x (nm), yields the k-th value, which is also the k-th value in the second response sequence. This represents the k-th value in the first spectral data; The value represents the k-th value of the second spectral data; ratio_shift_x is the ratio when the frequency offset is x. Both the first and second spectral data are sequences.

[0086] In this embodiment, for each response channel of the second spectral sensor, first spectral data corresponding to the response channel is acquired under the illumination of the first LED light source, and second spectral data corresponding to the response channel is acquired 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 shifted to obtain a second response sequence, which is obtained by the response channel of the reference spectral sensor under the illumination of light of different wavelengths. Then, for the response channels of the second spectral sensor and the reference spectral sensor at each same position, based on the second response sequence, the first spectral data and the second spectral data, the ratio corresponding to the frequency offset can be accurately determined, thereby accurately determining the correspondence between the frequency offset and the ratio at the position of the response channel.

[0087] Furthermore, the electronic device can also more accurately offset the frequency deviation in the correct direction to obtain a more accurate second sequence, whether the frequency deviation is positive or negative.

[0088] In one embodiment, the illumination data obtained by the reference spectral sensor under illumination of light at different wavelengths includes a first response sequence and standard spectral data. The first response sequence is obtained by the response channels of the reference spectral sensor under illumination of light at different wavelengths. Based on the response intensity differences of the response channels at each same location, the target frequency offset, and the illumination data obtained by the reference spectral sensor under illumination of light at different wavelengths, the spectral reconstruction parameters of the first spectral sensor are calibrated, including: adjusting the first response sequence based on the response intensity differences and the target frequency offset for each response channel at the same location to obtain a calibration response sequence for the response channel; and determining the spectral reconstruction parameters of the first spectral sensor based on the calibration 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 the data used to calibrate the first spectral sensor.

[0090] Optionally, the first response sequence is adjusted based on the response intensity difference and the target frequency offset to obtain the calibration response sequence of the response channel, including: adjusting the response intensity of the first response sequence based on the response intensity difference to obtain an intermediate response sequence; and offsetting the intermediate response sequence based on the target frequency offset to obtain the calibration response sequence of the response channel.

[0091] Optionally, based on the response channels at each same location, the electronic device multiplies the response intensity difference by the first response sequence to obtain an intermediate response sequence; the intermediate response sequence is then subjected to offset processing corresponding to the target frequency offset to obtain a calibration response sequence.

[0092] Optionally, if the target frequency offset is positive, the intermediate response sequence of the response channel is shifted in the first direction to obtain the calibration response sequence; the first direction is the direction in which the wavelengths of the response elements increase from small to large. If the frequency offset is negative, the intermediate response sequence of the response channel is shifted in the second direction to obtain the calibration response sequence; the second direction is the direction in which the wavelengths of the response elements decrease from large to small.

[0093] For example, taking response channel 1 as an example, the response intensity difference of this response channel is G1, and the target frequency offset is X1. The electronic device first extracts the first response sequence of the response sequence, multiplies each value in the first response sequence by G1 to obtain the intermediate response sequence, and then shifts the intermediate response sequence by X1 positions in the first direction or the second direction according to the frequency offset X1 to obtain the calibration response sequence.

[0094] like Figure 12As shown, the first spectral sensor is the device to be calibrated. The electronic device calculates the response intensity difference and target frequency offset of the first spectral sensor. Based on the response intensity difference and target frequency offset, the illumination data of the reference spectral sensor is adjusted to obtain the illumination data of the first spectral sensor. The least squares method is used to calculate the spectral reconstruction matrix of the calibrated first spectral sensor.

[0095] The electronic device calculates the spectral reconstruction parameters of the first spectral sensor using the following formula: Among them, Raw i The response intensity of the i-th response channel in the calibration response sequence of the first spectral sensor is represented by a row vector; S i The i-th standard spectral data from the reference spectral sensor is also represented by a row vector, and is parallel to the raw data. i It is a pair of data originating from a unified light source; n represents the total number of light source data collected for calibration; CM is the spectral reconstruction parameter, represented as a matrix, the number of rows of which is the same as the number of response channels of the first spectral sensor or the reference spectral sensor, and the number of columns of which is the same as the length of the spectral array. i *CM stands for matrix multiplication, and the result is the reconstructed spectrum. S i This is equivalent to the true value of the spectrum, thus minimizing the value of the formula, that is, minimizing the sum of squares of the errors between the obtained spectral reconstruction parameters and the actual data, and then using the least squares method to determine the spectral reconstruction parameters.

[0096] The least squares method can solve linear fitting problems by finding the best function match for the data by minimizing the sum of squared errors. The least squares method can also be used to easily obtain unknown data and minimize the sum of squared errors between the obtained data and the actual data.

[0097] In this embodiment, for each response channel at the same location, the first response sequence is adjusted based on the difference in response intensity and the target frequency offset to obtain the calibration response sequence of the response channel; based on the calibration 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, based on the difference in response intensity, the electronic device adjusts the response intensity of the first response sequence to obtain an intermediate response sequence; based on the target frequency offset, the intermediate response sequence is offset to accurately obtain the calibration response sequence of the response channel.

[0099] In one embodiment, the method further includes: acquiring 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 under illumination of different wavelengths of light from the monochromator light source; adjusting the original response intensity to a 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 spectral sensor based on the standard response intensity corresponding to different wavelengths; and adjusting the original spectral data to standard spectral data per unit optical power based on the original spectral data and the optical power value.

[0100] It is understandable that, such as Figure 13 The diagram shows a calibration equipment group, which includes an integrating sphere, a monochromator light source, a spectrometer, a reference spectral sensor, and an optical power meter. The integrating sphere acts as a homogenizer, uniformly reflecting the light source to its outlet. The monochromator light source generates a narrowband light source with a 1nm step size. At the integrating sphere outlet are three devices: a spectrometer, a reference spectral sensor, and an optical power meter. The spectrometer detects the output spectrum, the reference spectral sensor is the device to be calibrated, and the optical power meter detects the current optical power. Figure 14 The image shown is a schematic diagram of the spectrum of the monochromator light source in one embodiment.

[0101] Optionally, the monochromator continuously switches the wavelength of the light source. Under the illumination of different wavelengths of the monochromator, the reference spectral sensor collects the original response intensity, the spectrometer collects the original spectral data, and the optical power meter collects the optical power value; the electronic device acquires the original response intensity collected by the reference spectral sensor, the original spectral data collected by the spectrometer, 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 the standard response intensity per unit optical power, and constructs the first response sequence by dividing the standard response intensities corresponding to different wavelengths of each response channel; the electronic device divides the original spectral data by the optical power value to obtain the standard spectral data per unit optical power.

[0103] In this embodiment, under illumination by light of different wavelengths from a 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 acquired. Based on the original response intensity and optical power value, the original response intensity is adjusted to the standard response intensity per unit optical power. Based on the standard response intensity 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 optical power value, the original spectral data can be accurately adjusted to the standard spectral data per unit optical power. Thus, based on the first response sequence and standard spectral data, the spectral reconstruction parameters of the first spectral sensor can be determined more accurately.

[0104] In one embodiment, such as Figure 15 As shown, the monochromator acts as the light source, continuously switching the wavelength from the start to the end (e.g., 350nm-1000nm) according to the design range of the spectral sensor. Simultaneously, the spectral sensor continuously acquires data from all response channels, the spectrometer continuously acquires spectral data, and the optical power meter continuously records the optical power value. For each acquired intensity of all response channels, dividing by the simultaneously recorded optical power value yields the standard response intensity per unit of optical power; for each acquired spectral data, dividing by the simultaneously recorded optical power value yields the standard spectral data per unit of optical power. For example... Figure 16 As shown, the standard spectral data and standard response intensity recorded simultaneously are treated as a data pair.

[0105] In another embodiment, the spectral reconstruction parameters of the reference spectral sensor can also be determined in other ways, such as... Figure 17 As shown, the electronic device selects a reference spectral sensor; it collects calibration data of the reference spectral sensor, which includes the response intensity of each response channel of the reference spectral sensor and spectral data; and it calculates the calibrated spectral reconstruction matrix using the least squares method.

[0106] To use the least squares method, construct the expression that minimizes the error: Among them, Raw i S represents the response intensity of the i-th response channel in the standard response intensity of the reference spectral sensor, denoted by a row vector; i The i-th standard spectral data from the reference spectral sensor is also represented by a row vector, and is parallel to the raw data. i This is a pair of data originating from a unified light source; n represents the total number of light source data collected for calibration; CM is the spectral reconstruction parameter, represented as a matrix, with the same number of rows as the number of response channels of the reference spectral sensor, and the same number of columns as the length of the spectral array. i *CM stands for matrix multiplication, and the result is the reconstructed spectrum. S i This is equivalent to the true value of the spectrum, thus minimizing the value of the formula, that is, minimizing the sum of squares of the errors between the obtained spectral reconstruction parameters and the actual data, and then using the least squares method to determine the spectral reconstruction parameters.

[0107] In one embodiment, the method for determining the reference spectral sensor includes: determining a reference response intensity based on the response intensities collected by at least two third spectral sensors under illumination by a flat light source; determining the degree of deviation between the response intensity of the third spectral sensor and the reference response intensity for each third spectral sensor; and determining the reference spectral sensor from the at least two third spectral sensors based on the degree of deviation corresponding to each third spectral sensor.

[0108] Among them, the third spectral sensor, the second spectral sensor, and the first spectral sensor can be the same, or they can all be different, or they can be partially the same and partially different.

[0109] The reference response intensity is used to select the reference spectral sensor. Optionally, the electronic device may use the average of the response intensities acquired by at least two third spectral sensors as the reference response intensity, or the median of the response intensities acquired by at least two third spectral sensors as the reference response intensity, or other methods 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; and a reference spectral sensor is determined based on the Euler distance corresponding to each third spectral sensor.

[0111] Alternatively, the electronic device can calculate the Euler distance between the third spectral sensor and the reference response intensity using the following formula: Among them, X i (a) This represents the response intensity of the i-th channel of the third spectral sensor a. This represents the reference response intensity of the i-th channel.

[0112] Optionally, the electronic device may use the third spectral sensor with the smallest Euler distance as the reference spectral sensor, or it may use the third spectral sensor with the second smallest Euler distance as the reference spectral sensor; there is no limitation on this.

[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 collected by at least two third spectral sensors respectively; 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 determined more accurately from the at least two third spectral sensors.

[0114] In one embodiment, such as Figure 18As shown, firstly, select a number of third-spectral sensors for testing, such as 100; use a light source with a continuous and flat spectrum to test the third-spectral sensors and obtain the response intensity of each response channel of all third-spectral sensors; the response intensity of each third-spectral sensor module can be represented by an array of length n, where n represents the number of response channels of the spectral sensor; calculate the average value of each response intensity as the reference response intensity; calculate the Euler distance between each response intensity and the average value; select the third-spectral sensor with the smallest Euler distance as the reference spectral sensor.

[0115] In one embodiment, another calibration method is also provided, applied to an electronic device, the calibration method comprising the following steps:

[0116] Step A1, determine the reference spectral sensor; the method for determining the reference spectral sensor includes: under illumination from a flat light source, determining a reference response intensity based on the response intensities collected by at least two third spectral sensors respectively; for each third spectral sensor, determining the degree of deviation between the response intensity of the third spectral sensor and the reference response intensity; and determining the 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 spectral sensor and the reference spectral sensor at each same position, based on the first response intensity and the second response intensity, determine the difference in response intensity between the first spectral sensor and the reference spectral sensor; 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 spectral sensor, and the second response intensity is obtained by the response channel of the reference spectral 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 offset corresponding to the target ratio based on the correspondence between the frequency offset and the ratio at the location of the response channel; the wavelength of the power peak of the first LED light source is different from the wavelength of the power peak of the second LED light source.

[0119] Step A4: Obtain the correspondence between the frequency offset and the ratio at the location of the response channel; the method for determining the correspondence between the frequency offset and the ratio at the location of the response channel includes: for each response channel of the second spectral sensor, acquiring the first spectral data corresponding to the response channel under the illumination of the first LED light source, and acquiring the second spectral data corresponding to the response channel under the illumination 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 offset is positive, the first response sequence of the response channel is shifted in the first direction to obtain the second response sequence; the first direction is the wavelength of the response element. The frequency offset is calculated from smallest to largest. If the frequency offset is negative, the first response sequence of the response channel is shifted in the second direction to obtain the second response sequence. The second direction is the direction from largest to smallest wavelength of the response element. The first response sequence is obtained by the response channel of the reference spectral sensor under illumination of light of different wavelengths. For the response channels of the second spectral sensor and the reference spectral sensor at each same position, based on the second response sequence, the first spectral data, and the second spectral data, the ratio corresponding to the frequency offset is determined, and the correspondence between the frequency offset and the ratio at the position of the response channel is determined. The frequency offset is the offset distance of the first response sequence of the response channel of the reference spectral sensor after offset processing.

[0120] Step A5: Obtain illumination data from the reference spectral sensor under illumination of light at different wavelengths. This illumination data includes a first response sequence and standard spectral data. The determination of the first response sequence and standard spectral data includes: under illumination of light at different wavelengths from the monochromator light source, obtaining 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; based on the original response intensity and optical power value, adjusting the original response intensity to the standard response intensity per unit optical power, and based on the standard response intensity corresponding to different wavelengths, determining the first response sequence of each response channel in the reference spectral sensor; and based on the original spectral data and optical power value, adjusting the original spectral data to the standard spectral data per unit optical power.

[0121] Step A6: For each response channel at the same position, adjust the response intensity of the first response sequence based on the difference in response intensity to obtain an intermediate response sequence; perform offset processing on the intermediate response sequence based on the target frequency offset to obtain the calibration response sequence of the response channel; determine the spectral reconstruction parameters of the first spectral sensor based on the calibration 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 are used to fit the spectrum obtained by the first spectral sensor under light illumination.

[0122] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0123] Based on the same inventive concept, this application also provides a calibration apparatus for implementing the calibration method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more calibration apparatus embodiments provided below can be found in the limitations of the calibration method described above, and will not be repeated here.

[0124] In one embodiment, such as Figure 19 As shown, a calibration device is provided, including: a response intensity difference determination module 1902, a target frequency offset determination module 1904, and a spectral reconstruction parameter calibration module 1906, wherein:

[0125] The response intensity difference determination module 1902 is used to determine the response intensity difference between the first spectral sensor and the reference spectral sensor based on the first response intensity and the second response intensity for the response channels of the first spectral sensor and the reference spectral sensor at each same position under illumination from a 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 responding through the response channel of the first spectral sensor, and the second response intensity is obtained by responding through the response channel of the reference spectral sensor.

[0126] The target frequency offset determination module 1904 is used to determine the third response intensity of each response channel of the first spectral sensor under the illumination of the first LED light source, and the fourth response intensity of the response channel under the illumination of the second LED light source, and to determine the target ratio between the third response intensity and the fourth response intensity; based on the correspondence between the frequency offset and the ratio at the location of the response channel, the target frequency offset corresponding to the target ratio is determined; the wavelength of the power peak of the first LED light source is different from the wavelength of the power peak of the second LED light source.

[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 offset, and the illumination data obtained by the reference spectral sensor under illumination of different wavelengths of light; the spectral reconstruction parameters are used to fit the spectrum obtained by the first spectral sensor under illumination.

[0128] The aforementioned calibration device, under illumination by a flat light source, determines the difference in response intensity between the first spectral sensor and the reference spectral sensor at each corresponding position, based on a first response intensity and a second response intensity, for the response channels of the first spectral sensor and the reference spectral sensor. 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 spectral sensor, and the second response intensity is obtained by the response channel of the reference spectral sensor. For each response channel of the first spectral sensor, a third response intensity is determined under illumination by a first LED light source, and a third response intensity is determined under illumination by a second LED light source. The fourth response intensity of the response channel is determined, and the target ratio between the third and fourth response intensities is determined. Based on the correspondence between the frequency offset and the ratio at the location of the response channel, the target frequency offset corresponding to the target ratio is determined. The wavelength of the power peak of the first LED light source is different from that of the power peak of the second LED light source. Then, based on the difference in response intensity of the response channels at each same location, the target frequency offset, and the illumination data obtained by the reference spectral sensor under illumination of light of different wavelengths, the spectral reconstruction parameters of the first spectral sensor can be accurately calibrated. These spectral reconstruction parameters are used to fit the spectrum obtained by the first spectral sensor under illumination.

[0129] In one embodiment, the above-described apparatus further includes a correspondence determination module; this correspondence determination module is used to acquire, for each response channel of the second spectral sensor, first spectral data corresponding to the response channel under illumination by a first LED light source, and second spectral data corresponding to the response channel under illumination by a second LED light source; for each response channel of the reference spectral sensor, offsetting the first response sequence of the response channel to obtain a second response sequence; the first response sequence is obtained by the response channel of the reference spectral sensor under illumination by light of different wavelengths; for the response channels of the second spectral sensor and the reference spectral sensor at each same position, based on the second response sequence, the first spectral data, and the second spectral data, determining the ratio corresponding to the frequency offset, and determining the correspondence between the frequency offset and the ratio at the position of the response channel; the frequency offset is the offset distance of the first response sequence of the response channel of the reference spectral sensor after offsetting.

[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 magnitude. The aforementioned correspondence determination module is further configured to, if the frequency offset is positive, 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 in which the wavelengths of the response elements increase from small to large. If the frequency offset is negative, shift the first response sequence of the response channel in a second direction to obtain a second response sequence; the second direction is the direction in which the wavelengths of the response elements decrease from large to small.

[0131] In one embodiment, the illumination data obtained by the reference spectral sensor under illumination of light at different wavelengths includes a first response sequence and standard spectral data. The first response sequence is obtained by the response channels of the reference spectral sensor under illumination of light at different wavelengths. The aforementioned spectral reconstruction parameter calibration module 1906 is further used to adjust the first response sequence for each response channel at the same location based on the difference in response intensity and the target frequency offset to obtain a calibration response sequence for the response channel. Based on the calibration 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.

[0132] In one embodiment, the spectral reconstruction parameter calibration module 1906 is further configured to adjust the response intensity of the first response sequence based on the response intensity difference to obtain an intermediate response sequence; and to perform offset processing on the intermediate response sequence based on the target frequency offset to obtain the calibration response sequence of the response channel.

[0133] In one embodiment, the above-described apparatus further includes an illumination data determination module; the illumination data determination module is used to acquire 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 under illumination by light of different wavelengths from the monochromator light source; based on the original response intensity and the optical power value, adjust the original response intensity to the standard response intensity per unit optical power, and determine the first response sequence of each response channel in the reference spectral sensor based on the standard response intensity corresponding to different wavelengths; and based on the original spectral data and the optical power value, adjust the original spectral data to the standard spectral data per unit optical power.

[0134] In one embodiment, the above-described apparatus further 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 collected by at least two third spectral sensors respectively under illumination by 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; and determine a reference spectral sensor from at least two third spectral sensors based on the degree of deviation corresponding to each third spectral sensor.

[0135] Each module in the aforementioned calibration device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the electronic device in hardware form or independent of it, or stored in the memory of the electronic device in software form, so that the processor can call and execute the operations corresponding to each module.

[0136] In one embodiment, an electronic device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 20 As shown, this electronic device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a calibration method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the electronic device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the electronic device, or external keyboards, touchpads, or mice, etc.

[0137] Those skilled in the art will understand that Figure 20 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0138] This application also provides a computer-readable storage medium. One or more non-volatile computer-readable storage media containing computer-executable instructions, which, when executed by one or more processors, cause the processors to perform the steps of a calibration method.

[0139] This application also provides a computer program product containing instructions that, when run on a computer, cause the computer to perform a 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, data stored, data displayed, 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 the relevant data must comply with relevant regulations.

[0141] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this 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), magnetic 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. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0142] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended 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 spectral sensor and the reference spectral sensor at each same position, the difference in response intensity between the first spectral sensor and the reference spectral sensor is determined 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 spectral sensor, and the second response intensity is obtained by the response channel of the reference spectral sensor. For each response channel of the first spectral sensor, a third response intensity of the response channel is determined under the illumination of a first LED light source, and a fourth response intensity of the response channel is determined under the illumination of a second LED light source. A target ratio between the third response intensity and the fourth response intensity is then determined. Based on the correspondence between the frequency offset and the ratio at the location of the response channel, the target frequency offset corresponding to the target ratio is determined; the wavelength of the power peak of the first LED light source is different from the wavelength of the power peak of the second LED light source; Based on the response intensity difference of each response channel at the same location, the target frequency offset, and the illumination data obtained by the reference spectral sensor under illumination of different wavelengths of light, 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 illumination.

2. The method according to claim 1, characterized in that, The method further includes: For each response channel of the second spectral sensor, first spectral data corresponding to the response channel is acquired under the illumination of the first LED light source, and second spectral data corresponding to the response channel is acquired 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 shifted to obtain a second response sequence; the first response sequence is obtained by the response channel of the reference spectral sensor under illumination of light of different wavelengths. For the response channels of the second spectral sensor and the reference spectral sensor at each same position, based on the second response sequence, the first spectral data, and the second spectral data, the ratio corresponding to the frequency offset is determined, and the correspondence between the frequency offset and the ratio at the position of the response channel is determined; the frequency offset is the offset distance of the first response sequence of the response channel of the reference spectral sensor after offset processing.

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 magnitude; The step of shifting the first response sequence of the response channel to obtain the second response sequence includes: If the frequency offset is positive, the first response sequence of the response channel is shifted in the first direction to obtain the second response sequence; the first direction is the direction in which the wavelengths of the response elements increase from small to large. If the frequency offset is negative, the first response sequence of the response channel is shifted in the second direction to obtain the second response sequence; the second direction is the direction in which the wavelength of the response element decreases from large to small.

4. The method according to claim 1, characterized in that, The illumination data obtained by the reference spectral sensor under illumination of light of different wavelengths includes a first response sequence and standard spectral data. The first response sequence is obtained by the response channel of the reference spectral sensor under illumination 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 identical location, the target frequency offset, and the illumination data obtained by the reference spectral sensor under illumination of different wavelengths of light, including: For each response channel at the same location, the first response sequence is adjusted based on the response intensity difference and the target frequency offset to obtain the calibrated response sequence of the response channel; Based on the calibration response sequence 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.

5. The method according to claim 4, characterized in that, The step of adjusting the first response sequence based on the response intensity difference and the target frequency offset to obtain the calibrated response sequence of the response channel includes: Based on the difference in response intensity, the response intensity of the first response sequence is adjusted to obtain an intermediate response sequence; Based on the target frequency offset, the intermediate response sequence is offset to obtain the calibration response sequence of the response channel.

6. The method according to claim 4, characterized in that, The method further includes: Under illumination by light of different wavelengths from a monochromator light source, the raw response intensity of the reference spectral sensor, the raw 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 intensity corresponding to different wavelengths, the first response sequence of each response channel in the reference spectral sensor is determined; Based on the original spectral data and the optical power value, the original spectral data is adjusted to standard spectral data per unit optical power.

7. The method according to any one of claims 1 to 6, characterized in that, The method for determining the reference spectral sensor includes: Under the illumination of the flat light source, a reference response intensity is determined based on the response intensity collected by at least two third spectral sensors. For each third spectral sensor, determine the degree of deviation between the 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 degree of deviation corresponding to each third spectral sensor.

8. A calibration device, characterized in that, include: The response intensity difference determination module is used to determine the response intensity difference between the first spectral sensor and the reference spectral sensor at each same position under illumination by a flat light source, 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 spectral sensor, and the second response intensity is obtained by the response channel of the reference spectral sensor. The target frequency offset determination module is used to determine the third response intensity of each response channel of the first spectral sensor 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. Based on the correspondence between the frequency offset and the ratio at the location of the response channel, the target frequency offset corresponding to the target ratio is determined; the wavelength of the power peak of the first LED light source is different from the wavelength of the power peak of the second LED light source; The 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 channel at each same position, the target frequency offset, and the illumination data obtained by the reference spectral sensor under illumination of different wavelengths of light; the spectral reconstruction parameters are used to fit the spectrum obtained by the first spectral sensor under illumination.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the computer program is executed by the processor, it causes the processor to perform the steps of the calibration method as described in 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, it implements the steps of the method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method, device and mobile terminal for calibrating light sensor

    CN109059987A

  • Spectral reconstruction of detector sensitivity

    CN114026396A