# Hyperspectral Imaging Sorting of Refurbishment Plasterboard Waste
## 2 Materials and Methods
### HSI-Based Sorting System
Predictive classification models based on the PLS-DA algorithm were developed with manually sorted plasterboard fragments 40-50 mm in size (Figure 2a) and other materials typically found in refurbishment plasterboard waste. These other materials included mortar, aggregates, plastics, foam, ceramics, concrete, wood, glass, plastics, metal and rubber. Paper was not classified as a contaminant because plasterboard is constituted by a gypsum core sandwiched between two lining papers. Initially, individual samples were manually positioned on the sliding scanning table and scanned in-line by the HSI camera (Figure 2b). The methodology for modelling is described in Figure 3 and consisted of recording short-wavelength infrared (SWIR) hyperspectral images of different reference samples by the laboratory setup; adding the class information to the training data set; creating a sample model by means of PCA to remove the background pixels and identify the objects within the images (for instance, plasterboard fragments); and developing the PLS-DA classification model considering the average spectrum of each training sample, the centring pre-treatment of raw spectra and the classes previously defined. The number of measurements or recorded images for model training was 11. The training set consisted of 107 samples made of 51 plasterboard fragments (47.7%) and 56 contaminants (52.3%). The next step was to create a prediction workflow based on the sample and classification models  
Figure 2: Refurbishment plasterboard waste fragments composed of gypsum core and lining paper (**a**) and laboratory-scale experimental setup with advanced HSI camera, air-cooled tubular halogen lamps and sliding scanning table for in-line material classification (**b**). to analyse and classify unknown materials (test samples--not used for training). According to this workflow, firstly, a measurement (or recorded image) was analysed by the sample model to find or recognize the materials by removing the background. Afterwards, the classification model was applied to the materials in order to predict the class to which the scanned materials belong (plasterboard or contaminants). The model classified individual samples contained in each measurement or recorded image analysing the spectral footprint of each pixel. Thus, the classification approach used was pixel-based. Additionally, the number of spectral bands used as explanatory variables was reduced to those with the highest contribution to the discrimination. As a result, 111 out of 288 spectral bands were used to train the model, corresponding to the wavelength range 1617.33-2216.68 nm. The spectra of the samples used to train the calibration model by classes are presented in Figure 4.  
The correctness or performance of the model was assessed considering the values of R\({}^{2}\)X (model fit to the training/known data), R\({}^{2}\)Y (model fit to the predicted data), Q\({}^{2}\)Y (prediction capacity from cross-validation), RMSE (root mean squared error) and F\({}_{1}\) score, and the confusion matrixes for the calibration samples and the laboratory sorting trials. The F\({}_{1}\) score was calculated from the precision and recall of the laboratory test using Equations (1)-(3). \[\text{F}_{1}\text{ score}=2\times(\text{Precision}\times\text{Recall})/(\text{ Precision}+\text{Recall}) \tag{1}\]  
Figure 3: Scheme of the HSI methodology. On the other hand, the number of measurements or recorded images for model validation in the real-time classification laboratory test was 113. The validation test set comprised 3766 samples that weighed 8.249 kg, being 91.66 wt% (3536) plasterboard and 8.34 wt% (230) contaminants. An example of a validation trial is shown in Figure 5 and examples of classification images are shown in Figure 6.  
Figure 4: Spectra of samples used during model training. Figure 5: Example of validation trial showing a picture of scanned samples and table of classifications carried out by the PLS-DA model (real category vs. predicted category).