A spectral coding optimization method based on coding space minimum distance and an imaging system
By optimizing the structural parameters of the spectral encoder based on the design criterion of minimum distance in the coding space and the global-local joint optimization strategy, the reconstruction ambiguity and stability problems of the spectral encoder in the prior art are solved, and efficient and stable spectral imaging effect is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG NORMAL UNIV
- Filing Date
- 2026-03-31
- Publication Date
- 2026-06-30
Smart Images

Figure CN122306220A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of spectral imaging technology, and specifically relates to a spectral coding optimization method and imaging system based on minimum distance in the coding space. Background Technology
[0002] Computational spectral imaging technology, through a combination of spectral coding modulation and computational reconstruction, breaks the constraints between spectral resolution, luminous flux, and system size inherent in traditional dispersive spectral imaging systems, becoming a core technology direction for miniaturized and highly integrated spectral imaging. As the core hardware of a computational spectral imaging system, the structural characteristics of the encoding matrix of the spectral encoder directly determine the system's reconstruction accuracy, noise robustness, and anti-interference capability. Therefore, designing a spectral encoder that combines excellent computational performance with physical realizability is a key research problem in this field.
[0003] Existing design principles for spectral encoders primarily revolve around the statistical properties of the coding matrix, such as random coding methods based on maximizing the orthogonality of the coding spectra, decorrelation designs based on minimizing row correlation coefficients, and compressed sensing designs based on minimizing column coherence. However, these design principles only focus on the algebraic characteristics of the coding spectra themselves and do not directly characterize the geometric separation of different spectra in the detector coding space after being projected by the encoder. When the coding responses of different spectra are too closely distributed in the coding space, even small detection noise, system processing errors, or spectral perturbations can cause overlapping coding responses, leading to reconstruction ambiguity and decreased system stability, failing to meet the high robustness requirements of practical applications.
[0004] Meanwhile, existing structural optimization methods for spectral encoders mostly employ a single global random search or local deterministic optimization. Global random search is often computationally inefficient and struggles to find high-performance solutions; while local optimization methods heavily rely on the selection of initial parameters, making them prone to getting trapped in local optima. They cannot simultaneously balance the pursuit of optimal coding performance with the technological constraints of physical implementation in complex non-convex structural parameter spaces. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a spectral coding optimization method and imaging system based on minimum distance in the coding space.
[0006] A spectral coding optimization method based on minimum distance in the coding space, as described in this invention, includes:
[0007] Obtain the sparse spectral prior dictionary and the preset spectral set;
[0008] The spectral coding matrix is calculated based on the initial structural parameters, and the preset spectral set is projected onto the coding response space to obtain the coding response vector corresponding to each spectral sample.
[0009] Calculate the Euclidean distance between the corresponding encoded response vectors of any two different spectral samples in the encoded response space, and determine the minimum Euclidean distance;
[0010] With maximizing the minimum Euclidean distance as the optimization objective, the structural parameters are iteratively optimized using a global-local joint optimization strategy until the convergence condition is met.
[0011] The present invention provides a computational spectral imaging system comprising a light source, a target object, a spectral encoder, a focusing lens, a detector, and a sparse reconstruction module arranged sequentially along the optical path.
[0012] The spectral encoder is configured based on a multilayer dielectric film structure, and its film thickness parameter is determined by the following optimization: a coding response space is constructed through a physical optical model, and the optimization objective is to maximize the minimum Euclidean distance between the coding response vectors of any two spectral samples in the space. A joint optimization strategy combining global random search and gradient-based local optimization is used for iterative optimization, so that the encoder produces a coding response with high geometric separability after spectrally coding the incident light.
[0013] The detector is used to receive the coded signal converged by the focusing lens and convert it into an electrical signal;
[0014] The sparse reconstruction module is used to decode the acquired electrical signals based on a pre-trained spectral sparse prior dictionary and a sparse reconstruction algorithm to recover the spectral-spatial three-dimensional data cube of the target object.
[0015] The beneficial effects of this invention are:
[0016] (1) The proposed design criterion based on Euclidean distance in coding space, starting from the new dimension of geometric separability, directly improves the distinguishability of different spectral signals at the detector end, fundamentally enhancing the system's robustness to noise and disturbances. Compared with traditional design criteria based on correlation or mutual coherence, it can achieve better reconstruction performance.
[0017] (2) The proposed global-local joint optimization strategy effectively combines the advantages of global exploration and local fine search, and uses automatic differentiation technology to accelerate gradient calculation. It overcomes the disadvantages of single optimization methods that are prone to getting trapped in local optima and slow convergence, and can efficiently and stably converge to a high-performance solution in a non-convex parameter space.
[0018] (3) The encoder structure designed based on the method of the present invention can well balance the encoding performance and physical process constraints, has good resistance to processing errors, and the simulation and measurement results are highly consistent, verifying the feasibility of the whole process from theoretical design to physical manufacturing. Attached Figure Description
[0019] Figure 1 This is a flowchart of the optimization of the structural parameters of the spectral encoder according to an embodiment of the present invention;
[0020] Figure 2 This is a schematic diagram of the structure of a spectral encoder according to an embodiment of the present invention;
[0021] Figure 3 This is a schematic diagram of the structure of a computational spectral imaging system according to an embodiment of the present invention;
[0022] Figure 4 This is a comparison chart of the simulated and measured transmission spectra of a spectral encoder. Detailed Implementation
[0023] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0024] The core of this application lies in proposing a design criterion for a spectral encoder based on the minimum geometric distance in the coding response space. This criterion differs from traditional design methods based on correlation or coherence, directly constraining the separability of different spectra from the perspective of the coding space geometry. Simultaneously, this application proposes a global-local joint optimization strategy for efficiently solving the non-convex optimization problem corresponding to this design criterion. Based on this, this application also provides a computational spectral imaging system applying the above method and encoder. The core criterion for optimizing the structural parameters of the spectral encoder is to maximize the minimum Euclidean distance in the coding space, i.e., solving the following optimization problem:
[0025]
[0026] Where H is the spectral coding matrix, As a sparse spectral prior, , Let be the sparse coefficient vectors of the i-th and j-th spectra, respectively. It is a 2-norm.
[0027] like Figure 1 As shown in the figure, the spectral coding optimization method based on minimum distance in the coding space provided in this application includes the following steps:
[0028] 1) Input the pre-trained spectral sparse prior dictionary And construct a preset spectral set consisting of representative spectral samples covering the required bands;
[0029] 2) Input randomly generated encoder structure parameters, and calculate the spectral coding matrix H of the spectral encoder corresponding to the preset spectral set under these parameters using a physical optics model. Use H to project all spectral samples in the spectral sample set onto the coding response space to obtain the coding response vector corresponding to each sample.
[0030] The coding response space is calculated from the structural parameters of the spectral encoder through a physical optical model, establishing a direct mapping relationship between the structural parameters and the coding response space, thereby realizing a strong correlation between the coding method and the physical carrier.
[0031] Furthermore, the physical optics model is a forward physical model, used to establish a one-to-one mapping between the structural parameters and the spectral coding matrix.
[0032] 3) Calculate the Euclidean distance between the corresponding encoded response vectors of any two different spectral samples in the encoded response space, and find the minimum value, denoted as the minimum Euclidean distance. This will be used as an evaluation metric for the current parameter performance.
[0033] 4) Perform global-local joint optimization until... By maximizing the minimum distance, the distribution of different spectra in the encoding response space becomes more discrete, thereby improving the robustness of the spectral reconstruction system against noise and disturbances, and converging to the maximum value or satisfying the preset threshold.
[0034] a) Global Exploration Phase: Employing a global random search, The fitness function is used to search within the parameter space to obtain a set of initial parameters with better performance.
[0035] This stage aims to overcome the local optimum trap, conduct extensive exploration in the complex non-convex parameter space, initially locate the parameter region that can give the coding response space good overall geometric separation, and provide high-quality initial parameters for the next stage.
[0036] b) Local optimization stage: Using the optimal parameters obtained from global exploration as initial values, a gradient-based local optimization algorithm is used for fine-tuning. In this stage, automatic differentiation techniques are used to make the physical model differentiable, thereby accurately and efficiently calculating the objective function. The gradients of each structural parameter guide the optimization direction to converge quickly;
[0037] 5) When The optimization terminates when the convergence reaches the maximum value or meets the preset threshold. The optimal structural parameters and the corresponding spectral coding matrix H are output to maximize the separability of different spectra in the coding response space.
[0038] The above method is applied to the design of a multilayer dielectric spectral encoder. The spectral encoder consists of a stack of multilayer dielectric films deposited on a substrate (such as quartz glass). In this embodiment, using the aforementioned design method, the structural parameter to be optimized is the thickness of each film layer. By optimizing these thickness parameters, the optical transmission characteristics of the multilayer stack can be altered, thereby enabling it to possess the required spectral modulation function. This encoder can modulate incident light, generating an encoded response with high geometric separability.
[0039] This embodiment specifically uses... Figure 2 Taking the 10-layer TiO2 / SiO2 alternating stacked structure shown as an example, the specific optimization process includes the following steps:
[0040] 1) Obtain the pre-trained spectral sparse prior dictionary The size is M×d, where M is the spectral dimension of the incident light and d is the number of atoms in the dictionary;
[0041] 2) Randomly initialize a set of thickness parameters for each layer of a multilayer film (the thickness of each layer ranges from 0 nm to 300 nm), and calculate the spectral coding matrix H corresponding to the encoder under this thickness parameter using the transfer matrix method. The matrix H has a size of L. M, where L is the number of encodings by the spectral encoder;
[0042] 3) Project the preset spectral sample set onto the coded response space through the coding matrix H, calculate the Euclidean distance between the coded response vectors corresponding to all different spectra, and determine the minimum value among them. ;
[0043] 4) Perform global-local joint optimization until... convergence:
[0044] a) Global Exploration Phase: A genetic algorithm is used to perform a global random search. The fitness function is used to search within the thickness parameter space to find the initial parameter set with better performance.
[0045] b) Local Optimization Stage: Using the optimal parameters determined by the genetic algorithm as initial values, local fine-tuning is performed using the L-BFGS quasi-Newton method. The transfer matrix model is constructed into a differentiable computational graph using automatic differentiation techniques for precise computation. The gradient of thickness for each film layer guides optimization;
[0046] 5) Output the optimal film thickness parameters and the corresponding H, and verify them. value.
[0047] Preferably, the spectral dimension size M=261, the number of dictionary atoms d=1000, and the number of encoding times of the spectral encoder L=16.
[0048] Preferably, after optimization of the thickness of each layer of the TiO2 / SiO2 10-layer film structure, the minimum Euclidean distance of its encoding space is achieved. Reaching 7.2×10 -3 This represents an improvement of approximately 148% compared to the results obtained using only the global exploration phase.
[0049] As a specific embodiment, the optimized thickness of each film layer (from substrate upwards, in nm) of the 16-channel TiO2 / SiO2 multilayer film spectral encoder is as follows:
[0050] Channel 1: 89, 148, 300, 110, 221, 104, 153, 254, 75, 0;
[0051] 2. Channel 2: 126, 201, 116, 202, 110, 237, 51, 83, 44, 171;
[0052] 3. Channel 3: 0, 83, 300, 204, 128, 224, 196, 216, 150, 0;
[0053] 4. Channel 4: 243, 242, 268, 84, 109, 96, 297, 92, 248, 0;
[0054] 5. Channel 5: 171, 169, 174, 127, 64, 289, 85, 220, 159, 0;
[0055] 6. Channel 6: 58, 215, 276, 206, 250, 129, 266, 125, 266, 0;
[0056] 7. Channel 7: 134, 108, 100, 101, 136, 103, 53, 276, 249, 0;
[0057] 8. Channel 8: 142, 221, 120, 100, 108, 183, 195, 181, 108, 245;
[0058] 9. Channel 9: 251, 162, 182, 163, 267, 300, 252, 163, 100, 64;
[0059] 10. Channel 10: 140, 223, 122, 212, 123, 105, 159, 226, 129, 0;
[0060] 11. Channel 11: 299, 300, 182, 166, 190, 168, 186, 300, 89, 218;
[0061] 12. Channel 12: 269, 157, 265, 163, 187, 165, 196, 164, 176, 62;
[0062] 13. Channel 13: 211, 155, 43, 79, 187, 225, 207, 98, 221, 151;
[0063] 14. Channel 14: 167, 153, 300, 169, 108, 300, 172, 279, 78, 54;
[0064] 15. Channel 15: 95, 178, 181, 180, 180, 183, 105, 178, 99, 255;
[0065] 16. Channel 16: 124, 221, 126, 237, 21, 46, 136, 219, 124, 75.
[0066] This application also provides a computational spectral imaging system suitable for the visible light-shortwave infrared band (400 nm-1700 nm), such as... Figure 3 As shown, the system includes a light source (1), a target object (2), a spectral encoder (3), a focusing lens (4), a CMOS detector (5), and a sparse reconstruction module (6). The system's workflow is as follows:
[0067] 1) The light emitted by light source 1 shines on target object 2, producing incident light carrying the spectral-spatial three-dimensional information of the target object;
[0068] 2) The incident light is modulated by the spectral encoder 3, which encodes the incident light into spectral codes numbered l (l=1,2,….,L);
[0069] 3) The encoded and modulated optical signal is focused by the focusing lens 4 onto the CMOS detector 5, where it is detected and converted into an electrical signal;
[0070] 4) The sparse reconstruction module 6 receives the encoded signal and, based on the Alternating Direction Multiplier Method (ADMM) optimization framework, uses a pre-trained spectral sparse prior dictionary to perform sparse reconstruction of the encoded signal, and finally outputs the reconstructed spectral-spatial three-dimensional data cube of the target object.
[0071] Since the spectral encoder designed using the optimization method of the embodiments of this application can generate a coding response with high geometric separability, it provides a more stable and interference-resistant input for subsequent reconstruction algorithms, significantly improving the reconstruction accuracy and robustness of the entire system.
[0072] In step 1), the discretized incident light can be represented as a vector f with a magnitude of Where H is the spatial height, W is the spatial width, and M is the dimension of the spectral dimension.
[0073] In step 2), the total number of spectral encoding operations performed by the spectral encoder is L, corresponding to the L spectral transmittances of the encoder. The matrix form of the spectral encoding is H, with a size of L. M.
[0074] In step 3), the signal detected by the CMOS detector can be written in vector form g, with a magnitude of L. .
[0075] In step 4), the sparse prior dictionary used by the coefficient reconstruction module is: Size M d.
[0076] Preferably, the space has a height H=512 and a width W=640.
[0077] Preferably, the three-dimensional data cube of the target object has a size of 512. 640 261.
[0078] Furthermore, to verify the effectiveness of the embodiments of this application, a computational spectral imaging system was constructed according to the above embodiments, and a 16-channel TiO2 / SiO210 layer spectral encoder optimized by the method was prepared.
[0079] By comparing the simulated and measured transmission spectra of all 16 channels (e.g. Figure 4 As shown in the figure, the optimized design has good manufacturability and process feasibility, and the simulation and experimental results are in high agreement.
[0080] Spectral imaging performance tests conducted under the same test conditions show that the system using the Euclidean distance criterion optimized by the encoder in the embodiments of this application improves the peak signal-to-noise ratio of the reconstructed image by 3.60 dB, 4.52 dB and 2.82 dB respectively compared to the baseline schemes of random coding, correlation-optimized coding and coherence-optimized coding. This result consistently demonstrates that the design criterion based on the geometric separability of the coding response space can effectively improve the overall performance of the computational spectral imaging system.
[0081] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A spectral coding optimization method based on minimum distance of coding space, characterized in that, include: Obtain the sparse spectral prior dictionary and the preset spectral set; The spectral coding matrix is calculated based on the initial structural parameters, and the preset spectral set is projected onto the coding response space to obtain the coding response vector corresponding to each spectral sample. Calculate the Euclidean distance between the corresponding encoded response vectors of any two different spectral samples in the encoded response space, and determine the minimum Euclidean distance; With maximizing the minimum Euclidean distance as the optimization objective, the structural parameters are iteratively optimized using a global-local joint optimization strategy until the convergence condition is met.
2. The method of claim 1, wherein, The global-local joint optimization strategy includes: In the global exploration phase, by conducting a global random search of structural parameters, the parameter regions that enable the overall geometric separation of the encoded response space are initially located, and the initial parameters are obtained. In the local optimization phase, starting from the initial parameters, a gradient-based local optimization method is used for fine-tuning until convergence.
3. The method of claim 2, wherein, The global exploration phase employs a genetic algorithm for global random search, with the minimum Euclidean distance as the fitness function.
4. The method of claim 2, wherein, The local optimization stage employs the L-BFGS quasi-Newton method and utilizes automatic differentiation technology to calculate the gradient of the minimum Euclidean distance with respect to each structural parameter.
5. The method according to any one of claims 1 to 4, characterized in that, The minimum Euclidean distance is calculated using the following formula: where H is a spectral encoding matrix, is a spectral sparsity prior, , are the sparse coefficient vectors of the i-th and j-th spectrum, respectively, is the two-norm.
6. The method of claim 1, wherein, The structural parameters are the thicknesses of each layer in the multilayer dielectric film spectral encoder, which is composed of a stack of multilayer dielectric films deposited on a substrate.
7. The method according to claim 1, characterized in that, The preset spectral set covers representative spectral samples within the target band, and is constructed using the sparse spectral prior dictionary to ensure the completeness of the samples in the sparse representation space.
8. A computational spectral imaging system, comprising a light source, a target object, a spectral encoder, a focusing lens, a detector, and a sparse reconstruction module arranged sequentially along an optical path, characterized in that: The spectral encoder is configured based on a multilayer dielectric film structure, and its film thickness parameter is determined by the following optimization: a coding response space is constructed through a physical optical model, and the optimization objective is to maximize the minimum Euclidean distance between the coding response vectors of any two spectral samples in the space. A joint optimization strategy combining global random search and gradient-based local optimization is used for iterative optimization, so that the encoder produces a coding response with high geometric separability after spectrally coding the incident light. The detector is used to receive the coded signal converged by the focusing lens and convert it into an electrical signal; The sparse reconstruction module is used to decode the acquired electrical signals based on a pre-trained spectral sparse prior dictionary and a sparse reconstruction algorithm to recover the spectral-spatial three-dimensional data cube of the target object.
9. The computational spectral imaging system according to claim 8, characterized in that, The spectral encoder is composed of a multilayer dielectric film stack deposited on a substrate. The multilayer dielectric film is a TiO2 / SiO2 alternating stacked structure with 10 layers.
10. The computational spectral imaging system according to claim 8 or 9, characterized in that, The light emitted by the light source illuminates the target object, generating incident light carrying spatial-spectral three-dimensional information. After being spectrally encoded and modulated L times by the spectral encoder, the light is focused by the focusing lens onto the detector. The detector obtains L frames of encoded images, which are transmitted to the sparse reconstruction module, and finally outputs the reconstructed spectral-spatial three-dimensional data cube.