Three-dimensional reconstruction method of field integral snapshot imaging spectrometer
By leveraging GPU parallel computing and CUDA platform-based spectral reconstruction algorithms, the problems of slow speed and low accuracy in traditional 3D spectral reconstruction have been solved, achieving fast and accurate spectral reconstruction and improving data processing efficiency and product reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUZHOU UNIV
- Filing Date
- 2023-09-13
- Publication Date
- 2026-07-21
AI Technical Summary
Traditional three-dimensional spectral reconstruction methods are slow and inaccurate, failing to meet the demands of real-time and efficient applications.
A three-dimensional reconstruction method for a field integral snapshot imaging spectrometer based on GPU parallel computing is adopted. By optimizing memory allocation through parallel computing of the image processor and combining the CUDA parallel computing architecture, the spectral reconstruction algorithm is parallelized, including denoising, background correction and non-uniformity correction. Parallel computing and interpolation are performed using the CUDA platform to generate three-dimensional spectral data.
It achieves faster, more efficient, and more accurate spectral reconstruction, significantly shortens processing time, improves data processing efficiency, enhances product quality and reliability, and reduces production or R&D costs.
Smart Images

Figure CN117173339B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of field integral snapshot imaging spectrometer technology, and specifically to a three-dimensional reconstruction method for a field integral snapshot imaging spectrometer. Background Technology
[0002] Spectral imaging technology is a multi-dimensional information acquisition technique that integrates optical imaging and spectral analysis. It can simultaneously acquire both two-dimensional spatial information and one-dimensional spectral information of the target object. Based on this, researchers can measure and analyze the chemical structure, state information, and content of the substances composing the target object according to its spectral characteristics. Therefore, this technology has broad application prospects in fields such as production, daily life, scientific research, and military reconnaissance.
[0003] A field integral snapshot imaging spectrometer is an optical instrument used to acquire spectral information. It can acquire spectral information of multiple wavelengths simultaneously, that is, acquire the spectral information of the entire scene within a single shutter speed. Spectral reconstruction is the process of recovering the three-dimensional spectral information of an object based on the input of the spectrometer through calibration and data processing. Spectral reconstruction can help obtain the spectral characteristics of substances, calibrate and optimize optical systems, and recover lost spectral information, and is of great significance in scientific research, industrial applications, and environmental monitoring.
[0004] However, traditional 3D reconstruction methods suffer from slow processing speed and low accuracy, failing to meet the demands of real-time and efficient applications. Summary of the Invention
[0005] In view of the shortcomings of the prior art described above, the present invention provides a three-dimensional reconstruction method for a field integral snapshot imaging spectrometer, which achieves faster, more efficient and accurate spectral reconstruction.
[0006] To achieve the above effects, the technical solution of the present invention is as follows:
[0007] This invention provides a three-dimensional reconstruction method for a field integral snapshot imaging spectrometer, comprising the following steps:
[0008] Step 1: Use a field integral snapshot imaging spectrometer to acquire optical measurement data of the scene; the optical measurement data includes image data of multiple wavelength channels, each wavelength channel corresponding to an optical filter;
[0009] Step 2: Preprocess the image data;
[0010] Step 3: Obtain the dispersion map output by the in-field integral snapshot imaging spectrometer for the target object, and perform spectral data recovery on the dispersion map;
[0011] Step 4: Perform spectral reconstruction on the image data and dispersion map on the GPU memory to generate three-dimensional spectral data; interpolate the three-dimensional spectral data to achieve three-dimensional reconstruction.
[0012] This invention presents a 3D reconstruction method for field integral snapshot imaging spectrometers based on image processor (GPU) parallel computing. By analyzing the working principle and data characteristics of snapshot imaging spectrometers and combining the CUDA parallel computing architecture, the parallelizable parts of the spectral reconstruction algorithm are maximized, and optimizations are made to memory allocation and other aspects in parallel computing, ultimately achieving real-time spectral 3D reconstruction. This improves the performance and efficiency of hyperspectral data recovery.
[0013] Furthermore, the preprocessing includes denoising, background correction, and non-uniformity correction of the image data.
[0014] Furthermore, the image data is denoised, specifically as follows:
[0015] The image data is denoised using a denoising kernel function to obtain the denoised image data.
[0016] Furthermore, step 4, which involves reconstructing the dispersion map on GPU memory to generate three-dimensional spectral data, specifically involves:
[0017] The computational task of reconstructing the spectral structure of the dispersion map is assigned to the GPU programming framework for parallel computation;
[0018] Obtain the correspondence between the wavelength of the dispersion map and the gray values of the dispersion bands;
[0019] Load image data into GPU memory;
[0020] Parallel computation is performed on the image data, and spectral reconstruction is performed on the GPU memory to generate three-dimensional spectral data; the three-dimensional spectral data represents the spectral distribution of each pixel in the scene.
[0021] Furthermore, the GPU programming framework is the CUDA platform.
[0022] Furthermore, step 4, which involves interpolating the three-dimensional spectral data to achieve three-dimensional reconstruction, specifically includes:
[0023] A monochromatic laser is used to determine the pixel position corresponding to a preset wavelength of image data, and the wavelength corresponding to each pixel in a single image of the image data is obtained based on the pixel position.
[0024] Calculate the wavelength difference corresponding to the dispersive stripes, and construct a reference wavelength array with preset wavelengths based on the wavelength difference;
[0025] Obtain the dispersion map output by the in-field integral snapshot imaging spectrometer of the target object, and obtain the number of dispersion bands in the dispersion map;
[0026] Traverse the dispersion map and read the number of dispersion bands in each dispersion map; calculate the gray value and corresponding wavelength of each dispersion band in the dispersion map based on the number of dispersion bands; obtain the actual wavelength corresponding to each pixel in a single image based on the pixel position; perform one-dimensional linear interpolation between the gray value of the dispersion band and the actual wavelength to obtain the interpolation result.
[0027] The interpolation results are corrected using a reference wavelength array to obtain the number of channels for each wavelength and the grayscale value corresponding to each channel, thereby achieving three-dimensional reconstruction.
[0028] Furthermore, the calculation of the grayscale value and corresponding wavelength of each dispersion band in the dispersion map based on the number of dispersion bands is specifically as follows:
[0029] Register GPU data and transfer GPU data to GPU memory;
[0030] Read image data and transfer it to GPU memory;
[0031] The image data is interpolated using the kernel function preset by the CUDA platform. Based on the index of each image data thread, the wavelength and gray value corresponding to each dispersion strip pixel are obtained from the input dispersion map. The wavelength and gray value are interpolated to obtain the interpolation function. The gray value corresponding to each wavelength after correction by the interpolation result is calculated, and the interpolation result is obtained and stored.
[0032] Transfer the interpolation results from GPU memory to host memory;
[0033] Release the memory space allocated on GPU memory and unregister it from host memory.
[0034] Furthermore, the storage of the interpolation results specifically includes:
[0035] The default kernel functions defined in the CUDA platform are blockIdx.x and threadIdx.x, which are used to obtain the index ID of the current thread;
[0036] Start the CUDA kernel using the CUDA platform; the CUDA platform includes numBlocks and blockSize; numBlocks represents the number of thread blocks started, and blockSize represents the number of threads in each thread block. The enabled multi-threaded execution will execute the spectral reconstruction algorithm in parallel.
[0037] Thread parallel processing: In the kernel function preset by the CUDA platform, the index tid of each thread is calculated; blockIdx.x represents the index of the current block, blockDim.x represents the number of threads in each block, and threadIdx.x represents the index of the current thread within the block; blockIdx.x, blockDim.x, and threadIdx.x are combined to obtain the global index of the current thread; the index tid is used to determine the data to be processed by the current thread;
[0038] Parallel data processing: Each thread processes different index data according to its own index tid; the index data includes multiple arrays consisting of the number of dispersion stripes, the wavelength corresponding to each pixel, the reference wavelength array, and the target dispersion image; each thread reads and processes the image data corresponding to its own index tid, obtains the calculation result, and stores the calculation result in the cube array.
[0039] Furthermore, the pixel position processed by each thread is calculated in the image data as shown in the following formula:
[0040] T=blcokDim.x*blockIdx.x+threadIdx.x
[0041] Where T is the intermediate term, blockDim.x is the dimension of the current thread block, blockIdx.x is the current thread block, and threadIdx.x is the index of the current thread.
[0042] Furthermore, step 4 includes the following:
[0043] Data post-processing and analysis: Perform spectral analysis, substance identification, and data visualization on the generated three-dimensional spectral data.
[0044] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:
[0045] Highly efficient and accurate spectral reconstruction: Utilizing the parallel computing capabilities of the GPU, image data and dispersion maps are reconstructed on GPU memory to generate three-dimensional spectral data; three-dimensional reconstruction is achieved through interpolation of the three-dimensional spectral data; a faster, more efficient, and more accurate spectral reconstruction process is realized; compared with traditional serial computing methods, processing time can be significantly shortened and data processing efficiency can be improved.
[0046] Improve product quality and reliability: For products or systems involving spectral analysis, provide more reliable spectral data to improve product quality and performance and meet higher accuracy requirements;
[0047] Improved production efficiency and cost savings: In applications involving large amounts of data processing, this parallelization method can accelerate the spectral reconstruction process, thereby improving production efficiency and reducing production or R&D costs. Attached Figure Description
[0048] Figure 1 This is a schematic diagram of the three-dimensional reconstruction method of the present invention;
[0049] Figure 2 This is a schematic diagram of the dispersive band recovery spectral data cube of the present invention. Detailed Implementation
[0050] The embodiments of the present invention will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.
[0051] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0052] Before introducing the embodiments of the present invention, the relevant terms involved in the embodiments of the present invention are first defined as follows:
[0053] CUDA (Compute Unified Device Architecture) is a computing platform launched by graphics card manufacturer NVIDIA. TM CUDA is a general-purpose parallel computing architecture introduced by NVIDIA that enables GPUs to solve complex computational problems. It includes the CUDA instruction set architecture (ISA) and the parallel computing engine within the GPU. Developers can use the C language to configure CUDA. TM The architecture is used to write programs that can support CUDA. TM It runs at ultra-high performance on processors. CUDA 3.0 has begun to support C++ and FORTRAN.
[0054] Kernel functions: Generally refers to kernel support functions. The kernel manages data I / O (input and output) requests from software, translating these requests into data processing instructions for processing by the central processing unit (CPU) and other electronic components in the computer. It is the most fundamental part of a modern operating system. Kernel support functions, also known as routines, are routines or subroutines that can only be called in kernel mode. Their primary purpose is to prevent user programs from corrupting kernel support functions.
[0055] Parallel computing, also known as parallel computation, is the opposite of serial computing. It is an algorithm that executes multiple instructions at once, aiming to improve computation speed and solve large and complex computational problems by scaling the problem-solving scope. Parallel computing can be divided into temporal parallelism and spatial parallelism. Temporal parallelism refers to pipelining techniques, while spatial parallelism refers to using multiple processors to execute computations concurrently.
[0056] 3D reconstruction refers to establishing a mathematical model of a 3D object that is suitable for computer representation and processing. It is the basis for processing, manipulating and analyzing the properties of the object in a computer environment, and it is also a key technology for establishing virtual reality that expresses the objective world in a computer.
[0057] Example
[0058] Compared to CPUs, GPUs have stronger parallel processing capabilities and are commonly used for tasks such as graphics rendering, high-performance computing, simulation, and artificial intelligence model training and inference. With the increasing number of commercial GPU computing units, it is difficult for a single computing task to fully utilize all the computing units in the GPU. To improve the utilization of GPU computing units, allowing multiple tasks to share the GPU simultaneously is the most common practice.
[0059] This embodiment proposes a three-dimensional reconstruction method for a field-integral snapshot imaging spectrometer. Please refer to [link to relevant documentation]. Figure 1 and Figure 2 This includes the following steps:
[0060] Step 1: Data Acquisition: Execute the CUDA program on a computer with the CUDA platform installed, and use a field integral snapshot imaging spectrometer to acquire optical measurement data of the scene; the optical measurement data includes image data of multiple wavelength channels, each wavelength channel corresponding to an optical filter;
[0061] Specifically, a field integral snapshot imaging spectrometer is used to acquire optical measurement data of the scene through a pinhole array (115*70, a total of 8050 pinholes); the optical measurement data should include image data of multiple wavelength channels (400nm~900nm), each wavelength channel corresponds to an optical filter, and this invention has a total of 231 wavelength channels, resulting in 8050 dispersive stripes on each image;
[0062] Step 2: Data preprocessing: Preprocess the image data;
[0063] Specifically, since the wavelength emitted by the laser is not stable each time, for example, if the emission wavelength is set to 401nm, the actual wavelength may be 401.13nm. In order to unify the wavelengths on the 231 channels, the wavelength difference between the channels is calculated based on the first dispersion strip, and a new wavelength array is constructed for subsequent correction.
[0064] Step 3: Obtain the dispersion map output by the in-field integral snapshot imaging spectrometer for the target object, and perform spectral data recovery on the dispersion map;
[0065] Specifically, spectral data recovery is performed on the dispersion map. The size of the recovered data cube is 115*70*231 (*grayscale). The value of each block is the grayscale value of the corresponding channel, where x = 115, y = 70, and λ = 231.
[0066] Step 4: Spectral reconstruction algorithm design: Perform spectral reconstruction on GPU memory to generate three-dimensional spectral data from image data and dispersion map; interpolate the three-dimensional spectral data to achieve three-dimensional reconstruction.
[0067] The steps of this invention are implemented through a software program, including modules for data acquisition, data preprocessing, spectral reconstruction algorithm design, parallel computing, reconstruction result generation, data post-processing, and analysis. This software program can be integrated into existing field integral snapshot imaging spectrometer systems or used independently of the spectrometer equipment.
[0068] As a preferred technical solution, in this embodiment, the preprocessing includes denoising, background correction, and non-uniformity correction of the image data; the preprocessing is used to improve the accuracy of spectral reconstruction.
[0069] As a preferred technical solution, in this embodiment, a denoising kernel function is used to denoise the image data to obtain denoised image data.
[0070] As a preferred technical solution, in this embodiment, step 4, which involves reconstructing the dispersion map on GPU memory to generate three-dimensional spectral data, specifically includes:
[0071] Parallel computing environment setup: Assign the computational task of reconstructing the dispersion map spectrum to the GPU programming framework for parallel computing, and use the GPU programming framework (such as CUDA) to improve the parallel computing capabilities of the GPU.
[0072] Obtain the correspondence between the wavelength of the dispersion map and the gray values of the dispersion bands in order to recover the spectral information of each pixel;
[0073] The spectral reconstruction is implemented as a parallel computation using a GPU programming framework; optical measurement data and image data are loaded into GPU memory;
[0074] Spectral reconstruction result generation: Parallel computation is performed on the image data, and spectral reconstruction is performed on the GPU memory to generate three-dimensional spectral data; the three-dimensional spectral data represents the spectral distribution of each pixel in the scene.
[0075] As a preferred technical solution, in this embodiment, the GPU programming framework is the CUDA platform.
[0076] The CUDA platform is a CUDA parallel computing model.
[0077] As a preferred technical solution, in this embodiment, step 4, which involves interpolating the three-dimensional spectral data to achieve three-dimensional reconstruction, specifically includes:
[0078] A monochromatic laser is used to determine the pixel position corresponding to a preset wavelength of image data, and the wavelength corresponding to each pixel in a single image of the image data is obtained based on the pixel position.
[0079] Calculate the wavelength difference corresponding to the dispersive stripes, and construct a reference wavelength array with preset wavelengths based on the wavelength difference;
[0080] Obtain the dispersion map output by the in-field integral snapshot imaging spectrometer of the target object, and obtain the number of dispersion bands in the dispersion map;
[0081] Traverse the dispersion map and read the number of dispersion bands in each dispersion map; calculate the gray value and corresponding wavelength of each dispersion band in the dispersion map based on the number of dispersion bands; obtain the actual wavelength corresponding to each pixel in a single image based on the pixel position; perform one-dimensional linear interpolation between the gray value of the dispersion band and the actual wavelength to obtain the interpolation result.
[0082] The interpolation results are corrected using a reference wavelength array to obtain the actual grayscale range, the number of wavelength channels and the grayscale value corresponding to each channel are obtained, and three-dimensional reconstruction is achieved.
[0083] Specifically, assuming the actual captured wavelength is between 400nm and 900nm with 231 channels, the grayscale values corresponding to the 231 channels between 400nm and 900nm are calculated by one-dimensional linear interpolation, resulting in 8050 sets of dispersive bands with 231 wavelengths and corresponding grayscale values, i.e., 115*70*231 (*grayscale), thus achieving three-dimensional reconstruction.
[0084] In step 4, the target chromatic dispersion map is traversed and interpolated using Python and a C++ dynamic link library (DLL). The efficiency of C++ is used for image processing. Python is used for data processing and calling the interface functions of the C++ DLL, while the C++ DLL performs image traversal, grayscale calculation and correction to improve running efficiency.
[0085] As a preferred technical solution, in this embodiment, the calculation of the gray value and corresponding wavelength of each dispersion band in the dispersion map based on the number of dispersion bands is specifically as follows:
[0086] Register GPU data and transfer GPU data to GPU memory;
[0087] Read image data and transfer it to GPU memory;
[0088] The image data is interpolated using the kernel function preset by the CUDA platform. Based on the index of each image data thread, the wavelength and gray value corresponding to each dispersion strip pixel are obtained from the input dispersion map. The wavelength and gray value are interpolated to obtain the interpolation function. The gray value corresponding to each wavelength after correction by the interpolation result is calculated, and the interpolation result is obtained and stored.
[0089] Transfer the interpolation results from GPU memory to host memory;
[0090] Release the memory space allocated on GPU memory and unregister it from host memory.
[0091] As a preferred technical solution, in this embodiment, the storage of interpolation results specifically refers to:
[0092] The CUDA platform defines the default kernel functions as blockIdx.x and threadIdx.x, which are used to obtain the index ID of the current thread, thereby enabling parallel computing;
[0093] Start the CUDA kernel using the CUDA platform; the CUDA platform includes numBlocks and blockSize; numBlocks represents the number of thread blocks started, and blockSize represents the number of threads in each thread block. The enabled multi-threaded execution will execute the spectral reconstruction algorithm in parallel.
[0094] Thread parallel processing: In the kernel function preset by the CUDA platform, the index tid (i.e., the globally unique index of the current thread) of each thread is calculated; blockIdx.x represents the index of the current block, blockDim.x represents the number of threads in each block, and threadIdx.x represents the index of the current thread within the block; blockIdx.x, blockDim.x, and threadIdx.x are combined to obtain the global index of the current thread; the index tid is used to determine the data to be processed by the current thread;
[0095] Parallel data processing: Each thread processes different index data according to its own index tid; the index data includes multiple arrays consisting of the number of dispersion stripes, the wavelength corresponding to each pixel, the reference wavelength array, and the target dispersion image; each thread reads and processes the image data corresponding to its own index tid, obtains the calculation result, and stores the calculation result in the cube array.
[0096] In this embodiment, the number of dispersion stripes is 8050, and the cube array is 115*70*231.
[0097] As a preferred technical solution, in this embodiment, the pixel position processed by each thread is calculated in the image data as shown in the following formula:
[0098] T=blcokDim.x*blockIdx.x+threadIdx.x
[0099] Where T is the intermediate term, blockDim.x is the dimension of the current thread block, blockIdx.x is the current thread block, and threadIdx.x is the index of the current thread.
[0100] As an embodiment of this application, blockDim.x, blockDim.x, and blockIdx.x are all obtained through CUDA library functions. Here, blockSize is set to 256, indicating that there are 256 threads in each CUDA block; numBlocks is calculated by dividing the total number of threads (8050) by the block size (256) and then rounding up, which determines the number of CUDA blocks that need to be started; the total number of threads is numBlocks * blockSize.
[0101] As a preferred technical solution, in this embodiment, step 4 is followed by:
[0102] Data post-processing and analysis: Spectral analysis, substance identification, and data visualization of the generated 3D spectral data; this helps to understand the spectral characteristics of the scene and conduct further data analysis.
[0103] It should be noted that the field integral snapshot imaging spectrometer acquires target spectral data through a single exposure, making it suitable for portable, unmanned vehicle, and drone platforms. Its schematic diagram is shown below. Figure 1 As shown, the target object is imaged onto a pinhole array via a front-facing lens. The pinhole array samples the image and transmits the light to a beam splitter. The beam splitter then images the light entering the pinholes, forming a spectral image of each pinhole after dispersion on a CMOS detector. The spectral dispersion lines of each pinhole precisely fill the gaps between the pinholes. After reconstruction using a hyperspectral reconstruction algorithm, the spectral data of the target is obtained. The geometric image resolution is the number of sampling points in the pinhole array, while the spectral resolution is determined by a combination of factors, including the pinhole size, optical system performance, and detector pixel size.
[0104] The key technical points of this invention include the following aspects:
[0105] 1. Parallel computing optimization: Implement efficient parallel computing strategies and algorithm design to ensure that the spectral reconstruction process on the GPU can fully utilize the GPU's parallel computing capabilities, thereby improving computing speed and efficiency and realizing real-time three-dimensional spectral reconstruction;
[0106] 2. Correspondence between wavelength and grayscale values of dispersive bands: This step requires determining the accurate correspondence between wavelength and grayscale values of dispersive bands; the accuracy of this process directly affects the precision and reliability of spectral reconstruction.
[0107] 3. Proper use of GPU programming frameworks: Choose a suitable GPU programming framework (such as CUDA) and make flexible use of its functions and features in order to give full play to the advantages of GPUs in parallel computing;
[0108] 4. Accuracy and stability of the spectral reconstruction algorithm: The designed spectral reconstruction algorithm needs to ensure that it can accurately recover the spectral information of each pixel under parallel computing on the GPU, and has a certain degree of stability and robustness;
[0109] Cost-effectiveness: The use of parallel spectral reconstruction methods may generate economic benefits for relevant industries or fields. By fully utilizing the parallel computing power of GPUs, accelerating the spectral reconstruction process may save computational costs and time, improve production efficiency, and reduce related R&D or production costs. For example, in agriculture, spectral analysis of a large number of crops can be performed more quickly, enabling more precise agricultural management and resource optimization.
[0110] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. A three-dimensional reconstruction method for a field integral snapshot imaging spectrometer, characterized in that, Includes the following steps: Step 1: Use a field integral snapshot imaging spectrometer to acquire optical measurement data of the scene; the optical measurement data includes image data of multiple wavelength channels, each wavelength channel corresponding to an optical filter; Step 2: Preprocess the image data; Step 3: Obtain the dispersion map output by the in-field integral snapshot imaging spectrometer for the target object, and perform spectral data recovery on the dispersion map; Step 4: Perform spectral reconstruction on the image data and dispersion map on the GPU memory to generate 3D spectral data; interpolate the 3D spectral data to achieve 3D reconstruction; The image data and dispersion map are spectrally reconstructed on GPU memory to generate three-dimensional spectral data, specifically as follows: The computational task of reconstructing the spectral structure of the dispersion map is assigned to the GPU programming framework for parallel computation; Obtain the correspondence between the wavelength of the dispersion map and the gray values of the dispersion bands; Load image data into GPU memory; Parallel computation is performed on the image data, and spectral reconstruction is performed on the GPU memory to generate three-dimensional spectral data; the three-dimensional spectral data represents the spectral distribution of each pixel in the scene; The method of interpolating three-dimensional spectral data to achieve three-dimensional reconstruction specifically involves: A monochromatic laser is used to determine the pixel position corresponding to a preset wavelength of image data, and the wavelength corresponding to each pixel in a single image of the image data is obtained based on the pixel position. Calculate the wavelength difference corresponding to the dispersive stripes, and construct a reference wavelength array with preset wavelengths based on the wavelength difference; Obtain the dispersion map output by the in-field integral snapshot imaging spectrometer of the target object, and obtain the number of dispersion bands in the dispersion map; Traverse the dispersion map and read the number of dispersion bars for each dispersion map; The gray value and corresponding wavelength of each dispersion band in the dispersion map are calculated based on the number of dispersion bands. The actual wavelength corresponding to each pixel in a single image is obtained based on the pixel position. The gray value of the dispersion band and the actual wavelength are interpolated in one dimension to obtain the interpolation result. The interpolation results are corrected using a reference wavelength array to obtain the number of channels for each wavelength and the grayscale value corresponding to each channel, thereby achieving three-dimensional reconstruction.
2. The three-dimensional reconstruction method for a field integration snapshot imaging spectrometer according to claim 1, characterized in that, The preprocessing includes denoising, background correction, and non-uniformity correction of the image data.
3. The three-dimensional reconstruction method for a field integral snapshot imaging spectrometer according to claim 2, characterized in that, Denoising the image data specifically involves: The image data is denoised using a denoising kernel function to obtain the denoised image data.
4. The three-dimensional reconstruction method for a field integral snapshot imaging spectrometer according to claim 1, characterized in that, The GPU programming framework is the CUDA platform.
5. The three-dimensional reconstruction method for a field integral snapshot imaging spectrometer according to claim 4, characterized in that, The calculation of the gray value and corresponding wavelength of each dispersion band in the dispersion map based on the number of dispersion bands is as follows: Register GPU data and transfer GPU data to GPU memory; Read image data and transfer it to GPU memory; The image data is interpolated using the kernel function preset by the CUDA platform. Based on the index of each image data thread, the wavelength and gray value corresponding to each dispersion strip pixel are obtained from the input dispersion map. The wavelength and gray value are interpolated to obtain the interpolation function. The gray value corresponding to each wavelength after correction by the interpolation result is calculated, and the interpolation result is obtained and stored. Transfer the interpolation results from GPU memory to host memory; Release the memory space allocated on GPU memory and unregister it from host memory.
6. The three-dimensional reconstruction method for a field integral snapshot imaging spectrometer according to claim 5, characterized in that, The stored interpolation results are specifically as follows: The default kernel functions defined in the CUDA platform are blockIdx.x and threadIdx.x, which are used to obtain the index ID of the current thread; Start the CUDA kernel of the CUDA platform; the CUDA platform includes numBlocks and blockSize; numBlocks represents the number of thread blocks started, and blockSize represents the number of threads in each thread block. The enabled multi-threaded execution will execute the spectral reconstruction algorithm in parallel. Thread parallel processing: Calculate the index tid of each thread in the kernel function preset by the CUDA platform; Let blockIdx.x represent the index of the current block, blockDim.x represent the number of threads in each block, and threadIdx.x represent the index of the current thread within the block; combine blockIdx.x, blockDim.x, and threadIdx.x to obtain the global index of the current thread; the index tid is used to determine the data to be processed by the current thread; Parallel data processing: Each thread processes different index data according to its own index tid; the index data includes multiple arrays consisting of the number of dispersion stripes, the wavelength corresponding to each pixel, the reference wavelength array, and the target dispersion image; each thread reads and processes the image data corresponding to its own index tid, obtains the calculation result, and stores the calculation result in the cube array.
7. The three-dimensional reconstruction method for a field integral snapshot imaging spectrometer according to claim 6, characterized in that, The pixel position processed by each thread is calculated in the image data as shown in the following formula: T=blcokDim .x*blockIdx .x+threadIdx .x Where T is the intermediate term, blockDim.x is the dimension of the current thread block, blockIdx.x is the current thread block, and threadIdx.x is the index of the current thread.
8. The three-dimensional reconstruction method for a field integral snapshot imaging spectrometer according to claim 1, characterized in that, Step 4 is followed by: Data post-processing and analysis: Perform spectral analysis, substance identification, and data visualization on the generated three-dimensional spectral data.