Journal of Food Measurement and Characterization

, Volume 12, Issue 3, pp 1787–1794 | Cite as

Algorithm for automatic calibration of color vision system in foods

  • P. S. Minz
  • I. K. Sawhney
  • C. S. Saini
Original Paper


One of the important steps in development of machine vision system is calibration. In this study, a graphic user interface based program was developed and evaluated for calibration of color vision system. Algorithm is capable of processing user defined shades and generates calibration files. System was evaluated for calibration of color vision system to measure CIE L*a*b* color values of flavored milk and skim milk powder. The proposed method takes advantage of individual L*a*b* channel calibration using multiple regression analysis. Effect of image at different resolutions (0.3, 2, 8, 16 mega pixel) and calibration models (linear, quadratic, cubic and quartic) on color measurement was studied. Innovative trend analysis program for L*a*b* channel was useful in identifying and eliminating errors in early calibration steps. Image resolution of 8 mega pixel or above was found to be adequate to capture all graphical details for food colorimetric applications. The algorithm was successful in calibration of color vision system.


Algorithm Calibration Color measurement Color vision system Food 

List of symbols

\({\ddot {L}^*}\)

\({L^*}\) value measured by MVS before calibration

\({\hat {L}^*}\)

\({L^*}\) value measured by MVS after calibration


\({L^*}\) value measured by colorimeter

\(\ddot {a}_{{}}^{*}\)

\({a^*}\) value measured by MVS before calibration

\({\hat {a}^*}\)

\({a^*}\) value measured by MVS after calibration


\(a_{{}}^{*}\) value measured by colorimeter

\(\ddot {b}_{{}}^{*}\)

\({b^*}\) value measured by MVS before calibration

\({\hat {b}^*}\)

\({b^*}\) value measured by MVS after calibration


\({b^*}\) value measured by colorimeter

\(\hat {y}\)

Dependent variable


Independent or explanatory variable

\({\beta _i}\)

Regression coefficients


Error involved in fitting point i


Actual value

\({\hat {y}_i}\)

Predicted value


Color difference


Sum of squares


Compliance with ethical standards

Conflict of interest

All authors declare that they have no conflict of interest.


  1. 1.
    H.D. Wu, X. Yang, Y. Chen, X. He, Li, Application of image texture for the sorting of tea categories using multi-spectral imaging technique and support vector machine. J. Food Eng. 88, 474–483 (2008)CrossRefGoogle Scholar
  2. 2.
    S. Benalia, S. Cubero, J.M. Prats-Montalbán, B. Bernardi, G. Zimbalatti, J. Blasco, Computer vision for automatic quality inspection of dried figs (Ficus carica L.) in real-time. Comput. Electron. Agric. 120, 17–25 (2016)CrossRefGoogle Scholar
  3. 3.
    D. Wu, D.-W. Sun, Colour measurements by computer vision for food quality control: a review. Trends Food Sci. Technol. 29, 5–20 (2013)CrossRefGoogle Scholar
  4. 4.
    O. Grillo, V. Rizzo, R. Saccone, B. Fallico, A. Mazzaglia, G. Venora, G. Muratore, Use of image analysis to evaluate the shelf life of bakery products. Food Res. Int. 62, 514–522 (2014)CrossRefGoogle Scholar
  5. 5.
    H. Manninen, M. Paakki, A. Hopia, R. Franzén, Measuring the green color of vegetables from digital images using image analysis. LWT-Food Sci. Technol. 63, 1184–1190 (2015)CrossRefGoogle Scholar
  6. 6.
    D.F. Barbin, S.M. Mastelini, S. Barbon, G.F.C. Campos, A.P.A.C. Barbon, M. Shimokomaki, Digital image analyses as an alternative tool for chicken quality assessment. Biosys. Eng. 144, 85–93 (2016)CrossRefGoogle Scholar
  7. 7.
    B. Pace, D.P. Cavallo, M. Cefola, R. Colella, G. Attolico, Adaptive self-configuring computer vision system for quality evaluation of fresh-cut radicchio. Innov. Food Sci. Emerg. Technol. 32, 200–207 (2015)CrossRefGoogle Scholar
  8. 8.
    D. Mery, F. Pedreschi, A. Soto, Automated design of a computer vision system for visual food quality evaluation. Food Bioprocess Technol. 6, 2093–2108 (2012)CrossRefGoogle Scholar
  9. 9.
    A. Manickavasagan, N.K. Al-Mezeini, H.N. Al-Shekaili, RGB color imaging technique for grading of dates. Sci. Hortic. 175, 87–94 (2014)CrossRefGoogle Scholar
  10. 10.
    K.L. Yam, S.E. Papadakis, A simple digital imaging method for measuring and analyzing color of food surfaces. J. Food Eng. 61, 137–142 (2004)CrossRefGoogle Scholar
  11. 11.
    V. Briones, J.M. Aguilera, Image analysis of changes in surface color of chocolate. Food Res. Int. 38, 87–94 (2005)CrossRefGoogle Scholar
  12. 12.
    F. Mendoza, P. Dejmek, J.M. Aguilera, Calibrated color measurements of agricultural foods using image analysis. Post. Biol. Technol. 41, 285–295 (2006)CrossRefGoogle Scholar
  13. 13.
    K. León, D. Mery, F. Pedreschi, J. León, Color measurement in L*a*b* units from RGB digital images. Food Res. Int. 39, 1084–1091 (2006)CrossRefGoogle Scholar
  14. 14.
    R.A. Quevedo, J.M. Aguilera, F. Pedreschi, Color of salmon fillets by computer vision and sensory panel. Food Bioprocess Technol. 3, 637–643 (2008)CrossRefGoogle Scholar
  15. 15.
    Q. Wang, H. Wang, L. Xie, Q. Zhang, Outdoor color rating of sweet cherries using computer vision. Comput. Electron. Agric. 87, 113–120 (2012)CrossRefGoogle Scholar
  16. 16.
    A. Girolami, F. Napolitano, D. Faraone, A. Braghieri, Measurement of meat color using a computer vision system. Meat Sci. 93, 111–118 (2013)CrossRefGoogle Scholar
  17. 17.
    E.M. de Oliveira, D.S. Leme, B.H.G. Barbosa, M.P. Rodarte, A computer vision system for coffee beans classification based on computational intelligence techniques. J. Food Eng. 171, 22–27 (2016)CrossRefGoogle Scholar
  18. 18.
    S. Shafiee, S. Minaei, N. Moghaddam-Charkari, M. Barzegar, Honey characterization using computer vision system and artificial neural networks. Food Chem. 159, 143–150 (2014)CrossRefGoogle Scholar
  19. 19.
    T. Johnson, Methods for characterizing colour scanners and digital cameras. Displays 16, 183–191 (1996)CrossRefGoogle Scholar
  20. 20.
    H. Afshari-Jouybari, A. Farahnaky, Evaluation of Photoshop software potential for food colorimetry. J. Food Eng. 106, 170–175 (2011)CrossRefGoogle Scholar
  21. 21.
    E. Saldaña, R. Siche, R. Huamán, M. Luján, W. Castro, R. Quevedo, Computer vision system in real-time for color determination on flat surface food. Sci. Agropecu. 4, 55–63 (2013)CrossRefGoogle Scholar
  22. 22.
    N.A. Valous, F. Mendoza, D.W. Sun, P. Allen, Colour calibration of a laboratory computer vision system for quality evaluation of pre-sliced hams. Meat Sci. 81, 132–141 (2009)CrossRefGoogle Scholar
  23. 23.
    P.C. Marchal, D.M. Gila, J.G. García, J.G. Ortega, Expert system based on computer vision to estimate the content of impurities in olive oil samples. J. Food Eng. 119, 220–228 (2013)CrossRefGoogle Scholar
  24. 24.
    S.L. Campbell, J.P. Chancelier, R. Nikoukhah, Modeling and Simulation in SCILAB (Springer, New York, 2006)Google Scholar
  25. 25.
    G.E. Urroz, Regression analysis with scilab (Infoclearing House, 2001), Accessed 15 July 2013
  26. 26.
    J.O. Rawlings, S.G. Pantula, D.A. Dickey, Applied Regression Analysis: A Research Tool (Springer, New York, 2001)Google Scholar
  27. 27.
    S. Sharifzadeh, L.H. Clemmensen, C. Borggaard, S. Støier, B.K. Ersbøll, Supervised feature selection for linear and non-linear regression of L*a*b* color from multispectral images of meat. Eng. Appl. Artif. Intell. 27, 211–227 (2014)CrossRefGoogle Scholar
  28. 28.
    P. Jackman, D.-W. Sun, G. El Masry, Robust colour calibration of an imaging system using a colour space transform and advanced regression modelling. Meat Sci. 91, 402–407 (2012)CrossRefGoogle Scholar
  29. 29.
    N.A. Valous, F. Mendoza, D.-W. Sun, P. Allen, Texture appearance characterization of pre-sliced pork ham images using fractal metrics: Fourier analysis dimension and lacunarity. Food Res. Int. 42, 353–362 (2009)CrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2018

Authors and Affiliations

  1. 1.Dairy Engineering DivisionNational Dairy Research InstituteKarnalIndia
  2. 2.Department of Food Engineering and TechnologySant Longowal Institute of Engineering and TechnologyLongowalIndia

Personalised recommendations