Foreign Object Detection in Multispectral X-ray Images of Food Items Using Sparse Discriminant Analysis

  • Gudmundur Einarsson
  • Janus N. Jensen
  • Rasmus R. Paulsen
  • Hildur Einarsdottir
  • Bjarne K. Ersbøll
  • Anders B. Dahl
  • Lars Bager Christensen
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10269)


Non-invasive food inspection and quality assurance are becoming viable techniques in food production due to the introduction of fast and accessible multispectral X-ray scanners. However, the novel devices produce massive amount of data and there is a need for fast and accurate algorithms for processing it. We apply a sparse classifier for foreign object detection and segmentation in multispectral X-ray. Using sparse methods makes it possible to potentially use fewer variables than traditional methods and thereby reduce acquisition time, data volume and classification speed. We report our results on two datasets with foreign objects, one set with spring rolls and one with minced meat. Our results indicate that it is possible to limit the amount of data stored to 50% of the original size without affecting classification accuracy of materials used for training. The method has attractive computational properties, which allows for fast classification of items in new images.


X-ray Multispectral Sparse classification Foreign object detection 



This work is supported by the Lundbeck foundation, the Technical University of Denmark and the NEXIM research project funded by the Danish Council for Strategic Research (contract no. 11-116226) within the Program Commission on Health, Food and Welfare. We would like to thank the anonymous reviewers for providing valuable comments on the manuscript.


  1. 1.
    Barthelme, S.: imager: Image Processing Library Based on ‘CImg’ (2016). r package version 0.31,
  2. 2.
    Brambilla, A., Ouvrier-Buffet, P., Rinkel, J., Gonon, G., Boudou, C., Verger, L.: CdTe linear pixel X-ray detector with enhanced spectrometric performance for high flux X-ray imaging. IEEE Trans. Nuclear Sci. 59(4), 1552–1558 (2012)CrossRefGoogle Scholar
  3. 3.
    Chung, D., Keles, S., et al.: Sparse partial least squares classification for high dimensional data. Stat. Appl. Genet. Mol. Biol. 9(1), 17 (2010)MathSciNetzbMATHGoogle Scholar
  4. 4.
    Clemmensen, L., Hastie, T., Witten, D., Ersbøll, B.: Sparse discriminant analysis. Technometrics 53(4), 406–413 (2011). Taylor & FrancisMathSciNetCrossRefGoogle Scholar
  5. 5.
    d’Aspremont, A., El Ghaoui, L., Jordan, M.I., Lanckriet, G.R.: A direct formulation for sparse PCA using semidefinite programming. SIAM Rev. 49(3), 434–448 (2007)MathSciNetCrossRefzbMATHGoogle Scholar
  6. 6.
    Einarsdóttir, H., Emerson, M.J., Clemmensen, L.H., Scherer, K., Willer, K., Bech, M., Larsen, R., Ersbøll, B.K., Pfeiffer, F.: Novelty detection of foreign objects in food using multi-modal X-ray imaging. Food Control 67, 39–47 (2016)CrossRefGoogle Scholar
  7. 7.
    Friedman, J., Hastie, T., Tibshirani, R.: The elements of statistical learning. Springer series in statistics, vol. 1. Springer, Berlin (2001)zbMATHGoogle Scholar
  8. 8.
    Gorecki, A., Brambilla, A., Moulin, V., Gaborieau, E., Radisson, P., Verger, L.: Comparing performances of a CdTe X-ray spectroscopic detector and an X-ray dual-energy sandwich detector. J. Instrumen. 8(11), P11011 (2013)CrossRefGoogle Scholar
  9. 9.
    Pfeiffer, F., Bunk, O., David, C., Bech, M., Le Duc, G., Bravin, A., Cloetens, P.: High-resolution brain tumor visualization using three-dimensional X-ray phase contrast tomography. Phys. Med. Biol. 52(23), 6923 (2007)CrossRefGoogle Scholar
  10. 10.
    Pfeiffer, F., Weitkamp, T., Bunk, O., David, C.: Phase retrieval and differential phase-contrast imaging with low-brilliance X-ray sources. Nat. Phys. 2(4), 258–261 (2006)CrossRefGoogle Scholar
  11. 11.
    R Core Team: R: a language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria (2015).
  12. 12.
    Rebuffel, V., Rinkel, J., Tabary, J., Verger, L.: New perspectives of X-ray techniques for explosive detection based on CdTe/CdZnTe spectrometric detectors. International Symposium on Digital Industrial Radiology and Computed Tomography-We, vol. 2, pp. 1–8 (2011)Google Scholar
  13. 13.
    Tschumperlé, D.: The CImg library. In: IPOL 2012 Meeting on Image Processing Libraries, p. 4 (2012)Google Scholar
  14. 14.
    Zou, H., Hastie, T.: Regularization and variable selection via the elastic net. J. Roy. Stat. Soc.: Ser. B (Stat. Methodol.) 67(2), 301–320 (2005)MathSciNetCrossRefzbMATHGoogle Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Gudmundur Einarsson
    • 1
  • Janus N. Jensen
    • 1
  • Rasmus R. Paulsen
    • 1
  • Hildur Einarsdottir
    • 1
  • Bjarne K. Ersbøll
    • 1
  • Anders B. Dahl
    • 1
  • Lars Bager Christensen
    • 2
  1. 1.DTU ComputeTechnical University of DenmarkKongens LyngbyDenmark
  2. 2.Teknologisk InstitutTaastrupDenmark

Personalised recommendations