# Hyperspectral Imaging for the Detection of Bitter Almonds in Sweet Almond Batches
## 1 Introduction  
Almonds are one of the most important tree nuts, containing high amounts of vegetable proteins and fat--mainly monounsaturated and polyunsaturated fatty acids, as well as other nutrients such as dietary fibre, vitamins, minerals and other bioactive constituents [1; 2; 3]. These fruits have been included in guidelines of healthy eating due to their nutritional quality and the evidence of health benefits associated with their consumption have, in turn, increased their commercialisation. Nowadays, almonds have become the major nut consumed in the world, accounting nearly for one-third of all the tree nuts produced worldwide, being the USA, Spain and Australia in the three main reporters [4].  
The most common fraud that can be found in the sweet almond industry is the presence of bitter almonds in commercial batches. This presence not only causes unpleasant flavours but also problems in commercialisation; it is necessary to eradicate the bitter almonds from these commercial batches [5]. Moreover, bitter almonds are related to toxicity for the consumers due to their content in the cyanogenic compound amygdala [6; 7]. Therefore, it is a key aspect for the industry to ensure the integrity of this product along the entire supply chain. Currently, high-performance liquid chromatography (HPLC) is the analytical technique used to measure the amygdala content in almonds. This technique is complex,destructive, highly expensive and time-consuming. It, therefore, does not allow real-time responses to be obtained for the almond processing industries.  
Different studies in the literature have demonstrated the potential of Near Infrared Spectroscopy (NIRS) to assure the integrity of sweet almond batches by identifying the presence of bitter kernels in them. In this sense, [PERSON] et al. [8] detected the presence of bitter almonds in commercial batches of sweet almonds using two portable NIRS devices, and [PERSON] et al. [9] used NIRS technology as a non-targeted control method to detect non-compliant or adulterated sweet almond batches. However, although hyperspectral imaging (HSI) has been proved to be suitable for quality estimation and fraud detection in the almond sector [10; 11; 12; 13; 14], there are no published articles related to the use of this technique for the detection of bitter almonds in commercial sweet almond batches. HSI presents a fundamental advantage for this purpose as it acquires both spatial and spectral information of each sample, combining them to provide a unique fingerprint for each pixel of the image [15], which is a key feature in dealing with the food heterogeneity. Thus, while NIRS technology provides a characteristic average spectrum of each sample or batch, HSI provides the spectrum of each individual pixel of the image. It would enable us to know the spatial distribution of the different physicochemical characteristics, favouring the individual identification of the different compounds in the sample. Because of that, HSI could be an optimal alternative analytical method as it not only enables to identify each individual bitter almond kernel but also because it allows to scan the greater surface of the sample, obtaining more representative information and, therefore, reducing the sampling error. This application is of great interest for detecting bitter almonds in sweet almond batches as the only presence of one bitter kernel is a problem for the industry.  
Then, this study aimed to study the feasibility of using a HSI system to identify single bitter almond kernels in commercial sweet almond batches, including bitter almonds in different percentages (from 5 to 20%). Furthermore, to reduce the amount of data, the selection of the most relevant wavelengths for the discrimination between sweet and bitter almond kernels was carried out.