Grading and Sorting of Grape Berries Using Visible-Near Infrared Spectroscopy on the Basis of Multiple Inner Quality Parameters

The potential of visible-near infrared (vis/NIR) spectroscopy (400 nm to 1100 nm) for classification of grape berries on the basis of multi inner quality parameters was investigated. Stored Vitis vinifera L. cv. Manicure Finger and Vitis vinifera L. cv. Ugni Blanc grape berries were separated into three classes based on the distribution of total soluble solid content (SSC) and total phenolic compounds (TP). Partial least squares regression (PLS) was applied to predict the quality parameters, including color space CIELAB, SSC, and TP. The prediction results showed that the vis/NIR spectrum correlated with the SSC and TP present in the intact grape berries with determination coefficient of prediction (RP2) in the range of 0.735 to 0.823. Next, the vis/NIR spectrum was used to distinguish between berries with different SSC and TP concentrations using partial least squares discrimination analysis (PLS-DA) with >77% accuracy. This study provides a method to identify stored grape quality classes based on the spectroscopy and distributions of multiple inner quality parameters.


Introduction
Grapes are berry fruits with thin peels and high moisture and sugar content, and are more sensitive to storage and transportation conditions than other types of fruits. As photosynthesis is halted after fruit harvest, respiration becomes the main metabolic process during storage and transportation. This catabolism results in the consumption of organic matter in fruit, affecting the edible quality and nutritional value of post-harvest grapes and considerably reducing their commodity value. Garcia [1] observed that frozen storage affects grape quality parameters, including total soluble solid content (SSC), pH, titratable acidity, total anthocyanin content, and total phenolic compounds (TP). However, studies on evaluation of grape berry quality during cold storage are limited. Improving the cold storage resistance of grapes is an important aspect of postharvest preservation of grape fruit, while the non-destructive monitoring of grape quality during storage and the rapid determination of the freshness of grapes are new points to be considered for effective and rational arrangement of the stock and reduction in storage loss after harvest [2].
According to the brochure of International Standardization of Fruits and Vegetables- Table Grape, published by the Organization for Economic Co-operation and Development (OECD), commercial table grapes are divided into three quality types, namely, superior quality, good quality, and marketable quality [3]. This standard focuses more on the entire bunch quality, including the total SSC, appearance, shape, color, and weight. However, Parpinello [4] pointed out that total SSC varies considerably within each grape cluster, and Nelson [5] reported that this variability may exceed 6%. As berries in a cluster face different direction, they are exposed to varying degrees of sunlight, and hence the pigment and TP content of the berries are also unequal. Thus, it is reasonable to monitor grape bunch quality from a berry point of view. For any specific sample, the external and internal qualities deteriorate during storage. However, the changes in external and internal qualities are asynchronous for different samples, and the specific numerical range for each quality parameter in specific varieties are not standardized. Thus, grading of postharvest and stored grape berries is challenging. In this study, we proposed a method of grading berries numerically based on their inner quality and the whole sample set distribution during short cold storage. Based on external quality, all berry samples remained marketable after storage Previously, Glasbey [6] has used size distribution information for potato tuber grading schemes.
The traditional method is not only time-consuming and expensive, but is also damaging for the grape berries. Sample analysis is a time-consuming process, which unavoidably alters sample quality, especially close to the grape harvest season. Spectroscopic techniques, such as visible (vis), near infrared (NIR), mid infrared, and hyperspectral spectroscopy are more non-destructive and rapid than the traditional physical and chemical methods. Vis/NIR and NIR spectroscopy have the advantages of simple instrumentation and universality. Therefore, they are currently used in agriculture, food, petrochemical, and pharmaceutical industries. The vis/NIR technology has been extensively used to determine the chemical components in agricultural products, including soluble solid, water, protein, starch, lipid, and cellulose content, and grade the quality class and contamination levels of these samples [7][8][9][10]. In grape industry, Giovenzana [11] applied a handheld optic vis/NIR spectrometer to estimate the SSC and TP concentrations and Beghi [12] identified the ripeness of grape berries during ripening process. However, as we mentioned before, studies on using the vis/NIR technology to evaluate the grape berry quality during cold storage are limited. This is the first study to identify stored grape quality classes based on its multiple inner quality parameters combined with spectroscopy, which will assist in improving the economics of the grape and wine industry.
As the name suggests, vis/NIR spectroscopy consists of visible and near-infrared spectroscopy. The wavelength range used in visible spectroscopy is 380 nm to 760 nm, and sample color is related to absorption of visible light. When a sample surface is irradiated, electrons absorb visible light of a particular wavelength and transition to a higher energy level, which manifests as color. NIR radiation is a type of electromagnetic wave with wavelength between the visible and mid infrared regions of the spectrum. The energy of the photon in the NIR range is lower than that in the visible range and that required for electrons to escape from outer orbitals of alkali metals. Therefore, the information provided by the NIR spectrum is different from that obtained due to electronic transition in the visible light spectrum, although the absorption bands of structural components such as O-H, N-H, C-H, and other hydrogen-bearing groups, which are related to overtone bands and combination of several stretch-bend vibration modes, are similar [13]. Overall, vis/NIR spectroscopy can provide valuable information regarding grape quality and freshness.
Therefore, this study aims to (1) define the quality classes of grape berries based on the distributions of total SSC and TP and (2) distinguish berries of different classes using the vis/NIR spectra.

Samples Preparation
In this study, Vitis vinifera L. cv. Manicure Finger and Vitis vinifera L. cv. Ugni Blanc were used. The 60 clusters of each cultivar were collected in Nanjing Eight Diagrams Vineyard (32 • 09 59.75" N; 118 • 49 29.82" E, Nanjing, China) after ripening; all the clusters were stored at 4 • C in the presence of 85% to 95% relative humidity in freshness packets for 25 days. The sampling process was conducted every 5 days (0 d, 5 d, 10 d, 15 d, 20 d, and 25 d), and 10 clusters of each cultivar were collected each time, and three berries were randomly picked from the top, middle, and bottom of each cluster. All collected berries were free of visual defects.

Vis/NIR Spectroscopy Collection
The reflectance spectrum of each intact sample was obtained from 32 scans using a fiber optic vis/NIR system. The system consisted of a computer (Surface pro 3, Microsoft Corporation, New York, NY, USA), a vis/NIR fiber optic spectrometer (FX2000, Shanghai Ideaoptics Corporation, Shanghai, China) which uses holographic concave diffractive grating combined with charge-coupled component to obtain the spectra covering the range of 400 nm to 1100 nm, a quartz optical fiber, a halogen light source (HL 2000, Shanghai Ideaoptics Corporation, Shanghai, China) and a detection platform [14].

CIELAB
The CIELAB color space values were determined using a digital hand-held spectrophotometer (Ci6X, X-rite, Grand Rapids, MI, USA). The factor L* represents "lightness", with values ranging from 0 to 100, factor a* represents color change from magenta to green, and b* represents color change from yellow to blue [15].

SSC
According to the China Standard [16] for SSC measurement in fruit, after removing the peel of grape berries, extracting juice from the flesh of each sample was measured using a digital hand-held "pocket" refractometer (PAL-1, ATAGO CO., LTD., Tokyo, Japan), and was expressed as a percentage with an accuracy of 0.1% according to the refractometer's specification.

TP
Each of stored grape berries was homogenized in liquid nitrogen using a batch mill (A 11 B S025, IKA, Staufen, Germany). Then, 0.2 g of the ground sample of each berry was macerated in 8 mL hydrochloric acid solution (10 mL/L HCl: 960 mL/L ethanol = 17:3 v/v) at 40 • C for 40 min under ultrasonication. The mixture was then centrifuged for 5 min at 13,710 g, and 0.1 mL of the supernatants were diluted with 4 mL HCl solution. Finally, TP content was determined by measuring the absorbance at 280 nm using a UV spectrophotometer (UV 1800, Shimadzu Corporation, Kyoto, Japan). Gallic acid monohydrate (in the range of 2.0 mg/L to 20.0 mg/L) was applied to generate a calibration curve and TP was expressed as concentration of gallic acid of fresh grape sample [17].

Grading of Stored Grape Berries
Considering that the ripening condition of each berry is different, and the quality change is asynchronous during the storage process, grading berries according to storage time is unreasonable. Therefore, grading based on the inner quality parameters appears appropriate. The data regarding total SSC and TP content were subjected to descriptive analysis to test the normal distribution of the data using the IBM SPSS Statistics 22 software (IBM Inc., New York, NY, USA). Then, the data was used to produce a frequency histogram and a Gaussian curve fitting. Berry classes were determined from the mean value (µ) and standard deviation (σ) of the fitted Gaussian equations.
The berries were divided into four classes based on SSC and TP distribution. The fourth class (IV) is characterized by µ + σ to +∞, the third class (III) by µ + σ to µ, the second class (II) by µ − σ to µ, and the first class (I) by 0 to µ − σ. Then, the SSC-based and TP-based divisional results were combined to divide the berries into three groups using the following chart (Table 1). Table 1. Quality classes of stored berries based on total soluble solid content and total phenolic compounds.

Determination and Discrimination Based on vis/NIR Spectra
The vis/NIR spectroscopy data were preprocessed using moving average smoothing (MS), the standard normal variate (SNV) [18], and mean normalization. The samples were divided into calibration and prediction sets by 3:1 for each class. The determination models were built using partial least squares (PLS) method and the discrimination models using partial least squares discrimination analysis (PLS-DA). Leave-one-out cross-validation (LOOCV) was used during model establishments. The preprocessing and model establishments were generated with MATLAB 2018b (The Mathworks, Natick, MA, USA).

Statistical Results of Quality Parameters
The statistical results of the reference parameters are shown in Table 2  The SSC of Manicure Finger ranged from 13.93% to 19.01% and the mean value was 16.57%; the SSC of Ugni Blanc was in the range of 14.68% to 17.31% and the mean value was 15.81%. Spayd [19] observed that the SSC was unchanged after 24 h of frozen storage. Cynkar and co-workers [20,21] showed that the SSC did not change during frozen storage for 1 week, 2 weeks, 3 weeks, and 10 weeks, and for 1 month, 3 months, 6 months, and 12 months.
The phenolic compounds in Manicure Finger and Ugni Blanc varied considerably. This may be caused by the increase in activity of polyphenol oxidase, which oxidizes phenol compounds to quinone compounds and causes browning of the peel of grape berries; the a* value increases as the color of the peel darkens.

Grading of Stored Grape Berries
The normal probability plots for the distribution of total SSC and TP compounds are shown in Figure 1. When few large and small values are ignored, all the plots appear fairly straight and the points lie close to a straight line in each plot, indicating that the distributions of total SSC and TP compounds of each variety are normal. The frequency histogram of each parameter of each variety was plotted ( Figure 2). All the histograms appear symmetric and unimodal, which is in accordance with the character of normal distribution. Hence, these plots indicated the normal distribution of each parameter of each variety. Based on the frequency results, the Gaussian curve fitting was performed on each parameter dataset as shown in Figure 2 The correlation coefficients (R) were 0.93, 0.91, 0.94, and 0.97 for SSC and TP of Manicure Finger and Ugni Blanc, respectively. According to the probability density function (5) of normal distribution, the µ and σ value of each data set can also be computed. Thus, the µ and σ values can be assumed to be the mean value and standard deviation, respectively, when the dataset is large. The fitting values are close to the statistical results mentioned in Section 3.1.
Next, grading was performed based on the fitted µ and σ values. The classes based on SSC distribution for Manicure Finger were as follows: class I (0% to 15.24%), class II (14.01% to 16.47%), class III (16.47% to 17.7%), and class IV (17.7% to +∞%). The classes based on TP distribution for Manicure Finger were as follows: class I (0 g/kg to 7.52 g/kg), class II (7.52 g/kg to 10.29 g/kg), class III (10.29 g/kg to 13.06 g/kg), and class IV (13.06 g/kg to +∞ g/kg). The classes based on SSC distribution for Ugni Blanc were as follows: class I (0% to 15.02%), class II (15.02% to 15.76%), class III (15.76% to 16.50%), and class IV (16.50% to +∞ %). The classes based on TP distribution for Ugni Blanc were as follows: class I (0 g/kg to 10.21 g/kg), class II (10.21 g/kg to 13.94 g/kg), class III (13.94 g/kg to 17.63 g/kg), and class IV (17.63 g/kg to +∞ g/kg). The berries were divided into three classes after combining the SSC grading results with TP grading results for each variety. For Manicure Finger berries, there were a total of 58 berries in class 1, a total of 70 berries in class 2, and a total of 44 berries in class 3; for Ugni Blanc, there were a total of 35 berries in class 1, a total of 91 berries in class 2, and a total of 43 berries in class 3.

Vis/NIR Spectral Features of Grape Berries
The preprocessed reflectance spectra of Manicure Finger and Ugni Blanc are shown in Figure 3. The main differences in the spectral features were observed in the range of 400 nm to 760 nm, which is related to the absorbance of visible light by berries peels. As the two selected varieties showed different peel color, the features of the spectral peaks varied between these two varieties. Manicure Finger with red peel color absorbed green color around the range of 500 nm to 570 nm which is green light, and showed strong reflectance in the range of 600 nm to 700 nm which is red light. On the contrary, the white variety, Ugni Blanc, showed strong absorbance in the range of 450 nm to 500 nm (which is blue light) and 600 nm to 700 nm, and strong reflectance in the range of 500 nm to 570 nm which is green light, as the Ugni Blanc peel is green in color [22]. In the NIR range, a small peak can be observed around 950 nm to 970 nm both for 'Manicure Finger' and 'Ugni Blanc', which assigned to -OH second overtone [23]. Interestingly, the spectral difference among different classes were observed in the range of 400 nm to 1000 nm for Manicure Finger, while for Ugni Blanc, spectral differences were not evident in the range of 400 nm to 700 nm, and relatively minor changes were observed in the range of 700 nm to 1000 nm. These differences demonstrated that the berries in different classes may can be distinguished based on their spectral characteristics.

Determination of Quality Parameters Using vis/NIR Spectra
The partial least squares regression results are shown in Table 3. For the regression of color space values of Manicure Finger, the prediction for a* was the best among the three color parameters with the highest ratio of standard error of performance to standard deviation (RPD) of 2.191, determination coefficient of prediction (R P 2 ) of 0.724, and root mean squares of prediction (RMSEP) of 1.324. The b* value was also predicted, with higher determination coefficient of calibration (R C 2 ) and R P 2 of 0.829 and 0.816, respectively, although RPD was lower than that of a*. In contrast, the prediction for b* was better than that of a*, with higher R 2 and RPD. The RMSE values were not compared as they are for different parameters. The L* value prediction was not satisfactory, which might be because the vis/NIR spectra did not provide sufficient information regarding lightness. The prediction of SSC for Manicure Finger was better than that for Ugni Blanc as the model for Manicure Finger was associated with slightly higher R 2 and lower RMSE both for the calibration set and prediction set than that for Ugni Blanc; in addition, it showed higher RPD of 1.435.
Similar observation was made for the Ugni Blanc berries. R C 2 was 0.851 and R P 2 was 0.823 for Manicure Finger prediction, which were higher than those for Ugni Blanc, with predictions of 0.811 and 0.735 for R C 2 and R P 2 , respectively. The RPD of Manicure Finger was considerably higher than that of Ugni Blanc.
With the exception of L*, the R 2 values of all models were higher than 0.600, especially for SSC and TP prediction of two varieties, indicating that the models were applicable to some extents.

Distinguishing Berries Based on the vis/NIR Spectra
The results of PLS-DA are shown in Table 4. For calibration set of Manicure Finger berries, five, five, and three samples were misidentified in classes 1, 2, and 3, respectively. Thus, the distinguishing accuracies were 88.4%, 90.2%, and 90.6% for classes 1, 2, and 3, respectively, for the calibration set. When the constructed model was used to predict berries in the prediction set, three, four, and one samples were mistaken for the three respective classes, and the discrimination accuracies were 80.0%, 77.8%, and 90.9%, respectively. For Ugni Blanc, two samples were misidentified in class 1 of the calibration set. Seven and two berries were misidentified in classes 2 and 3. The identification accuracies were 92.3%, 89.7%, and 93.8%, respectively. For the prediction set of Ugni Blanc, the accuracies were slightly lower than those of the calibration set, while two, five, and two samples were misidentified in the three classes (1, 2, and 3), respectively.
The calculated response of three classes using partial least squares discrimination analysis for two varieties are shown in Figure 4.

Discussion
In this study, we proposed a method of grading grape berries using vis/NIR spectra, which can define the quality classes of grape berries based on the distributions of inner quality parameters such as SSC and TP.
Cozzolino [24] reviewed the vis/NIR studies in grape and wine industry and observed that 900 nm to 1050 nm, 300 nm to 1160 nm, and 650 nm to 1100 nm in vis-short wavelength NIR (400 nm to 1100 nm) were commonly related to the prediction of total SSC in grapes, and a standard error of calibration (SEC) range of 0.5% to 3.9% must be achieved. Our prediction results and the spectral features of whole grapes in our study are in accordance with those of Cozzolino [25]. However, the prediction results of SSC and TP were worse than those of models constructed using developing and ripening berries of the same variety reported by Xiao [14]. This is possibly because a wide range of samples provide more information required for establishing a model.
As sugars and phenolic compounds are used as primary quantitative parameters of quality, their concentrations should be determined, and the freshness of stored fruit must be estimated according to these parameters [26]. Considering the complexity associated with the determination of quality parameters, berry sorting and grading is a big issue for fresh and stored fruits. Sorting and grading can not only ensure that the products satisfy different levels of consumer expectations but can also reduce losses by preventing cross-contamination between good and damaged fruits. The traditional sorting and grading systems involve use of molds with specific holes on a conveyor belt that sort fruits by size, and manually based on color, shape, and external defects.
Nondestructive methods, including vis/NIR spectroscopy, X-ray tomography, and machine vision are widely used in agricultural production as they can rapidly detect physical and chemical qualities. Kondon [27] described several fruit and vegetable grading systems for orange, eggplant, and leek based on automation technologies and pointed out that machine vision systems are most widely used as exterior qualities are commonly the key quality features used for grading. However, because of the increasing demand for high quality products worldwide, especially in developed countries, the inner qualities of fruits, including sugar contents, acidity, and nutrient contents should also be included as inspection parameters. For the grape industry, Lafontaine [28] pointed out that berry sorting can assist in improving wine quality, as wine flavor depends significantly on sugar and phenolic compound content. They constructed an experimental sorter to sort grape berries according to their maturity/sugar concentration, for which maturity is the indication of phenolic compound content. This sorter works by first floating the berries in different salt solutions to determine total soluble solids levels, followed by vis/NIR spectrum to determine maturity stages. Negara [29] assessed the LDA, KNN-C, SVM PCR, and PLSR to classify grape berries into high sugar and low sugar concentration groups, and observed that vis/NIR spectra were better for classification than the conventional NIR spectra, and that PLS can be used successfully for this purpose. Compared to their results, our models distinguished berries based on both total SSC and TP compounds by determining the relationship between vis/NIR spectrum and chemical compounds, and achieved relatively promising results. This can be used in grape industry for improving the efficiency of sorting and grading grapes.

Conclusions
This study defined grape berry classes based on the distribution of inner quality parameters, namely, total SCC and TP compounds, and also built chemometric models to distinguish between berries from different classes. Results showed that the range of accuracies for all discrimination models were in the range of 77% to 94%. Considering that efficient sorting and labor saving are two important parts of modern fruit and vegetable industry, more nondestructive technologies would be tested and utilized on-line, and how to improve the discrimination accuracy and how to take more quality requirements into consideration may be some of the new research directions.
Author Contributions: L.P. conceived and designed the experiments; H.X. performed the experiments and wrote the paper; K.T., L.F., D.S., and J.P. contributed reagents/materials/analysis tools.