A snapshot spectral imaging system reconstruction method based on prior image guidance
By adopting a priori image guidance method in hyperspectral compressed sensing imaging and designing a regularization term and multiplier alternating direction algorithm based on semantic similarity, the problems of slow reconstruction speed and poor imaging quality in the existing technology are solved. Efficient reconstruction and high-quality imaging of the snapshot spectral imaging system are achieved.
Patent Information
- Application Number
- CN202211398389.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-09
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2042-11-09
AI Technical Summary
Existing hyperspectral compressed sensing imaging methods have slow reconstruction speed and poor imaging quality, which limits the application and development of snapshot spectral imaging.
A snapshot spectral imaging system reconstruction method based on prior image guidance is used to modulate the three-dimensional hyperspectral image into a two-dimensional compressed measurement value through a hardware encoder and a dispersion prism, and a regularization term based on the semantic similarity of the prior image is designed. Reconstruction is performed using a multiplier alternating direction algorithm to improve the fidelity of the reconstructed spectral image.
It achieves fast reconstruction speed and high data fidelity, improves the similarity between the spatial structure information of the spectral image and the prior image, and significantly improves the imaging quality.
Smart Images

Figure CN115561182B
Abstract
Description
Technical Field
[0001] The invention belongs to the field of hyperspectral computational imaging, and in particular relates to a snapshot spectral imaging system reconstruction method based on prior image guidance. Background Art
[0002] Compared with RGB images, hyperspectral images contain rich spatial and spectral information and have been applied to many fields such as environmental monitoring, geological exploration, aerospace, and medical testing. Hyperspectral imaging technology can perform continuous spectral sampling of target scenes, mainly including point scanning, line scanning, and spectral scanning. Due to the difficulties of point scanning, line scanning, and filter-type spectral imaging such as high requirements for mechanical hardware and slow imaging speed, snapshot-based hyperspectral imaging technology has attracted widespread interest from academia and industry. Coded aperture snapshot imaging technology based on compressed sensing is a representative work in hyperspectral computational imaging. Snapshot spectral imaging technology does not require scanning and can complete hyperspectral imaging in one shot. It converts the three-dimensional cube of the captured hyperspectral data into a two-dimensional compressed measurement value, which has the advantages of fast imaging speed and convenient data transmission.
[0003] Snapshot spectral imaging mainly consists of two parts: hardware encoder and software decoder. The hardware encoder modulates the spectral scene into a two-dimensional compressed measurement value through the synergy of the physical coding mask and the prism. The software decoder reconstructs a three-dimensional hyperspectral image based on the two-dimensional compressed measurement value through a reconstruction algorithm. How to reconstruct a high-quality three-dimensional hyperspectral image from the two-dimensional compressed measurement value is an important problem that needs to be solved. At present, many reconstruction algorithms have been developed for snapshot spectral imaging. The key point of the reconstruction algorithm is to select a suitable regularization term for the hyperspectral image data captured by the hyperspectral camera, and then solve the constrained convex optimization problem. The regularization terms commonly used at present include total variation, Gaussian mixture model, low rank, deep image prior, deep network constraint (Plug-and-play), etc. Xin Yuan et al. from Bell Labs in the United States introduced total variation (TV) regularization to constrain the local smoothness of hyperspectral data, and then used the generalized alternating projection (GAP) optimization algorithm. Liu Yang and others from Tsinghua University used the low rank of the patch group as a priori and then reconstructed it using the alternating direction method of multipliers (ADMM). At present, most hyperspectral compressed sensing imaging methods have two problems: slow reconstruction speed and poor imaging quality, which limits the application and development of snapshot spectral imaging. Professor Wang Lizhi from Beijing Institute of Technology proposed a dual-camera coded aperture snapshot imaging technology that can make full use of RGB reference images, thereby improving the quality of reconstructed hyperspectral images. Summary of the invention
[0004] Aiming at the problems of slow reconstruction speed and poor imaging quality in most current hyperspectral compressed sensing imaging methods, the present invention proposes a snapshot spectral imaging system reconstruction method based on prior image guidance based on dual-camera coded aperture snapshot imaging technology.
[0005] The snapshot spectral imaging system reconstruction method based on prior image guidance includes the following:
[0006] S1, using a snapshot spectral imaging system to shoot the target scene to obtain a three-dimensional hyperspectral image and an RGB image;
[0007] S2, a hardware encoding model of a preset snapshot spectral imaging system, the hardware encoding model comprising a hardware encoder and a dispersion prism, the hardware encoder modulates a three-dimensional hyperspectral image into a two-dimensional compressed measurement value through the synergistic effect of a physical encoding mask and the dispersion prism;
[0008] S3, design a regularization term based on the semantic similarity of the prior images, and create a reconstruction model of the three-dimensional hyperspectral image according to the regularization term and the two-dimensional compression measurement value;
[0009] S4. Solve the reconstruction model of the three-dimensional hyperspectral image through the multiplier alternating direction algorithm to obtain a reconstructed three-dimensional hyperspectral image.
[0010] Preferably, S2 is specifically:
[0011] S21, modulating the three-dimensional hyperspectral image by a fixed coding aperture to obtain a spatially coded data cube;
[0012] S22, spectrally encoding the spatially encoded data cube through a dispersion prism to obtain a spectrally encoded cube;
[0013] S23. Compress the spectral coding cube to obtain a two-dimensional compressed measurement value.
[0014] Preferably, S3 is specifically:
[0015] S31, using the RGB image as a priori image;
[0016] S32, calculating the difference of the total variation of the three-dimensional hyperspectral image and the RGB image based on the L1 norm, and taking the optimization upper limit of the difference of the total variation to obtain a regularization term based on the prior image semantic similarity;
[0017] S33. A reconstruction model of a three-dimensional hyperspectral image is obtained through two-dimensional compression measurement values and a regularization term based on prior image semantic similarity.
[0018] Preferably, S4 is specifically:
[0019] S41, introducing auxiliary variables, transforming the reconstruction model of the three-dimensional hyperspectral image, and obtaining a transformed reconstruction model of the three-dimensional hyperspectral image;
[0020] S42, constructing a reconstruction model of the transformed three-dimensional hyperspectral image as an augmented Lagrangian function, and using a multiplication alternating direction algorithm to obtain an expression of a solution of the reconstruction model of the transformed three-dimensional hyperspectral image;
[0021] S43, preset the number of iterations, calculate the solutions of the reconstruction model of all transformed three-dimensional hyperspectral images within the number of iterations, select the solution with the largest image quality index value and output it as the reconstructed three-dimensional hyperspectral image.
[0022] Preferably, the spatially encoded data cube obtained in S21 is specifically:
[0023] X′=C⊙X
[0024] Where X' represents the spatially encoded data cube, X represents the three-dimensional hyperspectral image, Where H, W represent the height and width of the three-dimensional hyperspectral image, B represents the spectral channel, and C represents the physical mask. ⊙ represents the product.
[0025] Preferably, the spectral coding cube is obtained in S22, specifically:
[0026] X″(r,c+d i , i) = X′(r, c, i)
[0027] In the formula, represents the spectral encoding cube, represents the data cube of spatial encoding, (r, c) represents the coordinates on the two-dimensional image plane, d i is the spatial offset distance of the i-th spectral channel, X'(r, c, i) represents the point with coordinates (r, c) on the i-th spectral channel in the spatially encoded data cube, and X″(r, c+d i , i) indicates that the coordinates of the ith spectral channel in the spectral coding cube are (r, c+d i ) point, i∈(1,B).
[0028] Preferably, the two-dimensional compression measurement value in S23 is specifically:
[0029]
[0030] In the formula, represents the two-dimensional compressed measurement value, X″(:,:,i) represents the corresponding two-dimensional image on the i-th spectral channel in the spectral coding cube, Represents the noise in the compression process.
[0031] Preferably, the hardware coding model of the snapshot spectral imaging system is preset in S2, specifically:
[0032] y=Ax+z
[0033] Where y is the vectorized form of the two-dimensional compressed measurement value Y of the snapshot spectral imaging system, M=H(W+B-1), z is the vectorized form of the noise Z in the compression process, x is the vectorized form of the three-dimensional hyperspectral image X, N = HWB, A is the measurement matrix of the snapshot spectral imaging system,
[0034] Preferably, the reconstruction model of the three-dimensional hyperspectral image in S3 is specifically:
[0035]
[0036] In the formula, represents the reconstructed three-dimensional hyperspectral image, ||TV(xy PI )|| represents the regularization term based on the semantic similarity of the prior image, x is the vectorized representation of the three-dimensional hyperspectral image X, y is the vectorized form of the two-dimensional compressed measurement value Y of the snapshot spectral imaging system, A is the measurement matrix of the snapshot spectral imaging system, y PI is the two-dimensional compression measurement value Y PI is a vectorized representation of , where λ is the balancing factor.
[0037] Preferably, in S42, the reconstruction model of the converted three-dimensional hyperspectral image is constructed as an augmented Lagrangian function, specifically:
[0038]
[0039] Where x is the vectorized representation of the three-dimensional hyperspectral image X, y is the vectorized form of the two-dimensional compressed measurement value Y of the snapshot spectral imaging system, A is the measurement matrix of the snapshot spectral imaging system, and y PI is the two-dimensional compression measurement value Y PI is a vector representation of λ, where λ is the balance factor and ||TV(zy PI )|| is the regularization term based on the prior image semantic similarity after constructing the augmented Lagrangian function. is an auxiliary variable, z = x, represents the Lagrange multiplier, i.e. the dual variable, is the penalty parameter.
[0040] The above-mentioned snapshot spectral imaging system reconstruction method based on prior image guidance first uses a snapshot spectral imaging system to shoot the target scene to obtain a three-dimensional hyperspectral image and an RGB image; then the hardware encoding model of the snapshot spectral imaging system is preset, including a hardware encoder and a dispersion prism, and the hardware encoder modulates the three-dimensional hyperspectral image into a two-dimensional compressed measurement value through the synergistic effect of the physical coding mask and the dispersion prism; then a regularization term based on the semantic similarity of the prior image is designed, and a reconstruction model of the three-dimensional hyperspectral image is created according to the regularization term and the two-dimensional compressed measurement value; finally, the reconstruction model of the three-dimensional hyperspectral image is solved by the multiplier alternating direction algorithm to obtain a reconstructed three-dimensional hyperspectral image. This method enhances the fidelity of the reconstructed spectral image by designing the semantic similarity of the prior image as a regularization term, so that the spatial structure information of the spectral image is as similar as possible to the prior image, and the optimization upper limit of the regularization term is derived and the reconstruction model of the three-dimensional hyperspectral image is established, and the model is solved by the multiplier alternating direction algorithm to obtain a reconstructed three-dimensional hyperspectral image. This method has a fast reconstruction speed and shows excellent performance in terms of data fidelity. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 is a flow chart of a snapshot spectral imaging system reconstruction method based on prior image guidance in one embodiment of the present invention;
[0042] Figure 2 is a schematic structural diagram of a snapshot spectral imaging system based on prior image guidance in one embodiment of the present invention;
[0043] Figure 3 It is a test set of a snapshot spectral imaging system reconstruction method based on prior image guidance in one embodiment of the present invention. DETAILED DESCRIPTION
[0044] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings.
[0045] In one embodiment, a snapshot spectral imaging system reconstruction method based on prior image guidance specifically includes the following steps:
[0046] S1, using a snapshot spectral imaging system to shoot the target scene to obtain a three-dimensional hyperspectral image and an RGB image;
[0047] S2, a hardware encoding model of a preset snapshot spectral imaging system, the hardware encoding model comprising a hardware encoder and a dispersion prism, the hardware encoder modulates a three-dimensional hyperspectral image into a two-dimensional compressed measurement value through the synergistic effect of a physical encoding mask and the dispersion prism;
[0048] S3, design a regularization term based on the semantic similarity of the prior images, and create a reconstruction model of the three-dimensional hyperspectral image according to the regularization term and the two-dimensional compression measurement value;
[0049] S4. Solve the reconstruction model of the three-dimensional hyperspectral image through the multiplier alternating direction algorithm to obtain a reconstructed three-dimensional hyperspectral image.
[0050] Specifically, see Figure 1 , Figure 1 The flowchart is a snapshot spectral imaging system reconstruction method based on prior image guidance in one embodiment of the present invention.
[0051] A snapshot spectral imaging system reconstruction method based on prior image guidance is firstly adopted to shoot the target scene with a snapshot spectral imaging system, which includes a beam splitter, a hyperspectral camera, a grayscale camera or an RGB camera. The beam splitter divides the incident light equally into two directions, one of which is captured by the hyperspectral camera to obtain a three-dimensional hyperspectral image, i.e., a three-dimensional hyperspectral data cube, and the other direction is captured by the grayscale camera or the RGB camera to obtain a grayscale image or an RGB image; then a hardware encoding model of the snapshot spectral imaging system is preset, and the hardware encoding model includes a hardware encoder and a dispersion prism. The hardware encoder modulates the three-dimensional hyperspectral image into a two-dimensional compressed measurement value, i.e., a two-dimensional compressed image, through the synergistic effect of a physical coding mask and a dispersion prism; then a regularization term based on the semantic similarity of the prior image is designed, and a reconstruction model of the three-dimensional hyperspectral image is created according to the designed regularization term and the two-dimensional compressed measurement value; finally, the reconstruction model of the three-dimensional hyperspectral image is solved by a multiplier alternating direction algorithm to obtain a reconstructed three-dimensional hyperspectral image.
[0052] In one embodiment, S2 is specifically:
[0053] S21, modulating the three-dimensional hyperspectral image by a fixed coding aperture to obtain a spatially coded data cube;
[0054] S22, spectrally encoding the spatially encoded data cube through a dispersion prism to obtain a spectrally encoded cube;
[0055] S23. Compress the spectral coding cube to obtain a two-dimensional compressed measurement value.
[0056] Specifically, see Figure 2 , Figure 2 It is a schematic structural diagram of a snapshot spectral imaging system based on prior image guidance in one embodiment of the present invention.
[0057] The key point of spectral compression imaging is to encode three-dimensional hyperspectral images into two-dimensional compressed measurements. First, the three-dimensional hyperspectral image obtained by the hyperspectral camera, that is, the three-dimensional hyperspectral data cube, is modulated by a fixed coding aperture (such as a physical binary mask or a digital micromirror device) to obtain a spatially encoded data cube; then the spatially encoded data cube is spectrally encoded by a dispersion prism, specifically, the spatially encoded data cube corresponding to each wavelength is spatially moved in the y-axis direction by a dispersion prism for mathematical modulation to obtain a spectral encoding cube; finally, the spectral encoding cube is compressed to obtain a two-dimensional compressed measurement value.
[0058] In one embodiment, S3 is specifically:
[0059] S31, using the RGB image as a priori image;
[0060] S32, calculating the difference of the total variation of the three-dimensional hyperspectral image and the RGB image based on the L1 norm, and taking the optimization upper limit of the difference of the total variation to obtain a regularization term based on the prior image semantic similarity;
[0061] S33. A reconstruction model of a three-dimensional hyperspectral image is obtained through two-dimensional compression measurement values and a regularization term based on prior image semantic similarity.
[0062] Specifically, the beam splitter divides the incident light into two directions, the incident light in one direction is captured by a hyperspectral camera to obtain a three-dimensional hyperspectral image, and the incident light in the other direction is captured by a grayscale or RGB camera to obtain a grayscale image or an RGB image. In this application, an RGB image is used to illustrate the proposed method, and the grayscale image can be converted from the RGB image. A regularization term based on prior image semantic similarity (PIDS) is designed to enhance the fidelity of the reconstructed three-dimensional hyperspectral image, and the fidelity refers to the similarity between the reconstructed spectral image and the three-dimensional hyperspectral image captured by the hyperspectral camera. The total variation difference between the two inputs, the prior image (i.e., RGB image) and the three-dimensional hyperspectral image, based on the L1 norm is calculated respectively, and the upper limit of the total variation difference between the two inputs is obtained by using the fact that the total variation difference between the two inputs is less than or equal to the total variation of the difference between the two inputs, which is used as a regularization term based on the semantic similarity of the prior image. Through the two-dimensional compressed measurement value and the regularization term based on the semantic similarity of the prior image, as well as the measurement matrix of the snapshot spectral imaging system, the reconstruction model of the three-dimensional hyperspectral image of the snapshot spectral imaging system is obtained.
[0063] In one embodiment, S4 is specifically:
[0064] S41, introducing auxiliary variables, transforming the reconstruction model of the three-dimensional hyperspectral image, and obtaining a transformed reconstruction model of the three-dimensional hyperspectral image;
[0065] S42, constructing a reconstruction model of the transformed three-dimensional hyperspectral image as an augmented Lagrangian function, and using a multiplication alternating direction algorithm to obtain an expression of a solution of the reconstruction model of the transformed three-dimensional hyperspectral image;
[0066] S43, preset the number of iterations, calculate the solutions of the reconstruction model of all transformed three-dimensional hyperspectral images within the number of iterations, select the solution with the largest image quality index value and output it as the reconstructed three-dimensional hyperspectral image.
[0067] Specifically, in order to facilitate the solution of the model, auxiliary variables are first introduced to transform the reconstruction model of the obtained three-dimensional hyperspectral image to obtain the reconstruction model of the transformed three-dimensional hyperspectral image; then the reconstruction model of the transformed three-dimensional hyperspectral image is constructed as an augmented Lagrangian function and solved using the multiplication alternating direction algorithm; considering the reconstruction quality of the three-dimensional hyperspectral image and the calculation running time, the number of iterations is preset, and the solution of the reconstruction model of all transformed three-dimensional hyperspectral images within the number of iterations (that is, all reconstructed three-dimensional hyperspectral images within the number of iterations) is calculated, and the image with the largest image quality index value is selected and output as the reconstructed three-dimensional hyperspectral image. The image quality indicators here include peak signal-to-noise ratio (PSNR) and structural similarity (SSIM). PSNR measures the spatial fidelity of the reconstructed image, and SSIM quantifies the similarity between two images in space. The larger the PSNR and SSIM values, the better the reconstruction performance.
[0068] In one embodiment, the spatially encoded data cube obtained in S21 is specifically:
[0069] X′=C⊙X
[0070] Where X' represents the spatially encoded data cube, X represents the three-dimensional hyperspectral image, Where H, W represent the height and width of the three-dimensional hyperspectral image, B represents the spectral channel, and C represents the physical mask. ⊙ represents the product.
[0071] Specifically, a 3D hyperspectral image (i.e., a 3D hyperspectral data cube) is modulated by a fixed coded aperture, such as by performing a pixel-by-pixel product of each spectral dimension through a physical binary mask or a digital micromirror device to obtain a spatially encoded data cube.
[0072] In one embodiment, the spectral coding cube is obtained in S22, specifically:
[0073] X″(r,c+d i , i) = X′(r, c, i)
[0074] In the formula, represents the spectral encoding cube, represents the data cube of spatial encoding, (r, c) represents the coordinates on the two-dimensional image plane, d i is the spatial offset distance of the i-th spectral channel, X'(r, c, i) represents the point with coordinates (r, c) on the i-th spectral channel in the spatially encoded data cube, and X″(r, c+d i , i) indicates that the coordinates of the ith spectral channel in the spectral coding cube are (r, c+d i ) point, i∈(1,B).
[0075] Specifically, the spatially encoded data cube is spectrally encoded through a dispersion prism, specifically, the spatially encoded data cube corresponding to each wavelength (ie, spectral channel) is spatially moved in the y-axis direction through the dispersion prism to perform mathematical modulation to obtain a spectrally encoded cube.
[0076] In one embodiment, the two-dimensional compression measurement value in S23 is specifically:
[0077]
[0078] In the formula, represents the two-dimensional compressed measurement value, X″(,:,i) represents the corresponding two-dimensional image on the i-th spectral channel in the spectral coding cube, Represents the noise in the compression process.
[0079] Specifically, the spectral coding cube data on B spectral channels are compressed, and the noise in the compression process is considered to obtain a two-dimensional compressed measurement value.
[0080] In one embodiment, the hardware coding model of the snapshot spectral imaging system is preset in S2, specifically:
[0081] y=Ax+z
[0082] Where y is the vectorized form of the two-dimensional compressed measurement value Y of the snapshot spectral imaging system, M=H(W+B-1), z is the vectorized form of the noise Z in the compression process, x is the vectorized form of the three-dimensional hyperspectral image X, N = HWB, A is the measurement matrix of the snapshot spectral imaging system,
[0083] Specifically, the focus of spectral compression imaging is to encode three-dimensional hyperspectral images into two-dimensional compressed measurement values. Through the measurement matrix A of the snapshot spectral imaging system, the three-dimensional hyperspectral image, and the noise in the compression process, the three-dimensional hyperspectral image is encoded into a two-dimensional compressed image (i.e., two-dimensional compressed measurement values) by a preset hardware encoding model.
[0084] In one embodiment, the reconstruction model of the three-dimensional hyperspectral image in S3 is specifically:
[0085]
[0086] In the formula, represents the reconstructed three-dimensional hyperspectral image, ||TV(xy PI )|| represents the regularization term based on the semantic similarity of the prior image, x is the vectorized representation of the three-dimensional hyperspectral image X, y is the vectorized form of the two-dimensional compressed measurement value Y of the snapshot spectral imaging system, A is the measurement matrix of the snapshot spectral imaging system, y PI is the two-dimensional compression measurement value Y PI is a vectorized representation of , where λ is the balancing factor.
[0087] Specifically, given the two-dimensional compressed measurement value y and the measurement matrix A of the snapshot spectral imaging system (based on pre-designed hardware), the preset sampling frequency is 1 / B. When B ≥ 1, the sampling rate is much lower than the Nyquist sampling frequency. The inversion problem of reconstructing the three-dimensional hyperspectral image from the two-dimensional compressed measurement value can be expressed as:
[0088]
[0089] in,
[0090] In the formula, represents the reconstructed three-dimensional hyperspectral image, λ is the balancing factor, and R(x) represents the regularization term.
[0091] In the methods mentioned in the relevant literature, R(x) can be total variation, Gaussian mixture model, low rank, deep image prior or deep network constraint (Plug-and-play), etc. These regularization terms play a vital role in solving spectral images. In this application, the prior image semantic similarity (PIDS) is designed as a regularization term to enhance the fidelity of the reconstructed spectral image. The specific process is as follows:
[0092] make Represents the captured RGB image, which is used as the prior image;
[0093] A regularization term based on the semantic similarity of the prior image is established. Specifically, the difference between the total variation (TV) of the prior image and the three-dimensional hyperspectral image based on the L1 norm is calculated, which can be expressed as:
[0094] PIDS(x,y PI )=||TV(x)-TV(y PI )|| (3)
[0095] Among them, x and y PI X and Y respectively PI The vectorized representation of and
[0096] Then, the optimization upper limit of the regularization term based on the prior image semantic similarity is taken. The specific process is as follows:
[0097] The total variation of x based on the L1 norm can be expressed as:
[0098]
[0099] y PI The total variation based on the L1 norm can be expressed as:
[0100]
[0101] From formulas (4) and (5), we can deduce:
[0102]
[0103]
[0104]
[0105] From formula (6), we can see that the difference between the TVs of the two inputs is less than or equal to the TV of the difference between the two inputs. This can lead to the optimization upper limit of the regularization term based on the prior image semantic similarity:
[0106] ||TV(x)-TV(y PI )||≤||TV(xy PI )|| (7)
[0107] In the formula, ||TV(xy PI )||is||TV(x)-TV(y PI )||, it can be seen that minimizing its upper limit is more effective for optimization than directly minimizing the prior image semantic similarity.
[0108] Substituting formula (3) and (2) into formula (1), we can obtain:
[0109]
[0110] According to formula (7), formula (8) can be expressed as:
[0111]
[0112] Formula (9) is the reconstruction model of the three-dimensional hyperspectral image of the preset snapshot spectral imaging system.
[0113] In one embodiment, in S42, the reconstruction model of the converted three-dimensional hyperspectral image is constructed as an augmented Lagrangian function, specifically:
[0114]
[0115] Where x is the vectorized representation of the three-dimensional hyperspectral image X, y is the vectorized form of the two-dimensional compressed measurement value Y of the snapshot spectral imaging system, and A is the measurement matrix y of the snapshot spectral imaging system PI is the two-dimensional compression measurement value Y PI is a vector representation of λ, where λ is the balance factor and ||TV(zy PI )|| is the regularization term based on the prior image semantic similarity after constructing the augmented Lagrangian function. is an auxiliary variable, z = x, represents the Lagrange multiplier, i.e. the dual variable, is the penalty parameter.
[0116] Specifically, the formula (9) is solved by the Alternating Direction Method of Multipliers (ADMM), and the solution process is as follows:
[0117] 1) To facilitate the solution of the model, auxiliary variables are introduced to transform formula (9), specifically:
[0118]
[0119] in, is the introduced auxiliary variable, z=x.
[0120] 2) Formula (10) is constructed as an augmented Lagrangian function, specifically:
[0121]
[0122] in, represents the Lagrange multiplier, i.e. the dual variable, is the penalty parameter, and u=(1 / ρ)b represents the scaled dual variable.
[0123] Then the expression of the solution of the reconstruction model of the three-dimensional hyperspectral image is obtained by using the multiplication alternating direction algorithm:
[0124]
[0125]
[0126] u k+1 =u k +(x k+1 -z k+1 ) (14)
[0127] Here, k is the number of iterations.
[0128] 3) Solve for x, and consider other variables as known;
[0129] Taking the derivative of formula (12) and taking the value of x that makes the derivative zero as the solution, we can find:
[0130]
[0131] According to the matrix inversion lemma, we can derive:
[0132]
[0133] 4) Solve for z, and consider other variables as known;
[0134] Deriving formula (13), taking the z value that makes the derivative zero as the solution, we can solve:
[0135]
[0136] 5) Solve for u, substitute formula (16) and (17) into formula (15) and solve, we can get:
[0137]
[0138] The solution process of relevant parameters is illustrated as follows:
[0139] When k = 1, taking the derivative of formula (12) and taking the value of x that makes the derivative zero can solve:
[0140]
[0141] According to formula (16), we can further solve:
[0142]
[0143] According to formula (17), we can solve:
[0144]
[0145] According to formula (18), we can deduce:
[0146] u 2 =u+(x 2 -z 2 )
[0147] When k=2, further deduction according to formula (16) yields:
[0148]
[0149] According to formula (17), we can further deduce:
[0150]
[0151] According to formula (18), we can deduce:
[0152] u 3 =u 2 +(x 3 -z 3 )
[0153] Through continuous iteration, the number of iterations in the experiment is 320. When k = 32, we get
[0154]
[0155] If during the 320 iterations, x 321 The image quality index value of the corresponding reconstructed three-dimensional hyperspectral image is the largest, then x 321 Output, thus getting The optimal solution of the reconstruction model for the reconstructed three-dimensional hyperspectral image.
[0156] It should be noted that x k+1 represents the reconstructed three-dimensional hyperspectral image obtained after k iterations of x, The image quality index value of the reconstructed three-dimensional hyperspectral image obtained within all iterations is the largest, that is, the output of the reconstructed image with the best image quality is taken as the reconstructed three-dimensional hyperspectral image.
[0157] Among them, the number of iterations k is obtained through experiments, and the number of iterations can be 20 to 400. If the number of iterations is small, the reconstruction quality is poor, and if the number of iterations is large, it will take a long time. Therefore, the design of the number of iterations needs to comprehensively consider the two factors of reconstruction quality and time consumption.
[0158] Furthermore, the snapshot spectral imaging system reconstruction method based on prior image guidance was experimentally verified on the public dataset KAIST.
[0159] See also Figure 3 , Figure 3 This is a test set for a snapshot spectral imaging system reconstruction method based on prior image guidance in one embodiment of the present invention.
[0160] The KAIST dataset consists of 30 hyperspectral images with a spatial size of 2704×3376, containing wavelengths from 400nm to 700nm with a step size of 10nm (31 bands in total). The spectral bands from 450nm to 650nm are obtained by preprocessing, with 28 spectral channels. In the experiment, 6 scenes are selected from the KAIST dataset as the test set, and each scene is cropped with a data size of 256×256×28. For fairness, all algorithms use the same mask. During the imaging process, the Hadamard product (elementwise multiplication) is used to simulate the spatial mask encoding process. The two pixel offsets between adjacent spectral channels are used to simulate spectral dispersion. In addition, the spectral response function of the grayscale or RGB detector is borrowed from the Baumer TXG02c camera. In the experiment, the prior image is obtained by repeating each band of the RGB image 9, 9, and 10 times respectively. In order to verify the performance of spectral compression imaging, two image quality indicators, namely peak signal-to-noise ratio (PSNR) and structural similarity (SSIM), are used. PSNR measures the spatial fidelity of the reconstructed image, and SSIM quantifies the similarity between two images in space. The larger the PSNR and SSIM values, the better the reconstruction performance.
[0161] Table 1
[0162]
[0163] From Table 1, we can see that the proposed method with RGB images as prior images has an average PSNR of 38.29dB and an average SSIM of 0.962. Compared with the best model-based method (PnP-DIP), the proposed method has an average PSNR and SSIM improvement of 6.29dB and 0.097, respectively. Compared with the baseline method (GAP-TV), our method improves the average PSNR by nearly 10dB. In particular, the data of scene 6 increases by 15.64dB.
[0164] The above-mentioned snapshot spectral imaging system reconstruction method based on prior image guidance first uses a snapshot spectral imaging system to shoot the target scene to obtain a three-dimensional hyperspectral image and an RGB image; then the hardware encoding model of the snapshot spectral imaging system is preset, including a hardware encoder and a dispersion prism, and the hardware encoder modulates the three-dimensional hyperspectral image into a two-dimensional compressed measurement value through the synergistic effect of the physical coding mask and the dispersion prism; then a regularization term based on the semantic similarity of the prior image is designed, and a reconstruction model of the three-dimensional hyperspectral image is created according to the regularization term and the two-dimensional compressed measurement value; finally, the reconstruction model of the three-dimensional hyperspectral image is solved by the multiplier alternating direction algorithm to obtain a reconstructed three-dimensional hyperspectral image. This method enhances the fidelity of the reconstructed spectral image by designing the semantic similarity of the prior image as a regularization term, so that the spatial structure information of the spectral image is as similar as possible to the prior image, and the optimization upper limit of the regularization term is derived and the reconstruction model of the three-dimensional hyperspectral image is established, and the model is solved by the multiplier alternating direction algorithm to obtain a reconstructed three-dimensional hyperspectral image. This method has a fast reconstruction speed and shows excellent performance in terms of data fidelity.
[0165] The above is a detailed introduction to a snapshot spectral imaging system reconstruction method based on prior image guidance provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the core idea of the present invention. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A snapshot spectral imaging system reconstruction method based on prior image guidance, characterized in that: The method comprises the following steps: S1, using a snapshot spectral imaging system to shoot the target scene to obtain a three-dimensional hyperspectral image and an RGB image; S2, presetting a hardware encoding model of a snapshot spectral imaging system, wherein the hardware encoding model includes a hardware encoder and a dispersion prism, and the hardware encoder modulates a three-dimensional hyperspectral image into a two-dimensional compressed measurement value through the synergistic effect of a physical coding mask and the dispersion prism; S3, designing a regularization term based on a priori image semantic similarity, and creating a reconstruction model of the three-dimensional hyperspectral image according to the regularization term and the two-dimensional compression measurement value; S4. Solving the reconstruction model of the three-dimensional hyperspectral image by using a multiplier alternating direction algorithm to obtain a reconstructed three-dimensional hyperspectral image.
2. The snapshot spectral imaging system reconstruction method based on prior image guidance according to claim 1, characterized in that: The S2 is specifically: S21, modulating the three-dimensional hyperspectral image through a fixed coding aperture to obtain a spatially coded data cube; S22, spectrally encoding the spatially encoded data cube through a dispersion prism to obtain a spectrally encoded cube; S23, compressing the spectral coding cube to obtain a two-dimensional compressed measurement value.
3. The snapshot spectral imaging system reconstruction method based on prior image guidance according to claim 2, characterized in that: The S3 is specifically: S31, using the RGB image as a priori image; S32, calculating the difference of the total variation of the three-dimensional hyperspectral image and the RGB image based on the L1 norm, and taking the optimization upper limit of the difference of the total variation to obtain a regularization term based on the prior image semantic similarity; S33, obtaining a reconstruction model of the three-dimensional hyperspectral image through the two-dimensional compression measurement value and the regularization term based on the prior image semantic similarity.
4. The snapshot spectral imaging system reconstruction method based on prior image guidance according to claim 3, characterized in that: The S4 is specifically: S41, introducing auxiliary variables to transform the reconstruction model of the three-dimensional hyperspectral image to obtain a transformed reconstruction model of the three-dimensional hyperspectral image; S42, constructing a reconstruction model of the transformed three-dimensional hyperspectral image as an augmented Lagrangian function, and using a multiplication alternating direction algorithm to obtain an expression of a solution of the reconstruction model of the transformed three-dimensional hyperspectral image; S43, preset the number of iterations, calculate the solutions of the reconstruction model of all transformed three-dimensional hyperspectral images within the number of iterations, select the solution with the largest image quality index value and output it as the reconstructed three-dimensional hyperspectral image.
5. The snapshot spectral imaging system reconstruction method based on prior image guidance according to claim 4, characterized in that: The spatially encoded data cube obtained in S21 is specifically: X′=C⊙X Where X' represents the spatially encoded data cube, X represents the three-dimensional hyperspectral image, Where H, W represent the height and width of the three-dimensional hyperspectral image, B represents the spectral channel, and C represents the physical mask. ⊙ represents the product.
6. The snapshot spectral imaging system reconstruction method based on prior image guidance according to claim 5, characterized in that: The spectral coding cube is obtained in S22, specifically: X″(r,c+d i ,i)=X′(r,c,i) In the formula, represents the spectral encoding cube, represents the data cube of spatial encoding, (r, c) represents the coordinates on the two-dimensional image plane, d i is the spatial offset distance of the i-th spectral channel, X'(r, c, i) represents the point with coordinates (r, c) on the i-th spectral channel in the spatially encoded data cube, and X"(r, c+d i , i) indicates that the coordinates of the ith spectral channel in the spectral coding cube are (r, c+d i ) point, i∈(1,B).
7. The snapshot spectral imaging system reconstruction method based on prior image guidance according to claim 6, characterized in that: The two-dimensional compression measurement value in S23 is specifically: In the formula, represents the two-dimensional compressed measurement value, X”(:,:,i) represents the corresponding two-dimensional image on the i-th spectral channel in the spectral coding cube, Represents the noise in the compression process.
8. The snapshot spectral imaging system reconstruction method based on prior image guidance according to claim 7, characterized in that: The hardware coding model of the snapshot spectral imaging system preset in S2 is specifically: y=Ax+z Where y is the vectorized form of the two-dimensional compressed measurement value Y of the snapshot spectral imaging system, M=H(W+B-1), z is the vectorized form of the noise Z in the compression process, x is the vectorized form of the three-dimensional hyperspectral image X, N = HWB, A is the measurement matrix of the snapshot spectral imaging system, 9. The snapshot spectral imaging system reconstruction method based on prior image guidance according to claim 8, characterized in that: The reconstruction model of the three-dimensional hyperspectral image in S3 is specifically: In the formula, represents the reconstructed three-dimensional hyperspectral image, ||TV(xy PI )|| represents the regularization term based on the semantic similarity of the prior image, x is the vectorized representation of the three-dimensional hyperspectral image X, y is the vectorized form of the two-dimensional compressed measurement value Y of the snapshot spectral imaging system, A is the measurement matrix of the snapshot spectral imaging system, y PI is the two-dimensional compression measurement value Y PI is a vectorized representation of , where λ is the balancing factor.
10. The snapshot spectral imaging system reconstruction method based on prior image guidance according to claim 9, characterized in that: In S42, the reconstruction model of the converted three-dimensional hyperspectral image is constructed as an augmented Lagrangian function, specifically: Where x is the vectorized representation of the three-dimensional hyperspectral image X, y is the vectorized form of the two-dimensional compressed measurement value Y of the snapshot spectral imaging system, and A is the measurement matrix y of the snapshot spectral imaging system PI is the two-dimensional compression measurement value Y PI is a vector representation of λ, where λ is the balance factor and ||TV(zy PI )|| is the regularization term based on the prior image semantic similarity after constructing the augmented Lagrangian function. is an auxiliary variable, z = x, represents the Lagrange multiplier, i.e. the dual variable, is the penalty parameter.
