Case Studies
Detecting foreign objects on food with the Specim FX17 hyperspectral camera
POSTED 12/11/2024
Foreign objects in food pose significant risks to consumer safety. The discovery of foreign objects often results in product recalls, which can be costly for businesses and damage the brand’s reputation.
To ensure the quality and safety of food products, manufacturers must implement robust quality assurance throughout the production process, where hyperspectral imaging offers a solution.
In this study, we used the Specim FX17 hyperspectral camera (900 – 1700 nm) and Specim Lab Scanner 40*20 to measure three food products: chicken fillet, veggie patties, and goat cheese containing contaminants. We placed foreign objects on each food product with the aim of creating a classification model to detect those.
Figure 1. Scannig the chicken fillet with the Specim FX17 camera and LabScanner 40×20.
First, we measured the chicken fillet, a valuable food product. We used wood, metal, and two kinds of plastics (PE and PS) as contaminants. The food was placed on baking paper.
Figure 2 shows the measured chicken fillet with and without the contaminants.
Figure 2. Chicken fillet with contaminants. Photos (left) and hyperspectral false RGB image (right).
After this, we examined the veggie patties using the same contaminants as those used for the chicken fillet (Figure 3).
Figure 3. Veggie patties with contaminants. Photo (left) and hyperspectral false RGB image (right)
Finally, we measured the goat cheese. We used a piece of packaging material, i.e., a small piece of thin white plastic wrapping, as a contaminant. Figure 4 shows that the contaminant looks very similar to the cheese and is hardly visible with an RGB camera or the naked eye.
Figure 4. Goat cheese with contaminant. Photo (left) and hyperspectral false RGB image (right).
Spectral comparison between food and foreign objects
Each data was normalized with respect to white and dark references. We processed the resulting reflectance data with the SpecimINSIGHT analysis software. Area selection from the chicken fillet and contaminants were taken, and a mean spectrum from each selection was drawn to the spectral plot for comparison (Figure 5).
The color of each spectra matches the color of the corresponding selection on the image. The spectral plot shows that the spectral signatures of the chicken fillet and all the contaminants are clearly different.
Figure 5. Spectral comparison of the chicken fillet and the contaminants. Chicken = light brown, PS = red, PE = purple, wood = yellow), metal = green.
The spectral signature of the veggie patties also differs from the contaminants, as shown in Figure 6.
Figure 6. Spectral comparison of veggie patties and contaminants. Vegetable steak = brown, PS = red, PE = purple, wood = yellow, metal = green.
The goat cheese packaging material is slightly transparent, which causes the spectrum of the goat cheese to mix with the spectrum of the packaging material (Figure 7). Therefore, the spectral signatures of the goat cheese and the contaminant don’t differ as significantly as they do with the chicken fillet and veggie patties and the contaminants.
Figure 7. Spectral comparison of goat cheese and contaminant. Goat cheese = white, packaging material = red.
Classification
We created a PLS-DA model(*) for each food product to detect foreign objects. Models for chicken fillet (Figure 8) and veggie patties (Figure 9) both include five classes (PE, PS, wood, metal, and food). The goat cheese contains only one contaminant, so the classification model (Figure 10) includes only two classes (plastic and food). Each model’s background is detected and visualized with a black color.
Figure 8. Chicken fillet with contaminants: PS=red, PE=purple, wood=yellow), metal=green.
Figure 9. Veggie patties with contaminants: PS=red, PE=purple, wood=yellow), metal=green.
Figure 10. Goat cheese with contaminant. The piece of packaging material=red.
*PLS DA = PARTIAL LEAST SQUARE DISCRIMINANT ANALYSIS
Conclusion
This study used a Specim FX17 hyperspectral camera (900 – 1700 nm) to detect foreign objects on food products. Based on the measurement and analysis, we can conclude:
- Spectral signatures of food products and contaminants are distinguishable.
- Based on data captured with the Specim FX17 camera, creating a classification model to detect contaminants is possible.
- The Specim FX17 hyperspectral camera can detect contaminants that are invisible to the human eye and undetectable with a standard RGB camera.