Abstract

Crown pears are an important economic crop, but their quality and economy are seriously affected by the different levels of damage. To improve the overall quality of crown pears, sorting of crown pears with different levels of damage is required. However, there are some shortcomings in the traditional detection methods, such as low efficiency and large error. Therefore, the hyperspectral technology was used to discriminate between sound and 3 different levels of damage (defined as level I, II, and III damage, respectively) of crown pears in this study. To improve the discriminatory accuracy of the model, absorbance (A) spectra and Kubelka–Munk (K-M) spectra were added to reflectance (R) spectra. The three spectra were pretreated; then, the partial least squares discriminant analysis (PLS-DA) model and the support vector machine (SVM) model were established to discriminate the crown pears with different levels of damage. The results of the discriminant model show that the discrimination accuracy of the SVM based on R, A, and K-M spectra is higher than that of PLS-DA of them; the A-RAW-SVM model has the best discrimination performance with an overall discrimination accuracy of 100% for the test and 98.98% for calibration sets, respectively. Finally, the spectra were selected by the competitive adaptive reweighted sampling (CARS) and the uninformative variables elimination (UVE) to obtain the characteristic wavelengths, and the SVM models were built based on the filtered R, A, and K-M. Their discrimination results show that the A-RAW-CARS-SVM model has the best discrimination ability, and the discrimination accuracies of the test and calibration sets of the model are 96.88% and 100%, respectively. The results show that the best discrimination of different levels of damage of crown pears is the SVM model based on a spectra. This study provides a theoretical basis and experimental basis for detecting the damage of crown pears using hyperspectral.

1. Introduction

Crown pears are an important economic crop, and they are widely grown in subtropical regions. It is popular because of their crisp, sweet, juicy, and thin skin [1]. Due to the characteristics of thin skin, crown pears produce unavoidable mechanical damage during picking, transportation, and storage after ripening, which can be divided into surface damage, epidermal abrasion, and impact damage according to the different levels of damage [2]. The damaged crown pears are easy to breed bacteria and rot and deteriorate in a relatively short time, and they also infect the sound crown pears, affecting the shelf life of the sound crown pears [3]. The crown pears after damage can be sorted and taken different treatment according to the different levels of damage to obtain higher economic benefits. The crown pears with mild damage can still be eaten normally in the early stage. The crown pears with severe damage can be considered to remove the damaged part after making processed food. At present, the damaged crown pears mainly rely on manual sorting. This sorting method has a large error and low efficiency. Therefore, it is necessary to explore a precise, nondestructive, and efficient inspection method to realize the sorting of crown pears with different damaged levels.

In order to discriminate the different levels of damage of crown pears more efficiently, researchers have proposed various detection techniques to investigate. Kim et al. [4] used infrared-locked thermography to assess the damage of pears by feeding periodic thermal energy to the pear, and then, thermal radiation from the pear was collected to identify the size of the damage and the depth of the damage. The results showed that the phase information generated by thermography could be used to detect the damaged fruit. However, thermal radiation can cause some damage to the quality of fruit. Luo et al. [5] used spatial frequency domain imaging (SFDI) to detect different levels of damage (sound, slight, and severe damage) of pears. The results showed that the accuracy of SFDI was 100% at 527 nm; this demonstrated that the SFDI technique could be used to detect the damage level of fruit. However, SFDI is strongly influenced by the color of the peel, and the difference in peel color poses a great difficulty in characterizing the optical properties. Zhou et al. [6] used optical coherence tomography (OCT) to detect the damage of pears. The results indicated that the OCT could be used for damage detection in pears, but the resolution and detection depth of OCT technique needed to be improved. The insignificant difference between the early damaged and sound areas of crown pears increases the difficulty of sorting by visual techniques [7]. To overcome the limitations of the above detection techniques, the hyperspectral technique is proposed to detect the damaged level of pears. The hyperspectral technique is seen as an emerging nondestructive testing technique, and it provides a large amount of information about the characteristics of sample [8].

Many scholars have studied the damage of fruit using the hyperspectral technique and have obtained many satisfactory results. Li et al. [9] used hyperspectral to achieve the detection of early damage in peaches. They compared the ability of short-wave NIR and long-wave NIR to distinguish bruises, and it concluded that the short-wave NIR had better discriminatory ability with an accuracy of 96.5% for bruised peaches. Tan et al. [10] used hyperspectral to detect early damage and determine the damaged level of apples with the accuracy of 97.5%. Sun et al. [11] used hyperspectral to identify different levels of damage in tomatoes with the accuracy of 90.93%. The above studies show the feasibility of using hyperspectral detection damage of fruit. Most of the studies based on hyperspectral detection quality of fruit used the reflectance spectra to establish analytical models [12].

The physical and chemical properties of fruit may change after being damaged, and these physical and chemical properties can be connected with the spectra [13]. The combination of hyperspectral and chemometrics can be used to detect the change in the content of compounds in fruits [14]. However, there are a lot of background information, noise information, and useless information in the spectra when judging based on the reflectance spectra directly obtained by the spectral instrument, those lead to the low-discrimination accuracy (90.93%) of fruit with various degrees of damage. Therefore, the reflectance (R) spectra, absorbance (A) spectra, and Kubelka–Munk (K-M) spectra combining with chemometrics was proposed to identify the various degrees of damage of fruit to improve the identification accuracy.

2. Materials and Methods

2.1. Crown Pear Sample

The crown pear samples used for the experiment were obtained from local orchards in Jiangxi. Samples without external damage were selected by visual inspection, and the samples with equatorial diameter between 70 and 80 mm and weight between 250 and 280 g were stored at the room temperature of 25°C.

2.2. Quantitative Damage Experiments

The samples subjected to impact damage experiments using the pendulum device are shown in Figure 1(a). The pendulum consists of a pendulum arm and an impact surface, and the sample is fixed at the end of the pendulum arm. The pendulum arm is released by different angles, which can cause the different levels of damage samples. The samples caused by 30°, 40°, and 50° release are defined as level I, II, and III damage, respectively. Samples with different levels of damage are shown in Figure 1(b). The samples are divided into 4 groups, one of which served as the control group, and the remaining 3 groups are subjected to 3 levels of impact damage experiments. 64 samples each of sound, I, II, and III damage are obtained by the impact damage experiments.

2.3. Acquisition of Hyperspectral Images

Images of all samples are acquired by the Gaia Sorter hyperspectral instrument. The composition of the hyperspectral image acquisition system is shown in Figure 2, and the instrument is manufactured by Dualix Spectral Imaging Ltd. Crown pear samples are sequentially placed on the transport platform, and the spectral acquisition is performed sequentially to generate a 3D data body containing image information and spectral information. The hyperspectral acquisition instrument is preheated for 30 min before acquisition to reduce the acquisition error caused by the baseline drift.

2.4. Spectral Calibration

The dark current and uneven distribution of light sources exist in the hyperspectral instrument when the acquisition is carried out directly, and they may cause large experimental errors, so the spectral correction process is carried out bywhere R is the calibrated sample image acquisition data, Ry is the all-black image acquisition data, Rz is the all-white image acquisition data, and R0 is the original sample image acquisition data.

2.5. Spectral Extraction

Spectral extraction is performed on the acquired hyperspectral images to obtain the spectral information that it can be used to characterize the sample. The VIS-NIR spectra cover the wavelength range of 397.5∼1014.0 nm with a resolution of 3.5 nm. The region of interest (ROI) is selected in the equatorial region of sound samples and damaged samples to reduce the uneven degree of light. The average value of the reflectance within the ROI is calculated as the reflectance spectra (R of this sample. The R spectra are calculated by (2) and (3) to obtain the absorbance (A) spectra and Kubelka–Munk (K-M) spectra, respectively.

2.6. Spectral Data Pretreatment

The R, A, and K-M spectral data may contain information about anomalies caused by some unrelated characteristics of the sample in addition to the information about the sample being tested. Therefore, the raw data need to be processed to eliminate or attenuate the influence of anomalous information and retain valid information to improve the applicability and robustness of the discrimination model. The pretreatment methods of Gaussian filter (GF), standard normal variation (SNV), Savitzky–Golay derivative (SGD), multiplicative scatter correction (MSC), and correlation optimized warping (COW) are commonly used.

2.7. Characteristic Wavelength Selection

There are multiple correlations between R, A, and K-M spectra at different wavelengths, resulting in redundant information in the spectra. This redundant information reduces the discrimination speed and accuracy of the model, and therefore, the redundant information needs to be eliminated [15]. In practice, a good performing classification model requires not only high discrimination accuracy but also has fast discrimination speed; therefore, the original spectra can be downscaled by the competitive adaptive reweighted sampling (CARS) and the uninformative variables elimination (UVE) [16]. CARS is a sampling method for wavelength selection based on regression coefficients, and UVE is a sampling method for rejecting uninformative variables based on the value of the stability of the model variables. These two methods are widely used for the selection of characteristic wavelengths of spectral data [17].

2.8. Model Building

The Kennard–Stone (KS) algorithm achieves stratified sampling by uniformly selecting samples in the characteristic space based on the Euclidean distance between variables, reducing the impact on the final results due to the introduction of additional bias in the partitioning process [18]. The KS algorithm is used to divide the spectral data of the samples into two mutually exclusive calibration sets and test set (calibration set: test set = 3 : 1). The partial least squares discriminant analysis (PLS-DA) and the support vector machine (SVM) models are based on R, A, and K-M spectra, respectively. The PLS-DA is used to find a linear regression model by projecting the predictor and observed variables into a new space [19]. SVM can be used to perform nonlinear classification by kernel methods with a decision boundary of the maximum margin hyperplane solved for the learned samples [20]. The precision and accuracy can be used to evaluate the performance of the classification model. The precision based on the confusion matrix is usually evaluated by the F1 value, which is a harmonic mean based on the accuracy and recall. The closer the F1 value is closer to 1, the higher the precision of the model [21]. The F1 value is calculated by the following equation:where TP is the true case, FN is the false counter case, and FP is the false positive case.

The F1 value is applicable to the binary classification model, for the evaluation of the accuracy rate of the multiclassification model needs to calculate the F1 value of each category, and the average of it is taken to get the macro-F value of the model, and the macro-F value is calculated bywhere Fi is the F1 value of each category and n is the number of categories.

3. Results and Discussion

3.1. Spectral Analysis of Crown Pear

The R, A, and K-M spectral data for sound and samples with different levels of damage were averaged, and their spectral curves were plotted. The mean values of the damage levels of the R spectra are shown in Figure 3(a), with the sound samples exhibiting the highest spectral reflectance, followed by the level I damage and level II damage and finally the level III damage. There is a significant decrease in the spectral reflectance of the damaged crown pear, and the reason for the spectral difference is mainly due to the rupture of the cell membrane of the crown pear after damage, which led to water loss and easy oxidation, which is consistent with the results of research on apple damage [22]. Figures 3(b) and 3(c) show that the curve characteristics of the A spectral and K-M spectral are different, and the A spectral and K-M spectral curves show that the spectral values of level III damage, level I damage, level II damage, and sound samples become lower in sequence. The different trends and characteristics presented by the three spectral curves are the basis for model discrimination.

3.2. Spectral Pretreatment

The spectra are usually pretreated before building a discriminant model. The purpose of pretreatment is to extract valid information and eliminate background information and noise. The R, A, and K-M spectra of crown pears were pretreated based on GF, MSC, SNV, COW, and SGD, and the changes in the spectra after pretreatment were described as an example of reflectance spectra. Figure 4 shows that the spectral characteristics of the R spectra change significantly after different pretreatments, and these changes are more pronounced at the wave peaks and troughs. Gaussian filtering is calculated by Gaussian function to reduce the self-noise of raw spectra. MSC and SNV methods are mainly used to eliminate the scattering effect from the inhomogeneous distribution of particles and particle size. COW aligns two signals by segmenting the spectra with linear stretching and compression. SGD can be used to effectively eliminate the baseline and other background interference by performing 1st derivative on the spectral curve.

3.3. Model Building and Analysis

The accuracy of the discrimination results of PLS-DA based on R spectra, A spectra, and K-M spectra is shown in Table 1. The best model based on the R spectra is the model pretreated by SNV with the discrimination accuracies of 64.06% and 65.63% for the test and calibration sets. The best model based on A spectra is the model pretreated by COW with discrimination accuracies of 60.94% and 54.17% for the test and calibration sets. The best model based on K-M spectra is the model based on RAW with the discrimination accuracies of 64.06% and 75.52% for the test and calibration sets, respectively. From the discriminant results, it is clear that the K-M spectra exhibits the best modeling performance in the PLS-DA discriminant model.

The accuracy of the discrimination results of the SVM model based on R spectra, A spectra, and K-M spectra is shown in Table 2. The best model based on R spectra is the model based on RAW with discrimination accuracy of 96.88% and 98.96% for the test and calibration sets. The best model based on A spectra is the model based on RAW with discrimination accuracies of 100% and 98.98% for the test and calibration sets. The best model based on K-M spectra is the model based on COW with discrimination accuracy of 95.31% and 98.44% for the test and calibration sets. From the discriminant results, it is clear that the SVM model has the best discriminant performance based on A spectra.

From the discriminant results in Tables 1 and 2, it is clear that the performance of the SVM model by GF is best among the models based on R spectra. Among the models based on the A spectra, the SVM model when the A spectra is not pretreated has the best performance. Among the models based on K-M spectra, the SVM model by COW pretreatment has the best performance. The discrimination results of the models show that the SVM model has a higher discrimination accuracy than the PLS-DA model. The reason for the poor discriminatory ability of PLS-DA may be due to the fact that the spectral information does not have a linear correlation with the level of cellular water loss of the sample under test reducing the predictive ability. In contrast, SVM is a nonlinear classification by the kernel method, so it obtains high discrimination accuracy in the detection different damage levels of crown pears. Cao et al. [23] used hyperspectral combined with SVM and PLS models to detect the damage level of pears, and the results showed that the SVM model was more accurate in predicting the damage level of pears. The results of the experimental discrimination show that SVM can be used to effectively discriminate the damage level of pears.

The discriminant results of the optimal models in R, A, and K-M spectra are analyzed separately. The optimal model based on R spectra is R-GF-SVM, and the confusion matrix of the model discrimination results is shown in Figure 5(a). 2 level II damage samples in the test set are misclassified as level I damage sample: 1 sound sample in the calibration set is misclassified as level I damage sample, and 1 level II damage sample is misclassified as level III damage sample. The optimal model based on A spectra is A-RAW-SVM, and the confusion matrix of model discrimination results is shown in Figure 5(b). There are no misclassified samples in the test set; 1 sound sample in the calibration set is misclassified as level II damage sample, and 1 level II damage sample is misclassified as level III damage sample. The optimal model based on K-M spectra is K-M-COW-SVM, and the confusion matrix of the model discrimination results is shown in Figure 5(c). 2 level I damage samples in the test set are misclassified as level II damage sample, and 1 level II damage sample is misclassified as 1 sound sample. 2 level I damage samples in the calibration set are misclassified as level II damage samples, and 1 level III damage sample is misclassified as level II damage sample.

The precision of the model discrimination is calculated, and the discrimination results are shown in Figure 5. The accuracy rates of the R-GF-SVM model, A-RAW-SVM model, and K-M-COW-SVM model are calculated by (4), and the results are shown in Table 3.

The macro-F value of the R-GF-SVM model, A-RAW-SVM model, and A-RAW-SVM is 0.9844, 0.9922, and 0.9767, respectively. The closer the macro-F value is to 1, the higher the precision of the model is indicated [24]. From Tables 2 and 3, it can be found that the performance model based on A spectra is best, and its accuracy and precision are higher than R spectra and K-M spectra.

3.4. Selection of Characteristic Wavelength

To simplify the spectral dataset and enhance the speed of the model run, CARS and UVE were used to filter the spectra with better modeling results for the characteristic wavelengths, respectively. A total of nine spectra were selected, and their discrimination accuracies were all greater than 89.06%, which were R-RAW, R-GF, R-COW, A-RAW, A-GF, A-COW, K-M-RAW, K-M-GF, and K-M-COW. The subset of wavelengths with the smallest RMSECV was obtained by first building a partial least squares model in CARS, and then, the wavelengths in the model were selected that correspond to the larger regression coefficients [25]. The A-RAW spectra are used as an example to introduce the characteristic wavelength selection of CARS, and its selection process is shown in Figure 6. CARS is performed 100 times sampling by sampling, and the number of sample variables gradually decreases as the number of samples sampled increase. RMSECV decreases and then increases to a minimum value of 0.4902 at 20 runs, with the characteristic wavelength determined by the minimum RMSEP during the sampling run [26].

The PLS model was established in UVE by cross-validation, and then, the ratio of the mean and standard deviation of the regression coefficients of the PLS model was calculated to select valid spectral information [27]. The wavelength selection process of UVE is introduced by using A-RAW spectra as an example, and it its selection process is shown in Figure 7. Yellow curve is the original variable and red curve is the filtered-free variable. The dotted line in Figure 7 shows the threshold splitting line with upper and lower limits of ±37.9147. According to the UVE selection principle, wavelengths within the threshold split line should be discarded, and wavelengths outside the threshold split line region are selected as characteristic wavelengths [28].

The results of the R spectra characteristic wavelength selection are shown in Figure 8. The R-RAW spectra have 10 characteristic wavelengths selected by the CARS algorithm, accounting for 5.68% of the total number of spectra. The 21 characteristic wavelengths selected by UVE for the R-RAW spectra are shown in Figure 8(b), accounting for 11.93% of the total number of spectra. The 10 characteristic wavelengths selected by CARS for R-GF spectra are shown in Figure 8(c), accounting for 5.68% of the total number of spectra. The 57 characteristic wavelengths selected by the R-GF spectra by the UVE algorithm are shown in Figure 8(d), accounting for 32.39% of the total number of spectra. The 16 characteristic wavelengths selected by CARS for the R-COW spectra are shown in Figure 8(e), accounting for 9.09% of the total number of spectra. The 111 characteristic wavelengths of the R-COW spectra selected by the UVE algorithm are shown in Figure 8(f), accounting for 63.07% of the total number of spectra.

The results of characteristic wavelength selection for the A spectra are shown in Figure 9. The 75 characteristic wavelengths selected by CARS for the A-RAW spectra are shown in Figure 9(a), accounting for 42.61% of the number of wavelengths in the full spectra. The 98 characteristic wavelength points selected by CARS for the A-RAW spectra are shown in Figure 9(b), accounting for 55.68% of the number of wavelengths in the full spectra. The 85 characteristic wavelengths selected by CARS for the A-GF spectra are shown in Figure 9(c), accounting for 48.3% of the number of wavelengths in the full spectra. The 97 characteristic wavelengths of the A-GF spectra selected by UVE are shown in Figure 9(d), accounting for 55.11% of the number of wavelengths in the full spectra. The 6 characteristic wavelengths selected by CARS for the A-COW spectra are shown in Figure 9(e), accounting for 3.41% of the number of wavelengths in the full spectra. The 71 characteristic wavelengths of the A-COW spectra selected by UVE are shown in Figure 9(f), accounting for 40.34% of the number of wavelengths in the full spectra.

The results of characteristic wavelength selection for K-M spectra are shown in Figure 10. 75 characteristic wavelengths selected by CARS for K-M-RAW spectra are shown in Figure 10(a), accounting for 42.61% of the number of wavelengths in the full spectra. The 98 characteristic wavelengths selected by CARS for K-M-RAW spectra are shown in Figure 10(b), accounting for 55.68% of the number of wavelengths in the full spectra. The 43 characteristic wavelengths selected by CARS for K-M-GF spectra are shown in Figure 10(c), accounting for 24.43% of the number of wavelengths in the full spectra. The 103 characteristic wavelengths of K-M-GF spectra selected by UVE are shown in Figure 10(d), accounting for 58.52% of the number of wavelengths in the full spectra. The 33 characteristic wavelengths selected by CARS for K-M-COW spectra are shown in Figure 10(e), accounting for 18.75% of the number of wavelengths in the full spectra. The 60 characteristic wavelengths of A-GF spectra selected by UVE are shown in Figure 10(f), accounting for 34.09% of the number of wavelengths in the full spectra.

From the characteristic wavelength selection results of CARS and UVE, it can be seen that the number of characteristic wavelengths selected by UVE is significantly more than the number of characteristic wavelengths selected by CARS. The reason for this may be that both CARS and UVE are characteristic wavelength selection methods based on the regression coefficients of the PLS model, but UVE uses the regression coefficients as a measure of wavelength importance, while the CARS uses the absolute value of the regression coefficients as a measure of wavelength importance [22, 23]. Zhou et al. [6] used hyperspectral to detect sugar content in pears, and the characteristic wavelength selection of spectral wavelengths was performed by CARS and UVE, and their results showed that the number of characteristic wavelengths selected by UVE (390) was more than the number of characteristic wavelengths selected by CARS (42).

3.5. Results and Analysis of Spectral Models of Characteristic Wavelengths

The SVM model based on the characteristic spectra selected by CARS and UVE screening was selected with the number of wavelengths from 6 (A-COW-CARS) to 111 (K-M-RAW-UVE). The discrimination results of the SVM model are shown in Table 4. The 58 characteristic wavelengths of the R-GF spectra selected by UVE in the R spectra have the highest discrimination accuracy, with 95.32% and 100% for the test and calibration sets. The 75 characteristic wavelengths of the A-RAW spectra selected by CARS in the A spectra have the highest discrimination accuracy, with 96.88% and 100% for the test and calibration sets. The 43 characteristic wavelengths of K-M-GF spectra selected by CARS in K-M spectra have the highest discrimination accuracy, with 93.75% and 96.88% for the test and calibration sets.

The optimal model based on the R spectra after characteristic wavelength selection is the R-RAW-UVE-SVM model, and the confusion matrix of model discrimination results are shown in Figure 11(a). 1 sound sample in the test set is misclassified as level I damage sample, and 1 level II damage sample is misclassified as level I damage sample. 2 sound samples in the calibration set are misclassified as level II damage samples, 2 level I damage samples are misclassified as level II damage samples, 2 level II damage samples are misclassified as level I damage samples and level III damage, and 2 level III damage samples are misclassified as level II damage samples. The optimal model based on the A spectra after characteristic wavelength selection is A-RAW-CARS-SVM, and the confusion matrix of the model discrimination results is shown in Figure 11(b). 1 sound sample in the test set is misclassified as the level II damage sample, and 1 level II damage sample was misclassified as the level I damage sample. There are no misclassified samples in the calibration set. The optimal model based on the A spectra after characteristic wavelength selection is A-RAW-CARS-SVM. The confusion matrix of the model discrimination results is shown in Figure 11(b), where 1 sound sample in the test set is misclassified as level II damage sample and 1 level II damage sample is misclassified as the level I damage sample. There are no misclassified samples in the calibration set. The optimal model based on K-M spectra is the K-M-GF-UVE-SVM model. The confusion matrix of model discrimination results is shown in Figure 11(c). 1 sound sample in the test set is misclassified as level I damage sample; 2 level II damage samples is misclassified as level I damage samples. 2 sound samples in the calibration set are misclassified as level II damage samples, 1 sound sample is misclassified as level I damage sample, 2 level I damage samples are misclassified as level II damage samples, 1 level I damage sample is misclassified as level III damage sample, 2 level III damage samples are misclassified as level I damage, 2 level III damage samples are misclassified as level II damage samples, and 1 level III damage sample is misclassified as level I damage sample.

The discriminant results are shown in the confusion matrix of Figure 11, the macro-F values of the R-RAW-UVE-SVM model, A-RAW-CARS-SVM model, and K-M-GF-UVE-SVM model are calculated by (4), and the results are shown in Table 5.

Table 5 shows that the macro-F value of the R-RAW-UVE-SVM model, RAW-CARS-SVM model, and K-M-GF-SVM model is 0.9605, 0.9922, and 0.9481, respectively. The closer the macro-F value is to 1, the higher the precision of the model is indicated. From Tables 4 and 5, it can be found that the accuracy and precision of the SVM model based on the A spectra after characteristic wavelength selection are higher than those of the R spectra and K-M spectra after characteristic wavelength selection. The results demonstrate that the A spectra by CARS has the best model discrimination performance. The CARS, which is widely used for characteristic wavelength selection of spectral data, is an effective characteristic wavelength selection method. Xuan et al. [29] used the characteristic wavelengths of R spectra selected by CARS to build MLR models to assess soluble solids (SSC) and hardness of peaches, and the results showed that hyperspectral combined with MLR had best discrimination results. Zhan et al. [30] selected the characteristic wavelengths of hyperspectral by pairing methods such as CARS and UVE. The results showed that the nonlinear model partial least squares support vector machine (LS-SVM) by CARS-selected spectra had the best results for pear fragrance identification.

4. Conclusions

In this study, the R spectra of sound as well as level I, II, and III damaged crown pears were acquired separately using a hyperspectral acquisition system, and then, the A spectra and K-M spectra were obtained from the R spectra by transformation of the equations. Linear PLS-DA models and nonlinear SVM models were developed for each of the three spectra and the discriminant results were explained. It was found that as the level of damage of the crown pears increases, the spectral reflectance decreased and the spectral absorbance increased. In the R, A, and K-M spectra models, the nonlinear SVM model was found to outperform the linear PLS-DA model by discriminating the results. The SVM discriminant model based on the A spectra outperformed the R and K-M spectra, and the discriminant accuracy of the test and correction sets of the SVM model based on A-RAW spectra was 100% and 98.98%, respectively. Moreover, the macro-F value of the model was 0.9922, and the A-RAW-SVM model showed high discrimination accuracy. Two false samples were found in the SVM discriminant model based on the characteristic wavelengths of the A-RAW spectra after CARS selection, and the number of false samples was the same as before CARS selection. The macro-F value of the A-RAW-CARS-SVM model after CARS selection was 0.9922, and the accuracy of the model was the same as that of the full spectra model, while the discriminant time of the model time was greatly reduced. In conclusion, the hyperspectral technology can be used to discriminate different damage levels of crown pears, and the nonlinear SVM model based on the A spectra has better discriminative effect on different damage levels of crown pears.

Data Availability

The data used to support the findings of this study are included within the article.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This work was supported by the National Natural Science Foundation of China (12103019) and National Science and Technology Award Backup Project Cultivation Plan (20192AEI91007).