{'fraction_non_alphanumeric': 0.025343138429108677, 'fraction_numerical': 0.012072723788535702, 'mean_word_length': 5.17482620914066, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Characterization and Separation of Traditional and Bio-Plastics by Hyperspectral Devices

Nowadays, bio-plastics can contaminate conventional plastics sent to recycling. Furthermore, the low volume of bio-plastics currently in use has discourage the development of new technologies for their identification and separation. Technologies based on hyperspectral data detection may be profitably employed to separate the bio-plastics from traditional ones and to increase the quality of recycled products. In fact, sensing devices make it possible to accomplish the essential requirement of a mechanical recycling technology, i.e., end products which comply with specific standards determined by industrial applications. This paper presents the results of the hyperspectral analysis conducted on two different plastic polymers (PolyEthylene Terephthalate and PolyStyrene) and one bio-based and biodegradable plastic material (PolyLactic Acid) in different phases of their life cycle (primary raw materials and urban waste). The reflectance analysis is focused on the near-infrared region (900–1700 nm) and data are detected with a linear-spectrometer apparatus and a spectroradiometer. A rapid and reliable identification of three investigated polymers is achieved by using simple two near-infrared wavelength operators employing key wavelengths.


Introduction
In recent years, plastics belonging to the family of organic polymers have experienced a wide commercial spread mainly due to their excellent physical and mechanical characteristics and to the availability of raw materials. Nevertheless, the use of products realized with plastics may involve potentially harmful impacts on the environment and human health, for example in the case of non-virtuous management of the products' end-of-life. These issues have directed the research into plastics with similar characteristics with respect to traditional ones, but which minimize the negative impacts resulting from their life cycle (from sourcing and manufacturing to end-of-life management). Bio-plastics are currently considered as one of the most viable alternatives to traditional plastics.
Bio-plastics are materials belonging to one of the following groups: (1) bio-based (from renewable raw resources) or partially bio-based non-biodegradable plastics; (2) bio-based and degradable plastics, (3) fossil resources-based and biodegradable plastics. According to [1], a plastic material is defined as a bio-plastic if it is either bio-based, biodegradable, or features both properties. Due to this definition, in the paper we will generically refer to bio-plastics though we will investigate a bio-based and biodegradable bio-plastic, i.e., PolyLactic Acid (PLA).
Though the global plastics production has almost reached 360 million tons (17% of which is produced in Europe [2]), bio-plastics represent about one percent of the total plastic produced annually. Nevertheless, the bio-plastics market is growing and is highly diversified, demonstrating how these materials are the emerging novelties in several sectors, from packaging, catering products, consumer electronics, automotive, agriculture/horticulture and toys to textiles and a number of other segments. Bio-plastics have different advantages compared to traditional plastics, such as lower carbon footprint and eco-safety [3,4].
According to the European Commission, the potential for recycling plastic waste in the European Union remains unfulfilled. Europe generates 25.8 million tons of plastic waste per year but only 30% of it is recycled. One of the possible solutions to minimize the amount plastic waste stored on landfills and in the oceans is to encourage circular economy, according to which products, materials and raw materials circulate as long as possible, which leads to minimization of waste [5]. Though the employment of bio-plastics represents a reasonable option to get a handle on the overwhelming waste problem, this typology of plastics could disturb the current recycling of plastics and hence inhibit the closure of plastic cycles [6]. Given the current small amounts of these plastics in the market, setting up separate collection is not viable and hence bio-plastics will act as contaminants whose impact on recycling processes and products has to be carefully considered. [6] has estimated that contamination of PET by PLA could be as high as 8% by 2021, with serious effects on the quality of the recycled PET.
To date the default option for the disposal of bio-based and degradable plastics is their conferment within the organic fraction of Municipal Solid Waste (MSW) and subsequent introduction into industrial composting. Because of the similarity of products made with bio-based and degradable plastics and the ones made with traditional plastics, especially in the food sector, after use they often end up in technical recycling chains [6]. This issue must be taken into account in the stage of designing and setting up of cost-effective and efficient technologies for plastics separation in recycling plants. The separation of traditional plastic wastes in mechanical recycling plants is the process that should ensure high-quality secondary raw materials to avoid fossil resource depletion due to their use as primary raw materials. In order to obtain high quality secondary raw materials, the separation process should produce a pure product or several distinct pure products consisting of a single polymer type. Therefore, it is necessary to employ a robust methodology to correctly separate bio-plastics, which act as contaminants, from traditional plastics and to enhance the separation processes traditionally used within recycling plants. Traditional methods are based on the floatation principle, which separates polymers with respect to their density. This requires the density of the floatation medium to be adjusted by adding saline solutions or organic solvents [7]. Nowadays, a few advanced sorting technologies are recognized of being promising for the fast industrial identification and separation of solid plastic wastes [8]. Among them, separation processes exploiting the potential of the hyperspectral analysis are gaining increasing attention. In fact, these are considered to be alternatives for the classical methods, which require large amounts of chemical reagents and are both time consuming and more expensive [9]. In particular, Near InfraRed (NIR) spectroscopy presents several advantages such as remote high-speed measurements, high penetration depth of the NIR radiation and high signal-to-noise ratio [8].
Hyperspectral systems exploit the interaction of an object with a light source (natural or artificial) allowing the extraction of the object's spectral signature, which describes the percentage of incident radiation reflected from the surface of the object as a function of the wavelength. Since the spectral signature is a characteristic feature of each material (all materials have their own signature) this property can be exploited for distinguishing plastic samples of different typology. At the Laboratory of Hydraulics of DICEA-Sapienza University of Rome, a system for the acquisition of hyperspectral images based on the use of linear spectrometers and an effective methodology for the discrimination of materials based on their chemical constituents have been designed and realized. This system has been used for the characterization of two traditional polymers, polyethylene terephthalate (PET) and polyvinyl chloride (PVC), adopting two different strategies for this purpose, the first one based on the position and characteristics of the spectral signature absorption bands of each polymer and the second Appl. Sci. 2020, 10, 2800 3 of 19 one on the correlation matrix analysis [10]. Ref [11] presents the application of principal component analysis and partial least squares-discriminant analysis on waste samples made of the most diffused plastic typologies, i.e., polyethylene, polypropylene, polyvinyl chloride, PET, and PS, achieving the complete classification of the polymer classes. Although their result is very interesting, the application of the method they developed for a real-time separation of plastic wastes appears to be impracticable. This paper presents the hyperspectral analysis of samples of three types of plastics, two of traditional type (PET and polystyrene (PS)) and one of bio-based and degradable origin (PLA). The purpose is to establish a procedure which could be successfully employed in recycling plant to achieve the real-time separation of the three typologies of plastics. PET, PS and PLA samples analyzed are collected at different stages of their life cycle (from virgin to urban plastic waste) and present different morphological (granules, flakes, pieces and the original shape of the waste) and dimensional (from 2 mm to roughly 25 cm) characteristics. Those polymers are chosen because of the occurrence in the food market of products with the same shape but realized by employing different plastic types, either traditional or bio. For instance, water bottles are made of both PET and PLA. Analogously, disposable dishes are available in both PS and PLA. As a matter of fact, traditional plastic waste may be contaminated with products realized with bio-plastics leading to a decreased quality of the recycled plastic stream in which the bio-plastics have ended up.
Collected samples were subjected to the hyperspectral investigation in the NIR region that, unlike the Visible (VIS) region that is influenced by the color of the sample, provides information related to the material chemical structure and therefore allows its unambiguous discrimination. Successively, characteristic peaks (for position and intensity) of the spectral signatures were identified. This information, coupled with the analysis of the correlation matrix of each pair of plastics spectral signatures, supplied the spectral indices (defined as the ratio or difference of the reflectance values at two different wavelengths). The identification of the spectral index that allows the most effective separation between each pair of plastics is attained via a separation accuracy analysis. Finally, those wavelengths are used to perform a decision tree analysis, where starting from a heterogeneous mixtures, PET and PS are effectively separated from PLA. In order to cross-validate spectral information detected with the spectrometer platform, reflectance values are acquired also with a field-portable spectroradiometer (FieldSpec 4 -ASD) which operates in the range of wavelengths 350-2500 nm.
This paper is organized as follows. Section 2 describes the plastic materials investigated, the hyperspectral devices and the methodology to extract spectral signatures from data acquired. Section 3 presents the main results in terms of the spectral signatures detected with both platforms, the statistical procedure employed to analyze data and the separation performances of the indices. The paper ends with concluding remarks.

Plastics
Samples used for the experimental tests presented herein are made with widely distributed bio-and traditional plastic materials, i.e., PET, PS and PLA. They are collected at different stages of a product's life cycle (virgin material and waste) and present different morphological and dimensional characteristics: Original shape of waste (O), large Pieces (P) and Flakes (F). This allowed the investigation of the sample geometry influence on the measured spectral signatures which is crucial when setting up procedures to handle waste in recycling plants. In addition, regular Granules (G) of Virgin particles (V) are analyzed, representing the primary raw materials used for product manufacture.
Density (physical characterization) and size (geometric characterization) of each sample are determined (Table 1). Each density value is the result of the arithmetic average of five independent measurements. The characteristic size of the samples is determined through a caliper for material in pieces and with their original shape, and with standard sieves for flakes and virgin particles.  Figure 1a shows the virgin material analyzed (PET_V, PS_V, PLA_V; Table 1). Figure 1b shows materials from urban waste with their original shape, washed and purified from any impurities (PET_O, PS_O, PLA_1_O, PLA_2_O). It is worth noting the similarity of PLA_1_O and PET_O samples. Same observation holds for PLA_2_O and PS_O samples.
To assess the spectral signature in real-plant conditions, all plastic samples are placed on a dark conveyor belt during spectral image acquisitions.

Spectral Acquisition Procedure
Hyperspectral images are acquired with a platform based on the use of two linear spectrometers. The system, composed of one VIS and one NIR Specim Imspector spectrometer, has a spectral range 400-1700 nm, but only the region of the Near InfraRed (NIR, 900-1700 nm region) allows the unambiguous characterization of materials through highlighting features related to their chemical structure. The facility employed for the experimental investigation of this study comprises: one NIR Specim Imspector spectrometer, centered in the near infrared region (900-1700 nm), mounted in front of an InGaAs Sensor Unlimited camera, 320 × 240 pixel resolution, 25 µm × 25 µm pixel pitch, 50 fps maximum frequency of acquisition; one high-speed DVR Express ®CORE with two Camera Link inputs used to acquire and manage the data, containing 1-terabyte solid state disk array; one power supply; one processing computer for controlling the entire system and managing image acquisition and storage; one lighting system comprising of two 500 Watt halogen lamps to ensure a proper sample Appl. Sci. 2020, 10, 2800 5 of 19 illumination; one Spectralon panel as white reference standard; one conveyor belt to allow the target displacement at a constant rate. Images were acquired at 50 fps and the spectral resolution was 3 nm.

PLA_1_F
Water bottle  A linear spectrometer captures a line image of the target and disperses the light from each line image pixel into a spectrum. Each spectral image contains the spatial information along an axis and the spectral information along the other axis. Multiple images must be acquired to reconstruct a twodimensional scene based on the combination of several lines. In our setup, the image rows contain A linear spectrometer captures a line image of the target and disperses the light from each line image pixel into a spectrum. Each spectral image contains the spatial information along an axis and the spectral information along the other axis. Multiple images must be acquired to reconstruct a two-dimensional scene based on the combination of several lines. In our setup, the image rows contain the spatial information, whereas the image columns the spectral information. The geometric calibration procedure described in [10] has allowed the detection of the portion of the NIR sensor useful for the construction of the hyperspectral cube. It also made it possible to determine the correspondence wavelength-column index. The spectral information occupies 254 columns with a spectral resolution of 0.32 pixel/wavelength. The objects under investigation are placed on a conveyor belt moving at a constant speed in a known direction and the spectrometer slip was set orthogonal to that direction. The reconstruction of the scene at a certain wavelength λ j was obtained by simply placing all j-th columns of the acquired image sequence side by side.
The samples are also investigated by a spectroradiometric device, in order to verify the presence and the position of absorption and reflectance peaks detected with the spectrometer platform. Spectra are acquired using a FieldSpec 4 (A.S.D. Inc., Longmont, CO, USA) spectroradiometer that measures light intensity in the range 350-2500 nm. The instrument uses an optical fiber bundle that collects the reflected radiation by three detectors spanning the visible, the near-infrared (VNIR) and the short-wave infrared (SWIR1 and SWIR2) wavelengths with a spectral sampling interval of 1.4 nm for the VNIR and 2 nm for the SWIR detectors. The spectroradiometer is set up on reflectance-mode and a Spectralon panel is used as white reference. Finally, the radiometer, with a 25 • conical field of view, is fixed at the same distance from the samples (8 cm) in order to analyze the same surface for all polymers investigated. In order to minimize the scattering effect due to sample roughness, for each sample a single spectrum is collected after rotating the sample each 90 • (0 • , 90 • , 180 • and 270 • ) and finally the four spectra are averaged in order to obtain a single and representative spectrum for each sample.

Procedure for the Analysis of Spectrometer Data
For the spectral characterization of plastic samples in the NIR region and extraction of the spectral signatures characterizing each material, a processing procedure is set up for the Specim Imspector spectrometer imagery.
Hyperspectral cube creation. The combination of the images of the scene at the different wavelengths represents the hyperspectral cube, i.e., a three-dimensional array containing spatial information on the x and y axes and spectral information on the z axis.
Radiometric calibration. This step eliminates the dependence of the measuring instruments (quantum efficiency of the sensor, filter transmission) on the spectra acquired. In fact, the spectral device does not record the reflectance of the material under investigation but rather the radiance, i.e., the amount of reflected radiation that reaches the camera sensor with energy content sufficient to be recorded. The reflectance value can be calculated only if the incident radiation on the target is known or if a suitable reference spectrum is available. In our investigation, since the incident radiation is unknown, the reflectance was calculated as the ratio of the radiance measured by the instrument and the spectrum of a Spectralon panel measured under the same lighting conditions.
Clustering and extraction of spectral signatures. This step, performed on the radiometrically calibrated hyperspectral cube, prescribes the extraction of the spectral signature of each pixel of the cube belonging to the object under investigation. For the characterization of the materials analyzed in this work, in addition to using the curves of each individual pixel belonging to the sample, the average spectral signature of all samples is computed. The sample average spectral signature was obtained by averaging the signatures of all pixels included in a properly selected area of the sample, which is defined as Region of Interest (ROI). To emphasize the absorption peaks of the spectral signatures [12], the method of normalization of the curves defined as Continuum Removal (CR) is applied. The CR is developed for the processing of aerial and satellite images, and it has been successfully applied to the identification of the geological composition of the materials [13] and to analyze vegetation [14]. This method involves the construction of a curve that joins the maxima of the original spectral curves (hereinafter maxima curve), and the computation of the curve given by the ratio between the original and maxima curves. The reflectance peak points are then standardized to the value of 1; the reflectance value decreases toward zero as the distance between the original spectrum and the continuum line increases.
Statistical analysis. Due to the high spectral resolution of the hyperspectral device associated with the large amount of information, spectral signatures are employed to compute the correlation matrix and thus reduce data dimensionality, highlighting the wavelengths which best differentiate the materials investigated. The correlation matrix is used by different authors for defect detection on apples [15], for feature extraction from hyperspectral data [16], for inland water quality mapping [17] and for geological unmixing classification [18].

Results and Discussion
Several acquisitions are performed arranging the samples on a black conveyor belt supplied by RemaPlast (Italian plastic recycling plant). Acquisitions were performed on: • samples of virgin material in granules; • samples of materials with their original shape; • samples in pieces from different sources; • samples in flakes from different sources.
In order to perform the radiometric calibration, images of the white reference are acquired before the sample under investigation.
The spectral signatures in the VIS region allow the discrimination of materials only as a function of their color and have no relation with the sample chemical structure. For this reason, only the spectral signatures of samples in the NIR region (900-1700 nm) are processed, as these are more effective in the separation of materials by polymer.
From the hyperspectral cube of each polymer sample, Regions of Interest (ROI) are created, and corresponding signatures are extracted as spectral library. The ROI dimensions are different case by case. To establish an optimal and homogeneous dataset for spectral index computation and validation, the initial dataset is reduced and 3000 spectral signatures for each sample are randomly extracted from the original ROI. Then, the dataset employed comprises 45,000 spectral signatures.
After, representative reflectance spectral signatures of PET, PS and PLA at different life cycle stages, in the range 900-1700 nm, are computed by consistently averaging the signatures within the spectral library. Figures 2-4 show those representative spectral signatures, in which the x axis shows the wavelengths while the y axis shows the values of reflectance (dimensionless by definition).

Results and Discussion
Several acquisitions are performed arranging the samples on a black conveyor belt supplied by RemaPlast (Italian plastic recycling plant). Acquisitions were performed on:  samples of virgin material in granules;  samples of materials with their original shape;  samples in pieces from different sources;  samples in flakes from different sources.
In order to perform the radiometric calibration, images of the white reference are acquired before the sample under investigation.
The spectral signatures in the VIS region allow the discrimination of materials only as a function of their color and have no relation with the sample chemical structure. For this reason, only the spectral signatures of samples in the NIR region (900-1700 nm) are processed, as these are more effective in the separation of materials by polymer.
From the hyperspectral cube of each polymer sample, Regions of Interest (ROI) are created, and corresponding signatures are extracted as spectral library. The ROI dimensions are different case by case. To establish an optimal and homogeneous dataset for spectral index computation and validation, the initial dataset is reduced and 3000 spectral signatures for each sample are randomly extracted from the original ROI. Then, the dataset employed comprises 45,000 spectral signatures.
After, representative reflectance spectral signatures of PET, PS and PLA at different life cycle stages, in the range 900-1700 nm, are computed by consistently averaging the signatures within the spectral library. Figures 2-4 show those representative spectral signatures, in which the x axis shows the wavelengths while the y axis shows the values of reflectance (dimensionless by definition). Appl. Sci. 2020, 10, x FOR PEER REVIEW 8 of 20 Figure 2. Spectral signatures of PET samples in the NIR region detected with the linear spectrometer (data referred to as 'linear' in the plot) and with the spectroradiometer (data referred to as 'punctual' in the plot).  Appl. Sci. 2020, 10, x FOR PEER REVIEW 8 of 20 Figure 2. Spectral signatures of PET samples in the NIR region detected with the linear spectrometer (data referred to as 'linear' in the plot) and with the spectroradiometer (data referred to as 'punctual' in the plot).  The spectral signatures show that samples of the same polymer, at different stages of the life cycle, present similar behavior to each other. For instance, Error! Reference source not found. shows that the representative spectral signatures of samples of virgin PET (PET_V) and waste (PET_F) feature similar trends that differ only in the reflectance values (the curves are translated along the y axis). This characteristic of the spectral signatures demonstrates how hyperspectral methods can be successfully applied to the separation of plastic materials, allowing the discrimination of different polymers regardless of their shape and color. Furthermore, it is observed that samples in flakes, or granular materials, generally show more pronounced trends with more intense peaks than samples  The spectral signatures show that samples of the same polymer, at different stages of the life cycle, present similar behavior to each other. For instance, Figure 2 shows that the representative spectral signatures of samples of virgin PET (PET_V) and waste (PET_F) feature similar trends that differ only in the reflectance values (the curves are translated along the y axis). This characteristic of the spectral signatures demonstrates how hyperspectral methods can be successfully applied to the separation of plastic materials, allowing the discrimination of different polymers regardless of their shape and color. Furthermore, it is observed that samples in flakes, or granular materials, generally show more pronounced trends with more intense peaks than samples in pieces or with their original shape. This difference applies to all cases but especially for PET and PLA samples (Figures 2 and 4). In Figure 2, spectral signatures detected with the linear spectrometer (data referred to as 'linear' in the plot) are overlapped to the spectral signatures measured via the FieldSpec 4 spectroradiometer (data referred to as 'punctual' in the plot). Remarkable is the match among the corresponding spectral signatures. To improve the figure readability, for the other polymers, i.e., PS and PLA, only the spectral signatures detected with the linear spectrometer are presented.
To highlight spectral signature features, the Continuum Removal (CR) procedure is applied to all data. Figures 5-7 show the results of the application of the CR procedure to the spectral signatures of all investigated samples. Reflectance values at wavelengths 950, 970, 1090, 1320, 1580 and 1700 nm are chosen for the normalization procedure as they correspond to points of local maxima or high reflectance values.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 9 of 20 in pieces or with their original shape. This difference applies to all cases but especially for PET and PLA samples (Error! Reference source not found. and 4). In Figure 2, spectral signatures detected with the linear spectrometer (data referred to as 'linear' in the plot) are overlapped to the spectral signatures measured via the FieldSpec 4 spectroradiometer (data referred to as 'punctual' in the plot). Remarkable is the match among the corresponding spectral signatures. To improve the figure readability, for the other polymers, i.e., PS and PLA, only the spectral signatures detected with the linear spectrometer are presented.
To highlight spectral signature features, the Continuum Removal (CR) procedure is applied to all data. Figures 5-7 show the results of the application of the CR procedure to the spectral signatures of all investigated samples. Reflectance values at wavelengths 950, 970, 1090, 1320, 1580 and 1700 nm are chosen for the normalization procedure as they correspond to points of local maxima or high reflectance values.   The curves processed with the CR method confirm the conclusions inferred from the analysis of the original spectral signatures, i.e., the coincidence of absorption peaks among samples of the same polymer but with different shape and size.

Tools for Determining Spectral Indices Useful for Polymers' Separation
The results above clearly show that each polymer presents a characteristic spectral signature with absorption peaks positioned at distinctive wavelengths. Then, the ratio (or difference) of the reflectance values at two well-defined wavelengths may be remarkably different from polymer to The curves processed with the CR method confirm the conclusions inferred from the analysis of the original spectral signatures, i.e., the coincidence of absorption peaks among samples of the same polymer but with different shape and size.

Tools for Determining Spectral Indices Useful for Polymers' Separation
The results above clearly show that each polymer presents a characteristic spectral signature with absorption peaks positioned at distinctive wavelengths. Then, the ratio (or difference) of the reflectance values at two well-defined wavelengths may be remarkably different from polymer to polymer. Reflectance values may then be combined as ratios or differences to yield hyperspectral indices. The chance of a successful identification and separation of different materials increases with the difference of their hyperspectral index values.
In the following paragraphs, tools employed to determine key wavelengths for hyperspectral index definition will be described.

Band Depth
The Band Depth (BD) is introduced to identify the amplitude of the main absorption peaks of the polymers investigated.
where BD(λ i ) is the Band Depth at wavelength λ i and CRR(λ i ) is the value of reflectance at wavelength λ i after CR. Virgin materials present spectral signatures which are considered as the most representative of the polymer and are then employed to compute the band depth. Table 2 contains the number of spectral signatures (n), the average reflectance value or Continuum Removal Reflectance (calculated employing the n spectral signatures of the pixels within the ROI) at wavelength λ CRR λ , the standard deviation related to the average reflectance (σ λ ) and the corresponding value of Band Depth (BD λ ). The Band Depth computation is carried out on spectral signatures after the application of the continuum removal procedure. The most evident absorption peaks are located at wavelengths 1660 nm (Band Depth equal to 0.508) for PET, 1170 nm (Band Depth equal to 0.509) for PLA and at 1150 nm (Band Depth equal to 0.522) for PS.

Correlation Matrix
The correlation between two random variables is a measure of their dependence. The correlation value is -1 when the variables are adversely correlated, whereas it is 1 when the maximum positive correlation is achieved and 0 when the variables are uncorrelated. In the contest of hyperspectral investigations, the computation and analysis of correlation matrices of spectral signatures make it possible to reduce the dataset dimensionality by providing a set of self-consisting bands and to ignore redundant and useless information for separating couples of polymers. This in turn allows the detection of feature wavelengths for the construction of robust hyperspectral indices. Each couple of polymers is considered for the computation of correlation matrices, i.e.: From the hyperspectral cube of each sample, 3000 hyperspectral signatures are randomly extracted from the ROI defined for each sample. The correlation matrix, R(λ i , λ j ), is computed as follows: where ρ(λ k ) is the reflectance at the generic wavelength λ k , ρ(λ k ) the mean reflectance at λ k and n the number of hyperspectral signatures employed to compute the correlation matrix. Figure 8 shows the 2-D correlation matrices for the polymer pairs PET-PLA, PET-PS and PLA-PS. The elements of the matrix represent the R 2 value for each pair of wavelengths.
where (λk) is the reflectance at the generic wavelength λk, ( ) the mean reflectance at λk and n the number of hyperspectral signatures employed to compute the correlation matrix.
Error! Reference source not found. shows the 2-D correlation matrices for the polymer pairs PET-PLA, PET-PS and PLA-PS. The elements of the matrix represent the R 2 value for each pair of wavelengths.  The smaller values within each matrix identify the pairs of wavelengths characterized by a low correlation between the reflectance values. The elements of the correlation matrix with values close to zero are represented in blue whereas values close to one are represented in red. Table 3 shows the wavelength pairs identified via the correlation matrices and the related values of R 2 . Wavelengths identified with the correlation matrix procedure for each pair of polymers are employed to calculate two typologies of hyperspectral indices, one based on the ratio and the other one on the difference of reflectance values at given wavelengths. Such simple typologies of calculation are useful and effective to reduce computation time during processing chains. For each material, 3000 values of the indices (corresponding to 3000 pixels randomly selected within the ROI) are computed as well as their standard deviation. For instance, considering the hyperspectral indices I(λ i ,λ j ), 3000 values of the ratio between the reflectance values at the two generic wavelengths λ i and λ j were computed. Those 3000 values are averaged and the threshold value calculated: where µ 1 . and µ 2 represent the average hyperspectral index for polymer 1 and 2 of the pair respectively. Tables 4-6 present the ratio and difference indices for each pair of samples in terms of mean and threshold values. Table 4. First set of spectral indices for the pair PET-PLA. λ 1 /λ 2 (λ 1 -λ 2 ) are computed as the ratio among reflectance values at wavelengths λ 1 and λ 2 .  The values reported in the tables demonstrate that the application of the Continuum Removal (CR) strategy allows the achievement of larger differences between the average values of the hyperspectral indices. Threshold values obtained with the procedure described above are then employed for the following stage of index validation.

Hyperspectral Index Validation
The last phase consists in verifying whether hyperspectral indexes, calculated employing only samples of virgin materials, are suitable for separating the different polymers no matter the shape of the sample. The separation of two materials of unknown typology into two classes (for instance class 1 and class 2) is based on the comparison of the hyperspectral indices computed employed the spectral signature belonging to the polymer ROI with the given threshold value: if the value of the index is lower than the threshold value, the signature is assigned, for example, to class 1, vice versa if the value of the index is greater than the threshold it will be assigned to class 2.
The separation accuracy is introduced to quantitatively evaluate the performance of the hyperspectral indices computed. It is defined as the ratio (expressed as a percentage) between spectral signatures correctly assigned to a class (class 1 or 2) and the total number of spectral signatures belonging to the same class.
The pairs of polymers used for the separation accuracy computation are, consistently with the previous analysis, PET-PLA, PS-PLA and PET-PS and samples of virgin materials are considered for index validation, as well as samples in flakes, pieces and original shape.
The separation accuracy results are reported as histograms in Figures 9 and 10, where the different hyperspectral indexes and their performances (expressed as a percentage) appear.
Remarkable separation accuracies are achieved for entire set of hyperspectral indices provided by the correlation matrix analysis. The application of the CR procedure is in general useful to increase the separation accuracies. To strengthen the index validation, the separation accuracy is computed also for samples in flakes, pieces and with their original shape. For PET-PLA samples, the accuracy is higher than 83% with the best performance provided by the wavelength ration 1170 nm/ 1650 nm (100% accuracy for both polymers). For PLA-PS samples, the accuracy is 100% for wavelength ratios 1430 nm/1140 nm, 1160 nm/1140 nm and 1470 nm/1640 nm. Finally, for PET-PS samples, the index providing the best separation accuracy is 1120 nm/ 1150 nm, whereas accuracy higher than 85% are achieved for the other two ratios. The method proposed to separate PET, PS and PLA waste samples can be potentially employed in a mechanical recycling plant. It involves a sequential procedure sketched in Figure 11 ('tree procedure'). As clearly demonstrated above, the continuum removal operation is profitably applied to the spectral signatures to enhance the separation process performance. Starting from a mixture of the three polymers (PET, PS and PLA), three separate fluxes are obtained, namely Flux #1 containing PET, Flux #2 containing PLA and Flux #3 containing PS. The separation accuracies are equal to 83.59% for PET, 99.92% for PS and 99.86% for PLA.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 18 of 20 Figure 11. Separation sketch employing the 'tree procedure' used to separate PET, PS and PLA.
The threshold values used in the 'tree procedure' to discriminate the three typologies of plastics was inferred from the analysis of the virgin materials and tested with the polymers in flakes and the original shape.

Conclusions
The aim of this work is the characterization via the hyperspectral analysis of different plastic materials and the development of an effective methodology for their separation in a mechanical recycling plant. The results obtained by applying the hyperspectral image analysis confirm the effectiveness of this innovative methodology in the characterization of plastic materials, both in the case of traditional plastics and bio-plastics. Reflectance values depend on several factors such as: (1) the thickness of the material; (2) lighting conditions; (3) the characteristics of the instrumentation used. Nevertheless, in spite of the device employed to extract spectral signatures (spectrometer platform rather than spectroradiometer) and the shape of the sample (virgin granules, flakes or original shape of the waste), each polymer presents peculiar features (remarkable absorption peaks at characteristic wavelengths) that can be employed to set up the separation procedure. It is also observed that spectral signatures in the VIS wavelength range (400-1000 nm) are influenced by the color of the material, while in the NIR range (900-1700 nm) they are related only to the chemical structure of the material.
It is worth noting that among the different types of waste, for each polymer the spectral signatures of samples in flakes presented the most pronounced absorption depths compared to the samples of the same polymer in pieces or with the original shape. The application of the Continuum Removal method has highlighted the characteristic peaks of each material, making it possible to increase the absorption peaks of samples in pieces, and thus contributing to significantly improving the spectral signatures measured.
In order to identify the wavelengths useful for the discrimination of materials to be employed The threshold values used in the 'tree procedure' to discriminate the three typologies of plastics was inferred from the analysis of the virgin materials and tested with the polymers in flakes and the original shape.

Conclusions
The aim of this work is the characterization via the hyperspectral analysis of different plastic materials and the development of an effective methodology for their separation in a mechanical recycling plant. The results obtained by applying the hyperspectral image analysis confirm the effectiveness of this innovative methodology in the characterization of plastic materials, both in the case of traditional plastics and bio-plastics. Reflectance values depend on several factors such as: (1) the thickness of the material; (2) lighting conditions; (3) the characteristics of the instrumentation used. Nevertheless, in spite of the device employed to extract spectral signatures (spectrometer platform rather than spectroradiometer) and the shape of the sample (virgin granules, flakes or original shape of the waste), each polymer presents peculiar features (remarkable absorption peaks at characteristic wavelengths) that can be employed to set up the separation procedure. It is also observed that spectral signatures in the VIS wavelength range (400-1000 nm) are influenced by the color of the material, while in the NIR range (900-1700 nm) they are related only to the chemical structure of the material.
It is worth noting that among the different types of waste, for each polymer the spectral signatures of samples in flakes presented the most pronounced absorption depths compared to the samples of the same polymer in pieces or with the original shape. The application of the Continuum Removal method has highlighted the characteristic peaks of each material, making it possible to increase the absorption peaks of samples in pieces, and thus contributing to significantly improving the spectral signatures measured.
In order to identify the wavelengths useful for the discrimination of materials to be employed for the construction of hyperspectral indexes, the correlation matrix is computed, which proved to be a valid instrument for the detection of key wavelengths. Using the wavelengths provided by the correlation matrix, hyperspectral indices are calculated as the ratio of reflectance values at different, key wavelengths.
The hyperspectral indexes are used to separate each pair of materials, namely PET and PS, PET and PLA, PLA and PS, obtaining very satisfactory separation accuracy (spectral signatures correctly assigned to the material class).