NDT model study of crown pear based on near infrared spectroscopy

. With the growing area and production of pear, as well as the people for the fruit quality requirements are growing. The traditional methods for pear quality inspection are expensive and less accurate, and cannot be done for every pear. In response to the current production environment and market demand, a rapid and non-destructive method of pear quality testing is explored, using near infrared spectroscopy to establish the quality prediction model of crown pear. The main quality indicators for crown pears are soluble solids (SSC) and hardness, using NIR spectroscopy to establish a hardness prediction model and NIR spectroscopy to establish a soluble solids prediction model to build a spectral measurement system. The method was to measure pear spectral images in the NIR band (400nm to 1050nm). The spectra were pre-processed with multiple scattering correction (MSC) and standard normal variables exchange (SNV) to eliminate the influence of extraneous factors, and then downscaled by continuous projection algorithm (SPA) and principal component analysis (PCA) to extract the number of principal factors respectively. Partial Least Squares (PLS) was used to build the regression model and to predict the soluble solids (SSC) and hardness. The best model developed was a hardness prediction model by SNV + principal component analysis with a correlation coefficient of 0.64116 and a soluble solids prediction model by SNV + principal component analysis with a correlation coefficient of 0.73566. results of the hardness and soluble solids prediction of pears by NIR-based spectroscopy were relatively successful. Combining the actual hardness and soluble solids values of pears, the most suitable pre-processing method and the best waveband were found by comparison. These prediction results show that nondestructive detection of pear hardness and soluble solids can be achieved by a visible-NIR hyperspectral imaging system, and the detection results are relatively accurate, and a pear quality prediction model based on NIR spectroscopy and partial least squares was established in this paper. This paper establishes a prediction model based on NIR spectroscopy and partial least squares method to build a nondestructive testing system for the future pear quality.


Introduction
Pear as a native and indigenous fruit tree in China. The cultivation of pear has a long history and extensive acreage in China. 'Crown Pear' (Huangguan Pear) is native to Zhao County, Shijiazhuang, Hebei Province, and is also one of the excellent varieties of pear in China's main plant.
For example, Wang [1] used NIR diffuse reflectance techniques to develop models for four internal qualities of soluble solids, hardness, PH and water content in late developing apples, which achieved good prediction results. Yu Jiajia [2] et al. used NIR spectroscopy and neural algorithms to build an artificial neural network model to predict mango brix and acidity, and the model had good predictive ability. Li [3] examined loquats of three major cultivars from two different growing regions and established a soluble solids model by NIR spectroscopy with high accuracy, demonstrating the feasibility of NIR spectroscopy to detect the internal quality of loquats. lammertyn [4] used principal component analysis and partial least squares regression to establish a model for predicting acidity and sugar content of apples.
At home and abroad, fruit quality inspection content generally includes: hardness, soluble solids content, brix, fruit skin gloss, etc.. Near infrared spectroscopy is a rapid and nondestructive testing technology. It has been applied in the quality inspection of various fruits.

Crown pear sample
A total of 90 samples of crown pear were purchased from a fruit market in Baoding, and the surface of crown pear was required to be free from obvious trauma and of uniform size and weight.

Determination of fruit hardness of crown pear samples
The PRC agricultural industry standard GB/T 10650-2008 [12] was used to measure the fruit hardness of the crown pear samples using the fruit hardness tester measurement method.
An Edelbrock LX-A handheld measuring fruit hardness tester (Shore hardness tester) was applied for the determination of fruit hardness of crown pear samples with a scale value of 0.5-12 kg/cm2 and a division value of 0.1 kg/cm2. the probe size was 11 mm and the accuracy was ±0.1 kg/cm2.

Determination of soluble solids of crown pear samples
The soluble solids of the fruit of the Crown pear sample were measured by the refractometer method using the agricultural industry standard of the People's Republic of China GB 12295-1990 [13] Determination of soluble solids of fruits and vegetables.
The sugar content of snow pears was measured by a hand-held saccharimeter, type 904-112, with a measurement range of 0-32°Brix (20°C) and a resolution of 0.1°Brix, without temperature compensation.

Spectral acquisition system
The spectral measurement system consists of three components: the spectrometer, the light source lamp, and the height adjustment platform. The spectrometer is a portable geophysical spectrometer PSR-1100 from spectral evolution, USA, with a spectral range of 320-1100nm (UV to NIR). Its lens opening angle is 4°. Measurements can be made within the 4° lens range. The light source lamp is a halogen lamp with a spectral range of 250-2500nm covering ITM Web of Conferences 47, 02045 (2022) CCCAR2022 https://doi.org/10.1051/itmconf/20224702045 the full spectrum from the UV to the mid-infrared, and the height adjustment platform is 30 cm high, allowing coarse adjustments from 0-28 cm and fine adjustments from 0-7 cm to ensure that the surface of the pear is as close as possible to the lens. To reduce the influence of external factors on the experiment (e.g. the influence of natural light) and to reduce errors, the system was placed in a dark room constructed of 60 cm x 60 cm x 100 cm aluminium profiles.

Spectral acquisition method
In the equator of the pear is selected at equal intervals of four areas of 5 mm radius, (selected as flat as possible surface) for these four areas for the spectral measurement, the average spectrum of the four areas taken as the original spectrum of the sample. Because the lens opening angle is 4 ° pre-taken r for 5mm circular area, set the lens to the pear surface distance d. r / d = tan2 °, then the lens to the pear surface distance d = 142.85mm

NIR spectral pre-processing
In the following, spectra from two different pre-processing methods using Multiple Scattering Correction (MSC) Standard Normal Variable Exchange (SNV) will be analysed. The spectral pre-processing means with the least error is adopted for the different metrics.
The spectra of 39 crown pears were scanned over the spectral range 400-1050 nm. as shown in Figure 1.

Dimensionality reduction algorithm
In this paper, principal component analysis and continuous projection algorithms are used to select the number of principal factors. The significance of the principal component analysis method lies in the dimensionality reduction of the variables through mathematical transformation. The previously large number of dependent variables is transformed into a few small number of principal components which can represent the information of the original dependent variable. The transformation is done by a linear transformation in which the total variance of the variables is kept constant so that the first variable after the transformation has the largest variance. The second variable is uncorrelated with the first ITM Web of Conferences 47, 02045 (2022) CCCAR2022 https://doi.org/10.1051/itmconf/20224702045 variable and has only a smaller variance than the first variable. And so on. The continuous projection algorithm (SPA) is defined as a forward variable selection algorithm that minimises the covariance of the variables and allows the selection of a few characteristic wavelengths in the whole spectrum. As an example, Figure 4 shows the results of the continuous projection algorithm on the MSC-treated spectra for soluble solids.
In the experiment, 80 bands can be seen being used as inlines. When the number of feature bands was 64, the root mean square error dropped to 0.077917. This proves that 64 feature bands can already contain most of the information of the spectrum, so the number of feature bands was chosen to be 64.
As can be seen from process result, when the number of principal components reached 10, the cumulative total variance reached 99.550. It is proved that 10 principal components can already contain most of the information of the spectrum, so the number of principal components was chosen to be 10.

Model building
From process result it can be seen that the hardness model built by spectral pre-processing with SNV+principal component analysis has the highest R2 of 0.64116 and the lowest RMSEC of 0.2002. SNV+principal component analysis is the optimal spectral pre-processing method for building hardness models. An image of the correlation between its predicted and actual values is shown in Figure 4.
As can be seen from process result, the highest R2 of 0.73566 and the lowest RMSEC of 0.5583 were obtained for the soluble solids model after spectral pre-processing by the SNV + principal component analysis method. Its predicted and actual values correlation image is shown in Figure 5.

Results and discussion
The spectra after the different pre-treatment methods were obtained using multiple scattering correction (MSC), standard normal variables exchange (SNV), modelled separately at full wavelength and compared with the model parameters. The results showed that for the pear hardness model, the hardness model built after spectral pre-treatment using SNV + principal component analysis was relatively better, with R2 of 0.64116 being the highest and RMSEC of 0.2002 being the lowest, and the model built was relatively better. For the pear soluble  The results of the hardness and soluble solids prediction of pears by NIR-based spectroscopy were relatively successful. Combining the actual hardness and soluble solids values of pears, the most suitable pre-processing method and the best waveband were found by comparison. These prediction results show that nondestructive detection of pear hardness and soluble solids can be achieved by a visible-NIR hyperspectral imaging system, and the detection results are relatively accurate, and a pear quality prediction model based on NIR spectroscopy and partial least squares was established in this paper. This paper establishes a prediction model based on NIR spectroscopy and partial least squares method to build a nondestructive testing system for the future pear quality.
Fund supported by the 2020 Hebei Provincial Key R&D Program Project "Pear Peeling, Bags, Cuts, Handles, Grading and Netting Integrated Sorter" (20327213D)