Low-cost high-resolution spectral detection method based on compressive sensing algorithm
By employing a block-based and reconstruction technique based on compressed sensing algorithms, the problems of data redundancy and low accuracy in traditional spectral detection are solved, enabling low-cost, high-resolution spectral detection and improving detection efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHANGCHUN UNIV OF SCI & TECH
- Filing Date
- 2026-03-13
- Publication Date
- 2026-06-19
AI Technical Summary
Traditional spectral detection and analysis uses a fixed sampling rate, which leads to the loss of key details or the lack of compression of redundant data. It is costly and has low detection accuracy, and lacks targeted protection for the characteristic bands of components.
A method based on compressed sensing algorithm is adopted. By segmenting spectral images and calculating the information complexity index and band importance index, the sampling strategy is dynamically adjusted. The spectral data is reconstructed by combining compressed sensing algorithm and a spectral analysis model is constructed for accurate analysis.
It effectively reduces data redundancy, lowers storage costs, improves detection accuracy and efficiency, breaks through the dependence on large-capacity hardware, and achieves low-cost, high-resolution spectral detection.
Smart Images

Figure CN122244469A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of spectral detection technology, and in particular to a low-cost, high-resolution spectral detection method based on compressed sensing algorithms. Background Technology
[0002] A spectrum is the pattern of monochromatic light dispersed by a dispersive system (such as a prism or grating) and arranged sequentially according to wavelength (or frequency). It is also called the optical spectrum. The largest part of the spectrum, the visible spectrum, is the portion of the electromagnetic spectrum visible to the human eye; electromagnetic radiation within this wavelength range is called visible light. The method of identifying substances and determining their chemical composition and relative abundance based on their spectra is called spectroscopic detection and analysis. Its advantages are sensitivity and speed. Historically, many new elements, such as rubidium, cesium, and helium, have been discovered through spectroscopic detection and analysis. Based on the detection and analysis principle, spectroscopic detection and analysis can be divided into emission spectroscopy and absorption spectroscopy; based on the form of the component being measured, it can be divided into atomic spectroscopy and molecular spectroscopy. When the component being measured in spectral analysis is an atom, it is called atomic spectroscopy; when the component is a molecule, it is called molecular spectroscopy.
[0003] However, traditional spectral detection and analysis often uses a fixed sampling rate (such as a global sampling rate of 0.5), which cannot purposefully reduce the collection of ordinary information and preserve key information. This leads to the loss of key details or the ineffective compression of redundant data, which in turn requires the use of high-capacity storage hardware for data storage, resulting in high costs and a large amount of data redundancy. At the same time, there is a lack of targeted protection for the characteristic bands of components (such as 500-550nm corresponding to chlorophyll) during the band selection process, thereby reducing the accuracy of spectral detection.
[0004] To address the aforementioned technical deficiencies, a solution is proposed. Summary of the Invention
[0005] The purpose of this invention is to address the problems in traditional spectral detection and analysis processes, which often employ a fixed sampling rate, making it impossible to purposefully reduce the collection of ordinary information and preserve key information. This leads to the loss of critical details or the ineffective compression of redundant data, necessitating the use of large-capacity storage hardware for data storage, resulting in high costs and significant data redundancy. Furthermore, the lack of targeted protection for component characteristic bands during band selection further reduces the accuracy of spectral detection.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a low-cost, high-resolution spectral detection method based on compressed sensing algorithm, comprising the following steps:
[0007] Step 1: Use an infrared spectrometer to scan the target substance and obtain the original spectral image. Divide the obtained original spectral image into N×N pixel blocks and obtain the spectral intensity value and band feature contribution value data of the pixels from the block images.
[0008] Step 2: Obtain the spectral intensity values of pixels in the segmented image and perform analysis and calculation to obtain the information complexity index of the spectral image, which is used to reflect the complexity of the information contained in the segmented image. The spectral data is filtered, and the larger the value, the higher the complexity of the information contained in the segmented image.
[0009] Step 3: Obtain the feature contribution values of the bands in the segmented image and perform analysis and calculation to obtain the band importance index of the spectral image bands, which is used to reflect the importance of the spectral image bands. The spectral data is then further filtered, and the larger the value, the higher the importance of the spectral image band.
[0010] Step 4: Obtain the filtered spectral data, reconstruct it using a compressed sensing algorithm, and then input the reconstructed spectral data into the constructed spectral analysis model for calculation and analysis to determine the component information of the target substance and the corresponding content information of the components.
[0011] Furthermore, the size N of the N×N pixel blocks ranges from 8 to 64. The block division process adopts a non-overlapping method to ensure that each pixel of the spectral image belongs to only one block, and the pixel edges of the blocks are smoothed by bilinear interpolation to reduce the block boundary effect.
[0012] Furthermore, the calculation process for the information complexity index of a spectral image is as follows:
[0013] S11. The acquired spectral images are processed according to... The pixels are divided into blocks, and then the data is acquired and analyzed.
[0014] S12. Calculate the information complexity index of the spectral image according to the following formula. : in, This refers to the size of the image blocks after the spectral image has been divided into blocks. After the spectral image is divided into blocks, the first block within the block image... Pixel spectral intensity value, This represents the average spectral intensity value of all pixels within a segmented image after the spectral image has been segmented.
[0015] S13. Obtain the preset information complexity threshold. Information complexity index Comparative analysis, when When this occurs, it indicates that the information contained in the image blocks is complex, and a high sampling frequency should be allocated. If the information contained in the segmented image is simple, a low sampling frequency is assigned, and the high sampling frequency is greater than the low sampling frequency.
[0016] Furthermore, the calculation process for the band importance index of the spectral image bands is as follows:
[0017] S21. Acquire data and perform analysis and calculation;
[0018] S22. Calculate the band importance index of the spectral image bands according to the following formula. : in, In the preset spectral detection, the key component types, For the first The characteristic contribution value of each component in this band is calculated using a partial least squares regression algorithm, reflecting the correlation strength between the spectral signal in this band and the content of the k-th component. The maximum feature contribution value among all bands;
[0019] S23. Obtain the preset band importance threshold. Important indexes of the wave band Comparative analysis, when When the band is high, it indicates that the spectral image band is of high importance. Therefore, the bands are divided into important bands, and the compression ratio of the band data is reduced. If the band is low in importance, it indicates that the band is classified as a secondary band, and the compression ratio of the band data is increased.
[0020] Furthermore, the process of constructing the spectral analysis model is as follows:
[0021] S31. Collect spectral data of standard samples of the same target substance from multiple groups, and simultaneously record the types of components and the true values of component content measured in the laboratory as a dataset. Randomly divide the dataset into training set and test set.
[0022] S32. Construct a spectral analysis model based on a convolutional neural network, train the spectral analysis model using a training set, and test the spectral analysis model using a test set to obtain a qualified spectral analysis model.
[0023] S33. Input the reconstructed spectral data into the constructed, qualified spectral analysis model for calculation and analysis to determine the component information contained in the target substance and the corresponding content information of the component information.
[0024] Furthermore, the compressed sensing algorithm reconstructs the spectrum as follows: an overcomplete dictionary is constructed based on the sparsity characteristics of the spectral signal, dimensionality reduction sampling is achieved through a random Gaussian measurement matrix, and an iterative threshold algorithm is used to solve for the sparsity coefficients to recover high-resolution spectral data.
[0025] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0026] This low-cost, high-resolution spectral detection method based on compressed sensing algorithm divides the original spectral image into N×N pixel blocks and extracts spectral intensity values and band feature contribution values. It then performs initial screening of the block data using an information complexity index, dynamically adjusting the sampling strategy to retain key details in complex areas while reducing redundant acquisition of ordinary information. This avoids information loss or data bloat caused by fixed sampling rates and achieves targeted protection of feature bands through band importance index calculation. Partial least squares regression algorithm quantifies the contribution of each band to component detection, reducing the compression ratio for highly important bands. Based on this, compressed sensing algorithm is used to reconstruct the screened spectral data, significantly reducing data storage while maintaining high resolution. This breaks through the dependence of traditional methods on large-capacity hardware and significantly reduces detection costs. Finally, a spectral analysis model accurately analyzes the reconstructed data, improving the accuracy of component identification and effectively increasing spectral detection efficiency and reducing costs through a dual optimization mechanism of data compression and feature protection. Attached Figure Description
[0027] Figure 1 A schematic diagram of the method flow of the present invention is shown. Detailed Implementation
[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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 are within the scope of protection of the present invention.
[0029] Example:
[0030] like Figure 1As shown, the low-cost, high-resolution spectral detection method based on compressed sensing algorithm first uses an infrared spectrometer to scan the target substance and acquire the original spectral image. The acquired original spectral image is then divided into N×N pixel blocks, and the spectral intensity values and band feature contribution values of the pixels are obtained from the block images. The size N of the N×N pixel block ranges from 8 to 64, preferably 16×16 pixels. The block division process uses a non-overlapping method to ensure that each pixel of the spectral image belongs to only one block, and the pixel edges of the blocks are smoothed using bilinear interpolation to reduce block boundary effects.
[0031] Then, the spectral intensity values of pixels in the segmented image are obtained and analyzed to obtain the information complexity index of the spectral image, which reflects the complexity of the information contained in the segmented image. The spectral data is filtered, and the larger the value, the higher the complexity of the information contained in the segmented image.
[0032] The calculation process for the information complexity index of a spectral image is as follows:
[0033] S11. The acquired spectral images are processed according to... The pixels are divided into blocks, and then the data is acquired and analyzed.
[0034] S12. Calculate the information complexity index of the spectral image according to the following formula. : in, This refers to the size of the image blocks after the spectral image has been divided into blocks. After the spectral image is divided into blocks, the first block within the block image... Pixel spectral intensity value, This represents the average spectral intensity value of all pixels within a segmented image after the spectral image has been segmented.
[0035] S13. Obtain the preset information complexity threshold. Information complexity index Comparative analysis, when When this occurs, it indicates that the information contained in the image blocks is complex, and a high sampling frequency should be allocated. If the information contained in the segmented image is simple, a low sampling frequency is assigned, and the high sampling frequency is greater than the low sampling frequency.
[0036] Next, the feature contribution values of the bands in the segmented image are obtained and analyzed to obtain the band importance index of the spectral image bands, which is used to reflect the importance of the spectral image bands. The spectral data is then further filtered, and the larger the value, the higher the importance of the spectral image band.
[0037] The calculation process for the band importance index of a spectral image band is as follows:
[0038] S21. Acquire data and perform analysis and calculation;
[0039] S22. Calculate the band importance index of the spectral image bands according to the following formula. : in, In the preset spectral detection, the key component types (such as chlorophyll and water) are identified. For the first The characteristic contribution value of each component in this band is calculated using the partial least squares regression (PLSR) algorithm, reflecting the correlation strength between the spectral signal in this band and the content of the k-th component. The maximum feature contribution value among all bands;
[0040] S23. Obtain the preset band importance threshold. Important indexes of the wave band Comparative analysis, when When the band is high, it indicates that the spectral image band is of high importance. Therefore, the bands are divided into important bands, and the compression ratio of the band data is reduced. If the band is low in importance, it indicates that the band is classified as a secondary band, and the compression ratio of the band data is increased.
[0041] Finally, the filtered spectral data is obtained and reconstructed using a compressed sensing algorithm. Specifically, an overcomplete dictionary is constructed based on the sparsity characteristics of the spectral signal, dimensionality reduction sampling is achieved through a random Gaussian measurement matrix, and an iterative threshold algorithm is used to solve for the sparsity coefficients to recover the high-resolution spectral data. The reconstructed spectral data is then input into the constructed spectral analysis model for calculation and analysis to determine the component information contained in the target substance and the corresponding content information.
[0042] The process of constructing the spectral analysis model is as follows:
[0043] S31. Collect spectral data of standard samples of the same target substance from multiple groups, and simultaneously record the types of components and the true values of component content measured in the laboratory as a dataset. Randomly divide the dataset into training set and test set.
[0044] S32. Construct a spectral analysis model based on a convolutional neural network, train the spectral analysis model using a training set, and test the spectral analysis model using a test set to obtain a qualified spectral analysis model.
[0045] S33. Input the reconstructed spectral data into the constructed, qualified spectral analysis model for calculation and analysis to determine the component information contained in the target substance and the corresponding content information of the component information.
[0046] This invention divides the original spectral image into N×N pixel blocks and extracts spectral intensity values and band feature contribution values. It then performs an initial screening of the block data using an information complexity index, dynamically adjusting the sampling strategy to retain key details in complex areas while reducing redundant acquisition of ordinary information. This avoids information loss or data bloat caused by fixed sampling rates and achieves targeted protection of feature bands through band importance index calculation. A partial least squares regression algorithm quantifies the contribution of each band to component detection, reducing the compression ratio for highly important bands. Based on this, a compressed sensing algorithm is used to reconstruct the screened spectral data, significantly reducing data storage while maintaining high resolution. This breaks through the dependence of traditional methods on large-capacity hardware and significantly reduces detection costs. Finally, a spectral analysis model accurately analyzes the reconstructed data, improving the accuracy of component identification and effectively increasing spectral detection efficiency and reducing costs through a dual optimization mechanism of data compression and feature protection.
[0047] The size of the interval and threshold is set to facilitate comparison. The size of the threshold depends on the amount of sample data and the number of bases set by those skilled in the art for each set of sample data; as long as it does not affect the ratio between the parameter and the quantized value.
[0048] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0049] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A low-cost, high-resolution spectral detection method based on compressed sensing algorithm, characterized in that, Includes the following steps: Step 1: Use an infrared spectrometer to scan the target substance and obtain the original spectral image. Divide the obtained original spectral image into N×N pixel blocks and obtain the spectral intensity value and band feature contribution value data of the pixels from the block images. Step 2: Obtain the spectral intensity values of pixels in the segmented image and perform analysis and calculation to obtain the information complexity index of the spectral image, which is used to reflect the complexity of the information contained in the segmented image. The spectral data is filtered, and the larger the value, the higher the complexity of the information contained in the segmented image. Step 3: Obtain the feature contribution values of the bands in the segmented image and perform analysis and calculation to obtain the band importance index of the spectral image bands, which is used to reflect the importance of the spectral image bands. The spectral data is then further filtered, and the larger the value, the higher the importance of the spectral image band. Step 4: Obtain the filtered spectral data, reconstruct it using a compressed sensing algorithm, and then input the reconstructed spectral data into the constructed spectral analysis model for calculation and analysis to determine the component information of the target substance and the corresponding content information of the components.
2. The low-cost, high-resolution spectral detection method based on compressed sensing algorithm according to claim 1, characterized in that, The size N of the N×N pixel blocks ranges from 8 to 64. The block division process adopts a non-overlapping method to ensure that each pixel of the spectral image belongs to only one block, and the pixel edge of the block is smoothed by bilinear interpolation to reduce the block boundary effect.
3. The low-cost, high-resolution spectral detection method based on compressed sensing algorithm according to claim 1, characterized in that, The calculation process for the information complexity index of a spectral image is as follows: S11. The acquired spectral images are processed according to... The pixels are divided into blocks, and then the data is acquired and analyzed. S12. Calculate the information complexity index of the spectral image according to the following formula. : in, This refers to the size of the image blocks after the spectral image has been divided into blocks. After the spectral image is divided into blocks, the first block within the block image... Pixel spectral intensity value, This represents the average spectral intensity value of all pixels within a segmented image after the spectral image has been divided into blocks. S13. Obtain the preset information complexity threshold. Information complexity index Comparative analysis, when When this occurs, it indicates that the information contained in the image blocks is complex, and a high sampling frequency should be allocated. If the information contained in the segmented image is simple, a low sampling frequency is assigned, and the high sampling frequency is greater than the low sampling frequency.
4. The low-cost, high-resolution spectral detection method based on compressed sensing algorithm according to claim 1, characterized in that, The calculation process for the band importance index of a spectral image band is as follows: S21. Acquire data and perform analysis and calculation; S22. Calculate the band importance index of the spectral image bands according to the following formula. : in, In the preset spectral detection, the key component types, For the first The characteristic contribution value of each component in this band is calculated using a partial least squares regression algorithm, reflecting the correlation strength between the spectral signal in this band and the content of the k-th component. The maximum feature contribution value among all bands; S23. Obtain the preset band importance threshold. Important indexes of the wave band Comparative analysis, when When the bands in the spectral image are highly important, the bands are divided into important bands, and the compression ratio of the band data is reduced. If the band is low in importance, it indicates that the band is classified as a secondary band, and the compression ratio of the band data is increased.
5. The low-cost, high-resolution spectral detection method based on compressed sensing algorithm according to claim 1, characterized in that, The process of constructing the spectral analysis model is as follows: S31. Collect spectral data of standard samples of the same target substance from multiple groups, and simultaneously record the types of components and the true values of component content measured in the laboratory as a dataset. Randomly divide the dataset into training set and test set. S32. Construct a spectral analysis model based on a convolutional neural network, train the spectral analysis model using a training set, and test the spectral analysis model using a test set to obtain a qualified spectral analysis model. S33. Input the reconstructed spectral data into the constructed, qualified spectral analysis model for calculation and analysis to determine the component information contained in the target substance and the corresponding content information of the component information.
6. The low-cost, high-resolution spectral detection method based on compressed sensing algorithm according to claim 1, characterized in that, The compressed sensing algorithm reconstructs the spectrum as follows: an overcomplete dictionary is constructed based on the sparsity characteristics of the spectral signal, dimensionality reduction sampling is achieved through a random Gaussian measurement matrix, and an iterative threshold algorithm is used to solve for the sparse coefficients to recover high-resolution spectral data.