A Performance Evaluation of Two Hyperspectral Imaging Systems for the Prediction of Strawberries’ Pomological Traits

Pomological traits are the major factors determining the quality and price of fresh fruits. This research was aimed to investigate the feasibility of using two hyperspectral imaging (HSI) systems in the wavelength regions comprising visible to near infrared (VisNIR) (400−1000 nm) and short-wave infrared (SWIR) (935−1720 nm) for predicting four strawberry quality attributes (firmness—FF, total soluble solid content—TSS, titratable acidity—TA, and dry matter—DM). Prediction models were developed based on artificial neural networks (ANN). The entire strawberry VisNIR reflectance spectra resulted in accurate predictions of TSS (R2 = 0.959), DM (R2 = 0.947), and TA (R2 = 0.877), whereas good prediction was observed for FF (R2 = 0.808). As for models from the SWIR system, good correlations were found between each of the physicochemical indices and the spectral information (R2 = 0.924 for DM; R2 = 0.898 for TSS; R2 = 0.953 for TA; R2 = 0.820 for FF). Finally, data fusion demonstrated a higher ability to predict fruit internal quality (R2 = 0.942 for DM; R2 = 0. 981 for TSS; R2 = 0.976 for TA; R2 = 0.951 for FF). The results confirmed the potential of these two HSI systems as a rapid and nondestructive tool for evaluating fruit quality and enhancing the product’s marketability.


Introduction
Nowadays, agrifood industries have increased expectations about sustainable production, the delivery of high-quality and safe food products, and the reduction in food losses along the entire supply chain, including post-harvest losses.The quick and accurate monitoring and evaluation of the quality, safety, nutrition, sensorial attributes, and shelf life of food products are being increasingly requested by the agrifood industries.Unfortunately, many industries rely on traditional human visual inspection to monitor product quality.However, this method is inefficient and subjective [1].Furthermore, traditional and analytical techniques, such as proximate analysis, as well as chromatographic and mass spectrometry, are destructive, expensive, time-consuming, and not useful for large-scale sample evaluation, and they can generate pollution and harmful waste [2,3].In fact, unlike traditional analytical methodologies for fruit internal quality assessment, the advantages of using hyperspectral imaging systems include rapid analysis times; small sample size; simple sample preparation, usually requiring few steps; reduced costs (compared to other laboratory equipment); and the absence of toxic or carcinogenic chemicals.
In recent years, some smart methods and real-time and nondestructive systems to assess quality parameters have been developed.Among these, computer vision technology and optical techniques have received increased attention for quality assessment.The first technique, based on image processing and analysis, allows for automated visual inspection.However, it can be inefficient in the evaluation of objects with similar colors or for detecting invisible defects.Moreover, it cannot be useful for predicting food chemical composition [1].On the contrary, vibrational spectroscopy methods, particularly near-infrared spectroscopy (NIRS), have the potential for simultaneously measuring multiple quality properties [1].However, they are limited in the spatial dimension, without information on position/location of the constituents investigated and could miss contaminants confined to small areas on the products [4].
The combination of spectroscopic techniques and imaging processing gives rise to the hyperspectral imaging (HSI) system, which enables the immediate recognition of different elements and their spatial distribution in the samples in a nondestructive, highly accurate, and fast way with minimal sample preparation.HSI produces a two-dimensional spatial array of vectors, which corresponds to the spectrum at each pixel location.Therefore, a three-dimensional dataset with the two spatial dimensions and one spectral dimension (i.e., a hypercube) is obtained.The spectrum related to each pixel in a food image can represent a fingerprint to identify the biochemical composition of the pixel, thus allowing for the vision of the constituents of the food sample at a pixel level with high accuracy.In fact, HSI can provide simultaneously spatial and physical attributes such as shape, texture, and color of the samples, as well as intrinsic and molecular information [5].
HSI has been successfully used to assess fruit quality, fruit ripeness, and fruit damage [6][7][8][9][10][11][12][13][14].In particular, the rapid and nondestructive evaluation of quality attributes, especially for easily perishable fruit, is a crucial point along all the supply chain.Strawberry fruit (Fragaria × ananassa Duch.) is the most consumed berry fruit crop worldwide [15].It can be consumed fresh or frozen, or utilized for garnishing cakes and pastries or as raw material and additive for jams, juices, ice cream, and jellies [16,17].However, it is a strongly focused fruit due to its high perishability.Therefore, identifying the qualitative characteristics of the fruit-which are also related to genetic and environmental conditions-to establish the most appropriate time for harvesting, retail sale, and consumption, is of fundamental importance.
In recent years, machine learning has been successfully applied in precision agriculture and the food industry, especially for the prediction and classification of quality parameters of fruit and vegetables [18].Among the various machine learning techniques, artificial neural networks (ANN) have a powerful learning ability and identifying and modeling ability for the complex and often nonlinear relationships between input and output signals depending on the provided patterns [19].Furthermore, ANN can learn from examples datasets through iteration without requiring prior knowledge of the relationships between the process variables.Previous studies proved that ANN can reliably predict fruit characteristics [20][21][22][23].
In light of these considerations, our study aimed to assess the performances in the prediction of two hyperspectral imaging systems with different wavelength ranges, a visible-near-infrared (VisNIR, 400-1000 nm) system and a short-wave infrared (SWIR, 935-1720 nm) system.Prediction models were developed for strawberry firmness, total soluble solid content, titratable acidity, and dry matter using artificial neural network algorithms, highlighting the most predictive input spectral regions for the two systems.Moreover, the fusion of spectral information from visible-light and short-wave infrared bands was used to improve predictiveness of all models.Although previous studies investigated the application of hyperspectral imaging for predicting major strawberry pomological traits [6,14,24], no studies were found to predict dry matter.In general, measurements of several parameters for a single small fruit and berry are quite difficult to carry out, because there is not enough material for a lot of physical and chemical determinations.For this reason, the studies on strawberry often do not consider dry matter coupled with total soluble solid content, titratable acidity, or other phytochemicals.All the pomological traits considered in our study can determine the quality, the price of fresh fruit, and the fruit's specific intended use.In particular, total soluble solids and titratable acidity can be useful for identifying fruit quality for ready-to-eat purposes, whereas a high content of dry matter is a good indicator for the industrial processing of strawberries into jams, jellies, and juices, among others [25].This study can provide a valuable contribution to agricultural technology and the food industry by applying hyperspectral imaging for a rapid and nondestructive assessment of strawberry internal quality.Moreover, the identification of the most predictive input spectral regions can be the starting point for building new and inexpensive sensors based on a small number of wavelengths, to be used commercially or for broader practical application.

Plant Material and Experimental Design
Strawberry fruits (Fragaria × ananassa L.) from four everbearing strawberry cultivars, listed in Table 1, were bought from local markets in two different periods (April and July).Samples for each cultivar are shown in Figure 1.
Sensors 2024, 24, x FOR PEER REVIEW 3 of 18 identifying fruit quality for ready-to-eat purposes, whereas a high content of dry matter is a good indicator for the industrial processing of strawberries into jams, jellies, and juices, among others [25].This study can provide a valuable contribution to agricultural technology and the food industry by applying hyperspectral imaging for a rapid and nondestructive assessment of strawberry internal quality.Moreover, the identification of the most predictive input spectral regions can be the starting point for building new and inexpensive sensors based on a small number of wavelengths, to be used commercially or for broader practical application.

Plant Material and Experimental Design
Strawberry fruits (Fragaria × ananassa L) from four everbearing strawberry cultivars, listed in Table 1, were bought from local markets in two different periods (April and July).Samples for each cultivar are shown in Figure 1.After purchase, the fruits were immediately transported to the laboratory and screened for uniformity, appearance, and the absence of physical defects or decay.Two independent sets of 200 fruit samples, referring to the types of spectroscopic acquisition (VisNIR and SWIR) were constituted.Fifty strawberries were considered for each of the four cultivars (Calinda, Marimbella, Sabrina, Sabrosa).

Analytical Methods
Quality analyses (i.e., weight, length, width, thickness, color (CIELab coordinates: L*, a*, b*), firmness (FF), dry matter (DM), titratable acidity (TA), and total soluble solid content (TSS)) were performed on single fresh fruits, as previously reported by Amoriello et al. (2022) [15].In detail, digital calliper (±0.05 mm accuracy) was used to determine the strawberry dimensions (length, width, thickness) expressed in mm.Dry matter was evaluated drying the fresh samples at 105 ± 1 °C until a constant weight was reached using oven, and the results were expressed as g 100 g −1 of fresh weight (FW).Berry firmness was measured with a penetrometer (Fruit Pressure Tester FT011, TR snc, Forlì, Italy), using an 8 mm tip, and the result was expressed in Newton (N).Skin color was acquired on the After purchase, the fruits were immediately transported to the laboratory and screened for uniformity, appearance, and the absence of physical defects or decay.Two independent sets of 200 fruit samples, referring to the types of spectroscopic acquisition (VisNIR and SWIR) were constituted.Fifty strawberries were considered for each of the four cultivars (Calinda, Marimbella, Sabrina, Sabrosa).

Analytical Methods
Quality analyses (i.e., weight, length, width, thickness, color (CIELab coordinates: L*, a*, b*), firmness (FF), dry matter (DM), titratable acidity (TA), and total soluble solid content (TSS)) were performed on single fresh fruits, as previously reported by Amoriello et al. (2022) [15].In detail, digital calliper (±0.05 mm accuracy) was used to determine the strawberry dimensions (length, width, thickness) expressed in mm.Dry matter was evaluated drying the fresh samples at 105 ± 1 • C until a constant weight was reached using oven, and the results were expressed as g 100 g −1 of fresh weight (FW).Berry firmness was measured with a penetrometer (Fruit Pressure Tester FT011, TR snc, Forlì, Italy), using an 8 mm tip, and the result was expressed in Newton (N).Skin color was acquired on the external opposite sides of fruit using CIELab color space, obtained with a tristimulus colorimeter (Chroma Meter CR-200; Minolta, Milan, Italy), equipped with a D65 illuminant [15].The method for titratable acidity was based on titration of the acids present in the juice with sodium hydroxide (0.1 N) using an automatic titration system (785 DPM Titrino, Metrohm Ltd., Herisau, Switzerland).Data were given as mEq L −1 .TSS evaluation was made with a digital refractometer (Refractometer 30PX, Mettler Toledo, Greifensee, Switzerland).TSS was expressed as g 100 g −1 of FW.

Hyperspectral Image Acquisition
Two hyperspectral imaging systems (VisNIR and SWIR) were used to acquire hyperspectral images of strawberry samples.
Images from the first set of samples (VisNIR) were acquired in reflectance mode using a portable Specim IQ hyperspectral camera with push-broom technology (Specim, Spectral Imaging Ltd., Oulu, Finland), as described by Dashti et al. [5].The VisNIR system included a spectrometer, a CMOS surface detector, a lens (Specimens FX10, Specim, Spectral Imaging Ltd., Oulu, Finland) with a detection range of 400-1000 nm and 224 wavelength points, and a computer system with an imaging acquisition software (Lumo-Scanner, Specim, Spectral Imaging Ltd., Oulu, Finland).
The spatial resolution was 512 × 512 pixels and the spectral resolution was 7 nm resulting in 204 spectral bands across the wavelength range.Therefore, a 3D hypercube was obtained with dimensions of 512 × 512 × 204 with over 53 million data points for each scan and active pixel pitch 17.58 µm.The camera was fixed on the tripod facing downwards, and samples were positioned on a table below the camera for scanning (Figure 2).Two halogen-based lamps, placed at 45 • facing downwards, were used as the light source.The integration time of the hyperspectral camera was set to 45.0 ms.A white diffuse reflectance target was used to carry out a white reference image to operate in simultaneous modality.The RGB and hyperspectral images were acquired through IQ studio software (Specim, Spectral Imaging Ltd., Oulu, Finland).Images from the second set of samples (SWIR) were acquired in reflectance mode using a SisuCHEMA Hyperspectral Chemical Imaging Analyser (SPECIM, Spectral Imaging LTD, Oulu, Finland) system.The system uses a push-broom imaging technology that captures one line of an image at a time while scanning the sample on a sliding table.The system included (1) a scanner table having a maximum scanning rate of 60 mm/s and a spatial resolution of 600 µm, with an integrated SPECIM diffusive line illumination unit (located on top of the samples in a 45 • angular position with respect to the samples) to illuminate the camera's field of view; (2) a monochrome InGaAs image sensor detector (Specim FX17, Spectral Imaging Ltd., Oulu, Finland) with a spectral range of 935-1720 nm and spatial resolution of 640 pixels, 224 wavebands and spectral resolution of 8 nm full width half maximum; (3) a computer with an imaging acquisition software (Lumo-Scanner, Specim, Spectral Imaging Ltd., Oulu, Finland).The exposure time of the hyperspectral camera was set to 4.70 ms, the frame rate to 15.20 Hz, the positioning speed of the platform to 20.00 mm s −1 , and the scanning speed to 5.84 mm s −1 .
All acquired raw hyperspectral images were then corrected into reflectance hyperspectral images using the white and dark references [26], according to the following equation: where I = the corrected reflectance, I raw = the original reflectance, I B = the black reference, and I W = the white reference.

Data Analysis
Two hundred samples for each of the two sets of strawberries were acquired twice, on opposite sides of the fruit.The mean spectrum from two spectra was determined for each sample, baseline corrected and used as a spectral signature of the sample in the spectral dataset.First-order Savitzky-Golay derivative was applied on the data for baseline correction and smoothing.The Savitzky-Golay filter was chosen because it tends to preserve the original signals by removing noise only to some degree [27].Image segmentation was carried out with the principal component analysis (PCA) algorithm on mean centered spectra, considering the first two principal components (PCs) to remove the background and extract the pixels of each strawberry sample from the entire hyperspectral image.PCA allowed a lower dimensional representation of the data by forming linear combinations of the original wavebands in direction of maximal variance [28].This is represented by score images.Then, all the hypercubes were transformed into two-dimensional matrices containing as many rows as the pixels retained after background elimination and as many columns as the number of wavelengths by unfolding.The spectra related to all pixels of strawberries were then averaged to obtain the mean spectrum of each sample.This processing was obtained using Evince software (Prediktera AB, Umeå, Sweden).

Prediction Models
Pomological traits of the strawberries (firmness, total soluble solid content, titratable acidity, dry matter) were predicted using artificial neural networks (ANN).A feed-forward architecture of ANN, known as multilayered perceptron (MLP), with back propagation and training algorithms, was employed to build predictive and nonlinear models for the output variables (FF, TSS, TA, DM) for both VisNIR and SWIR systems.Each of two whole datasets, containing the mean spectra of each strawberry sample, was randomly divided into training set (80% of data) and testing set (20% of data).
The ANN model consisted of three layers: an input layer with the neurons as independent variables (the spectral response), one or more hidden layers, and one output layer for each output variable (FF, TSS, TA, DM) with the neurons as dependent variables, as shown in Figure 3.The number of artificial neurons or nodes equals the size of the input vector.Different activation functions (identity function, logistic function, hyperbolic tangent function, and exponential function), as reported by Amoriello et al. (2022) [15], were considered.Different topologies with different neurons in the hidden layer (from 1 to 25) were tested, and the training process of the network was run 100,000 times with random initial values of weights and biases.The best topology for all pomological traits was evaluated using prediction performance values.initial values of weights and biases.The best topology for all pomological traits was evaluated using prediction performance values.Prediction performances of various ANN configurations for each pomological trait were evaluated using four statistical metrics: the coefficient of determination (R 2 ), the mean absolute error (MAE), the root mean squared error (RMSE), and the relative standard error (RSE), as defined by Amoriello et al. ( 2022) [15].
To improve the performances of models for all quality parameters, the fusion of spectral data from the two HSI systems was applied.It was performed at low-level fusion.Therefore, the two spectral datasets were first autoscaled to compensate for the scale differences, and then concatenated and merged into a single matrix containing 406 variables for modeling.
Data were processed using TIBCO ® Statistica statistical package software (version 13.5, TIBCO software Inc., Palo Alto, CA, USA)

Statistical Analysis
Differences in all measured properties were determined using a one-way analysis of variance (ANOVA) and the Kruskal-Wallis nonparametric test at a significance level of 5%, using SPSS statistical software (version 22, SPSS, Chicago, IL, USA).

Exploratory Analysis
The main quality traits of the first set of strawberry varieties under evaluation are shown in Table 2.
A considerable variability was observed in all pomological traits among the cultivars.Fresh weight ranged from 57 ± 13 g (Sabrina) to 22 ± 10 g (Sabrosa).Consequently, Sabrina and Sabrosa were characterized by the greatest and lowest values of length and width, respectively (Table 2).Data agreed with those reported in several studies on physical characteristics of different strawberry varieties [29][30][31][32].Fruit color coordinates showed marked differences between Sabrina and Sabrosa.Marimbella and Calinda were between these two cultivars and were very similar to each other from the point of view of color.
On average, no significant differences on firmness were observed among the investigated cultivars.Among genotypes, Sabrosa showed the highest total soluble solid content Prediction performances of various ANN configurations for each pomological trait were evaluated using four statistical metrics: the coefficient of determination (R 2 ), the mean absolute error (MAE), the root mean squared error (RMSE), and the relative standard error (RSE), as defined by Amoriello et al. ( 2022) [15].
To improve the performances of models for all quality parameters, the fusion of spectral data from the two HSI systems was applied.It was performed at low-level fusion.Therefore, the two spectral datasets were first autoscaled to compensate for the scale differences, and then concatenated and merged into a single matrix containing 406 variables for modeling.

Statistical Analysis
Differences in all measured properties were determined using a one-way analysis of variance (ANOVA) and the Kruskal-Wallis nonparametric test at a significance level of 5%, using SPSS statistical software (version 22, SPSS, Chicago, IL, USA).

Exploratory Analysis
The main quality traits of the first set of strawberry varieties under evaluation are shown in Table 2.
A considerable variability was observed in all pomological traits among the cultivars.Fresh weight ranged from 57 ± 13 g (Sabrina) to 22 ± 10 g (Sabrosa).Consequently, Sabrina and Sabrosa were characterized by the greatest and lowest values of length and width, respectively (Table 2).Data agreed with those reported in several studies on physical characteristics of different strawberry varieties [29][30][31][32].Fruit color coordinates showed marked differences between Sabrina and Sabrosa.Marimbella and Calinda were between these two cultivars and were very similar to each other from the point of view of color.On average, no significant differences on firmness were observed among the investigated cultivars.Among genotypes, Sabrosa showed the highest total soluble solid content and titratable acidity (9 ± 2 g 100 g −1 FW, and 128 ± 18 mEq 100 g −1 FW, respectively; Table 3), whereas the lowest mean values were recorded by Calinda (5.4 ± 0.5 g 100 g −1 FW, and 76 ± 12 mEq 100 g −1 FW, respectively).Sabrosa also showed the high dry matter content, whereas the lowest was observed in Marimbella (Table 2).These results were in accordance with previous studies reported by several authors [15,33,34].A similar trend reported above was observed in all investigated attributes also for second set samples, as shown in Table 3.

Image Processing and Spectra Analysis
Firstly, the unfolding was applied: the hypercube, in which rows and columns represent pixel position in the image and the third dimension of the spectral variables, was reorganized in a bi-dimensional structure for the PCA to be enforced.The new 2D data matrix had pixels as rows and variables as columns.After PCA, was possibly to come back to the original structure by applying the refolding procedure.Figure 4 showed an image of a strawberry before and after the processing phase.The filter application and the removal of pixels corresponding to the background, leaving only the fruit, were shown.A score plot of the first two PCs, which explained more than 98% of variance for all images, was represented.Moreover, a refolded hyperspectral image of strawberry represented by the first principal component score was shown.The average mean spectra for the four cultivars are shown in Figures 5 and 6.In general, VisNIR spectra (region from 400 to 1000 nm) (Figure 4) is featured by vibration overtones and combination bands of O-H, C-H, and N-H bonds related to the principal structural organic molecules [35].Many studies on fruit characteristics revealed the presence of the O-H overtone at and 970 nm related to the water [36,37].In addition, other authors [38][39][40] also reported a strong water absorption peak in fruit samples at around 960 nm.However, Benelli et al. (2022) [35] highlighted a reduced marking and amplitude of the water absorption peaks between 700 and 1000 nm, making the spectral information of the substances at low concentrations in the fruit less covered by the presence of water [35].Regarding carbohydrates, the absorbance peaks were found in the spectra regions between 950 and 1000 nm, characterized by the O-H and N-H second overtone, the O-H bonds' combination band, and the C-H third overtone [41].Pu et al. (2016) [39] indicated a probable sugar absorption band at 840 nm.Fruit pigments can be evaluated based on their spectral characteristics.The wavelength range from 420 to 503 nm is characterized by adsorption of carotenes and xanthophylls [36].The fruit pigment beta-carotene strongly absorbs near to 475 nm, while the xanthophylls lutein and violaxanthin strongly absorb at approximately 435 nm, with strong absorption across the 350-500 nm range [42].Sabrina showed a slightly different behavior in this spectral region in comparison with the other cultivars.An anthocyanin pigment sugar-protein complex leads an absorption at around 530-550 nm [43,44].The spectral reference for chlorophyll absorbance is the peak at 680 nm [42].Strawberries' spectra revealed differences at around 680 nm: Marimbella and Sabrosa showed a reduced chlorophyll content in comparison with the other cultivars.This different reflectance data variability among cultivars was likely caused by different levels of fruit ripeness.Moreover, the peak of reflectance for strawberries had occurred at around 800-840 nm, as noted by Tallada et al. (2006) [45].
Regarding the SWIR spectra region, the most prominent reflectance peaks in the regions between 1000-1150 nm are characterized by C-H and O-H functional groups, common in major constituents (e.g., water, sucrose, and cellulose) within the samples [46].Other vibrational bands for C-H functional groups were also reported in the region from 1300 to 1400 nm.An O-H overlapping with the first overtones of the O-H stretching modes of self-associated and water-bonded O-H functional groups could be found from 1400 to 1600 nm [46].The local reflectance trough, which appears at approximately 1200 nm, is The average mean spectra for the four cultivars are shown in Figures 5 and 6.In general, VisNIR spectra (region from 400 to 1000 nm) (Figure 4) is featured by vibration overtones and combination bands of O-H, C-H, and N-H bonds related to the principal structural organic molecules [35].Many studies on fruit characteristics revealed the presence of the O-H overtone at and 970 nm related to the water [36,37].In addition, other authors [38][39][40] also reported a strong water absorption peak in fruit samples at around 960 nm.However, Benelli et al. (2022) [35] highlighted a reduced marking and amplitude of the water absorption peaks between 700 and 1000 nm, making the spectral information of the substances at low concentrations in the fruit less covered by the presence of water [35].Regarding carbohydrates, the absorbance peaks were found in the spectra regions between 950 and 1000 nm, characterized by the O-H and N-H second overtone, the O-H bonds' combination band, and the C-H third overtone [41].Pu et al. (2016) [39] indicated a probable sugar absorption band at 840 nm.Fruit pigments can be evaluated based on their spectral characteristics.The wavelength range from 420 to 503 nm is characterized by adsorption of carotenes and xanthophylls [36].The fruit pigment beta-carotene strongly absorbs near to 475 nm, while the xanthophylls lutein and violaxanthin strongly absorb at approximately 435 nm, with strong absorption across the 350-500 nm range [42].Sabrina showed a slightly different behavior in this spectral region in comparison with the other cultivars.An anthocyanin pigment sugar-protein complex leads an absorption at around 530-550 nm [43,44].The spectral reference for chlorophyll absorbance is the peak at 680 nm [42].Strawberries' spectra revealed differences at around 680 nm: Marimbella and Sabrosa showed a reduced chlorophyll content in comparison with the other cultivars.This different reflectance data variability among cultivars was likely caused by different levels of fruit ripeness.Moreover, the peak of reflectance for strawberries had occurred at around 800-840 nm, as noted by Tallada et al. (2006) [45].
Regarding the SWIR spectra region, the most prominent reflectance peaks in the regions between 1000-1150 nm are characterized by C-H and O-H functional groups, common in major constituents (e.g., water, sucrose, and cellulose) within the samples [46].Other vibrational bands for C-H functional groups were also reported in the region from 1300 to 1400 nm.An O-H overlapping with the first overtones of the O-H stretching modes of self-associated and water-bonded O-H functional groups could be found from 1400 to 1600 nm [46].The local reflectance trough, which appears at approximately 1200 nm, is due to the presence of water in the sample.The reflectance peaks at 1060 and 1270 nm (C-H stretching second overtone) are due to sucrose and cellulose, respectively [46].

Prediction of Pomological Traits
Predictive models for pomological traits were developed using the artificial neural networks.
Different ANN configurations were tested and compared with each other to determine the optimal MLP architecture (input-hidden-output layers).The network included 204 wavelengths for the VisNIR dataset and 224 wavelengths for the SWIR dataset as input data in the first layer, and one output layer that represented the strawberry parameters.Hidden neurons in the hidden layers were set to a range between 1 and 25.The best configuration for each pomological trait, i.e., the best goodness of fit of ANN models, was highlighted by the lowest RMSE of the training and test sets.
Tables 4 and 5 show the neural networks' architectures according to their topologies, including the MLP algorithm; the numbers of neurons in input, hidden, and output layers; the hidden and output neurons' activation functions; and the regression metrics (R 2 ; RMSE; MAE and RSE) for the highest training and test set predictions for each

Prediction of Pomological Traits
Predictive models for pomological traits were developed using the artificial neural networks.
Different ANN configurations were tested and compared with each other to determine the optimal MLP architecture (input-hidden-output layers).The network included 204 wavelengths for the VisNIR dataset and 224 wavelengths for the SWIR dataset as input data in the first layer, and one output layer that represented the strawberry parameters.Hidden neurons in the hidden layers were set to a range between 1 and 25.The best configuration for each pomological trait, i.e., the best goodness of fit of ANN models, was highlighted by the lowest RMSE of the training and test sets.
Tables 4 and 5 show the neural networks' architectures according to their topologies, including the MLP algorithm; the numbers of neurons in input, hidden, and output layers; the hidden and output neurons' activation functions; and the regression metrics (R 2 ; RMSE; MAE and RSE) for the highest training and test set predictions for each

Prediction of Pomological Traits
Predictive models for pomological traits were developed using the artificial neural networks.
Different ANN configurations were tested and compared with each other to determine the optimal MLP architecture (input-hidden-output layers).The network included 204 wavelengths for the VisNIR dataset and 224 wavelengths for the SWIR dataset as input data in the first layer, and one output layer that represented the strawberry parameters.Hidden neurons in the hidden layers were set to a range between 1 and 25.The best configuration for each pomological trait, i.e., the best goodness of fit of ANN models, was highlighted by the lowest RMSE of the training and test sets.
Tables 4 and 5 show the neural networks' architectures according to their topologies, including the MLP algorithm; the numbers of neurons in input, hidden, and output layers; the hidden and output neurons' activation functions; and the regression metrics (R 2 ; RMSE; MAE and RSE) for the highest training and test set predictions for each pomological trait (FF, TSS, TA, DM).The best topology for each attribute was found using neurons in the hidden layer from 1 to 25.The same procedure was applied to both VisNIR and SWIR datasets.The best five ANN architectures for each parameter were shown in Tables S1 and S2 (Supplementary Materials).Legend: MLP = multilayer perceptron; Tanh = hyperbolic tangent function; Exp = exponential function; FF = firmness (N); TSS = total soluble solid content (g 100 g −1 FW); TA = titratable acidity (mEq L −1 ); DM = dry matter (g 100 g −1 FW).Legend: MLP = multilayer perceptron; Tanh = hyperbolic tangent function; Exp = exponential function; FF = firmness (N); TSS = total soluble solid content (g 100 g −1 FW); TA = titratable acidity (mEq L −1 ); DM = dry matter (g 100 g −1 FW).
Regarding the VisNIR dataset, the best model for berry firmness was carried out with 11 neurons in the hidden layer, a logistic activation function for the hidden neurons, and identity activation function for the output neurons (Table 4).The optimal model for total soluble solid content was developed with 22 neurons in the hidden layer, an exponential activation function for the hidden neurons, and a hyperbolic tangent activation function for the output neurons.The best model of titratable acidity had 16 neurons in the hidden layer, and an identity activation function for the hidden neurons, and an identity activation function for the output neurons.The best model for dry matter was characterized by 19 neurons in the hidden layer, an exponential activation function for hidden neurons, and an exponential function for output neurons.
Table 4 and Figure 7 show a high goodness of fit for all parameters, especially for total soluble solid content and dry matter, and with the exception of firmness.In fact, the TSS model had coefficients of determination close to 1 (R 2 = 0.967 for the training test and R 2 = 0.959 for the test set) and the other metrics close to 0, indicating a low dispersion of residuals.Likewise, DM also had very high coefficients of determination (R 2 = 0.967 for the training test and R 2 = 0.947 for the test set) and very low other metrics.Optimal values of the coefficients of determination of TA (R 2 = 0.973 for the training test and R 2 = 0.877 for the test set), MAE, RMSE, and RSE (0.019, 3.922, and 0.019 for the training set, and 1.003, 9.306, and 8.438 for the test set, respectively) showed a high ability in predicting the strawberry titratable acidity.Finally, a poor goodness of fit resulted for firmness, due to low coefficients of determination (R 2 = 0.682 for the training test and R 2 = 0.808 for the test set) and high values of MAE, RMSE, and RSE.The low performance of the FF model may be due to two reasons.At first, FF measurements were performed with a manual penetrometer, and therefore were subject to associated operator error.Secondly, the calibrations were carried out using samples at the commercial harvest stage, with FF values between 45 and 10 N. Optimal calibrations for FF should be built by a wider range of variability of FF values, also including samples at different levels of ripeness.Regarding the SWIR dataset, the best model for firmness was carried out with 10 neurons in the hidden layer, a logistic activation function for the hidden neurons, and an identity activation function for the output neurons (Table 5).The optimal model for total soluble solid content was obtained with 11 neurons in the hidden layer, a logistic activation function for the hidden neurons, and an identity activation function for the output neurons.The best model of titratable acidity had 19 neurons in the hidden layer, and an identity activation function for the hidden neurons, and an identity activation function for the output neurons.Finally, the best model for dry matter was characterized by 19 neurons in the hidden layer, an exponential activation function for hidden neurons, and an exponential activation function for output neurons.Regarding the SWIR dataset, the best model for firmness was carried out with 10 neurons in the hidden layer, a logistic activation function for the hidden neurons, and an identity activation function for the output neurons (Table 5).The optimal model for total soluble solid content was obtained with 11 neurons in the hidden layer, a logistic activation function for the hidden neurons, and an identity activation function for the output neurons.The best model of titratable acidity had 19 neurons in the hidden layer, and an identity activation function for the hidden neurons, and an identity activation function for the output neurons.Finally, the best model for dry matter was characterized by 19 neurons in the hidden layer, an exponential activation function for hidden neurons, and an exponential activation function for output neurons.
Table 5 and Figure 8 showed a good agreement between experimental and predicted SWIR for all parameters.Dry matter showed high coefficients of determination (R 2 = 0.981 for the training test and R 2 = 0.924 for the test set) and values of the other metrics close to 0. An optimal prediction performance resulted for titratable acidity (R 2 = 0.987 for the training test and R 2 = 0.953 for the test set) and total soluble solid content (R 2 = 0.965 for the training test and R 2 = 0.898 for the test set).The model for firmness was promising, with R 2 being equal to 0.932 for the training test and R 2 being equal to 0.820 for the test set, and showing low values of MAE.However, a large dispersion of residuals, i.e., high RMSE, indicated a discrete prediction performance of the models (RMSE = 7.191 for the training test and RMSE = 10.774 for the test set).The discrete performance of the FF model for the SWIR system may be due to the reasons indicated for the VisNIR calibration.However, compared to the latter, the SWIR model for firmness was better.This can be explained by the fact that the SWIR spectral region considered the O-H vibrational modes of all NIR spectrum overtones.These modes are related to the fruit structure, and therefore to the firmness.
Table 5 and Figure 8 showed a good agreement between experimental and predicted SWIR for all parameters.Dry matter showed high coefficients of determination (R 2 = 0.981 for the training test and R 2 = 0.924 for the test set) and values of the other metrics close to 0. An optimal prediction performance resulted for titratable acidity (R 2 = 0.987 for the training test and R 2 = 0.953 for the test set) and total soluble solid content (R 2 = 0.965 for the training test and R 2 = 0.898 for the test set).The model for firmness was promising, with R 2 being equal to 0.932 for the training test and R 2 being equal to 0.820 for the test set, and showing low values of MAE.However, a large dispersion of residuals, i.e., high RMSE, indicated a discrete prediction performance of the models (RMSE = 7.191 for the training test and RMSE = 10.774 for the test set).The discrete performance of the FF model for the SWIR system may be due to the reasons indicated for the VisNIR calibration.However, compared to the latter, the SWIR model for firmness was better.This can be explained by the fact that the SWIR spectral region considered the O-H vibrational modes of all NIR spectrum overtones.These modes are related to the fruit structure, and therefore to the firmness.In order to explain the performances of the models in predicting the pomological traits using the two hyperspectral systems, a sensitivity analysis was carried out.This analysis highlighted the relative importance of the input variables to ANN model predictions.The normalized relative variable importance of the projection (VIP) across the spectral region for each of the ANN model was reported in Tables 6 and 7.
Regarding the firmness model, the spectra bands, which strongly contributed to the prediction capability, ranged from 450-880 nm (Table 6).As previously reported by Merzlyak and Solovchenko (2002) [47], the VIS region (450-700 nm) is strongly related to the absorption of pigment (such as chlorophylls, carotenoids, anthocyanins, etc.), whose concentration depends on the fruit ripening stage.Moreover, the spectral region around In order to explain the performances of the models in predicting the pomological traits using the two hyperspectral systems, a sensitivity analysis was carried out.This analysis highlighted the relative importance of the input variables to ANN model predictions.The normalized relative variable importance of the projection (VIP) across the spectral region for each of the ANN model was reported in Tables 6 and 7.
Regarding the firmness model, the spectra bands, which strongly contributed to the prediction capability, ranged from 450-880 nm (Table 6).As previously reported by Merzlyak and Solovchenko (2002) [47], the VIS region (450-700 nm) is strongly related to the absorption of pigment (such as chlorophylls, carotenoids, anthocyanins, etc.), whose concentration depends on the fruit ripening stage.Moreover, the spectral region around 800-950 nm also contributed to the firmness prediction: this region is an indicator of the probable sugar and water absorption, which varies during fruit softening, as reported by Pu et al. (2016) [39].Similarly to what was found for FF, the spectral regions that most influenced the predictive capacity of the TSS model were those related to pigments and carbohydrates (C-H third overtone).For example, the absorption bands between 570 and 590 nm are related to carotenoids, and those between 680 and 710 nm to chlorophyllα [39,48,49].In fact, many authors highlighted a close relationship between fruit pigment variation, soluble solid content, and ripening stage [48][49][50].The bands from 800 to 1000 nm contributed to the TSS model.This band is associated with the water absorption peak [36,37].The bands from 800 to 1000 nm are strongly related to the O-H water overtone and second overtone and the O-H bonds' combination band and C-H third overtone [41].For TA model, the Vis region had great importance because fruit acidity is strongly related to the maturation stage [49].In addition, absorbance contribution at 950 nm is due to the O-H overtone of organic acids.For DM model, the absorbances from 760 to 970 nm were among the most important predictive variables because they are related to the O-H vibration of water.Legend: FF = firmness; TSS = total soluble solid content; TA = titratable acidity; DM = dry matter.
For the SWIR system, VIP spectral regions are reported in Table 8.Firmness was strongly related to the spectral regions between 1123 and 1361 nm, which could be ascribed by the O-H second overtone O-H bonds' combination band, and the C-H second and third overtones.These functional groups are characteristic to the water and carbohydrates, which are strongly associated with the fruit softness.However, other spectral bands near 1200 nm, 1300 nm, 1400 nm, and 1700 nm, characteristic of the C-H stretching second overtone and O-H functional groups [46], were predictive for FF.These spectral regions were the most predictive also for the TSS model, because they are characteristic of sugar functional groups, the main constituent of soluble solid content.The absorption peak near 1344 nm was considered the most important spectral band in the TA model, because it is related to the C-H and O-H functional groups of organic acids.Moreover, the spectral bands near 1300 and 1600 nm, characteristic of O-H overlapping with the first overtones of the O-H stretching and water-bonded O-H functional groups, also contributed to the TA model.As for VisNIR, the bands characteristic of the O-H group of the water at around 1400 nm [46] were the main predictors of the DM model.Legend: MLP = multilayer perceptron; Tanh = hyperbolic tangent function; Exp = exponential function; FF = firmness (N); TSS = total soluble solid content (g 100 g −1 FW); TA = titratable acidity (mEq L −1 ); DM = dry matter (g 100 g −1 FW).
Regarding the fused dataset, the best model for firmness was carried out with 13 neurons in the hidden layer, a hyperbolic tangent activation function for the hidden neurons, and a logistic activation function for the output neurons (Table 8).The optimal model for total soluble solid content was obtained with 17 neurons in the hidden layer, an exponential activation function for the hidden neurons, and an identity activation function for the output neurons.The best model of titratable acidity had 15 neurons in the hidden layer, an identity activation function for the hidden neurons, and a logistic activation function for the output neurons.Finally, the best model for dry matter was characterized by 11 neurons in the hidden layer, a logistic activation function for hidden neurons, and an identity activation function for output neurons.
The predictive performances of all models built by the fusion band spectral features were better than that of the single-band spectral features (Table 8 and Figure 9), especially for the firmness, whose model showed higher metrics (R 2 = 0.951, RMSE = 1.554,MAE = 0.343 and RSE = 6.602 for the test set).This result demonstrated that the information obtained from the two his systems can have a synergistic effect, improving the model's predictiveness.
Our study showed how the two HSI systems can predict the internal quality of strawberries.However, the predictive capacity may also depend on the quality of the hyperspectral data, as well as on the algorithms used for prediction.In particular, a high imaging speed can reduce spectral and spatial resolution.The optimal calibration of these parameters is strictly linked to the structure of the instrument.To monitor real-time dynamic biological samples with high spectral and spatial resolution, it is possible to use a stand-down video-rate high-throughput HSI, equipped with a high-speed galvo mirror, that allows one to scan spatial light, obtaining a spectral resolution of 3-5 nm and accelerating the collection rate of hyperspectral cubes to the video level, as described by Li et al. [51].

Figure 2 .
Figure 2. Schematic diagram of the VisNIR hyperspectral imaging system.

Figure 3 .
Figure 3. Structure of multilayer perceptron artificial neural network.

Figure 3 .
Figure 3. Structure of multilayer perceptron artificial neural network.

Sensors 2024 ,
24,  x FOR PEER REVIEW 8 of 18 removal of pixels corresponding to the background, leaving only the fruit, were shown.A score plot of the first two PCs, which explained more than 98% of variance for all images, was represented.Moreover, a refolded hyperspectral image of strawberry represented by the first principal component score was shown.
presence of water in the sample.The reflectance peaks at 1060 and 1270 nm (C-H stretching second overtone) are due to sucrose and cellulose, respectively[46].

Figure 5 .
Figure 5. Mean reflectance spectra of strawberries for the four cultivars at wavelength range of 400-1000 nm (VisNIR).

Figure 6 .
Figure 6.Mean reflectance spectra of strawberries for the four cultivars at wavelength range of 935-1720 nm (SWIR).

Figure 5 .
Figure 5. Mean reflectance spectra of strawberries for the four cultivars at wavelength range of 400-1000 nm (VisNIR).

024, 24 ,
x FOR PEER REVIEW 9 of 18 due to the presence of water in the sample.The reflectance peaks at 1060 and 1270 nm (C-H stretching second overtone) are due to sucrose and cellulose, respectively[46].

Figure 5 .
Figure 5. Mean reflectance spectra of strawberries for the four cultivars at wavelength range of 400-1000 nm (VisNIR).

Figure 6 .
Figure 6.Mean reflectance spectra of strawberries for the four cultivars at wavelength range of 935-1720 nm (SWIR).

Figure 6 .
Figure 6.Mean reflectance spectra of strawberries for the four cultivars at wavelength range of 935-1720 nm (SWIR).

Sensors 2024 , 18 Figure 7 .
Figure 7. Predicted vs. experimental values of the firmness (FF), total soluble solid content (TSS), titratable acidity (TA), dry matter (DM) using the optimal ANN topologies and VisNIR spectra.The coefficients of determination (R 2 ) for training and test sets are reported.

Figure 7 .
Figure 7. Predicted vs. experimental values of the firmness (FF), total soluble solid content (TSS), titratable acidity (TA), dry matter (DM) using the optimal ANN topologies and VisNIR spectra.The coefficients of determination (R 2 ) for training and test sets are reported.

Figure 8 .
Figure 8. Predicted vs. experimental values of the firmness (FF), total soluble solid content (TSS), titratable acidity (TA), dry matter (DM) using the optimal ANN topologies and SWIR spectra.The coefficients of determination (R 2 ) for training and test sets are reported.

Figure 8 .
Figure 8. Predicted vs. experimental values of the firmness (FF), total soluble solid content (TSS), titratable acidity (TA), dry matter (DM) using the optimal ANN topologies and SWIR spectra.The coefficients of determination (R 2 ) for training and test sets are reported.

Table 2 .
Means and standard deviation of quality parameters of first set (VisNIR) samples divided by cultivar.Differences between letters (a, b, c) in the same row indicate significant differences (p < 0.05).

Table 3 .
Means and standard deviation of quality parameters of second set (SWIR) samples divided by cultivar.Differences between letters (a, b, c) in the same row indicate significant differences (p < 0.05).

Table 4 .
Visible-near-infrared spectrometer.Neural network architectures, regression metrics for the highest training and test set predictions, goodness of fit, and residual analysis for the developed ANN models.

Table 5 .
Short-wave infrared spectrometer.Neural network architectures, regression metrics for the highest training and test set predictions, goodness of fit, and residual analysis for the developed ANN models.

Table 5 .
Short-wave infrared spectrometer.Neural network architectures, regression metrics for the highest training and test set predictions, goodness of fit, and residual analysis for the developed ANN models.

Table 6 .
Normalized relative importance (%) of the most significative input variables (wavelengths λ) to ANN model predictions for VisNIR system.

Table 7 .
Normalized relative importance (%) of the most significative input variables (wavelengths λ) to ANN model predictions for SWIR system.

Table 8 .
Visible-near-infrared and Short-wave infrared and spectrometers.Neural network architectures, regression metrics for the highest training and test set predictions, goodness of fit, and residual analysis for the developed ANN models.