# Estimating the Spectral Response of Eight-Band MSFA One-Shot Cameras Using Deep Learning
## 3 Materials and Methods
### Metric Performance  
To evaluate the performance of the spectral responses provided by our models, we use several metrics [18], including  
* PSNR (peak signal-to-noise ratio): Peak signal-to-noise ratio (PSNR) is a commonly used metric to evaluate the quality of a reconstructed or compressed image compared to its original. It quantifies the ratio between the maximum possible power of a signal (the peak signal) and the power of the noise, which alters the fidelity of its representation. \[PSNR=10\cdot\text{log}_{10}\left(\frac{\left(2^{n}-1\right)^{2}}{\frac{1}{n} \overset{n}{\underset{i=1}{\sum}}\left(I^{i}-\bar{I}^{i}\right)^{2}}\right)\] (11)
* The spectral angle mapper (SAM) is a spectral classification method based on calculating the angle between two spectral vectors in a high-dimensional space. Its principle is based on the following elements: Each pixel in a hyperspectral image is represented by a spectral vector, where each dimension corresponds to the reflectance or luminance of the pixel in a specific spectral band. Each class or reference material is also represented by an average spectral vector calculated from selected reference pixels. The SAM calculates the angle between the pixel's spectral vector and each reference vector in n-dimensional space (where n corresponds to the number of spectral bands). The smaller the angle between two vectors, the more similar the spectra are. A maximum angular threshold determines whether a pixel should be assigned to a specific class [24]. \[SAM=\text{cos}^{-1}\left(\frac{\overset{n}{\underset{i=1}{\sum}}\left(I^{i} \odot\bar{I}^{i}\right)}{\sqrt{\overset{n}{\underset{i=1}{\sum}}\left(I^{2} \odot\bar{I}^{2}\right)}}\right)\] (12)
* SSIM (structural similarity index measure): SSIM is designed to assess the similarity between two images by comparing their structural information, luminance, and contrast while considering the characteristics of the human visual system. Unlike more straightforward measures such as mean square error (MSE) or peak signal-to-noise ratio (PSNR), which do not consider aspects of human perception, SSIM offers a more comprehensive assessment of the similarity between the images [25]. The SSIM value is between \(-1\) and \(1\), where: \[SSIM\left(I,\bar{I}\right)=\frac{\left(2\mu_{I}\mu_{\bar{I}}+C_{1}\right)\left( 2\sigma_{\bar{I}\bar{I}}+C_{2}\right)}{\left(\mu_{\bar{I}}^{2}+\mu_{\bar{I}}^{2 }+C_{1}\right)\left(\sigma_{\bar{I}}^{2}+\sigma_{\bar{I}}^{2}+C_{2}\right)}\] (13)
* RMSE (root mean square error): RMSE is a metric that evaluates the average error between predicted and actual values in a data set. It is expressed in the same unit as the target value. Here is the RMSE formula: \[RMSE=\sqrt{\frac{\overset{n}{\underset{i=1}{\sum}}\left(I^{i}-\bar{I}^{i} \right)^{2}}{n}}\] (14)
* MAE (mean absolute error): MAE is a metric used to measure the accuracy of a model by averaging the absolute errors between the values predicted by the model and the actual values. Unlike RMSE, MAE treats all errors equally without squaring them, making it a more intuitive measure for understanding the average error made by the model. The lower the MAE, the closer the model predictions are to the actual values. The MAE formula is as follows: \[MAE=\frac{1}{n}\overset{n}{\underset{i=1}{\sum}}\left|I^{i}-\bar{I}^{i}\right|\] (15)I: Real picture for sample.  
I: The predicted image for the sample.