Objective:

This application note examines how hyperspectral imaging (HSI) technology improves food quality and safety inspection, specifically focusing on detecting contaminants in coffee beans. Using Specim FX10, FX17, and SWIR cameras, this study explores how HSI technology detects foreign materials and contaminants to ensure quality and safety in food processing.

Overview of Food Quality and Safety Challenges

Food manufacturers face challenges in identifying contaminants, such as foreign objects, to maintain quality standards. Detecting non-coffee materials within coffee beans, like wooden sticks, shells, and stones, is critical to ensure quality and safety.

Hyperspectral Imaging allows for detailed contaminant detection by capturing spectral data across each pixel, differentiating between coffee beans and potential contaminants based on spectral features. The technology’s non-destructive nature is a major advantage for the food industry because it inspects products without altering or damaging them.

Hyperspectral Imaging in Food Quality Inspection

For this study, 2 types of coffee beans and several contaminants were measured using Specim’s FX10, FX17, and SWIR hyperspectral cameras, each offering a distinct spectral range and resolution:

Specim FX10 hyperspectral camera

Specim FX10

  • 400- 1000 nm
  • Spectral resolution: 5.5 nm
  • Pixel size: ca. 0.176 mm
Specim FX17 hyperspectral camera

Specim FX17

  • 900- 1700 nm
  • Spectral resolution: 8 nm
  • Pixel size: ca. 0.281 mm
Specim SWIR Hyperspectral Camera

SWIR

  • 1000- 2500 nm
  • Spectral resolution: 12 nm
  • Pixel size: ca. 0.520 mm

Data were processed using SpecimINSIGHT, part of the SpecimONE processing platform.

The contaminants tested included wooden sticks, shells, and stones. Spectral responses were recorded for each camera to evaluate their effectiveness in distinguishing these contaminants from coffee beans.

Figure 1: Photo of the sample and contaminants

Compared to traditional vision systems, the added value of hyperspectral imaging is clear:

  • Both the coffee beans and contaminants were roasted, resulting in very similar colors. This makes an RGB camera alone unsuitable for distinguishing between them.
  • The coffee beans and contaminants also have similar densities, rendering X-ray imaging ineffective.
  • Hyperspectral imaging, however, reveals the chemical composition of the materials, making it the most suitable method for this application.

Sample Measurements and Data Analysis

Specim FX10 Camera

The spectral data from Specim FX10 did not reveal distinct features to reliably separate coffee beans from contaminants, with minimal differentiation observed in the spectra.

VNIR spectra of coffee beans

VNIR spectra of contaminants

Figure 2: Specim FX10 spectra of coffee beans and contaminants

As expected, a PLSDA model does not perform well for sorting the contaminants from the coffee beans.

Figure 3: Prediction based on the Specim FX10 related model (orange for beans and purple for contaminants)

Specim FX17 Camera

The Specim FX17 captured more distinguishing spectral features, particularly around 1200, 1430, and 1700 nm. These peaks aligned with coffee-specific spectra, enhancing the ability to differentiate contaminants.

NIR spectra of coffee beans

NIR spectra of contaminants

Figure 4: Specim FX17 spectra of coffee beans and contaminants

We also emphasize that spectral differences can be enhanced using appropriate pre-processing techniques. Additionally, a spectral region of interest (ROI) covering only the relevant range can be defined, showcasing another advantage of the Specim FX camera.

Figure 5: Specim FX17 related spectra of contaminants (purple) and beans (orange) after pre-processing.

Modeling results showed good separation between coffee beans and contaminants.

Figure 6: Prediction based on the Specim FX17 related model (orange for beans and purple for contaminants)

SWIR Camera

The SWIR camera displayed the most comprehensive spectral features. It encompasses the spectral range of the Specim FX17, going beyond, up to 2500 nm. This added range enabled the model to include more caffeine-related spectral markers, enhancing contaminant detection accuracy.

SWIR spectra of coffee beans

SWIR spectra of contaminants

Figure 7: SWIR spectra of coffee beans and contaminants
Figure 8: prediction based on the Specim SWIR related model (orange for beans and purple for contaminants)

Conclusion

Based on the results, both Specim FX17 and SWIR cameras effectively identified contaminants, with SWIR providing slightly higher accuracy. However, due to cost efficiency and compatibility with SpecimONE, we recommended the Specim FX17 camera for contaminants detection in coffee processing.

Specim FX10 model

Specim FX17 model

SWIR model

Implementing hyperspectral imaging in food processing enhances product safety, minimizes waste, and improves quality control standards, offering manufacturers a reliable tool to detect contaminants and ensure the highest quality standards.

DISCLAIMER

This technical note is prepared by Specim, Spectral Imaging Ltd. and for generic guidance only. We keep all the rights to modify the content.

Related products:

SpecimONE spectral imaging platform

SpecimONE

Spectral imaging platform

Specim FX10 Hyperspectral Camera

Specim FX10

VNIR (400–1000 nm)

Specim FX17 Hyperspectral Camera

Specim FX17

NIR (900–1700 nm)

Specim SWIR Hyperspectral Camera

Specim SWIR

SWIR (1000–2500 nm)

SpecimINSIGHT

SpecimINSIGHT