Impaginato 111 Adv. Hort. Sci., 2023 37(1): 111­116 DOI: 10.36253/ahsc­13911 Application of computer vision systems for assessing bergamot fruit external features S. Benalia (*), V. Calogero, M. Anello, G. Zimbalatti, B. Bernardi Dipartimento di Agraria, Università degli Studi Mediterranea di Reggio Calabria, Località Feo di Vito, snc, 89122 Reggio di Calabria (RC), Italy. Key words: Aspect ratio, Citrus x bergamia Risso & Poiteau, citrus colour index (CCI), dimensions, HunterLab, imaging, RGB. Abstract: Bergamot Citrus x bergamia Risso & Poiteau is an emblematic Citrus species of Reggio Calabria province (Southern Italy) where more than 90% of the global production thrives. The present work deals with the use of a non­ destructive technique based on a computer vision system to evaluate bergamot fruit peel colour, as well as dimensional features. To this purpose, experimental trials considered three bergamot cultivars, namely ‘Femminello’, ‘Castagnaro’ and ‘Fantastico’. Bergamot fruit RGB images were taken using a laboratory inspection chamber equipped with a lighting system and a digital camera Nikon D5200 directly connected to a personal computer, to enable remote image acquisition. First, images were pre­processed according to a previously created colour profile. After that, bergamot fruit colour was analysed and expressed in terms of Hunter L, a, and b coordinates, which were used to calculate Standard Citrus Colour Index (CCI). In addition, dimensional features and shape descrip­ tors were measured for each cultivar. Statistical data analysis, by applying the Kruskal­Wallis test at p<0.05 on CCI data highlighted significant differences between the assessed cultivars, and discriminant analysis (LDA) applied on CCI and dimensional features enabled a classification rate of 78.86% between culti­ vars, proving the reliability of computer vision techniques in assessing berg­ amot external features. 1. Introduction Bergamot Citrus x bergamia Risso & Poiteau (Pellegrino et al., 2015) is an emblematic Citrus species of Reggio Calabria province (Southern Italy), where more than 90% of the global production is located. Until recently, the production has been exclusively destinated to peel essential oil extraction and subsequent use in perfumery, cosmetic and pharmaceutic preparations, food flavouring and confectionery (Navarra et al., 2015; Gioffrè et al., 2020). However, the rising interest toward bergamot­based food and beverage for their high content in functional bioactive com­ pounds is directing the production toward other market channels. This trend is also accompanied by the necessity of agrifood industries to devel­ (*) Corresponding author: soraya.benalia@unirc.it Citation: BENALIA S., CALOGERO V., ANELLO M., ZIMBALATTI G., BERNARDI B., 2023 ­ Application of computer vision systems for assessing bergamot fruit external features. ­ Adv. Hort. Sci., 37(1): 111­116. Copyright: © 2023 Benalia S., Calogero V., Anello M., Zimbalatti G., Bernardi B. This is an open access, peer reviewed article published by Firenze University Press (http://www.fupress.net/index.php/ahs/) and distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. Data Availability Statement: All relevant data are within the paper and its Supporting Information files. Competing Interests: The authors declare no competing interests. Received for publication 31 October 2022 Accepted for publication 7 April 2023 AHS Advances in Horticultural Science https://doi.org/10.36253/ahsc-13911 http://www.fupress.net/index.php/ahs/ http://creativecommons.org/licenses/by/4.0/ http://creativecommons.org/licenses/by/4.0/ http://creativecommons.org/licenses/by/4.0/ Adv. Hort. Sci., 2023 37(1): 111­116 112 op particularly from a technological point of view, to keep up and adequately address global market requirements and standards. In fact, great attention has been paid, in the last years, to the development and implementation of non­destructive techniques based on artificial intelligence in industrial processes including agrifood sector, for their reliability, accura­ cy, and timeliness in determining qualitative parame­ ters of the product, especially when employed in automated post­harvest processes. Several studies dealt with the use of computer vision systems for cit­ rus fruit quality assessment or grading (Cubero et al., 2014; Lorente et al., 2015; Zhang et al., 2020; Riccioli et al., 2021; Zhang et al., 2022), but up to now, no one regarded bergamot fruits. In this context, the present work aims at assessing fruit peel colour, expressed in terms of Standard Citrus Colour Index (CCI) as well as dimensional features and shape descriptors, including fruit area, fruit perimeter, major axis, minor axis, circularity, roundness, aspect ratio and solidity of three cultivars of bergamot fruit, by means of computer vision systems. 2. Materials and Methods Bergamot samples Experimental trials considered three bergamot cultivars, namely: Citrus x bergamia Risso & Poiteau, ‘Femminello’, ‘Castagnaro’ and ‘Fantastico’. Fruits were collected at the end of their ripening stage (since mid­January to the beginning of February) in private farms located in Reggio Calabria province. A total of 248 fruits were used. Methodology set‐up and RGB image acquisition Bergamot RGB image acquisition was performed using a laboratory squared inspection chamber equipped with a digital camera Nikon D5200 directly connected to a personal computer, to enable remote image acquisition, and a lighting system including 4 fluorescent linear lamps (BIOLUX T8­ 18W/965, 6500 K) placed on the top of the inspection chamber in a 0°/45° configuration as shown in figure 1. The used camera was equipped with a CMOS 23.5 x 15.6 mm sensor, allowing getting a resolution of 24.1 million pixels; and a Nikkor f/2.8G lens with a 1:1 reproduc­ tion ratio. Prior to image acquisition, several configurations of operational parameters were tested until getting the most appropriate one, which considered the fol­ lowing parameters: ISO: 100; exposition time: 1/125; diaphragm opening f: 5.6; 4 lamps (instead of 8), without polarizing filter. Image analysis and bergamot colour determination Bergamot images were calibrated, first, by per­ forming the white balance, and subsequently the chromatic correction according to a previously creat­ ed profile with the ColorChecker Classic target (X­Rite Inc., USA), through the Colorchecker Passport Software as performed in Benalia et al. (2017). Bergamot RGB images were then analysed as per­ fomed by Benalia et al. (2016) using a specific appli­ cation (Fig. 2) that enables to convert mean R, G, B values of all pixels contained in a selected Region Of Interest (ROI) into L, a, b coordinates considering the CIE illuminant D65 and the 10° observer standard (Cubero et al., 2018). Besides and for comparison purpose, bergamot Fig. 1 ­ Bergamot RGB image acquisition using a laboratory inspection chamber equipped with a computer vision system. Fig. 2 ­ Bergamot colour determination through RGB image anal­ ysis. Benalia et al. ‐ Computer vision systems (CVS) for bergamot fruit characterization 113 fruit colour was determined by means of a portable Konica Minolta CM­700D spectrophotometer being the only widely standardized instrument used for instantaneous food colour evaluation in agrifood industries. To this end, six measurements were car­ ried out randomly on each fruit. Determination of dimensional features and shape descriptors Dimensional features and shape descriptors, including fruit area in the image, fruit perimeter, major axis, minor axis, circularity, roundness, aspect ratio and solidity were determined using the soft­ ware ImageJ 1.50i using Java 1.8.0.77 (Fig. 3), accord­ ing to a previously set scale. Data analysis Hunter L, a and b values were used to calculate the Standard Citrus Colour Index (CCI) according to the following formula (Eq. 1) and to compare whether there is a difference between the examined cultivars. CCI = 1000 a/(L·b) (Eq. 1) With L value indicating lightness (0 = darkness ­> 100 = lightness), a value representing red (positive value) or green (negative value); and b representing yellow (positive value) or blue (negative value). CCI data were statistically analysed using the open­source application R (version 3.3.1). Hence, data normal distribution was checked by applying the Shapiro­Wilk normality test, and according to the results, the most appropriate test was applied to compare the examined cultivars in terms of colour features. Furthermore, CCI data as well as dimensional fea­ tures and shape descriptors retrieved from bergamot RGB image analyses were used to build an exhaustive dataset and multivariate image analyses (MIA), par­ ticularly, Principal Component Analysis (PCA) and Discriminant Analysis (LDA) were applied using Past 4.12b (Hammer et al., 2001). 3. Results and Discussion Citrus Colour Index (CCI) values calculated from bergamot image analysis were compared with those obtained using the portable spectrophotometer for each cultivar. The obtained results are shown in the following figure 4. Particularly, the coefficient of Fig. 4 ­ Standard Citrus Colour Index (CCI) from Image analysis Vs portable spectrophotometer. A: ‘Castagnaro’, B: ‘Fantastico and C: ‘Femminello’. Fig. 3 ­ Bergamot dimensional feature and shape descriptor calculation through RGB image analysis using ImageJ. Adv. Hort. Sci., 2023 37(1): 111­116 114 determination R2 was equal to 0.83, 0.87 and 0.90 respectively for the cultivars Castagnaro, Fantastico and Femminello, making it possible to substitute colour analysis using conventional instruments with that based on image analysis. Indeed, diversely from the portable spectrophotometer, which offers the possibility to only analyse a small area of the fruit surface, image analysis allows assessing fruit colour of the whole surface of each fruit. The obtained R2 values in this study are, however, lower than those reported by Vidal et al. (2013), who tested two algorithms for the estimation of oranges cv. Navelina CCI based on computer vision. This dif­ ference could mainly be attributed to the difference in the used hardware and operation parameters. Indeed, up to now, a standardized methodology con­ cerning the use of CVS is still missing. The results of Shapiro­Wilk test demonstrated that CCI data do not follow a normal distribution. Therefore, the non­parametric test Kruskal­Wallis was applied. The outputs highlighted a significant difference between the cultivars in terms of CCI at p<0.05 (Table 1). CCI mean and median values are reported in Table 2. CCI mean values were equal to 3.01±1.51 for cv. Castagnaro and 2.36±2.26 for cv. Femminello, indicating a yellowish colour, while it was much lower for cv. Fantastico with a value of 1.21±1.52 cor­ responding to a greenish colour yet (Table 2). As mentioned above, multivariate image analysis, particularly, Principal Component Analysis (PCA) and Discriminant Analysis (LDA) were applied considering CCI values as well as dimensional features and shape descriptors. Hence, the three cultivars were com­ pared according to 9 variables. PCA highlighted that most of the variability was expressed by the first two components, with respectively 46.86% for PC1 and 21.38% for PC2. The first component PC1 is mostly and positively influenced by fruit area, fruit perime­ ter as well as by major and minor axis. To this regard, Giuffrè (2019) and Giuffrè and Nobile (2020) found significant differences between the bergamot culti­ vars when comparing both major and minor axes. However, diversely from our method they used con­ ventional measuring method. The first component PC1 is also negatively influenced by roundness. The second component PC2 is, however, positively, and mainly influenced by roundness and subsequently solidity, while it is negatively affected by CCI and aspect ratio (Fig. 5). A better discrimination between the cultivars was obtained when LDA was applied (Fig. 6), and 80.49% of correctly classified fruit according to cultivar was reached. This rate decreases to 78.86% when Jackknif cross­validation method is applied (Table 3). This study focuses on the use of computer vision system to retrieve colour and dimensional features with the aim of distinguishing between three culti­ vars grown in the province of Reggio Calabria. As pre­ viously stated, no work dealing with this theme have Table 1 ­ Results of Kruskal­Wallis test for CCI according to the cultivar Table 2 ­ Mean and median values of CCI according to the culti­ var Test χ2 df p Kruskal­Wallis: (CCI by cultivar) 46.55 2 7.793e­11 Cultivars Mean values ± St dev. Median values Castagnaro 3.01 ± 1.51 3.05 Fantastico 1.21 ± 1.52 1.57 Femminello 2.36 ± 2.26 2.61 Fig. 5 ­ PCA score plot. Green filled square: ‘Femminello’, purple filled triangle: Castagnaro, yellow dots: Fantastico. Fig. 6 ­ LDA plot. Green filled square: Femminello, purple filled triangle: Castagnaro, yellow dots: Fantastico. Benalia et al. ‐ Computer vision systems (CVS) for bergamot fruit characterization 115 been performed so far. To our knowledge the only one, which reports the characterization of bergamot physical properties using CVS is that of Rafiee et al. (2007), who measured fruit size, mass, projected area, fruit density, solid density, bulk density, bulk porosity, packing coefficient, density ratio, geometric diameter, sphericity and surface area of Citrus medi‐ ca, which characteristics are different from Citrus x bergamia Risso & Poiteau. 4. Conclusions The obtained results in this study confirm the reli­ ability of computer vision systems in characterizing bergamot fruit external properties, considering par­ ticularly, colour and dimensional features. Although preliminary, the outputs clearly demonstrate the effi­ ciency and accuracy of these techniques in distin­ guishing the examined cultivars, promoting therefore their implementation in bergamot post­harvest pro­ cesses. Indeed, both features, i.e., colour and dimen­ sions are important to be considered for the develop­ ment of new technologies as they represent impor­ tant qualitative indicators. Further research activities should be performed to validate findings obtained in this study, and to inves­ tigate other aspects using CVS such as ripening progress and essential oil peel content. Acknowledgements II level master course for expert technician on “The bergamot of Reggio Calabria. Production and enhancement “organized by the Department of Agriculture of the University Mediterranean of Reggio Calabria, in collaboration with Reggio Calabria Metropolitan City. National Operational Programme (NOP) on Research and Innovation 2014­2020 ­ Axis I “Investment in Human Capital”­ Action I.1 ­ Innovative Industrial Doctorates ­ Cycle XXXVI. References BENALIA S., BERNARDI B., BLASCO J., FAZARI A., ZIMBAL­ ATTI G., 2017 ­ Assessment of the ripening of olives using computer vision. ­ Chem. Eng. Trans., 58: 355­ 360. BENALIA S., CUBERO S., PRATS­MONTALBÁN J.M., BERNARDI B., ZIMBALATTI G., BLASCO J., 2016 ­ Computer vision for automatic quality inspection of dried figs (Ficus carica L.) in real‐time. ­ Comput. Electron. Agric., 120: 17­25. CUBERO S., ALBERT F., PRATS­MOLTALBÁN J.M., FERNÁN­ DEZ­PACHECO D.G., BLASCO J., ALEIXOS N., 2018 ­ Application for the estimation of the standard citrus colour index (CCI) using image processing in mobile devices. ­ Biosyst. Eng.,167: 63­74. CUBERO S., ALEIXOS N., ALBERT F., TORREGROSA A., ORTIZ C., GARCÍA­NAVARRETE O., BLASCO J., 2014 ­ Optimised computer vision system for automatic pre‐ grading of citrus fruit in the field using a mobile plat‐ form. ­ Precis. Agric., 15(1): 80­94. GIOFFRÈ G., URSINO D., LABATE M.L.C., GIUFFRÈ A.M., 2020 ­ The peel essential oil composition of bergamot fruit (Citrus Bergamia, Risso) of Reggio Calabria (Italy): A review. ­ Emir. J. Food Agric., 32(11): 835­845. GIUFFRÈ A.M., 2019 ­ Bergamot (Citrus bergamia, Risso): The effects of cultivar and harvest date on functional properties of juice and cloudy juice. ­ Antioxidants, 8(7): 221. GIUFFRÈ M.A., NOBILE R., 2020 ­ Citrus bergamia, Risso: the peel, the juice and the seed oil of the bergamot fruit of Reggio Calabria (South Italy). ­ Emir. J. Food Agric., 32(7): 522­532. HAMMER Ø., HARPER D.A.T., RYAN P.D., 2001 ­ PAST: Paleontological statistics software package for educa‐ tion and data analysis. ­ Palaeontologia Electronica, 4(1): 9. LORENTE D., ESCANDELL­MONTERO P., CUBERO S., GÓMEZ­SANCHIS J., BLASCO J., 2015 ­ Visible‐NIR reflectance spectroscopy and manifold learning meth‐ ods applied to the detection of fungal infections on cit‐ rus fruit. ­ J. Food Eng., 163: 17­24. NAVARRA M., MANNUCCI C., DELBÒ M., CALAPAI G., 2015 ­ Citrus bergamia essential oil: from basic research to clinical application. ­ Front. Pharmacol., 6: 36. PELLEGRINO P., MAFRICA R., ZAPPIA R., 2015 ­ La coltiva‐ zione del bergamotto tra tradizione e innovazione, pp. 33­50. ­ Atti Convegno “Storie di Bergamotto”, Artemis S.r.l., Reggio Calabria, Italy, pp. 237. RAFIEE S., KERAMAT JAHROMI M., JAFARI A., SHARIFI M., MIRASHEH R., MOBLI H., 2007 ­ Determining some physical properties of bergamot (Citrus medica). ­ Int. Table 3 ­ Jackknife cross validation results resulting from dis­ criminant analysis (LDA) Given groups Predicted groups Total Femminello Castagnaro Fantastico Femminello 99 8 3 110 Castagnaro 13 42 14 69 Fantastico 0 14 53 67 116 Adv. Hort. Sci., 2023 37(1): 111­116 Agrophysics, 21: 293­297. RICCIOLI C., PEREZ­MARIN D., GARRIDO­VARO A., 2021 ­ Optimizing spatial data reduction in hyperspectral imaging for the prediction of quality parameters in intact oranges. ­ Postharvest Biol. Technol., 176. VIDAL A., TALENS P., PRATS­MONTALBÁN J.M., CUBERO S., ALBERT F., BLASCO J., 2013 ­ In‐line estimation of the standard colour index of citrus fruits using a computer vision system developed for a mobile platform. ­ Food Bioprocess Technol., 6: 3412­3419. ZHANG H., ZHAN B., PAN F., LUO W., 2020 ­ Determination of soluble solids content in oranges using visible and near infrared full transmittance hyperspectral imaging with comparative analysis of models. ‐ Postharvest Biol. Technol., 163: 111148. ZHANG X., XUN Y., CHEN Y., 2022 ­ Automated identifica‐ tion of citrus diseases in orchards using deep learning. ­ Biosyst. Eng., 223, Part A, pp. 249­258.