Introduction

For every food that is sold on the market, microbiological safety and quality issues are crucial. There are numerous requirements for the food’s microbial safety and quality before it may be exported. For both food imports and exports, each nation developed its own standards. There are numerous traditional and instrumental methods for assessing the quality and safety of food products. There are two types of techniques: destructive and non-destructive. Destructive techniques are those in which the sample used for the analysis is not further used for another purpose, and non-destructive techniques are those in which the sample is still useable after being analyzed. Except for a few spectroscopic techniques like Near-infrared spectroscopy (NIRS) and Fourier transform infrared (FTIR), the majority of traditional and experimental techniques (High-performance liquid chromatography (HPLC), Gas chromatography (GC), enzyme-linked immunosorbent assay (ELISA), and other conventional methods) are destructive. However, almost all of them take a lot of time, are laborious, and have a higher potential of human or machine error. Chemical reactions resulted in the creation of several waste products, and nearly all destructive techniques have a considerable possibility of creating biological hazards. Studies on recently developed non-destructive techniques have grown in popularity over the past 20 years among scientists and researchers. According to ElMasry and Sun (2010), a promising non-destructive analytical method for evaluating the safety and quality of food products is the hyperspectral imaging approach. hyperspectral imaging combines imaging and spectroscopic techniques, so it can offer the advantages of both separate approaches.

HSI has numerous advantages over other methods including multispectral imaging technology (MSI), near infrared spectroscopy (NIRS), and RGB (Red-Green-Blue) imaging. The only difference between MSI and HSI is the number of wavelengths. If there are more than 10 wavelengths, MSI is the case. The RGB imaging, and NIRS was compared with MSI, and HSI was presented in Table 1 (ElMasry & Sun 2010; Feng & Sun 2012; Gowen et al. 2007).

Table 1 Comparison of RGB imaging, and NIRS with MSI and HSI

In the end, it will produce a three-dimensional cube known as a hypercube by producing spatial maps at various wavelengths (ElMasry & Sun 2010; Williams & Sendin 2019). Each hyperspectral image contains unique data. Hypercube can be compared to a book in that each page contains unique information and that each page represents a different wavelength. HSI can be used to determine the different dietary components and their geographical distribution in the sample. The aim of this review is to introduce a novel non-destructive approach for identification and quantification of intrinsic as well as extrinsic quality of food.

Materials and methods

Collection and sorting of literature

Around 60 literatures were collected online by using keywords such as hyperspectral imaging, imaging and computer vision technology, non-destructive spectroscopy, etc. on google scholar.

Literatures were sorted on the basis of information. The information in literature related to basics of hyperspectral imaging, components of HSI, HSI used for food safety and quality was selected. After exclusion of literatures, 46 literatures were finally selected after manually analysis of information given in papers and discussion of relevance with the paper.

Results and discussion

Hyperspectral imaging technique components

Figure 1 depicts a typical HSI system used in research carried out by Du et al. (2020). The system is made up of five main parts: a light source or illumination unit, a stage for movement or translation, a spectrograph or wavelength dispersion device, a camera or area detector, and a computer with the necessary software (ElMasry & Sun 2010; Lu et al. 2020; Maldonado et al. 2018).

Fig. 1
figure 1

Components of hyperspectral imaging system (Du et al. 2020)

Due to the interaction between light and matter, the light source or illumination unit is essential for both spectroscopy and cameras. The objective-specified spectral range must be emitted by the source. There are two basic categories of light sources that can be used for spectrum imaging applications: illumination and excitation. For transmittance and reflection imaging, narrowband light is frequently employed as the excitation source and broadband light as the illumination source (Li et al. 2018). Halogen lights, light-emitting diodes (LEDs), and lasers are the main sources of HSI (Amigo & Grassi 2019). According to Amigo 2010 and Amigo & Grassi 2019, the optimal illumination should be as even, wide, and sample-damage-free as possible. The light sources are typically angled towards the sample at a 45-degree angle (Amigo & Grassi 2019). Halogen lamps-often tungsten halogen lamps-might provide the necessary light in the operational range of the ultraviolet, visible, and NIR sectors. The key benefits of halogen lights include their wide electromagnetic spectrum (340–2500 nm) coverage, low cost compared to the lamp’s price, low voltage requirement, and commercial availability (Amigo & Grassi 2019). The VIS-NIR-HSI systems were designed with the LED solution in mind as a more affordable lighting alternative. Different narrow band wavelengths are produced using monochromatic, VIS-emitting LEDs. GaAs-based LEDs with a wavelength range of 870–980 nm were the first infrared LEDs to be described (Amigo & Grassi 2019; Quist et al. 1962). For HSI and MSI, lasers and other tunable sources are also employed as excitation sources. Gas, dye solution, semiconductor, and crystal are all placed inside the resonant optical cavity, which stimulates emission to produce light (Qin 2010).

The heart of the HSI is the wavelength dispersion device (Wu & Sun 2013). In order to project broad-spectrum light onto a camera or detector, wavelength dispersion devices such as prisms, gratings, and filters are frequently used (Li et al. 2018). Filter wheels, image spectrographs, acousto-optic tunable filters (AOTF), and liquid crystal tunable filters are used as wavelength dispersion devices for the spectral imaging approach. A bandpass filter rejects additional light radiation outside of the bandpass, and a filter wheel is a simple instrument that has various bandpass filters in a disc. The imaging spectrograph is an improved version of the standard spectrograph that can instantly scatter a wide range of light spectra into distinct spectral wavelengths (Qin 2010). Electronically adjustable band pass filters include AOTF and LCTF. The solid state AOTF device consists of a crystal, an acoustic absorber, an acoustic transducer, a variable source operating at radio frequencies (RF), and a beam stop. Tellurium Dioxide (TeO2) is a typical crystal for producing AOTF and is based on light-sound interactions in crystals (Qin 2010). In order to block out all other wavelengths other than a certain wavelength, LCTF uses electronically controlled liquid crystal cells that are encircled by two polarizers (Qin 2010).

As an area detector for HSI, complementary metal oxide semiconductor and charge coupled device (CCD) cameras are used. Light conveying valuable information that will be captured by cameras after travelling through a wavelength dispersion device (Qin 2010). CCD sensors are made of light-sensitive components like silicon (Si) or indium gallium arsenide (InGaAs). (Wu & Sun 2013). Aluminium or stainless-steel is preferred as sample holders.

Methods for creating a three-dimensional hypercube

Point scanning, line scanning, area scanning, and single shot are the four methods used to generate a cube of hyperspectral images (Amigo & Grassi 2019; Amigo et al. 2013; Li et al. 2018; Lu et al. 2020; Wu & Sun 2013).

Point scan is a top left scanning technique that produces one-dimensional spectral data for each measurement (Amigo & Grassi 2019). It is also known as “whisker broom imaging”. In addition to point scan, push broom imaging and line scan methodologies also produce cubes using one spatial dimension and one spectral dimension. Area scanning, which similarly has two dimensions but both of which are spatial, is seen at the bottom left. According to Wu and Sun (2013), it is also known as spectral scanning or wavelength scanning. The most recent method, single shot, is the only one that can concurrently gather two spatial and one spectral pieces of information.

Point scan is not preferred for production line because it needs fixed position to scan whereas others are preferred for scanning of food products within the production line. The selection of scanning method depends on the purpose of the study. Localized visualization of chemical compounds needs fixed position (Williams & Sendin 2019) (Fig. 2).

Fig. 2
figure 2

Methods for creating a three-dimensional hypercube (Wu & Sun 2013)

Image acquisition modes

Typically, reflectance mode was employed in the majority of research. The two additional modes of transmittance and interaction are also used for image capturing. The reflectance mode was used to extract high relative information from a sample’s reflected light (Wu & Sun 2013). In transmittance mode, light that passed through the sample was recorded. The light source and cameras are placed 180 degrees apart from each other (Lu et al. 2020). It has the capacity to provide greater in-depth knowledge (Schaare & Fraser 2000; Wu & Sun 2013). The light source and detectors are set up in interactance mode, which combines reflectance and transmittance modes, on the same side at a 45° angle (ElMasry & Wold 2008; Wu & Sun 2013) (Fig. 3).

Fig. 3
figure 3

Modes: reflectance, transmittance and interactance (Lu et al. 2020)

Steps for analyzing hyperspectral image data

No sample preparation is necessary for the HSI system. HSI technique is not suitable for liquid foods but for powdered foods previously prepared aluminium plate (50 mm length* 50 mm width *15 mm height) having square well (30 mm length* 30 mm width * 2 mm depth) was used (Lim et al. 2016). Calibration is necessary since the detector can only detect spectral intensity and not the original reflectance value after image acquisition and creation of hyperspectral images at various wavelengths (Wu & Sun 2013). Black and white reference should be used to calibrate acquired hyperspectral pictures. The following equation can be used to calibrate reflectance:

$${\text{Ic}}=\frac{\left({{\text{I}}}_{{\text{o}}}-{\text{B}}\right)\times \left(100\right)}{\left({\text{W}}-{\text{B}}\right)}$$

Ic is a corrected hyperspectral image, B is a black image with nearly 0% reflectance, Io is an original hyperspectral image, and W is a white reference image with roughly 99.9% reflectance, according to Wu and Sun (2013).

Other important factors need to optimize for improved image quality. According to Riccioli et al. (2019) it is recommended to scan reference material for every ten sample scans, and dark ambient conditions and stainless-steel sample holder improved acquired images using NIR HSI system (Fig. 4).

Fig. 4
figure 4

Flowchart of a sequence of common procedures for examining hyperspectral image data

After hyperspectral image calibration, picture data extraction and analysis are required. Large amounts of data are produced by HSI from a single sample. Some chemometric algorithms and visualizing tools are needed for the mining of valuable or meaningful data (Williams & Sendin 2019). Some of the tools that are frequently used for hyperspectral image processing include MATLAB (MathWorks, Natick, MA, USA), Unscrambler (CAMO PROCESS AS, Oslo, Norway), and Environment for Visualizing Images (ENVI) software (Research Systems, Boulder, CO, USA) (Wu & Sun 2013).

Preprocessing is necessary following picture acquisition, according to Williams and Sendin (2019). Spatial and spectral preprocessing are needed to get rid of unwanted image artefacts (Amigo et al. 2013). According to Amigo et al. (2013), preprocessing entails unfolding, background removal, dead pixel removal, spike removal, and area of interest (ROI) selection. The issue of extremely high dimensionality can be solved by choosing spectral data at particular wavelengths (ElMasry & Sun 2010).

To forecast or visualize the hidden quality information, multivariate analysis is utilized to assess numerous variables of retrieved features (Wu & Sun 2013). Both qualitative classification and quantitative regression are categories for these techniques. Defective samples from new samples can be distinguished using multivariate classification. Multivariate classification also includes unsupervised and supervised classification. It is supervised classification if prior knowledge of predefined classes is necessary for classification (Wu & Sun 2013). Unsupervised techniques include Canonical Soft Independent and Modelling Class Analogy, Linear Discriminant Analysis, Support Vector Machine, Discriminant Analysis, Artificial Neural Network, and Partial Least Squares-Discriminant Analysis, while supervised techniques include Self-Organizing Map, Factor Analysis, Hierarchical Cluster Analysis, and Principle Component Analysis. To establish a relationship between a desired physical, chemical, or biological feature of an object and its spectrum, multivariate regression modelling is required. Principle Component Regression, Partial Least Squares Regression, and Multiple Linear Regression are examples of linear quantitative regression models. Artificial Neural Network and Support Vector Machine are examples of non-linear quantitative regression models (Kamruzzaman 2019). For model calibration and validation, component concentrations will be examined using conventional techniques. Numerous studies were conducted utilizing the HSI technique to evaluate food safety and quality after it was understood how it operated. Table 2 presents a selection of research studies on the use of HSI for food safety and quality evaluation.

Table 2 HSI method evaluation of food quality and safety

Applications

Merits

In terms of food quality and safety, HSI technology may be very advantageous to the food sector. Before using HSI technology, its advantages and disadvantages must be considered. First of all, as HSI is a non-destructive approach, it is possible to use the same sample for several purposes or analyses. With HSI technology, minimal sample preparation is required before analysis. This procedure is distinct from others where the use of chemicals or solvents is necessary. Therefore, there are no issues with the hazardous chemicals or trash that this method produces. It is helpful for both internal and external parameter analysis. With the aid of HSI, qualitative and quantitative analysis is also possible. Analysis by a model that has been calibrated and validated is relatively simple. The sample information generated by HSI comprises the quantity of the component at a particular area. Additionally, it has the capacity to simultaneously identify several sample constituents. It will produce the chemical image of the sample, making it very simple to see the chemical components that are present in the sample (ElMasry & Sun 2010). Using hyperspectral imaging technology, Yoon et al. (2015) developed an automated system for colony segmentation that can detect colonies with above 99% accuracy. According to Thiruppathi et al. (2017), NIR hyperspectral imaging can distinguish between distinct stages of fungal infection and varying quantities of ochratoxin A in grain kernels at an earlier stage.

Demerits

It is necessary to have huge storage capacities because HSI will produce a significant volume of data. To process the amount of data, fast computers are also necessary. The method’s biggest flaw is its computational complexity. For this technology, model calibration and validation are essential. It is challenging to extract useful information from so many photos and analyze that data because it is capable of producing several hyperspectral images at various wavelengths. According to ElMasry and Sun (2010), For the localized measurement of liquid products or homogenous samples, HSI has its limitations. To measure and quantify food quality and safety, more precisely calibrated and verified models are needed (Panagou et al. 2014). Using HSI, adulterants in milk were qualitatively analyzed with positive results; however, localized chemical images of liquid products could not be obtained (Kimbahune et al. 2016). It is quite challenging to develop high-accuracy models for such a vast number of microorganisms and to validate the models.

Conclusion

After studying all the aspects of the non-destructive hyperspectral imaging technology, it was stated that emerging technology such as hyperspectral imaging technology is very useful technology to improve the quality & safety of food in India instead of our current technologies. It can be easy to evaluate safety, and quality of foods including fruits and vegetables, dairy goods, meat products, seafood, grains, and legumes using hyperspectral imaging technology. Improved imaging equipment, high speed computers, advanced chemometrics models, large data storage capacities, advanced research to improve models, properly validated models and vast knowledge of hyperspectral imaging technology leads to an easy, time saving, and accurate quality and safety evaluation of foods. Combining hyperspectral imaging with Raman microscopic imaging (RMI) and fluorescence microscopic imaging (FMI) will improve the ability to analyze microbes. Qualitative and quantitative analysis of liquid or homogenous samples are possible with this advanced technique; However, localization of chemical compounds is limited for such products. With all the studies mentioned in review, the hyperspectral imaging technology can improve the quality and safety analysis in less time, and more accuracy.