# GPU Parallel Implementation for Real-Time Feature Extraction of Hyperspectral Images
## 4 Experimental Setup and Materials  
Experiments of the proposed method will be performed firstly on a personal computer equipped with Intel CPU and NVIDIA GPU. The detailed features of this platform are listed in Table 2. Besides, software specifications of the considered platform consist of Microsoft Visual Studio 2017 Compiler  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**No.** & **Functions/Class** & **Annotation** \\ \hline
1 & void read\_matrix(matrix* A, char* file) & Read matrix in from file, store in row-major order, *A must point to an uninitialized matrix \\ \hline
2 & void copy\_matrix\_to\_device(matrix* A) & typedef struct _matrix_, matrix dimensions are in \\  & & member _dim_[] \\ \hline
3 & void create\_matrix\_on\_device(matrix* A, & \\  & int rows, int cols, float value) & malloc cuda space to hold temp matrices \\ \hline
4 & void matrix\_multiply\_d(matrix a, & SGEMMS, Matrix multiplication, \\  & matrix b, matrix c) & \(c=a*b\) \\ \hline
5 & void matrix\_multiply\_AtB\_d(matrix a, & SGEMMS, Matrix multiplication, \\  & matrix b, matrix c) & \(c=a^{T}*b,c=a*b^{T}\) \\ \hline
6 & void matrix\_sub\_d(matrix a, matrix b, & Matrix subtraction \\  & int block\_size) & \\ \hline
7 & void sum\_cols\_d(action\_t action, matrix a, & \\  & matrix c, int* params) & Average and sum with reduction \\ \hline
8 & int choose\_rank(float* a, int m) & Select the number of principal components of \\  & & dimensionality reduction \\ \hline
9 & void n\_estimate\_d(matrix a, matrix b, & Noise estimation for the construction of noise \\  & int block\_size,int row;int col) & covariance matrix \(C_{N}\) \\ \hline
10 & SVDT svd(row, col); & SVD \\  & svd.SVDcompute(args) & \\ \hline \hline \end{tabular}  
* represents a pointer in the C++ language.  
\end{table}
Table 1: Key functions or class and their relative annotation.  
Figure 3: Flowchart of the proposed INAPC algorithm parallel implementation.  
(Community Edition, Changsha, China), CUDA 10.0 (Ubuntu 16.04, Changsha, China) and OpenCV 3.0 (Changsha, China), etc.  
Three real traditional hyperspectral datasets are tested in our experiments: Indian Pines, Salinas scene, Pavia University scene. Their details are given in Table 3.  
For the UAV experiments, the most critical parts of the UAV photoelectric platform are the UAV (a DJI Jingwei M600 PRO, Changsha, China), the hyperspectral camera (SPECIM_FX17E, Changsha, China), and the computing development board (NVIDIA Jetson Xavier, AGX, Changsha, China). The hardware configuration and parameters of the latter two are given in Tables 4 and 5, respectively.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Specification** & **Value** & **Specification** & **Value** \\ \hline Wavelength Range & 935–1720 nm & Spectral Resolution & 3.5 nm@1129 nm \\ \hline Sample & 640 & Digitization & 12 bit \\ \hline Lines & 482 & Horizontal Field Angle & 38\({}^{\circ}\) \\ \hline Bands & 224 & Spatial Resolution & 0.32 (300 m) \\ \hline Single Shooting Speed & 5 s & Operating Voltage & 12 V \\ \hline \hline \end{tabular}
\end{table}
Table 4: Main parameters of the SPECIM_FX17E snapshot hyperspectral sensor.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**SCENE** & **Indian Pines** & **Salinas Scene** & **Pavia University Scene** \\ \hline Instruments & AVIRIS sensor & AVIRIS sensor & ROSIS sensor \\ \hline Wavelength Range (\(\mu\)m) & \(0.4-2.5\) & \(0.4-2.5\) & \(0.43-0.86\) \\ \hline Size & \(145\times 145\times 220\) & \(512\times 217\times 224\) & \(610\times 340\times 103\) \\ \hline Spatial Resolution (m) & 20 & 3.7 & 1.3 \\ \hline Ground-truth classes & 16 & 16 & 9 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Details of the three experimental hyperspectral images.