# Air Pollution: Sensitive Detection of PM2.5 and PM10 Concentration Using Hyperspectral Imaging
## 3 Experiment  
The visible HSI (VIS-HSI) used in this study was calculated by using the images taken by a single-lens camera (Nikon D5200, Nikon, Tokyo, Japan) combined with the visible hyperspectral algorithm (VIS-HSA) (see Supplementary Materials for a detailed description of the instrument specification used in this study). The wavelength range was from 380 nm to 780 nm, and the spectral resolution was up to 1 nm. The construction process of this technology is shown in Figure 1. First, the camera and spectrometer (QE65000, Ocean Optics, Dunedin, FL, USA) needed to be provided with numerous common targets for the analysis. If the target could be interpreted within the 380 nm to 780 nm range, then the accuracy of this technology would be improved greatly. In this study, the standard 24-color checker (x-rite classic, 24-color checker) was selected as the target because it contains the most important colors (blue, green, red, grey) and the commonly found colors in nature [42]. To correct the inaccurate white balance generated by the camera, the standard 24-color card needed to be used to obtain a 24-color image (sRGB, 8 bit) and 24-color reflectance spectrum data through the camera and spectrometer, and these were converted to the \(XYZ\) color space (CIE 1931 \(XYZ\) color space). The correction coefficient matrix \(C\) is shown in Equation (3).  
\[\big{[}C\big{]}=\big{[}XYZ_{Spectrum}\big{]}\times pin(\big{[}V\big{]}) \tag{3}\]  
The \(XYZ_{Spectrum}\) matrix shows the reflection spectrum data converted into the \(XYZ\) value standardized in the \(XYZ\) color space, while the variable matrix \(V\) is obtained by analyzing the factors that may cause errors in the camera, such as the nonlinear response, dark current, inaccurate color separation, and color shift. The corrected \(X\), \(Y\), and \(Z\) (\(XYZ_{Correct}\)) values can be obtained from Equation (4), as well as the root-mean-square error of \(XYZ_{Correct}\) and \(XYZ_{Spectrum}\). The average error was found to be 0.19, which is negligible.  
\[\big{[}XYZ_{Correct}\big{]}=\big{[}C\big{]}\times\big{[}V\big{]} \tag{4}\]  
Figure 1: Visible light spectrum construction process.  
After completing the camera calibration, the 24-color block \(XYZ\) value (\(XYZ_{Correct}\)) obtained from the correction and the 24-color block reflection spectrum data (R\({}_{Spectrum}\)) measured by the spectrometer could be analyzed to obtain the conversion matrix M. The R\({}_{Spectrum}\) function was used to determine the principal components through principal component analysis (PCA), and multiple regression analysis was performed on the corresponding principal component scores (PCS) and \(XYZ_{Correct}\). Finally, the above results were integrated to obtain the conversion matrix \(M\). In the multivariate regression analysis of \(XYZ_{Correct}\) and the score, the variable \(V_{Colour}\) was chosen because it lists all possible combinations of \(X\), \(Y\), and \(Z\), and the conversion matrix \(M\) is obtained by Equation (5):  
\[\left[M\right]=\left[Score\right]\times pinv(\left[V_{Colour}\right]) \tag{5}\]  
Finally, the 24-color block analog spectrum (\(S_{Spectrum}\)) was obtained using Equation (6) and compared with the 24-color block reflection spectrum. The root mean square error of each color block was calculated, and the average error was 0.056.  
\[\left[S_{Spectrum}\right]_{\left(380\sim 780 nm\right)}=\left[EV\right] \times\left[M\right]\times\left[V_{Colour}\right] \tag{6}\]  
The visible light hyperspectral technology built according to the above process was able to simulate the RGB value captured by a single-lens camera into the reflection spectrum. If the RGB values of the entire image are calculated through the visible light hyperspectral technology, then a visible light hyperspectral image can be obtained (see Supplementary Materials Figure S1 for the NIR Hyperspectral Technology; see Supplementary Materials Figure S2 for the FIR Hyperspectral Technology).