Development of an open-source software to measure food color from images
DOI:
https://doi.org/10.24215/30089336e002Keywords:
foods, color, images, computer program, open sourceAbstract
This work presents the computational implementation and evaluation of a simple open-source software to measure the color of solid foods in the L*a*b* space, from digital images. The program was implemented in the free software OCTAVE, and allows reading an image and converting the RGB color space to L*a*b*. A direct conversion model was implemented, which does not require a calibration step, and an empirical model that requires calibration; for this aim, a known color chart was used. The software code can be easily modified according to the needs of each user. To assess the software, 18 food samples of a wide color range, with different lighting, were used and compared with measurements obtained with a colorimeter. The average total color difference (DE) between colorimeter and images values was 23.1, while the average difference of L*, a*, and b* were 8.6, 14.9, and 13.2, respectively. The developed software is a reliable alternative when no other color measuring instrument is available.
Downloads
References
Cserhalmi, Z., Sass-Kiss, Á., Tóth-Markus, M. y Lechner, N. (2006). Study of pulsed electric field treated citrus juices. Innovative Food Science & Emerging Technologies, 7(1-2), 49-54. https://doi.org/10.1016/j.ifset.2005.07.001
Cubero, S., Aleixos, N., Moltó, E., Gómez-Sanchis, J. y Blasco, J. (2011). Advances in machine vision applications for automatic inspection and quality evaluation of fruits and vegetables. Food and Bioprocess Technology, 4, 487-504. https://doi.org/10.1007/s11947-010-0411-8
Eaton, J. W., Bateman, D., Hauberg, S. y Wehbring, R. (2023). GNU Octave version 8.1.0 manual: a high-level interactive language for numerical computations. https://www.gnu.org/software/octave/doc/v8.1.0/
Fay, C. D. y Wu, L. (2024). Critical importance of RGB color space specificity for colorimetric bio/chemical sensing: A comprehensive study. Talanta, 266, 124957. https://doi.org/10.1016/j.talanta.2023.124957
Goñi, S. M. y Salvadori, V. O. (2017). Color measurement: comparison of colorimeter vs. computer vision system. Journal of Food Measurement and Characterization, 11(2), 538-547. https://doi.org/10.1007/s11694-016-9421-1
Goñi, S. M., Mattioli, N. G., Olivera, D. y Salvadori, V. (2024). Medición del color de alimentos en el espacio CIELAB a partir de imágenes. [Conjunto de datos]. Versión del 6 de mayo de 2024. Universidad Nacional de La Plata. http://sedici.unlp.edu.ar/handle/10915/165649
Gonzalez, R. C. y Woods, R. E. (2002). Digital Image Processing (2da Ed.). Prentice Hall.
Hernández Salueña, B., Sáenz Gamasa, C., Diñeiro Rubial, J. M. y Alberdi Odriozola, C. (2019). CIELAB color paths during meat shelf life. Meat Science, 157, 107889. https://doi.org/10.1016/j.meatsci.2019.107889
León, K., Merry, D., Pedreschi, F. y León, J. (2006). Color measurement in L*a*b* units from RGB digital images. Food Research International, 39, 1084-1091. https://doi.org/10.1016/j.foodres.2006.03.006
Li, H., Zhang, R., Zhou, W., Liu, X., Wang, K., Zhang, M. y Li, Q. (2023). A novel method for seed cotton color measurement based on machine vision technology. Computers and Electronics in Agriculture, 215, 108381. https://doi.org/10.1016/j.compag.2023.108381
Liñero, O., Cidad, M., Arana, G., Nguyen, C. y de Diego, A. (2017). The use of a standard digital camera as an inexpensive, portable, fast and non-destructive analytical tool to measure colour: Estimation of the ripening stage of tomatoes (Solanum lycopersicum) as a case study. Microchemical Journal, 134, 284-288. https://doi.org/10.1016/j.microc.2017.06.017
Mendoza, F., Dejmek, P. y Aguilera, J. M. (2006). Calibrated color measurement of agricultural foods using image analysis. Postharvest Biology and Technology, 41, 285-295. https://doi.org/10.1016/j.postharvbio.2006.04.004
Milovanovic, B. Tomovic, V., Djekic, I., Miocinovic, J., Solowiej, B. G., Lorenzo, J. M., Barba, F. J. y Tomasevic, I. (2021). Colour assessment of milk and milk products using computer vision system and colorimeter. International Dairy Journal, 120, 105084. https://doi.org/10.1016/j.idairyj.2021.105084
Minz, P. S. y Saini, C. S. (2021). Comparison of computer vision system and colour spectrophotometer for colour measurement of mozzarella cheese. Applied Food Research, 1, 100020. https://doi.org/10.1016/j.afres.2021.100020
Nguyen, C. -N., Vo, V. -T., Nguyen, L. -H. -N., Nhan, H. T. y Nguyen, C. -N. (2022). In situ measurement of fish color based on machine vision: A case study of measuring a clownfish’s color. Measurement, 197, 111299. https://doi.org/10.1016/j.measurement.2022.111299
Pandiselvam, R., Mitharwal, S., Rani, P., Anjaly Shanker, M., Kumar, A., Aslam, R., Barut, Y. T., Kothakota, A., Rustagi, S., Bhati, D., Siddiqui, S. A., Siddiqui, M. W., Ramniwas, S., Aliyeva, A. y Khaneghah, A. M. (2023). The influence of non-thermal technologies on color pigments of food materials: An updated review. Current Research in Food Science, 6, 100529. https://doi.org/10.1016/j.crfs.2023.100529
Pascale, D. (2006). RGB Coordinates of the Macbeth ColorChecker. The BabelColor Compay.
Pathare, P. B., Opara, U. L. y Al-Said, F. A. J. (2013). Color measurement and analysis in fresh and processed foods: a review. Food and Bioprocess Technology, 6, 36-60. https://doi.org/10.1007/s11947-012-0867-9
Quevedo, R. A., Aguilera, J. M. y Pedreschi, F. (2008). Color of salmon fillets by computer vision and sensory panel. Food and Bioprocess Technology, 3(5), 637-643. https://doi.org/10.1007/s11947-008-0106-6
Rodríguez-Pulido, F. J., Gordillo, B., Heredia, F. J. y González-Miret, M. L. (2021). CIELAB – Spectral image MATCHING: An app for merging colorimetric and spectral images for grapes and derivatives. Food Control, 125, 108038. https://doi.org/10.1016/j.foodcont.2021.108038
Sáez-Hernández, R., Ruiz, P., Mauri-Aucejo, A. R., Yusa, V. y Cervera, M. L. (2022). Determination of acrylamide in toasts using digital image colorimetry by smartphone. Food Control, 141, 109163. https://doi.org/10.1016/j.foodcont.2022.109163
Sánchez, C. N., Orvañanos-Guerrero, M. T., Domínguez-Soberanes J. y Álvarez-Cisneros, Y. M. (2023). Analysis of beef quality according to color changes using computer vision and white-box machine learning techniques. Heliyon, 9, e17976. https://doi.org/10.1016/j.heliyon.2023.e17976
Schanda, J. (Comp.). (2007). Colorimetry: Understanding the CIE System. John Wiley & Sons. http://dx.doi.org/10.1002/9780470175637
Tomasevic, I., Tomovic, V., Milovanovic, B., Lorenzo, J., Dorđević, V., Karabasil, N. y Djekic, I. (2019). Comparison of a computer vision system vs. traditional colorimeter for color evaluation of meat products with various physical properties. Meat Science, 148, 5-12. https://doi.org/10.1016/j.meatsci.2018.09.015
Trinderup, C. H., Dahl, A., Jensen, K., Carstensen, J. M. y Conradsen, K. (2015). Comparison of a multispectral vision system and a colorimeter for the assessment of meat color. Meat Science, 102, 1-7. https://doi.org/10.1016/j.meatsci.2014.11.012
Trinderup, C. y Kim, Y. H. B. (2015). Fresh meat color evaluation using a structured light imaging system. Food Research International, 71, 100-107. https://doi.org/10.1016/j.foodres.2015.02.013
Valous, N. A., Mendoza, F., Sun, D. -W. y Allen, P. (2009). Colour calibration of a laboratory computer vision system for quality evaluation of pre-sliced hams. Meat Science, 81, 132-141. https://doi.org/10.1016/j.meatsci.2008.07.009
Wu, D. y Sun, D. -W. (2013). Colour measurements by computer vision for food quality control - A review. Trends in Food Science & Technology, 29, 5-20. https://doi.org/10.1016/j.meatsci.2018.09.015
Yagiz, Y., Balaban, M. O., Kristinsson, H. G., Welt, B. A. y Marshall, M. R. (2009). Comparison of Minolta colorimeter and machine vision system in measuring colour of irradiated Atlantic salmon. Journal of the Science of Food and Agriculture, 89, 728-730. https://doi.org/10.1002/jsfa.3467
Downloads
Published
Issue
Section
License
Copyright (c) 2024 Nicolás Gabriel Mattioli, Daniela Flavia Olivera, Viviana Olga Salvadori, Sandro Mauricio Goñi

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Acorde a estos términos, el material se puede compartir (copiar y redistribuir en cualquier medio o formato) y adaptar (remezclar, transformar y crear a partir del material otra obra), siempre que a) se cite la autoría y la fuente original de su publicación (revista y URL de la obra), b) no se use para fines comerciales y c) se mantengan los mismos términos de la licencia.