A multi-frequency mixed light source regulated spectrum acquisition method and system
Patent Information
- Application Number
- CN202511861122.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2045-12-11
AI Technical Summary
[0002]光谱分析技术的核心是获取物质反射光谱信息,但现有技术存在明显缺陷:傅里叶变换光谱仪依赖干涉仪,成本高昂且体积大、检测慢,难以集成;液晶可调谐滤光片(LiquidCrystalTunableFilter,LCTF)光谱仪逐波长采集,耗时久且灵活性差;推扫式光谱仪需机械推扫,易磨损且效率低;成像芯片光谱仪专用芯片成本高,波长固定且像素串扰严重
[0022] The technical solution of this invention synchronously drives multiple monochromatic LEDs to output non-negative square wave light signals at preset frequencies, forming a mixed light field that illuminates a target object. A light signal acquisition device collects the mixed light intensity signal reflected from the target object. The mixed light intensity signal is preprocessed to remove the DC component, obtaining an AC signal. A preset algorithm extracts the fundamental amplitude of each LED's corresponding frequency from the AC signal. The spectrum of the target object is reconstructed based on the fundamental amplitude. This technical solution achieves single-shot acquisition of the mixed light signal through simultaneous strobe of multiple LEDs, eliminating the need for expensive core components. It solves the problems of high cost, large size, slow acquisition, and difficult integration of traditional spectral detection equipment, achieving low-cost, rapid, and highly integrated spectral detection, and can be flexibly extended to imaging spectral applications.
Smart Images

Figure CN121521770B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of spectral detection and optical measurement technology, and in particular to a spectral acquisition method and system for multi-frequency hybrid light source control. Background Technology
[0002] The core of spectral analysis technology is to obtain the reflectance spectrum information of substances, but existing technologies have obvious drawbacks: Fourier transform spectrometers rely on interferometers, which are expensive, bulky, slow to detect, and difficult to integrate; Liquid Crystal Tunable Filter (LCTF) spectrometers acquire data wavelength by wavelength, which is time-consuming and lacks flexibility; Pushbroom spectrometers require mechanical pushing, which is prone to wear and has low efficiency; Imaging chip spectrometers have dedicated chips that are expensive, have fixed wavelengths, and suffer from severe pixel crosstalk.
[0003] Existing technologies have failed to meet the demands for low cost, high speed, high integration, and flexible expansion to imaging, thus limiting the widespread application of spectral detection technologies. Summary of the Invention
[0004] This invention provides a spectral acquisition method and system for multi-frequency hybrid light source control, which enables low-cost, rapid, and highly integrated spectral detection, and can be flexibly extended to imaging spectral application scenarios.
[0005] According to one aspect of the present invention, a spectral acquisition method based on multi-frequency hybrid light source modulation is provided, comprising:
[0006] Multiple monochrome LEDs are synchronously driven to output non-negative square wave light signals at preset different frequencies, forming a mixed light field to illuminate the target object;
[0007] The mixed light intensity signal after reflection from the target object is acquired using a light signal acquisition device;
[0008] The mixed light intensity signal is preprocessed to remove the DC component and obtain the AC signal.
[0009] The fundamental frequency amplitude of each LED is extracted from the AC signal using a preset algorithm;
[0010] The spectrum of the target object is reconstructed based on the fundamental amplitude.
[0011] According to another aspect of the present invention, a spectral acquisition system with multi-frequency hybrid light source modulation is provided, comprising:
[0012] The LED excitation module synchronously drives multiple monochrome LEDs to output non-negative square wave light signals at preset different frequencies, forming a mixed light field to illuminate the target object.
[0013] The signal acquisition module is used to acquire the mixed light intensity signal reflected by the target object through an optical signal acquisition device;
[0014] The signal preprocessing module is used to preprocess the mixed light intensity signal to remove the DC component from the mixed light intensity signal and obtain the AC signal.
[0015] The amplitude extraction module is used to extract the fundamental frequency amplitude of each LED from the AC signal using a preset algorithm;
[0016] The spectral reconstruction module is used to reconstruct the spectrum of a target object based on the fundamental amplitude.
[0017] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0018] At least one processor;
[0019] and memory that is communicatively connected to at least one processor;
[0020] The memory stores a computer program that can be executed by at least one processor, which enables the at least one processor to execute the spectral acquisition method for multi-frequency hybrid light source control according to any embodiment of the present invention.
[0021] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement the spectral acquisition method for multi-frequency hybrid light source modulation according to any embodiment of the present invention.
[0022] The technical solution of this invention synchronously drives multiple monochromatic LEDs to output non-negative square wave light signals at preset frequencies, forming a mixed light field that illuminates a target object. A light signal acquisition device collects the mixed light intensity signal reflected from the target object. The mixed light intensity signal is preprocessed to remove the DC component, obtaining an AC signal. A preset algorithm extracts the fundamental amplitude of each LED's corresponding frequency from the AC signal. The spectrum of the target object is reconstructed based on the fundamental amplitude. This technical solution achieves single-shot acquisition of the mixed light signal through simultaneous strobe of multiple LEDs, eliminating the need for expensive core components. It solves the problems of high cost, large size, slow acquisition, and difficult integration of traditional spectral detection equipment, achieving low-cost, rapid, and highly integrated spectral detection, and can be flexibly extended to imaging spectral applications.
[0023] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 A flowchart illustrating a spectral acquisition method for multi-frequency hybrid light source modulation provided in an embodiment of the present invention;
[0026] Figure 2 A flowchart of another spectral acquisition method for multi-frequency hybrid light source modulation provided in an embodiment of the present invention;
[0027] Figure 3 A flowchart illustrating another spectral acquisition method for multi-frequency hybrid light source modulation provided in this embodiment of the invention;
[0028] Figure 4 This is a schematic diagram of a multi-frequency hybrid light source-controlled spectral acquisition system provided in an embodiment of the present invention;
[0029] Figure 5 A schematic diagram of the structure of an electronic device for implementing the multi-frequency hybrid light source control spectral acquisition method of this invention. Detailed Implementation
[0030] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0032] Figure 1 This is a flowchart illustrating a spectral acquisition method using a multi-frequency hybrid light source controlled according to an embodiment of the present invention. This embodiment is applicable to spectral detection scenarios in fields such as industrial quality inspection, biomedicine, and consumer electronics. The method can be executed by a spectral acquisition system controlled by a multi-frequency hybrid light source, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method specifically includes the following steps:
[0033] S110 synchronously drives multiple monochrome LEDs to output non-negative square wave light signals at preset different frequencies, forming a mixed light field to illuminate the target object.
[0034] Among them, simultaneous square wave strobe of multiple LEDs can refer to multiple monochrome LEDs synchronously outputting square wave light signals with low-level light intensity of 0 and high-level light intensity of a fixed value according to different preset unique frequencies; the target object can be understood as the object whose spectrum needs to be reconstructed.
[0035] Specifically, multiple monochrome LEDs can be driven synchronously, so that each LED outputs non-negative square wave light signals at different preset frequencies. The non-negative square wave light signals can be superimposed to form a mixed light field and uniformly illuminate the surface of the target object.
[0036] In some embodiments, synchronously driving multiple monochrome LEDs to output non-negative square wave light signals at preset different frequencies includes: selecting a preset number of monochrome LEDs and setting the square wave parameters corresponding to the LEDs; assigning a unique preset frequency to each LED based on a preset frequency group; and synchronously generating the driving timing sequence of each LED through a control module according to the preset frequency and square wave parameters, so as to drive the LEDs to output non-negative square wave light signals.
[0037] Among them, square wave parameters can refer to the key parameters of the square wave light signal output by the LED. Square wave parameters can include parameters such as duty cycle, low-level light intensity and high-level light intensity; preset frequency group can be a set of frequencies that are preset and have no harmonic overlap. The preset frequency group can be used to assign a unique identification frequency to each LED; driving timing can be understood as the time sequence signal output by the control module. The time sequence signal can be used to drive the LED to emit light according to the set parameters.
[0038] Specifically, a preset number of monochrome LEDs can be selected according to the actual detection requirements. The square wave parameters of each LED are set according to the reflectivity characteristics of the target object, namely the duty cycle, low-level light intensity, and high-level light intensity of the square wave. Then, a unique preset frequency is assigned to each LED from the preset frequency group. The preset frequency and square wave parameters are received by the control module, and the driving timing sequence corresponding to each LED is generated synchronously. The driving timing signal is transmitted to the LED driving circuit to drive each LED to output a non-negative square wave light signal.
[0039] It should also be noted that the center wavelength of the LED is customizable. This means that a monochromatic LED covering the target detection wavelength range can be selected based on actual detection needs. For example, a monochromatic LED with a center wavelength of 400-700nm can be chosen, or other monochromatic LEDs with different center wavelengths can also be selected. Furthermore, to avoid interference between the fundamental and harmonic frequencies of different LEDs, the preset frequency group can be set to a frequency set without overlapping third and fifth harmonics.
[0040] For example, 10 monochromatic LEDs with customizable center wavelengths can be selected, and the output square wave parameters of each LED can be set to a duty cycle of 50%, low-level light intensity of 0, and high-level light intensity of [missing value]. Then, a unique frequency is assigned to each LED from a preset frequency group (5Hz, 7Hz, 11Hz, 13Hz, 17Hz, 19Hz, 23Hz, 29Hz, 31Hz, 37Hz), which ensures that the frequencies of any two LEDs do not overlap at the third or fifth harmonic. Finally, a synchronous driving timing signal is generated by the control module to drive each LED to output square wave light according to the set parameters. The control module can be a microcontroller unit (MCU), a field-programmable gate array (FPGA), etc. Preferably, when extended to an imaging spectrometer, an FPGA can be used.
[0041] In some embodiments, before synchronously driving multiple monochrome LEDs, the method further includes: calibrating the timing synchronization accuracy between the control module and the optical signal acquisition device, so that the synchronization error is within a preset error range.
[0042] Among them, timing synchronization accuracy can refer to the timing synchronization error between the driving timing signal output by the control module and the sampling timing signal of the optical signal acquisition device; preset error range can refer to the preset timing synchronization error limit, which can be used to ensure the accuracy of signal acquisition.
[0043] To ensure the accuracy of signal acquisition, in this embodiment of the invention, before synchronously driving multiple monochrome LEDs, the driving timing trigger signal of the control module and the sampling trigger signal of the optical signal acquisition device can be monitored; the time difference between the two sets of signals is recorded, and then the timing synchronization accuracy of the two is calibrated based on the timing synchronization error until the timing synchronization error is within the preset error range, so as to ensure that the LED light emission and signal acquisition timing are synchronized.
[0044] S120. Acquire the mixed light intensity signal after reflection from the target object using a light signal acquisition device.
[0045] Among them, the optical signal acquisition device refers to the sensor that acquires mixed light intensity signals, including but not limited to single-pixel sensors and area array sensors. Single-pixel sensors can be used for single-point spectral detection, and area array sensors can be used for imaging spectral detection. Mixed light intensity signals can be understood as the comprehensive light intensity signal formed by the superposition of ambient light after the light from multiple LEDs is reflected by the target object.
[0046] In this embodiment of the invention, after a single-pixel sensor or an area array sensor acquires a mixed light intensity signal, the mixed light intensity signal can be transmitted to a host computer. Preferably, when extended to an imaging spectrometer, the transmission method can be upgraded to USB 3.0 / Ethernet to adapt to the large-capacity non-negative image data transmission of the area array sensor.
[0047] S130. Preprocess the mixed light intensity signal to remove the DC component and obtain the AC signal.
[0048] S140. Use a preset algorithm to extract the fundamental frequency amplitude of each LED from the AC signal.
[0049] S150, Reconstructing the spectrum of the target object based on the fundamental amplitude.
[0050] The preset algorithm can be understood as an algorithm for extracting the fundamental amplitude from an AC signal.
[0051] Specifically, the collected mixed light intensity signal is preprocessed by calculating the mean of the mixed light intensity signal to separate and remove the DC component, resulting in an AC signal containing only AC fluctuations. The AC signal is then analyzed using a preset algorithm to extract the fundamental frequency amplitude of each LED and construct the spectral curve of the target object based on the center wavelength and corresponding fundamental frequency amplitude of each LED.
[0052] The technical solution of this invention synchronously drives multiple monochromatic LEDs to output non-negative square wave light signals at preset frequencies, forming a mixed light field that illuminates a target object. A light signal acquisition device collects the mixed light intensity signal reflected from the target object. The mixed light intensity signal is preprocessed to remove the DC component, obtaining an AC signal. A preset algorithm extracts the fundamental amplitude of each LED's corresponding frequency from the AC signal. The spectrum of the target object is reconstructed based on the fundamental amplitude. This technical solution achieves single-shot acquisition of the mixed light signal through simultaneous strobe of multiple LEDs, eliminating the need for expensive core components. It solves the problems of high cost, large size, slow acquisition, and difficult integration of traditional spectral detection equipment, achieving low-cost, rapid, and highly integrated spectral detection, and can be flexibly extended to imaging spectral applications.
[0053] Figure 2This is a flowchart illustrating another spectral acquisition method for multi-frequency hybrid light source control provided by an embodiment of the present invention. Based on the aforementioned embodiments, this embodiment further optimizes the single-pixel sensor acquisition process and the processing of the mixed light intensity signal. Technical terms that are the same as or corresponding to those in the above embodiments will not be repeated here. Figure 2 As shown, the method specifically includes the following steps:
[0054] S210 synchronously drives multiple monochrome LEDs to output non-negative square wave light signals at preset different frequencies, forming a mixed light field to illuminate the target object.
[0055] S220. When the light signal acquisition device is a single-pixel sensor, control the single-pixel sensor to continuously acquire the mixed light intensity signal after reflection from the target object at a preset sampling frequency.
[0056] Among them, a single-pixel sensor can refer to a sensor used for collecting light intensity signals at a single point; the preset sampling frequency can refer to the preset number of times a single-pixel sensor collects light intensity signals per unit time.
[0057] Specifically, when the light signal acquisition device is a single-pixel sensor, the sampling frequency of the single-pixel sensor can be set to a preset sampling frequency through the supporting control software. After the acquisition is started, the single-pixel sensor is controlled to continuously acquire the mixed light intensity signal based on the preset sampling frequency for a preset duration to obtain the mixed light intensity signal.
[0058] For example, when using a single-pixel sensor, if its sampling frequency is set to ≥240Hz and sampling is continued for 2 seconds after starting the acquisition, no less than 480 discrete non-negative mixed light intensity data points can be obtained as mixed light intensity signals.
[0059] To further clarify the technical solution of the present invention, the LED square wave frequency domain characteristics and the minimum acquisition time of the sensor in the embodiments of the present invention are further explained. The LED square wave frequency domain characteristics are modified non-negative expressions, as follows:
[0060] The LED square wave is a non-negative signal (low level 0, high level 0). (Duty cycle 50%), its Fourier series expansion must include a DC component (to ensure overall non-negativity) and an odd-order AC component, expressed as:
[0061]
[0062] Physical meaning verification: DC component The time-averaged light intensity of the square wave, AC component The range of values is (≈) Therefore, the range of values for the entire square wave signal is... (≈) Since the actual low level of the LED is 0, the extremely small negative fluctuation can be ignored (or clamped to 0 by the driver circuit), and the overall signal is non-negative (0~1.136). ), consistent with the actual hardware output;
[0063] (Fundamental frequency): frequency ,amplitude ;
[0064] (Harmonics): Frequency The amplitude decays to 1 / 3 / 1 / 5 of the fundamental wave;
[0065] Frequency design verification: arbitrary , (For example, the 3rd harmonic of 5Hz, 15Hz, and the 5th harmonic, 25Hz, are not within the frequency group), ensuring that harmonics do not interfere with the fundamental frequency of other LEDs, thus eliminating interference for subsequent amplitude extraction.
[0066] Regarding the calculation of minimum acquisition time (unmodified, based on the modified backwave characteristics verification):
[0067] Two core conditions must be met: 1. Sampling frequency ≥ 2 × highest frequency component (Nyquist sampling theorem); 2. Acquisition duration ≥ 5 lowest fundamental frequency cycles (to ensure amplitude extraction accuracy, which can be adjusted according to accuracy requirements).
[0068] Highest frequency component: (The 3rd harmonic is the main interference; the 5th and above harmonics can be ignored).
[0069] Sampling frequency: 240Hz≥2×111=222Hz, which satisfies the Nyquist theorem and can accurately collect the fundamental and harmonic frequencies of non-negative square waves;
[0070] Lowest fundamental frequency: ,cycle ;
[0071] Minimum acquisition time: (Default time is 2 seconds, number of collection points) (This reduces noise interference and improves amplitude extraction accuracy).
[0072] S230. Calculate the mean value of the mixed light intensity signal and determine the mean value as the DC component, which includes the LED square wave DC component and the ambient light DC component.
[0073] S240. Subtract the mean from each data point in the mixed light intensity signal to obtain the AC signal.
[0074] The mean value can refer to the average value of all data points corresponding to the mixed light intensity signal; the DC component of the LED square wave can refer to the time-averaged light intensity part of the square wave light signal output by the LED.
[0075] Specifically, the mean value of the signal can be calculated based on all data points of the acquired mixed light intensity signal. This mean value is determined as the DC component. Then, each data point in the mixed light intensity signal is traversed, and the calculated mean value is subtracted from the value of each data point. Through this process, the interference of the DC component can be removed, and an AC signal that only reflects the AC fluctuation characteristics can be obtained.
[0076] In this embodiment of the invention, the process of acquiring and processing mixed signals may include the following:
[0077] Mixed light intensity signal model (corrected to non-negative mixed light intensity).
[0078] The mixed light intensity signal acquired by the single-pixel sensor is a non-negative value, containing the non-negative square wave contribution from 10 LEDs, ambient light (non-negative), and noise (extremely small, which can be considered a non-negative disturbance), as follows:
[0079]
[0080] in, For the target object in Reflectance at a point (0~1, non-negative); This represents the DC component of ambient light (non-negative). Gaussian white noise (mean 0, variance 0) Because the light intensity signal is strong, the absolute value of the noise is much smaller than the signal value, and the overall value is still non-negative.
[0081] Discrete sampling of the mixed light intensity signal (sampling period) (480 non-negative data points were collected over 2 seconds), and the resulting discrete sampling expression is as follows:
[0082]
[0083] in, It is Gaussian white noise. , This is consistent with the non-negative light intensity data actually collected by the sensor.
[0084] Furthermore, DC preprocessing can be performed:
[0085] It is understandable that the DC component of the mixed signal consists of two parts: the DC component of the LED square wave itself. Ambient light These need to be removed together to extract the AC components (fundamental and harmonics):
[0086] Calculate the mean of the sampled sequence This yields an alternating current signal (which can be positive or negative, reflecting the fluctuations of the fundamental and harmonic frequencies):
[0087]
[0088] It should be noted that here Negative values are allowed (because the DC component has been removed), but they are only used for subsequent frequency extraction and do not affect the non-negative characteristics of the original light intensity signal, which is in line with signal processing logic.
[0089] S250. For each LED's preset frequency, the Götzl algorithm is used to process the AC signal and recursively obtain the recursive result corresponding to the preset frequency.
[0090] S260. Calculate the fundamental amplitude of the preset frequency corresponding to each LED based on the recursive results.
[0091] The recursive result can be .
[0092] Specifically, for each LED and its assigned preset frequency, the preprocessed AC signal is input point by point into the Götzl algorithm according to the sampling order. The algorithm then calculates the result corresponding to the preset frequency using its preset recursive formula. Based on the final recursive result, a preset amplitude calculation formula is used to obtain the fundamental amplitude of each LED at its preset frequency. This approach offers the advantage of using an efficient and accurate algorithm to extract the fundamental amplitude, reducing computational complexity (its computational load is lower than that of the Fast Fourier Transform (FFT)). It also shortens data processing time while ensuring amplitude extraction accuracy, making it suitable for embedded scenarios.
[0093] In a preferred embodiment, the fundamental frequency amplitude of each LED at a preset frequency can be calculated through the following process.
[0094] For each LED's fundamental frequency The amplitude is calculated using a recursive formula:
[0095]
[0096] Initial conditions: ;
[0097] when At that time, the fundamental amplitude is:
[0098]
[0099] The fundamental amplitude is a non-negative value, reflecting the amplitude of light intensity fluctuations.
[0100] S270, Reconstructing the spectrum of the target object based on the fundamental amplitude.
[0101] In some optional embodiments, reconstructing the spectrum of the target object based on the fundamental amplitude includes: arranging the fundamental amplitude values according to the order of the center wavelengths of each LED to form a discrete spectrum; if a continuous spectrum needs to be generated, interpolating the discrete spectrum using an interpolation algorithm to obtain a continuous spectrum curve; and completing the spectral reconstruction of the target object based on the discrete spectrum or the continuous spectrum.
[0102] Specifically, the center wavelength of each LED can be obtained, and all center wavelengths can be sorted in ascending order. The sorted center wavelengths are then mapped one-to-one with their corresponding fundamental amplitudes to form a discrete spectrum of the target object. If a higher wavelength sampling density is required in the actual application, an interpolation algorithm can be used to solve for the interpolation coefficients based on the sampling points of the discrete spectrum, thus interpolating the discrete spectrum and generating a continuous spectral curve with continuous wavelengths. Finally, based on the discrete or continuous spectral curve, the spectral reconstruction of the target object is completed and the result is output. The advantage of this approach is that it satisfies the discrete spectral requirements of conventional detection while also generating a high-precision continuous spectrum through interpolation, adapting to application scenarios with different accuracy requirements.
[0103] For example, the non-negative values of 10 wavelength points can be... (0~1) Arranged in wavelength order to obtain discrete spectra; if it is necessary to increase the sampling density, two sets of LEDs can be spliced together (e.g., the first set is 400-550nm, and the second set is 550-700nm) to supplement reflectance data. Then, the following cubic spline interpolation formula is used to generate a continuous spectrum curve (non-negative, 0~1):
[0104]
[0105] in, , The interpolation coefficients satisfy the requirements of continuous sampling points and continuous first and second derivatives, ensuring that the spectrum is smooth and non-negative.
[0106] The technical solutions of this invention include at least the following technical effects: In terms of cost control, the core cost of the spectrometer is low, only 1% to 10% of that of the prior art. When upgrading to an imaging spectrometer, only the sensor and transmission module need to be replaced, resulting in extremely low additional costs. In terms of speed performance, the single acquisition time is ≤2 seconds, which is more than 5 times faster than Fourier transform spectrometers and more than 2 times faster than LCTF spectrometers. It has outstanding integration capabilities, as it can be embedded in a 5cm×5cm×1cm micro circuit board, with a volume of only 1% to 5% of traditional equipment, making it easy to integrate into portable devices. By correcting the non-negative characteristics of square waves, the mathematical model is made to perfectly match the actual light intensity output of the LED and the non-negative acquisition of the sensor, ensuring physical consistency and greatly improving the reliability of the solution. It has excellent expansion flexibility, as the imaging spectrometer can be upgraded simply by replacing the sensor, and each pixel is processed independently to adapt to different frame rate requirements. In terms of accuracy, the reflectivity error is ≤±2.5%, which can meet the stringent requirements of mid-to-high-end testing scenarios such as industrial quality inspection and biomedicine.
[0107] Figure 3 This is a flowchart illustrating another spectral acquisition method for multi-frequency hybrid light source control provided by an embodiment of the present invention. Based on the above embodiments, the technical solution of this embodiment can be extended to imaging spectrometers. Technical terms that are the same as or corresponding to those in the above embodiments will not be repeated here. Figure 3 As shown, the method specifically includes the following steps:
[0108] S310 synchronously drives multiple monochrome LEDs to output non-negative square wave light signals at preset different frequencies, forming a mixed light field to illuminate the target object.
[0109] S320. When the optical signal acquisition device is an area array sensor, control the area array sensor to perform frame acquisition at a preset frame rate to obtain mixed light intensity image data of multiple pixels, and use the mixed light intensity image data as a mixed light intensity signal.
[0110] Among them, an area array sensor can refer to a sensor with multiple array-type photosensitive units. An area array sensor can be used to acquire area array light intensity signals and can output mixed light intensity image data containing multiple pixels. An area array sensor can be a CMOS sensor. The preset frame rate can refer to the preset number of frames of images acquired by the area array sensor per unit time.
[0111] When the optical signal acquisition device is an area array sensor, a preset frame rate is set according to the detection scenario. For example, 60fps is used for static imaging, and 200fps is used for near real-time imaging. After acquisition is started, the area array sensor is controlled to acquire frames of the mixed light intensity signal at the preset frame rate for a preset duration, thereby obtaining mixed light intensity image data containing multiple pixels. This mixed light intensity image data is then used as the mixed light intensity signal for subsequent processing. The advantage of this approach is that it adapts to different detection scenario requirements, and the imaging detection can acquire spatial dimensional information, improving the applicability and flexibility of this method.
[0112] S330. The acquired mixed light intensity image data is grouped by pixel, and each pixel is independently preprocessed and the fundamental amplitude is extracted to obtain the fundamental amplitude corresponding to each pixel.
[0113] S340. For each pixel, reconstruct the pixel's spectrum based on the fundamental amplitude corresponding to the pixel to form a three-dimensional data matrix containing spatial coordinates and spectral information.
[0114] S350 performs imaging spectral reconstruction based on a three-dimensional data matrix.
[0115] Pixel grouping can be understood as dividing all pixels of an area array sensor into multiple groups by rows or columns to execute data processing in parallel; a three-dimensional data matrix can refer to a data set containing three dimensions of information: pixel spatial coordinates, wavelength, and fundamental amplitude (or reflectivity); imaging spectral reconstruction can refer to the process of constructing an imaging spectrum containing spatial distribution and spectral features based on pixel-level spectral information.
[0116] Specifically, when the optical signal acquisition device is an area array sensor, the acquired mixed light intensity image data can be grouped according to pixel coordinates, with each group containing a preset number of pixels; for each pixel, the preprocessing and fundamental amplitude extraction steps described in the aforementioned embodiments are performed independently to obtain the fundamental amplitude corresponding to each pixel, which will not be elaborated here.
[0117] Furthermore, based on the fundamental amplitude of each pixel and the center wavelength of the corresponding LED, the spectrum of that pixel is reconstructed. Based on the spectral information of all pixels, a three-dimensional data matrix of spatial coordinates, wavelength, and fundamental amplitude is formed, and then imaging spectral reconstruction is performed based on the three-dimensional data matrix. The advantage of this is that the method can be quickly extended to imaging spectroscopy applications, meeting more practical detection needs.
[0118] The technical solution of this invention synchronously drives multiple monochromatic LEDs to output non-negative square wave light signals at preset different frequencies, forming a mixed light field to illuminate the target object. When the light signal acquisition device is an area array sensor, the area array sensor is controlled to acquire frames at a preset frame rate, obtaining mixed light intensity image data of multiple pixels, which is then used as a mixed light intensity signal. The acquired mixed light intensity image data is grouped by pixel, and each pixel independently undergoes preprocessing and fundamental amplitude extraction steps to obtain the fundamental amplitude corresponding to each pixel. For each pixel, the pixel's spectrum is reconstructed based on the fundamental amplitude corresponding to the pixel, forming a three-dimensional data matrix containing spatial coordinates and spectral information. Imaging spectral reconstruction is performed based on the three-dimensional data matrix. This technical solution can be quickly extended to imaging spectral application scenarios to meet more practical detection needs.
[0119] Figure 4 This is a schematic diagram of a multi-frequency hybrid light source-controlled spectral acquisition system provided in an embodiment of the present invention. Figure 4 As shown, the system includes:
[0120] LED excitation module 410 synchronously drives multiple monochrome LEDs to output non-negative square wave light signals at preset different frequencies, forming a mixed light field to illuminate the target object.
[0121] Signal acquisition module 420 is used to acquire the mixed light intensity signal reflected by the target object through an optical signal acquisition device;
[0122] The signal preprocessing module 430 is used to preprocess the mixed light intensity signal to remove the DC component in the mixed light intensity signal and obtain an AC signal.
[0123] The amplitude extraction module 440 is used to extract the fundamental frequency amplitude of each LED from the AC signal using a preset algorithm;
[0124] The spectral reconstruction module 450 is used to reconstruct the spectrum of the target object based on the fundamental amplitude.
[0125] In some alternative embodiments, the LED excitation module 410 is specifically used for:
[0126] Select a preset number of monochrome LEDs and set the square wave parameters corresponding to the LEDs, wherein the square wave parameters include duty cycle, low-level light intensity and high-level light intensity;
[0127] Each LED is assigned a unique preset frequency based on a preset frequency group, and the driving timing sequence of each LED is synchronously generated by the control module according to the preset frequency and the square wave parameters, so as to drive the LED to output a non-negative square wave light signal.
[0128] In some optional embodiments, the multi-frequency hybrid light source-controlled spectral acquisition system further includes a calibration module for:
[0129] Before synchronously driving multiple monochrome LEDs, the timing synchronization accuracy between the control module and the optical signal acquisition device is calibrated to ensure that the synchronization error is within a preset error range.
[0130] In some optional embodiments, the signal acquisition module 420 is specifically used for:
[0131] When the optical signal acquisition device is a single-pixel sensor, the single-pixel sensor is controlled to continuously acquire light at a preset sampling frequency to obtain the mixed light intensity signal.
[0132] When the optical signal acquisition device is an area array sensor, the area array sensor is controlled to acquire frames at a preset frame rate to obtain mixed light intensity image data of multiple pixels, and the mixed light intensity image data is used as the mixed light intensity signal.
[0133] In some optional embodiments, the signal preprocessing module 430 is specifically used for:
[0134] Calculate the mean value of the mixed light intensity signal, and determine the mean value as the DC component, which includes the LED square wave DC component and the ambient light DC component;
[0135] The AC signal is obtained by subtracting the mean value from each data point in the mixed light intensity signal.
[0136] In some alternative embodiments, the amplitude extraction module 440 is specifically used for:
[0137] For each LED at a preset frequency, the Götzl algorithm is used to process the AC signal, and a recursive result corresponding to the preset frequency is obtained recursively.
[0138] The fundamental amplitude of the preset frequency corresponding to each LED is calculated based on the recursive result.
[0139] In some optional embodiments, the spectral reconstruction module 450 is specifically used for:
[0140] The fundamental wave amplitudes are arranged according to the order of the center wavelengths of each LED to form a discrete spectrum;
[0141] To generate a continuous spectrum, an interpolation algorithm is used to interpolate the discrete spectrum to obtain a continuous spectrum curve.
[0142] The spectral reconstruction of the target object is completed based on the discrete spectrum or the continuous spectrum.
[0143] In some optional embodiments, when the optical signal acquisition device is an area array sensor, the step of reconstructing the spectrum of the target object based on the fundamental amplitude further includes:
[0144] The acquired mixed light intensity image data is grouped by pixel, and each pixel is independently preprocessed and the fundamental amplitude is extracted to obtain the fundamental amplitude corresponding to each pixel;
[0145] For each pixel, the spectrum of the pixel is reconstructed based on the fundamental amplitude corresponding to the pixel, forming a three-dimensional data matrix containing spatial coordinates and spectral information;
[0146] Imaging spectral reconstruction is performed based on the three-dimensional data matrix.
[0147] The multi-frequency hybrid light source-controlled spectral acquisition system provided in this embodiment of the invention can execute the multi-frequency hybrid light source-controlled spectral acquisition method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0148] Figure 5 This is a schematic diagram of an electronic device for implementing the multi-frequency hybrid light source modulation spectral acquisition method according to embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptops, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0149] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0150] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0151] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the spectral acquisition method of multi-frequency hybrid light source modulation.
[0152] In some embodiments, the multi-frequency hybrid light source modulation spectral acquisition method can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the multi-frequency hybrid light source modulation spectral acquisition method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the multi-frequency hybrid light source modulation spectral acquisition method by any other suitable means (e.g., by means of firmware).
[0153] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include: implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0154] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0155] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0156] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0157] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0158] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0159] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0160] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A spectral acquisition method controlled by a multi-frequency hybrid light source, characterized in that, include: Multiple monochromatic LEDs are synchronously driven to output non-negative square wave light signals at different preset frequencies to form a mixed light field that illuminates the target object; wherein, the preset frequency of each LED is a frequency that does not overlap with the third or fifth harmonic. The mixed light intensity signal after being reflected by the target object is acquired by a light signal acquisition device; The mixed light intensity signal is preprocessed to remove the DC component and obtain an AC signal. A preset algorithm is used to extract the fundamental frequency amplitude of each LED from the AC signal; The spectrum of the target object is reconstructed based on the fundamental amplitude; The preprocessing of the mixed light intensity signal to remove the DC component and obtain an AC signal includes: Calculate the mean value of the mixed light intensity signal, and determine the mean value as the DC component, which includes the LED square wave DC component and the ambient light DC component; The AC signal is obtained by subtracting the mean value from each data point in the mixed light intensity signal; The step of extracting the fundamental frequency amplitude of each LED from the AC signal using a preset algorithm includes: For each LED at a preset frequency, the Götzl algorithm is used to process the AC signal, and a recursive result corresponding to the preset frequency is obtained recursively. The fundamental amplitude of the preset frequency corresponding to each LED is calculated based on the recursive result.
2. The method according to claim 1, characterized in that, The synchronous driving of multiple monochromatic LEDs to output non-negative square wave light signals at preset different frequencies includes: Select a preset number of monochrome LEDs and set the square wave parameters corresponding to the LEDs, wherein the square wave parameters include duty cycle, low-level light intensity and high-level light intensity; Each LED is assigned a unique preset frequency based on a preset frequency group, and the driving timing sequence of each LED is synchronously generated by the control module according to the preset frequency and the square wave parameters, so as to drive the LED to output a non-negative square wave light signal.
3. The method according to claim 2, characterized in that, Before synchronously driving multiple monochrome LEDs, the following is also included: The timing synchronization accuracy between the calibration control module and the optical signal acquisition device is ensured so that the synchronization error is within a preset error range.
4. The method according to claim 1, characterized in that, The acquisition of the mixed light intensity signal after reflection from the target object via the light signal acquisition device includes: When the optical signal acquisition device is a single-pixel sensor, the single-pixel sensor is controlled to continuously acquire light at a preset sampling frequency to obtain the mixed light intensity signal. When the optical signal acquisition device is an area array sensor, the area array sensor is controlled to acquire frames at a preset frame rate to obtain mixed light intensity image data of multiple pixels, and the mixed light intensity image data is used as the mixed light intensity signal.
5. The method according to claim 1, characterized in that, The reconstruction of the spectrum of the target object based on the fundamental amplitude includes: The fundamental wave amplitudes are arranged according to the order of the center wavelengths of each LED to form a discrete spectrum; To generate a continuous spectrum, an interpolation algorithm is used to interpolate the discrete spectrum to obtain a continuous spectrum curve. The spectral reconstruction of the target object is completed based on the discrete spectrum or the continuous spectrum.
6. The method according to claim 4, characterized in that, When the optical signal acquisition device is an area array sensor, the step of reconstructing the spectrum of the target object based on the fundamental amplitude further includes: The acquired mixed light intensity image data is grouped by pixel, and each pixel is independently preprocessed and the fundamental amplitude is extracted to obtain the fundamental amplitude corresponding to each pixel; For each pixel, the spectrum of the pixel is reconstructed based on the fundamental amplitude corresponding to the pixel, forming a three-dimensional data matrix containing spatial coordinates and spectral information; Imaging spectral reconstruction is performed based on the three-dimensional data matrix.
7. A spectral acquisition system controlled by a multi-frequency hybrid light source, characterized in that, include: The LED excitation module synchronously drives multiple monochromatic LEDs to output non-negative square wave light signals at different preset frequencies, forming a mixed light field to illuminate the target object; wherein, the preset frequency of each LED is a frequency that does not overlap with the third or fifth harmonic. The signal acquisition module is used to acquire the mixed light intensity signal reflected by the target object through the optical signal acquisition device; The signal preprocessing module is used to preprocess the mixed light intensity signal to remove the DC component from the mixed light intensity signal and obtain an AC signal. An amplitude extraction module is used to extract the fundamental frequency amplitude of each LED from the AC signal using a preset algorithm. A spectral reconstruction module is used to reconstruct the spectrum of the target object based on the fundamental amplitude; The signal preprocessing module is specifically used for: Calculate the mean value of the mixed light intensity signal, and determine the mean value as the DC component, which includes the LED square wave DC component and the ambient light DC component; The AC signal is obtained by subtracting the mean value from each data point in the mixed light intensity signal; The amplitude extraction module is specifically used for: For each LED at a preset frequency, the Götzl algorithm is used to process the AC signal, and a recursive result corresponding to the preset frequency is obtained recursively. The fundamental amplitude of the preset frequency corresponding to each LED is calculated based on the recursive result.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, which is then executed by the at least one processor to enable the at least one processor to perform the spectral acquisition method of multi-frequency hybrid light source modulation as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that are used to cause a processor to execute the spectral acquisition method of multi-frequency hybrid light source modulation as described in any one of claims 1-6.
Citation Information
Patent Citations
Method and apparatus for synchronous measurement with multi-wavelength spectrum
CN108333138A
Multi-spectral imaging method and device based on high-speed adjustable multi-color LED light source
CN114441035A