1. Introduction
The quality of agricultural products is crucial in terms of consumer interest and determining the levels of market acceptance. Therefore, quality directly affects the storage and post-harvest processing operations. Measuring the quality of fruits, vegetables and food products is the focus of the food industry. Non-destructive measurements of quality parameters have been performed on many agricultural products, and are fast and accurate in estimating the quality factors involved [
1,
2,
3,
4,
5].
Extensive research has been conducted in recent decades on the applications of both destructive and non-destructive methods in fruit quality assessment, but most of the proposed methods have not been able to provide all of the information needed to determine the quality and ripening of fruits.
Over the past decade, hyperspectral imaging has evolved rapidly and widely, and is now being used as a new scientific tool in the non-destructive evaluation of the quality of fruits and vegetables. The spectral imaging technique uses a combination of imaging and spectroscopy in a system that can obtain a set of monochrome images from approximately hundreds of thousands of wavelengths. Many published studies in the field of the processing and analysis of spectral images have suggested the use of hyperspectral imaging techniques to assess the quality of fruits and vegetables.
Destructive methods are now often used to measure qualitative parameters, which are difficult, time consuming and costly. Non-destructive methods of measuring the quality properties of fruit can be useful for the rapid determination of quality and ripening of more fruits individually. As according to the mentioned cases, in this study, the possibility of rapid and non-destructive detection and of the prediction of indicators such as soluble solids (SSC), titratable acid (TA), pH and total phenol (TP) of apple fruit were investigated by hyperspectral imaging. To achieve this goal, we developed the PLS least squares model and compared it with the results obtained from artificial intelligence. Based on the results obtained from data analysis, we introduced the best method for identifying the qualitative characteristics of apple fruit.
In the study by Gao et al. (2022) on Malus Micro-malus Makino, regression and classification models were studied by using NIR-HIS combined with chemo-metrics to develop the efficiency of non-destructive detection. The SPA, iRF and SCARS methods were used to extract effective wavelengths sensitive to changes in SSC and FI information. In their study, two types of assessment models, based on full-spectrum and effective wavelengths (namely, partial least squares regression and extreme learning machine), were established to predict the SSC and FI. In addition, the classification models based on the support vector machine, improved by the GWO-SVM and PLSR-DA, were constructed to differentiate the maturity stage. Their results illustrated that the SPA-ELM and SPA-GWO-SVM models achieved satisfactory performances. Finally, it can be said that NIR-HSI is possible to evaluate the quality of Micro-malus Micino Malus [
6].
In the study by Benelli et al. (2021) on Sangiovese grapes, grape mean spectra were extracted from each hyperspectral image and used to predict the SSC by PLS, and to classify the samples into the two classes by PLS-DA. The SSC was predicted with a R
2 = 0.77 (
RMSECV = 0.79° Brix), and classified the samples with 86 to 91% accuracy. Their study shows the potential of the use of HSI technology directly in the field by proximal measurements under natural light conditions for the prediction of the harvest time of the ‘Sangiovese’ red grape [
7].
Ekramirad et al. (2017) used hyperspectral imaging in the range of 400 to 1000 nm to detect infected apples, and reported that the classification of infested samples from normal ones was possible with the classification rates of 96% and 94% for normal and infested apples, respectively. The best classification rate was obtained for the decision tree method [
8].
Zhu et al. (2017) used hyperspectral imaging to predict the internal quality of Kiwifruit based on variable selection algorithms and geometric models. The firmness, soluble solids content (SSC) and pH of Kiwifruit were evaluated using this technique. Weighted regression coefficients (BW), sequential prediction algorithm (SPA) and genetic algorithm-partial least square (GAPLS) were compared and evaluated to select the effective wavelengths. Furthermore, Multiple Linear Regression (MLR), Partial Least Squares Regression and Least Squares Support Vector Machines (LS-SVM) were developed to predict quantitative quality characteristics using effective wavelengths. The SPA-MLR model showed excellent performance for firmness and SSC at 380–1023 nm, while the GAPLS-LS-SVM model was optimal at 874–1734 nm for pH prediction [
9].
Mobli et al. (2020) used hyperspectral imaging in the near-infrared region with the partial least square discriminant method for the rapid detection of leaf lettuce infected with E. coli from control samples (not infected), and reported that four different groups could be classified with an accuracy of more than 90% and an error of less than 0.008 [
10].
According to the above, the non-destructive detection of the quality parameters of apple fruit, which is one of the most important fruits for export, can lead to progress in the post-harvest, sorting and grading activities, and can also lead to the construction and design of machines that can grade fruits online in the shortest possible time in terms of quality (amount of ripening, amount of sweetness, etc.) without any damage to the fruit. The detection of qualitative parameters in agricultural products is conducted using various destructive and non-destructive methods. In this research, we try to identify and introduce the best model for diagnosing and predicting the quality parameters of apple fruit using partial least squares regression (PLS).
In this study, pH parameters, soluble solids, titratable acid and phenol were predicted. Because pH indicates the acidity of fruit juice, soluble solids represent fruit sugar, titratable acid indicates taste and phenol as free radical scavengers play an important role in health.
The purpose of this study is to detect and predict the qualitative parameters (pH, soluble solids (SSCs), titratable acid (TA) and total phenol (TP)) of apples with spectral imaging and using a multiple regression analysis to determine the quality of apple fruit quality parameters and also to determine the best artificial intelligence algorithms in determining apple fruit quality parameters. This method is of great importance due to there being no need for sample preparation, no need for special skills, field usability, remote usability, fast measurement and no waste generated and the fact that it is accurate, reliable, efficient and non-invasive.
3. Results and Discussions
3.1. Morphological Characteristics
Qualitative specifications and parameters, including weight, diameter, pH, soluble solids content (SSC), titratable acid (TA) and total phenol (TP) of Golden and Red Delicious apples, will be provided (
Table 1 and
Table 2). Then, the effect of different pre-processing methods on the spectra was investigated. Finally, using the PLS regression analysis and modeling between qualitative indicators and spectral data, the modeling results for each of the indicators were interpreted and compared to determine the optimal model.
3.2. Multivariate Regression Modeling
In this section, the best pre-processing method among the available pre-processing methods for each trait was predicted, by calculating parameters such as RMSEC, Rc and SDR and comparing the results of the best models. It should be noted that models should be selected that have the lowest value of RMSEC and the highest Rc and SDR, to predict the desired trait in a smaller number of main components. Also, the RMSECV versus LVs diagram was drawn for each cultivar and each trait in the best pre-processing method to determine how to select the optimal number of LVs (latent variables).
3.3. Detection of pH
The results of the calibration and validation of the PLS models, based on the combination of different pre-processing methods of hyperspectral imaging spectra to predict the pH of Red and Golden Delicious apples, are presented in
Table 3.
The results presented for hyperspectral imaging in
Table 3 (and
Figure S1 in Supplementary Materials) show that the best model developed to predict the pH of the Red Delicious apples was obtained from SNV pre-processing with
RMSEC = 0.00765,
rc = 0.9919 and
SDR = 2.51. For the Golden Delicious, the best pH prediction with acceptable accuracy was related to the 1st Derivatives (
RMSEC = 0.00425,
rc = 0.9989,
SDR = 1.43).
The graph of model error changes against the number of main components of hyperspectral imaging (in
Figure S2 in Supplementary Materials) shows that, for the Red Delicious apples in the number of LVs = 8,
RMSECV is 0.0068, and in Golden Delicious apples in LVs = 9,
RMSECV = 0.0017. Increasing the number of principal components after the optimal principal component leads to the over fitting and increasing of the model error.
In the study of Weng et al. (2020), pH was considered as a key parameter for strawberry quality. In this study, hyperspectral reflectance imaging in the range of 400 to 1000 nm was used to develop non-destructive detection methods, by integrating different multivariate methods as a partial least squares regression (PLSR). They found that through spectral properties, the best prediction for pH by LWR is Rp2 = 0.8493 and RMSEP = 0.0501, which is consistent with the findings of our study.
3.4. Detection of Titratable Acidity (TA)
Table 4 shows the calibration and prediction results of titratable acid (TA) for Red and Golden Delicious apples, with a PLS model based on the combination of different hyperspectral imaging pre-processing methods, respectively.
The results presented for hyperspectral imaging in
Table 4 show that the best model developed for predicting Red Delicious TA was obtained in SNV pre-processing with
RMSEC = 0.0034,
rc = 0.9939 and
SDR = 2.07. In Golden Delicious, the best TA prediction with acceptable accuracy was related to smoothing S.G. and the 2nd derivatives pre-processions, with similar results (
RMSEC = 0.00085,
rc = 0.9989 and
SDR = 2.94).
(
Figure S3 in Supplementary Materials)
RMSECV diagrams for each of the LVs in hyperspectral imaging show that they had the lowest
RMSECV at LVs = 9 in Red Delicious apples and the lowest
RMSECV at LVs = 8 for Golden Delicious apples, which provided the best predictive TA index results.
Figure S4 in the Supplementary Materials shows the predicted TA values by the best prediction model, based on hyperspectral imaging versus TA measurement values.
On-the-go hyperspectral imaging in the range of 400–1000 nm was performed on grapes in the study of Fernández-Novales et al. (2021). 144 grape clusters were measured for titratable acidity (TA) throughout the experiment, using standard wet chemistry reference methods. Partial least squares regression (PLS) was used to construct the calibration models, cross-validation and prediction of grape-composition parameters. According to their results, the best performance was from the values of external validation coefficients (R2p) of 0.81 for titratable acidity. This study has similar results to the present study.
3.5. Detection of Soluble Solids (SSC)
Table 5 shows the calibration and validation results of the PLS models based on different pre-processing of spectral imaging spectra for the soluble solids (SSC) of Red and Golden Delicious samples.
Based on model validation, the best multivariate regression model in hyperspectral imaging spectroscopy (
Table 5 and
Figure S5 in the Supplementary Materials) in MSC pre-processing in Red Delicious apples was able to predict the SSC with
RMSEC = 0.1765,
rc = 0.9909 and
SDR = 2.70. LVs = 8 was the best SSC predictor in this sample. According to the results mentioned in the table, the SSC of Golden Delicious with normalized pre-processing was the best model with values of
RMSEC = 0.0459,
rc = 0.999 and
SDR = 2.13, which also had LVs = 8.
Figure S6 in the Supplementary Materials shows the
RMSECV diagrams in each of the LVs for the best Red and Golden Delicious prediction model based on hyperspectral imaging.
Hyperspectral imaging in the spectral range of 874–1734, along with feature extraction methods to determine the soluble sugar content (SSC) content of ripe strawberries, was used in the study by Ding et al. (2015). Using different models, they showed that all PLS models achieved good results. PLS models using the full spectrum and features extracted by WT obtained the best results, with a calibration correlation coefficient (rc) and a prediction correlation coefficient (rp) of more than 0.9. The overall results showed that hyperspectral imaging combined with feature extraction methods can be used to detect SSC in strawberries.
3.6. Detection of Total Phenol (TP)
The validation results of the PLS calibration models based on the combination of different hyperspectral imaging processors for predicting the total phenol (TP) of Red and Golden Delicious apples are given in
Table 6.
Based on the results presented in
Table 6, in terms of TP hyperspectral imaging, Red Delicious apples was predictable in normalize pre-processing, and this pre-processing method was able to predict total phenol with
RMSEC = 2.3392,
rc = 0.9899 and
SDR = 1.73. The total phenol of Golden Delicious apples was predicted in the best case of normalize and SNV preprocesses with
RMSEC = 1.23845,
rc = 0.9989 and
SDR = 2.66 (
Figure S7 in Supplementary Materials).
The error changes of the models based on the change in the number of principal components for the TP (
Figure S8 in Supplementary Materials) show that in hyperspectral imaging, both Red and Golden Delicious apples had the lowest error in the best pre-processing at LVs = 9.
In a study by Nogales-Bueno et al. (2014), hyperspectral images of intact grapes were recorded during ripening using a near-infrared hyperspectral imaging system (900–1700 nm). Spectral data were correlated with the total phenolic concentration of the grape skin by modified partial least squares regression (MPLS), using a number of spectral pretreatments and different calibration sets. The results obtained for the global model of red grape samples were 0.89 mg/g of grape skin for the total phenolic concentration.
3.7. Artificial Neural Network Analysis
The results of the artificial neural network analysis, according to
Table 7 for hyperspectral imaging, also show that the best network mode of feed-forward structure with the LM training algorithm was
R = 0.93,
Performance = 0.005 and
RMSE = 0.03 in 325 inputs, 5 outputs and 2 hidden layers.
Figure 8 shows an ANN image constructed to detect the quality properties of apples by hyperspectral imaging, and
Figure 9 shows diagrams of the best ANN output for hyperspectral imaging.
4. Conclusions
The results of this study showed that the non-destructive method of hyperspectral imaging in the range of 1000–400 nm has different capabilities in measuring some internal quality characteristics of Red and Golden Delicious apples, and had a high ability to detect indicators. The results were as follows: the best prediction accuracy related to the pH parameter in the hyperspectral imaging method with high accuracy (SDR < 2.5) and low accuracy (SDR > 1.5), respectively, the best prediction accuracy related to the TA parameter in the hyperspectral method for Red and Golden Delicious apples with good accuracy (SDR < 2) and excellent accuracy (SDR < 2.5), respectively, the best prediction accuracy related to the SSC parameter in the hyperspectral method for Red and Golden Delicious apples with excellent accuracy (SDR < 2.5) and good accuracy (SDR < 2), respectively, and the best prediction accuracy related to the TP parameter in the hyperspectral method for Yellow and Red Delicious apples with moderate accuracy (SDR < 1.5) and excellent accuracy (SDR < 2.5), respectively.
In this study, pH parameters, soluble solids, titratable acid and phenol were predicted. These parameters are the main quality characteristics of the fruit and determine the ripening time of the product in order to prevent the loss of the product, and also determine the method of consumption, including market use or shelf-life. In addition, its main application is in exports, which prevents the return of the product due to a lack of quality characteristics.