# Single-Lens Imaging Spectral Restoration Method Based on Gradient Prior Information Optimization
## 3 Methods  
Image restoration is a deconvolution process. If the point spread function (PSF) of an imaging system is known, an original clear image can be obtained by deconvolution of a blurred image with the PSF [27]. In practical situations, the influence of noise also needs to be considered. The entire process is shown in Figure 2.  
Figure 1: Single-lens spectral imaging acquisition model. In the spatial domain, it can be represented as:  
\[ \begin{array}{c}g(x,y)=h(x,y)*f(x,y)+n(x,y)\\ =\int\limits_{-\infty}^{\infty}\int\limits_{-\infty}^{\infty}f(u,v)h(x-u,y-v) dudv+n(x,y)\end{array}  \tag{2}\]  
In the above equation, \(g(x,y)\) represents the blurred image, \(h(x,y)\) represents the blur kernel, \(f(x,y)\) represents the original image, \(n(x,y)\) represents noise, and \"\(*\)\" denotes convolution. Since digital images are discrete, the above model can be represented as:  
\[g(x,y)=\sum\limits_{m=0}^{M-1}\sum\limits_{n=0}^{N-1}f(m,n)h(x-m,y-n)+n(x,y) \tag{3}\]  
If there is no noise, \(n(x,y)=0\). The convolution operation in the spatial domain can be transformed into a multiplication operation in the frequency domain; thus:  
\[G(u,v)=H(u,v)F(u,v)+N(u,v) \tag{4}\]  
In the above equation, \(G(u,v)\), \(H(u,v)\), \(F(u,v)\), and \(N(u,v)\) correspond to the Fourier transforms of \(g(x,y)\), \(h(x,y)\), \(f(x,y)\), and \(n(x,y)\), respectively. When a blurred image and noise are acquired, and prior information about the blur kernel is known, restoration of the image can be achieved through deconvolution, with the aim of recovering an image that closely resembles the original. Based on the principle of spectrum acquisition using a single-lens imaging system, the spectral information captured using CCD includes both in-focus and out-of-focus images. In other words, the imaging process involves convolving in-focus spectral images with the in-focus PSF and adding them to the convolution of out-of-focus spectral images with the out-of-focus PSF. This imaging process can be challenging to solve as it involves a large number of two-dimensional convolutions. By analyzing the frequency domain, the computational complexity of the convolution can be reduced. If we do not consider the influence of noise, it can be expressed as follows:  
\[G(u,v)=H(u,v)F(u,v) \tag{5}\]  
\[F(u,v)=G(u,v)/H(u,v) \tag{6}\]  
\(F(u,v)\) represents the Fourier transform of the original image, \(H(u,v)\) represents the Fourier transform of the point spread function (PSF), and \(G(u,v)\) represents the Fourier transform of the mixed image obtained by CCD acquisition. Assuming there are \(N\) spectral segments, the image obtained from the \(k\)-th segment can be represented as:  
\[G_{k}(u,v)=\sum\limits_{i=1}^{N}H_{i}(u,v)F_{k}(u,v) \tag{7}\]  
Blurring in the collected images can be caused by the following: (1) spatial blurring caused by the point spread function (PSF) and (2) defocusing from neighboring spectral segments. In practical situations, as the wavelength difference from the \(k\)-spectrum segment increases, the impact of defocusing decreases, and it can even be neglected. The real impact  
Figure 2: Blurred image model. comes from adjacent spectral segments. Both spatial blurring and spectral defocusing occur simultaneously. The key to image restoration lies in the inversion of matrix \(H\). However, \(H\) usually exhibits ill conditioning. Here, the concept of condition number is introduced, which measures the uncertainty of solution \(x\) with respect to \(b\), or the sensitivity of the error in equation \(Ax=b\). This is expressed as:  
\[cond(A)=\|A\|\cdot\|A^{-1}\| \tag{8}\]  
If a small perturbation in matrix \(A\) causes only a small perturbation in solution vector \(x\), then matrix \(A\) is said to be well conditioned. If it causes a large perturbation in \(x\), it is considered to be ill conditioned. It is evident that even a tiny perturbation in matrix \(H\) can have a significant impact on the restored image, making matrix \(H\) ill conditioned. As a result, it is not directly invertible.