Abstract
The quality and variety of coffee are crucial to its final flavor. Due to the influence of various factors on the taste of coffee during the production process, hyperspectral imaging (HSI) stands out with its great potential in quality assessment, defect monitoring, and feature identification. This paper comprehensively summarizes current HSI-based coffee research, critically revealing the capabilities and existing shortcomings of HSI in practical applications in the coffee industry. Subsequently, the potential applications of HSI technology in coffee composition analysis and flavor estimation, defect diagnosis, and identification of origin or attributes are elaborated. Finally, from practical and sustainable perspectives, the key challenges and future prospects of HSI are highlighted, with digitalization being the main goal of the coffee industry.
Introduction
1.1 Coffee Production and Consumption
Coffee, as a globally popular beverage, is favored by people of different ages and backgrounds. According to data from the International Coffee Organization (ICO), global coffee consumption increased from 2001 to 2019, despite slight fluctuations in some years (Figure 1(a)). In the past two decades, U.S. consumption trends have shown steady growth (Figure 1(b)). Figure 1(b) displays the coffee consumption by country in 2019 (in thousands of 60 kg bags), with the U.S. significantly outpacing other nations at 27,309.95 thousand bags, highlighting the importance of coffee consumption.
1.2 Chemical Composition and Quality Characteristics of Coffee
Coffee is not only a lifestyle but also a culture that promotes social interaction. Moderate coffee consumption (typically less than 300–400 mg of caffeine per day) is considered beneficial for health, including reducing the risk of bone and nervous system diseases, cardiovascular diseases, and cancer. Table 1 shows some key flavor-contributing components after coffee roasting and their health benefits, including caffeine, nicotine, chlorogenic acid, cafestol, and kaempferol, while sucrose is almost completely decomposed during the roasting process, producing various acids.

Figure 1 shows the global coffee consumption overview reported by the ICO (a) trends and (b) quantities.
Coffee quality is crucial for its flavor and taste. The physical characteristics of coffee beans, such as size, color, defects, and blending ratios, are important factors affecting quality. Chemically, the composition of coffee components varies by species and is influenced by the growth environment (such as temperature, humidity, altitude, and shading). Although there are currently over one hundred coffee varieties, Arabica (Coffea arabica) and Robusta (Coffea robusta) are the two main international production species. ICO statistics show that in 2020, these two types of coffee beans accounted for approximately 60% and 40% of the global total production, respectively, demonstrating their dominance.

For Arabica coffee, the average percentage of chemical components in green seeds was statistically analyzed, where carbohydrates or fiber content accounts for about half, while the ranges for caffeine, canavanine, chlorogenic acid, cafestol (unsaponifiable triglycerides), and sucrose are 0.9-1.3, 0.6-2.0, 4.1-7.9, 15.0-17.0, and 6.0-9.0%, respectively.
Additionally, the complexity of coffee flavors throughout the entire process, from cultivation to consumption, and the final cup pressure result may vary, depending on the steps of each process.
1.3 Coffee Quality Specifications and Control Technologies
The complex and numerous factors affecting coffee quality and its final mouthfeel highlight the importance of precise coffee selection and process inspection. Common detection methods include chromatographic methods, such as high-performance liquid chromatography (HPLC) and gas chromatography (GC), mass spectrometry (MS), inductively coupled plasma (ICP), as well as non-destructive spectroscopic methods using different bands. Compared to destructive techniques, non-destructive measurements are valued for their rapid, cost-effective, online, reliable, and highly accurate characteristics, but they are less widely used than destructive techniques and are still under development. Among non-destructive technologies, hyperspectral imaging (HSI) combines the advantages of spectroscopy and imaging technologies, simultaneously acquiring spectral and spatial information for efficient analysis and integrated with machine learning algorithms.
Over the past two decades, HSI has demonstrated significant practical application potential in quality and safety control of vegetables, fruits, meat, tea, milk, juice, powdered food, and other items; some review articles have comprehensively summarized the applications of HSI in certain fields of the food and beverage industry. However, there is currently no specialized review specifically on the applications of HSI in coffee. Additionally, research on object quality assessment and identification based on HSI has been increasing in recent years, while corresponding research in coffee has shown a lack of momentum. Therefore, this review aims to summarize the latest research on using hyperspectral imaging technology for coffee quality assessment and identification, and to highlight currently underexplored aspects and future prospects, to present a relatively comprehensive picture of its applications in the coffee industry and to inspire research in this field.
Hyperspectral imaging in coffee applications
Hyperspectral imaging (HSI), as a transformative technology, is emerging in the coffee industry, offering broad applications for quality control and traceability. This technology enables detailed analysis of coffee beans, providing insights into their chemical composition and physical characteristics. HSI is particularly effective in identifying the characteristics of coffee beans, such as moisture content, ripeness, and defects, which are crucial for ensuring the quality of the final product. It also plays a significant role in tracing the origin of coffee, helping to better understand the geographical and environmental factors that affect coffee quality. The non-destructive testing properties of hyperspectral imaging make it especially suitable for specialty coffee, where maintaining the integrity of the beans is essential. As HSI technology continues to develop, its applications in the coffee industry are expanding to achieve better quality analysis.
2.1 Component Analysis and Flavor Prediction
2.1.1 Moisture, Sugar, and Lipids
Moisture content directly affects the quality of coffee beans. During the roasting process, roasters use high temperature and pressure to expel residual moisture from the coffee beans. The International Coffee Organization (ICO) recommends that the ideal moisture content of green coffee beans should be between 8% and 12.5%. Excessive moisture content can lead to mold growth, posing challenges for long-term storage. Conversely, if the moisture content is too low, the taste of the coffee may change significantly. Recent research on the analysis of moisture components in coffee has shown encouraging results in this field. Caporaso et al. applied Partial Least Squares Regression (PLSR) and Multivariate Linear Regression (MLR) to identify the linear relationship between the moisture content of green coffee beans and the spectral information obtained in the 1000-2500 nm band. They achieved an R² value of over 0.80 and quite low root mean square error (RMSE) values. Achata et al. reported an R² value of 0.99 for moisture determination in instant coffee powder, with an overall RMSE of 0.1. These findings validate the potential of Hyperspectral Imaging (HSI) in monitoring moisture content in coffee before roasting and in the final product. However, the effectiveness of HSI during the roasting process and in roasted coffee beans has not yet been explored. Therefore, further research is expected on moisture in different coffee processing stages or in coffee beans at different states. The levels of sugar and lipids are important for the taste of coffee, primarily contributing to the flavor intensity and precursor substances. During the roasting process, the Maillard reaction and subsequent Strecker degradation occur, converting carbohydrates and free amino acids into most flavor precursor compounds. The main low-molecular-weight carbohydrate, sugar, in these coffee beans decomposes into xylose, arabinose, and dehydrated glucose upon heating, thus contributing to the acidity of the coffee. The lipids in coffee, also known as coffee fat or oil, are mainly composed of sterols, triglycerides, tocopherols, and up to 20% diterpenes, which affect the aroma. Additionally, the oxidation of lipids during long-term storage reduces the aroma. Since lipids and sugar are unstable in coffee beans under heat and pressure, separate roasting models may be required. For pre-roasting models, Caporaso et al. tested the sugar and lipid content in green coffee beans, and the results showed that the linear model for coffee lipids performed better than that for sugar, with both models displaying lower calibration and cross-validation errors. However, similar studies for roasted coffee beans are lacking, which creates a gap in our understanding of the correlation between HSI data and the content of sugar or lipids during the roasting process, as well as their reduction and transformation during roasting.
Related products: please click here