Image analysis to predict the maturity index of strawberries

: Traditionally, strawberries are harvested manually when the typical colour of the cultivar does not reach at least 80% of the surface. The focus of this research activity is to develop an automatic system based on image analy­ sis in order to objectively deﬁne the optimal harvest time. Strawberries (cv. Sabrosa), with diﬀerent degrees of maturation, were analyzed in four diﬀerent harvesting periods and subsequently selected and classiﬁed, based on the ripe­ ning percentage, in three maturity classes: R0­25, R50­70 and R75­100. Each class of 10 strawberries, evaluated in triplicate, was subjected to image analysis and physiological and qualitative evaluation by measuring the following para­ meters: respiration rate, pH, total soluble solids content, and titratable acidity. The images, captured by a digital camera, were processed using Matlab® software and all the data found were supported by multivariate analysis. The image processing has made it possible to create an algorithm measuring objec­ tively the percentage and the saturation level of red assigning the fruit to each class. Principal component analysis (PCA) shows that discriminating parameters are the Chroma and the red Area, then used in a Partial Least Square Regression (PLSR) model to predict the TSS/TA ratio with R 2 of 0.7 and 0.6 for calibration


Introduction
Strawberries are fruit, belonging to the family of the Rosaceae and genus Fragaria. Only at the end of 1600 strawberry is no longer consid ered an ornamental plant, but rather a fruit to be cultivated and market ed for its delicacy. Fragaria chiloensis, coming from Chile, arouses the interest of many farmers for its unusual size differing from other straw berry species. The current strawberry, called F. ananassa, comes from the random hybridization, that occurred in the second decade of 1700, of F. virginiana (coming from the eastern United States) with F. chiloensis (coming from the Chilean coasts of the Pacific) (Angelini, 2010). The obtained species is consumed and appreciated all over the world for sensorial and nutritional quality. Strawberries are usually consumed as fresh fruit and they represent a healthy food choice for their rich ness in vitamin C, micronutrients and bioactive com pounds, mostly natural antioxidants such as phenols known even for antiinflammatory action. This fruit, expressing better its potential, needs to be harvested at the right ripening because it is not climacteric. In general ripening influences the appearance, texture, flavour, and aroma due to physiological, biochemical and structural modifications. Strawberry is hand picked evaluating visually the product when the char acteristic colour is reached. As consequence, the mis take of collecting an overmature or immature fruit, by presenting a poor product on the market, is very likely to occur.
Generally, the qualitative parameters of fresh products are determined by destructive analytical techniques which involve a sample preparation phase, timeconsuming and can be performed on a limited number of samples, often reducing their rep resentativeness. In addition, the environmental impact, and the contact of the operator with the chemicals should not be overlooked, especially if they are not properly trained and experienced. For these reasons, it is important to consider ecofriendly and objective nondestructive methods that can quickly assess the proper harvest time by evaluating the quality of the product at hand. Numerous studies have investigated various nondestructive techniques and their applicability in the field for the determina tion of the main qualitative parameters of fruit and vegetables. Image analysis (IA) has proven to be a successful contactless tool in fruit and vegetables quality assessment. This technology captures images in the electromagnetic spectrum and extracts the most discriminating external characteristics (shape, colour and defects) and the next phase of data pro cessing can allow, through predicting models, the estimation of chemical and physical properties of samples (Palumbo et al., 2022). The objectives of this study were (1) to implement a standardized comput er vision system to characterize quantitatively colour changes during the ripening of strawberries using the L*, a*, b* colour space, (2) to identify features of interest that can be related with ripening stages, such as colour saturation (Chroma) and Hue angle, (3) to develop a statistical model using selected features to identify the ripening stages of strawberries from sam ples previously classified by expert visual inspection.

Plant material
Candonga strawberries (Fragaria × ananassa Duch.) var. Sabrosa, which have different degrees of ripeness, were provided by a cooperative company of fresh fruit (APOFRUIT Italia Soc. Coop., Scanzano Jonico, Italy) in four different consecutive harvest times from February to May (one harvest per month) called H1, H2, H3 and H4. Then, they were transport ed in cold conditions to the Postharvest Laboratory of CNRISPA of Foggia to be processed. Fruits were selected by eliminating damaged sample and were grouped into three classes, based on the visual evalu ation of colour: R025 (from 0 to about 25% of red colour on fruit surface), R5070 (from 50 to about 70% of red colour on fruit surface) and R75100 (from 75 to about 100% of red colour on fruit sur face) (Fig. 1). Each class, consisting of 10 strawber ries, was evaluated in triplicate; each replicate was subjected to IA analysis, physiological (respiration rate) and physicalchemical (pH, total soluble solids and titratable acidity) characterization as below reported.

Computer vision system
Digital Camera AP3200TPGE (JAI Ltd., Yokohama, Japan), positioned inside a Photo studio box HPB60D (HAVOX®, Vendôme, France), was used to image a batch containing 10 strawberries for each replicate. In total, for each class, three replicates were consid ered, for a total of 30 berries. The camera sensor was an RGB CMOS type, providing a spatial resolution of 3.2 MP at 2 fps and a colour depth of 24 bit/pixel. The lens used was a 12 mm focal length and F1.8 (KOWA Lens mod. LM12NC3 1/2) allowing a field of view (FOV) of (35 × 30 cm). The lighting was supplied by two LED handrails consisting of 20 diodes (HAVOX HPB60, 5500K, 13,000 100 lumen CRI 93+). A Colour Checker Passport Photo 2 (Xrite Italy srl, Prato Italy) with 24 known colour stains was placed in the cam era's FOV as a chromatic reference. The images cap tured by the digital camera were processed using Matlab® R2021b (MathWorks Inc., Natick, MA, USA).

Image segmentation
Each raw image of the strawberry was separated from the background, generating a binary image. In detail, the algorithm processed the raw images by cropping the unnecessary image border and separat ing the three colourcomponents: red, green and blue (RGB). The background was thresholded using the R image, since showing the highest contrast between the object of interest (strawberry) and the background. The coarse segmentation of the straw berries was carried out by a threshold method (Gonzalez et al., 2004). On the resulting binary images, a morphological filter was applied to erode the strawberry rim and a flood filling operation was carried out to overcome the threshold defects. Using this primary mask (binary image), the total area and the red area of each strawberry were calculated to get the percentage of red coverage. In the red area, colour features have been extracted to get informa tion on Chroma and Hue angle needed to correlate them with the analytical data.

Destructive chemical analysis
Titratable acidity (TA) and pH using a semiauto matic titrator/pH meter (PHBurette 24 Crison Instrument, Barcelona, Spain), were measured on about 100 g of homogenized strawberries (for each class and replicate) as reported by Cozzolino et al. (2021). Similarly, the total soluble solids value (TSS) was determined using a digital refractometer (DBR35XS Instruments, Carpi, Italy) and results were expressed in °Brix. The maturity index (MI) was calcu lated as the ratio of TSS and TA for each class (Melgarejo et al., 2017).

Respiration rate
The respiration rate (RR) of strawberries was determined at 4°C using a closed system as reported by Kader (2002). Thoroughly, each replicate, about 250 g of product, was put into a 3.6 L sealed plastic container to let CO 2 accumulate up to 0.1% as the CO 2 standard concentration. At regular time intervals CO 2 concentration was monitored until the reference value is reached. A Gas sample (1 mL) was drained from the headspace through a rubber septum and injected into the gas chromatograph (p200 microGC Agilent, Santa Clara, CA, USA) equipped with dual columns and a thermal conductivity detector. Carbon dioxide was analysed with a retention time of 16 s and a total run time of 120 s on a 10m porous poly mer (PPU) column (Agilent, Santa Clara, CA, USA) at a constant temperature of 70°C. The RR was expressed as mL CO 2 /kg h.

Statistical analysis
The data obtained were analyzed by multifactor ANOVA for p ≤ 0.05 to evaluate the effects of the maturity class and harvest time (fixed factors) on pH, total soluble solid, titratable acidity, colour parame ters and RR (variables). Parameters affected only by maturity class were subjected to a posthoc test (Fisher), using Statgraphics (version 18.1.12, Warrenton, VA, USA).
A principal component analysis (PCA) was per formed using the software Statistica version 6.0. (Statsoft Inc., Tulsa, OK, USA) (Jolliffe, 2022) with the aim of selecting the parameters able to discriminate the maturity classes. Based on the results obtained a Partial Least Square Regression (PLSR) was applied to develop a predictive method using the Unscrambler 10.0 software (CAMO Software, Oslo, Norway). In detail, 70% of the data was used in the calibration step and the remaining 30% was used to validate the obtained model.

Results and Discussion
Among the analytical data, RR and the MI were affected by the interaction of the two factors (matu rity class x Harvest time) as reported in figure 2. MI showed all classes were different at first harvest with values of 6.61 (± 1.22), 7.38 (± 0.09) and 9.02 (± 0.84) for R025, R5070 and R75100, respectively; at the second harvest R75100 reported higher value than the other samples, and this difference was measured also in the last two harvests ( Fig. 2A). A similar trend was observed for the RR (Fig. 2B); in detail, at the first harvest time R025, R5070 and R75100 report ed values of 5.12 (± 0.06), 7.73 (± 0.45) and 12.30 (± 0.45) mL CO 2 /kg h, respectively. Then, at the second harvest, the RR increased at values around 10 mL CO 2 /kg h for the fruit coming from R025 and R5070 maturity classes, remaining almost constant in the last two harvests. On the other hand, for the full maturity class (R75100), an increase in RR was found during the harvest time reaching at the last the val ues of about 20 mL CO 2 /Kg h (Fig. 2B)

Conclusions
Results demonstrated that is possible to predict TSS/TA index starting by colour parameters extracted by IA on strawberry (cv. Sabrosa), collected in four consecutive harvests. The performance of the predic tive model obtained might be improved by increasing the number of samples and extending the analysis Sabrosa) collected at two different ripening stages, namely halfred (in ripening phase, fully expanded and 50% red) and red (in ripening phase, fully expanded and 100% red) in three consecutive har vests.
The image processing allowed us to measure the percentage of red (Area red) and the colour parame ters Chroma and Hue angle, which enabled the three classes' differentiation as indicated in figure 3.
Since, harvest time affected only two quality parameters, data coming from the different harvests were collected and used for the multivariate analysis (PCA and PLSR). Regarding PCA, also confirming data of ANOVA analysis, Area red and Chroma were able to discriminate the maturity class on the first compo nent, which accounted for 94% of the variability (Fig.  4A). Thus, these two parameters were used as pre dictors of maturity index TSS/TA, in a resulted PLS model, which showed R 2 of 0.7 in calibration and 0.6 in validation (Fig. 4B).
On the basis of these findings, an algorithm was developed using the Matlab® software, for the objec tive measurement of the percentage of red (Red Area) and the saturation level (Chroma) of a straw berry starting from the acquired images to automati cally and nondestructively attribute the fruit to each class, applying the PLSR model.   also to other cultivars trying to build an algorithm available for handheld devices used in the field or in general for applications available to consumers to consciously buy the product.