Roasted coffee beans characterization through optoelectronic color sensing


  • Sebastian-Camilo Vanegas-Ayala Systems Engineering Program, Faculty of Engineering and Basic Sciences, Fundación Universitaria los Libertadores, Bogotá, Colombia.
  • Daniel-David Leal-Lara Systems Engineering Program, Faculty of Engineering and Basic Sciences, Fundación Universitaria los Libertadores, Bogotá, Colombia.
  • Julio Barón-Velandia Systems Engineering Program, Faculty of Engineering, Universidad Distrital Francisco José de Caldas, Bogotá, Colombia.



The degree of roasting of the coffee determines the physical properties of the bean which are directly represented in the quality of the coffee, to classify the coffee bean efficiently represents a challenge that has been addressed from different technological approaches with colorimeters. This research aims to simplify the identification of the roast level of ground coffee on the Agtron scale by characterizing the degree of roast using an optoelectronic color sensor and establishing a correlation between the Red, Green, and Blue (RGB) scales. This allows for the assurance of quality levels of the beans right from the roasting process. This research comprehends the collection and preparation of samples, the definition of RGB and CIE L*a*b* values, and their interpretation in the Agtron scale using the red component of the RGB scale. The results showed an efficient and accurate estimation for the roast degree of ground coffee beans (0.1371 MSE) that uses minimum processing requirements and a function to assess the intermediate values in the Agtron scale. The characterization of the roast degree of ground coffee beans using data collected from an optoelectronic color sensor through a high-precision function with a linear structure enables the description of intermediate values not fully represented on the Agtron scale. This enhances the process of identifying the roast degree, facilitating subsequent quality assurance processes by maintaining the beans at the desired roast level.

Key words: Agtron; coffee bean color; color sensor; RGB.


ALAMRI, E. S. et al. Machine learning classification of roasted arabic coffee: Integrating color, chemical compositions, and antioxidants. Sustainability, 15(15):11561, 2023.

ANSAR. et al. Design and performance test of the coffee bean classifier. Processes, 9(8):1462, 2021.

ASOCIACIÓN DE CAFÉ DE ESPECIALIDAD - ACE. About SCA - Research. Available in: <>. Access in: December 11, 2023.

CHATHURANGA, S. et al. Practices driving the adoption of agile project management methodologies in the design stage of building construction projects. Buildings, 13(4):1079, 2023.

CUAYA-SIMBRO, G. et al. Automatic tariff classification system using deep learning. International Journal of Advanced Computer Science and Applications, 13(7), 2022.

FEDERACIÓN NACIONAL DE CAFETEROS DE COLOMBIA. Estadísticas Cafeteras - Federación Nacional de Cafeteros, 2023. Available in: Access in: December 12, 2023.

GARCÍA, M.; CANDELO-BECERRA, J. E.; HOYOS, F. E. Quality and defect inspection of green coffee beans using a computer vision system. Applied Sciences, 9(19):4195, 2019.

INTERNATIONAL COLOR CONSORTIUM. Image technology colour management-Architecture, profile format, and data structure, 2010. Available in: Access in: December 12, 2023.

INTERNATIONAL; ELECTROTECHNICAL; COMMISSION. Multimedia systems and equipment - Colour measurement and management - Part 2-1: Colour management - Default RGB colour space - sRGB, 1999. Available in: Access in: December 12, 2023.

KITTICHOTSATSAWAT, Y.; TIPPAYAWONG, N.; TIPPAYAWONG, K. Y. Prediction of arabica coffee production using artificial neural network and multiple linear regression techniques. Scientific Reports, 12:14488, 2022.

LEME, D. S. et al. Recognition of coffee roasting degree using a computer vision system. Computers and Electronics in Agriculture, 156:312-317, 2019.

MALAQUIAS, J. V.; CELESTINO, S. M. C.; XAVIER, M. F. F. Optimization of the roasting conditions of arabica coffee cultivated in the cerrado area of Brazil. Brazilian Journal of Food Technology, 21:e2016162, 2018.

NASUTION, T.; ANDAYANI, U. Recognition of roasted coffee bean levels using image processing and neural network. IOP Conference Series: Materials Science and Engineering, 180:12059, 2017.

OLIVEIRA, G. H. H. de. et al. Caracterização física de café após torrefação e moagem. Semina: Ciencias Agrarias, 35(4):1813-1827, 2014.

PÉREZ TORO, J. A. Economía cafetera y desarrollo económico en Colombia. Bogotá: Fundación Universidad de Bogotá Jorge Tadeo Lozano, 2013. 592p.

REFSNES DATA. Colors RGB. 2022. Available in: <>. Access in: December 11, 2023.

SPECIALTY COFFEE ASSOCIATION – SCA. Agtron Roast Color Kit – SCA Store. Disponível em: <>. Access in: December 11, 2023.

TOLEDO, P. R. A. B. de. et al. Reliable discriminant analysis tool for controlling the roast degree of coffee samples through chemical markers approach. European Food Research and Technology, 243(5):761-768, 2017.

UNAL, Y. et al. Application of pre-trained deep convolutional neural networks for coffee beans species detection. Food Analytical Methods, 15:3232-3243, 2022.

VALERIO CUBILLO, O. et al. Estudio de la cinética de cambio del color de café tostado usando análisis de imágenes en IMAGEJ. In: MEMORIA XII CONGRESO LATINOAMERICANO Y DEL CARIBE DE INGENIERÍA AGRÍCOLA, Bogotá, Colombia, 23 al 27 de Mayo de 2016.




How to Cite

VANEGAS-AYALA, S.-C. .; LEAL-LARA, D.-D. .; BARÓN-VELANDIA, J. Roasted coffee beans characterization through optoelectronic color sensing. Coffee Science - ISSN 1984-3909, [S. l.], v. 18, p. e182156, 2023. DOI: 10.25186/.v18i.2156. Disponível em: Acesso em: 13 jul. 2024.