## 2 Materials and Methods
### Hyperspectral Image Collection
#### 2.2.2 Data Preprocessing  
A region of interest (ROI) of the same size was selected at the same location in the hyperspectral image of each coal sample to obtain the coal spectra. A mask was created based on the spectral difference between the coal and the background, allowing for the extraction of the coal sample region and the exclusion of background influences. Figure 3 illustrates the reflectance spectra of 61 coal samples derived by averaging all pixels within the ROI and the characteristic wavelengths associated with the coal quality indices. Meanwhile, Table 1 lists the characteristic wavelengths and the corresponding groups or ions in the coal proximate analysis which are consistent with Figure 3.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Featured Wavelength (nm)** & **Groups or Ions** & **References** \\ \hline
1150 & Electron leaps in Fe\({}^{2+}\)-dominated metals & [34] \\
1400 & Combined bands of H\({}_{2}\)O vibrations & [34] \\
1700 & First overtones of CH\({}_{2}\), CH\({}_{3}\) & \\  & symmetric/asymmetric stretch. & [34,35] \\
1900 & Combined bands of H\({}_{2}\)O vibrations & [35] \\
2150 & Combination of aromatic C-H stretch and C-C & [35] \\
2200 & Combination Al-OH vibration & [35,36] \\
2300 & Combination of CH\({}_{2}\), CH\({}_{3}\) asymmetric stretch and & [34,35] \\  & bend & \\ \hline \hline \end{tabular}
\end{table}
Table 1: The characteristic wavelengths and corresponding groups or ions in coal proximate analysis based on hyperspectral images.  
Figure 2: Pseudo-color images (817 nm, 661 nm, and 549 nm) of four coal samples and the measured values of quality indices. The samples are arranged from left to right by CV, from highest to lowest.  
To filter the analyzed wavelengths, the noise level at each wavelength was evaluated by calculating a noise level vector [37]. Suppose that there are \(m\) coal samples, and the length of spectral data for each sample is \(n\). Thus, the spectral data of these coal samples form an \(m\times n\) matrix. The spectra noise level is an \(n\)-dimensional vector, calculated using Equations (3)-(5):  
\[R_{noise}=Median_{col}(|R_{Raw}-R_{SG}|) \tag{3}\]  
\[R_{refer}=Mean_{col}(R_{Raw}) \tag{4}\]  
\[Noise\ level=\frac{R_{noise}}{R_{refer}} \tag{5}\]  
where \(R_{SG}\) is an \(m\times n\) matrix representing the spectra after denoising using SG filtering with a window size of five points and a second-degree polynomial. \(R_{Raw}\) represents the original spectra matrix of size \(m\times n\). \(R_{noise}\) represents the spectra noise vector of \(n\) dimensions, obtained by computing the absolute value of the difference between \(R_{Raw}\) and \(R_{SG}\), followed by column-wise median calculation. \(R_{refer}\) is the n-dimensional reference spectra obtained by averaging \(R_{Raw}\) in the column direction. \(Noise\ level\) is an \(n\)-dimensional vector that reflects the quality of each wavelength.  
As shown in Figure 4, most wavelengths exhibit low noise ratios of less than 0.5%. The wavelengths with higher noise ratios are located at <465 nm, 954-975 nm, and >2470 nm, where the noise ratios are close to or exceed 1%. This occurs because these wavelengths are located at the edge of the spectrometer's sensing range (<465 nm and >2470 nm) and the overlap of the two sensors (954-975 nm), resulting in a higher noise ratio. Consequently, wavelengths in the range of <465 nm, >2470 nm, and 954-975 nm were excluded from further analysis, while those with a noise level of less than 0.5% were retained for subsequent analysis.  
Figure 3: Reflectance spectra and characteristic wavelengths obtained by averaging pixels in the region of interest from hyperspectral images of 61 coal samples. Each different colored curve represents each coal sample.