nondestructive detection of kiwifruit textural characteristic based on near infrared hyperspectral imaging technology

ABSTRACT The nondestructive detection of kiwifruit texture has become an important necessity that influences kiwifruit economic efficiency and consumer recognition of the kiwifruit. This study investigated the feasibility of using hyperspectral imaging technology to identify textural characteristics of kiwifruit, and to establish the model with best performance. Firstly, a near-infrared hyperspectral online grading system (1000–2500 nm) was constructed to acquire spectral images. Textural characteristics were measured via three different textural analysis tests: textural profile analysis, puncture test, and shear test. Then, samples were divided into a calibration set and a prediction set based on rank sampling at a ratio of 3:1. Mean centralization, standard normal variate, and multiplicative scatter correction methods were applied to pre-process obtained spectra. Finally, the partial least squares method was used to establish prediction models of kiwifruit textural characteristics. The models of hardness1, chewiness, resilience, peel hardness, average hardness, and corrected hardness achieved good performance. Both the correlation coefficients of calibration (rc) and prediction (rp) values exceeded 0.9. The difference between the root mean square error (RMSE) of calibration and prediction was small, and the ratio of prediction to deviation (RPD) value exceeded 2, which was used to predict kiwifruit quality. However, the model of average shear force had a low accuracy with an RPD of 1.680 and the model of shear force also had an RPD below 1.5 and a low RMSE. The results showed that near-infrared hyperspectral imaging technique can be used as a nondestructive method for the textural characteristics kiwifruit.


Introduction
As the "King of Fruits," the kiwifruit remains very popular among consumers because of its delicious flavor and high nutritional value . [ 1,2 ] Compared with other, commonly consumed fruits, the kiwifruit is rich in potassium, polyphenols, fiber, and vitamin C, which ameliorates sleeping quality of consumers [ 3 ] and aids their health.
With the rapid development of society and economy, and the improvement of people's living standards, the requirements for the quality of kiwifruits are also constantly increasing. These requirements are no longer limited to fruit traits such as appearance and long shelf life. Instead, delicious taste and high nutritional value have become important factors that attracting consumers and increase their consumption. To satisfy these demands, textural characteristics are used to assess fruit quality. Textural characteristic are important indicators with which to evaluate fruit. These parameters present relatively complex traits, and are used as a comprehensive reflection of the hardness, tenderness, and

Kiwifruit samples
This study used "Fenghuang-1" kiwifruits as samples. On September 27, 2018, after maturity, kiwifruits were picked from a kiwifruit orchard in Fengxin, Jiangxi, China. After the fruits were transported to the laboratory, all dirt was washed off from the surface. Samples with pests, damage, or malformations were excluded and only normal fruits (normal fruits are generally oval in shape, uniform in size, and intact on surface) were selected for experiments.
All the samples were cover with plastic film and refrigerated with the temperature of 4°C. Before each experiment, 10-15 samples were placed on an experiment bench for 12 h to ensure samples have uniform temperature and the temperature in the laboratory is 22 ± 3°C.
A total of 324 kiwifruit samples were used for this study, including 110 TPA test samples, 105 puncture test samples, and 109 shear test samples. Later, these samples will be divided into calibration set and prediction set according to the ratio of 3:1 using the content gradient method, according to their texture characteristic value.

Hyperspectral image acquisition
The spectral data were acquired by a hyperspectral online grading system shown in Figure 1. The system is mainly composed of four parts: an industrial camera (JHUM500m, Shenzhen Jinghang Technology Co., Ltd., China), a hyperspectral camera (SWIR-CL-400-N25E, SPECIM, Finland) with a spectral resolution of 12 nm, a light source (500 W tungsten lamps, Huizhou Guancheng Thermal Energy Technology Co., Ltd., China), three photoelectric sensors and other devices (e.g. fruit conveyor, fruit sorting device, fruit rotating device, and height control device, all of which were designed and manufactured in our laboratory). The major parameters of the HSI system are: the movement speed of the fruit conveyer was set to 150 mm/s, the gain time and the exposure time of industrial camera were 15 ms and 20 ms, respectively, the frame rate of the hyperspectral camera was set to 90 f/s, the exposure time was set to 4.5 ms, and the calibration height was 60 mm. The samples were placed on the fruit conveyor of the HSI system. When the sample reached photoelectric sensor1 at a uniform speed, the industrial camera was triggered and collected a visible image of the fruit after a specific time delay. When the sample moved to the photoelectric sensor2, the HSI system started the hyperspectral camera. This hyperspectral camera was triggered to collect a complete HSI of the fruit after a specific time delay. When the sample reached photoelectric sensor3, the fruit sorting device was opened on the basis of the processing results of HSI. The ultimate purpose was fruit grading according to different processing results.

Hyperspectral image calibration
Prior to the experiment, the HSI system was preheated for 30 min and various parameters were set. The samples were individually numbered using tags. The HSI acquisition was conducted where kiwifruits were put on the fruit conveyor and upon entering the field of view. To reduce the effects of light, the acquired original image (I origial ) had to be corrected. A 99.9% reflectance whiteboard (Spectralon SRT-99-100, Labsphere Inc., USA) was used to obtain a white calibration image (I white ), while a black calibration image (I black ) was obtained by turning off the camera lens. The corrected image (I) was calculated via Eq. 1: The resulting corrected images were used for the subsequent pre-processing and analysis.

Measurement of textural parameters
A food textural analyzer (TL-Pro, Food Technology Corporation, USA) was used to measure the textural parameters of kiwifruit via three different tests. A TPA test, also called as two-bite-test, can be used to quantify the taste of food by compressing samples twice. It simulates the chewing movement of a human mouth. Puncture test can be used to evaluate the hardness of fruit by piercing samples, using a millimeter-diameter cylindrical probe. Shear tests are mainly used to detect tenderness, using a blunt metal knife to cut the fiber pulp into two parts. The textural parameter values were calculated by the software Textural Lab Pro (Version 1.18-408, Food Technology Corporation, USA).

Instrumental TPA test
Each sample was peeled and two slices of flesh (10 mm thickness) were cut along the equator of the sample (one for testing and the other for comparison and as backup). Then, a piece of cylindrical pulp was cut off with a 40-mm diameter ring blade. During measurement, each slice of cylindrical pulp was placed on the stage of the textural analyzer, and was compressed by a P75 probe (Φ75 mm plate). The sample preparation process is shown in Figure 2(a). The test parameters in the TPA test were test speed of 0.5 mm/s, holding time between two compression of 5.0 s, sample deformation of 30%, and a trigger force of 0.5 N . [ 29 ] In the TPA test, textural parameters of hardness1, resilience, and chewiness were detected. A typical curve of the textural test by TPA is shown in Figure 3(a). Hardness1 (H 1 ) represented the force that achieved a specific deformation of fruit under certain conditions. This represented the peak force during the first compression. Resilience indicated the ability that flesh could recover from the applied external force. Resilience is the ratio of the work done in the first return (the areas of A1 between t1 and t2) to the first compression (the areas of A2 between 0 and t1), as A1/A2. Chewiness was used to describe the sensation, when people chew and swallow a piece of fruit. It comprehensively reflected the continuous resistance of flesh during chewing. In particular, Chewiness was the product of hardness1, cohesiveness (A3/A2, A3 for the areas between t4 and t3), and elasticity (t4-t3). Chewiness was calculated via Eq. 2 (unit: mj): (2)

Puncture test
The whole sample was placed on the stage of the textural analyzer, and was measured with surface [ 30 ] on by probe P6 (Φ6 mm stainless steel cylindrical probe). Figure 2(b) shows the sample preparation process. Test parameters in the puncture test used a preload speed and test speed of 0.5 mm/s, a return speed after finishing of 1.0 mm/s, a puncture depth of 10 mm of the sample, and a trigger force of 0.5 N . [ 31 ] Three points were uniformly measured near the equator of the sample and were calculated to determine the result of the measurement. The textural characteristic curve of puncture is shown in Figure 3(b). Peel hardness (PH) represents the maximum force (unit: N) during the experiment, when the peel was pierced. Average hardness (AH) represents the average load between the maximum force (d1) and the maximum puncture distance (d2), i.e., the average value between L2 and L3 (unit: N). Corrected hardness (CH) represents the slope value from the start of the test to the maximum forces (d1), i.e., the value of the slope between L1 and L2 (unit: N/mm).

Shear test
The preparation method for cylindrical pulp was the same as that used in the TPA test. A long strip of flesh with 10 mm width was taken out through cores of fruits. It was placed on shearing platform, where it was cut with a shearing cutter, in a direction perpendicular to the pulp fibers. The sample preparation process is shown in Figure 2(c). The test parameters of the shear test were a shear speed of 0.5 mm/s, a return speed of 3 mm/s, a return height of 40 mm, and a trigger force of 0.5 N. Each sample was tested twice and the results were averaged.
A typical shear test curve is shown in Figure 3(c). Shear force (SF) is the maximum force (unit: N) during the shearing process. Average shear force (ASF) represents the average of the starting force and the maximum force (t1) (unit: N), i.e., the average value of L1 and L2.

Sample set division method
A rational division of the sample is important to improve the model performance. The rank sampling (RS) method was applied in this study, to divide the calibration set and the prediction set from samples based on the content gradient method. First, the response values were arranged in ascending order and the maximum and minimum response values were removed. The remaining samples were then divided into a calibration set and a prediction set at a ratio of 3:1. Finally, the calibration set included samples of the calibration set, as well as maximum and minimum values . [ 32 ] Because the three tests would destroy the samples during experiments, those samples cannot be reused. Therefore, according to Table 1, the H 1 , chewiness, and resilience parameters obtained via the TPA test, the total number of samples for calibration and prediction is 110. The PH, AH and CH parameters obtained via the puncture test, the total number of samples for calibration and prediction is 105. The SF and ASF parameters obtained via the shear test, the total number of samples for calibration and prediction is 109. The total number of these three tests is 324. Table 1 shows that the samples number of each parameter was clear and visible in the calibration and prediction sets. Moreover, the calibration set had a wider distribution range and more representative values. In other words, it contained the range of prediction set to be analyzed. Thus, a model was established with the calibration set, and the accuracy and reliability of the model was verified using the prediction set.

Pre-processing of spectra
Each hyperspectral image contained a wealth of spectral information and the spectral values varied in the positions of the image surface. 30 ×30 pixels were chosen as region of interest (ROI) to achieve better accuracy. Therefore, a ROI of 30 ×30 pixels in the center of each corrected image of kiwifruit was calculated and the average value was used for further analysis . [ 2 ] The results of the average spectra are shown in Figure 4. The three methods mean centralization (MC), standard normal variate (SNV), and multiplicative scatter correction (MSC) were used to individually process the average spectrum . [ 33 ] The MC method can be simply expressed as the raw spectra minus the mean of the raw spectra. It is used to remove the errors caused by different dimensions, own variables, or large numerical differences. MC is calculated according to Eq. 3 and 4: where x k is the kth raw spectra, and m is equal to the total number of spectral bands. x are the raw spectrum, and x are the mean spectrum. x ðMCÞ are the spectrum with MC pre-processing. The SNV method is capable of correcting multiplicative noise, e.g., particle size influence, scatter interference and path length effect arising from the physical structure of samples. This scatter correction represents a row-oriented transformation that standardizes the spectra by individually using its mean and standard deviation. Therefore, it is used to remove the baseline effect of both translation and offset in the spectra. SNV can be mathematically expressed as Eq. 5: x ðSNVÞ ¼ xÀ x ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi P m k¼1 where x ðSNVÞ are the spectrum with SNV pre-processing. The MSC method offers a similar benefit to the SNV and was used to eliminate the effects of scattering and to enhance the spectral absorption information related to the content of components. Correction is achieved by the following steps. First, the mean of the raw spectrum is calculated. Through this calculation, the corrected spectra received a relatively consistent baseline. Then, simple linear regressions are performed. The regression coefficient is used to correct the baseline scatter by subtracting the regression constant and dividing it the regression coefficient as shown in Eq. 6 and 7: where n k is regression coefficient parameter, b k is regression constant parameter, and x ðMSCÞ are the spectrum with MSC pre-processing.

Modeling method
Partial least squares (PLS) is a popular multivariate statistical analysis . [ 34 ] The advantage of this typical linear method is its capability to solve multicollinearity problems, reduce the dimension, and compress the original spectral data. PLS creates a mathematical description of the relationship between the spectral variables (the X-matrix) and the attribute variables (the Y-matrix). First, the X-matrix and the Y-matrix are simultaneously principally decomposed to obtain U of the principal components T and Y of X, as shown in Eq. 8 and 9. Then T and U are regressed to obtain the regression coefficient matrix B (Eq. 10) . [ 35,36 ] where T and U are the scoring matrices of X and Y. P and Q are the load matrices of X and Y. E and F are the introduced errors when the PLS method is used to fit matrices X and Y.

Model evaluation
The performances of models were evaluated by correlation coefficient of calibration (r c ), root mean square error of calibration (RMSEC), correlation coefficient of prediction (r p ), root mean square error of prediction (RMSEP), and ratio of prediction to deviation (RPD). RPD is derived from the ratio of the standard deviation (Std) of the prediction to the RMSEP value, which was used to measure the prediction performance of models: where y ci and y pi are the predicted values of the i th sample, y i is the measured value of the i th sample,y c and y p are the mean values of sample of calibration and predicted, and n c and n p are the numbers of samples of calibration set and prediction set, respectively.
It is noted that, a model with higher correlation coefficient, smaller RMSEC and RMSEP and larger RPD value will has a better performance. A value for the RPD above 2 indicates that the prediction model has a good accuracy. Values for RPD between 1.5 and 2.0 reveal a possibility of non-quantitative prediction, while a value below 1.5 indicates that the calibration is not usable . [ 37,38 ]

Textural characteristics
The results of textural parameters are listed in Table 1. Under the same parameters, the textural parameter measurement range of each sample set differed, and the range of the calibration set was larger than that of the prediction, thus ensuring that the calibration set could be modeled under suitable conditions. Appropriate range sample data were added to further train and optimize the model and ensure the credibility and efficiency of the model. However, the sample range can be used to predict an unknown sample data range. The model was used for the prediction, and then compared with the sample range to obtain the unknown sample range. In addition, both standard error and average were used to describe the degree of data dispersion. Table 1 shows that except for H 1 (190-200 N) and chewiness (150-230mj), the standard errors of other parameters were small, and the resilience value was the smallest (0.1-0.2). The values of the averages and standard errors were close, indicating that the overall range of the data was large and scattered. The data were not concentrated in one area, which met the conditions required for modeling.

Modeling results
The corrected spectra were acquired at the range of 946 to 2566 nm. To decrease the influence of noise, the spectra at the beginning and at the end were eliminated. Therefore, the range of 963-2510 nm that contained 275 bands was used in the study. Four methods of NONE (named as unprocessed spectrum, i.e., the original spectrum), MC, SNV, and MSC were used to process the spectra, respectively. The results are shown in Table 2. Table 2 shows that the models achieved good accuracy, using four pre-processing methods. In the TPA test, the H 1 model worked well, and the values of r c and r p both exceeded 0.9. The effect was best with NONE processing. r c and r p were largest (0.9480 and 0.9352, respectively) and RMSEC and RMSEP were smallest (60.79 N and 72.54 N, respectively). For the chewiness model, the values of r c exceeded 0.9 except for the SNV method. However, the model with MC processing had the largest r p value and the smallest RMSEP (111.32 mj); therefore, the model with MC processing achieved the best effect. In the resilience model, the values of r c and RMSEC were close, and the models using NONE, MC and MSC methods were the same. However, the r p of the former was larger than that of the latter two, and RMSEP was smallest (0.05).
In the puncture test, textural parameters consisted of PH, AH, and CH. The overall effect of the PH model was good (r c value above 0.96). The value of r p was largest under NONE processing, and the RMSEP value was smallest. Comprehensive comparison indicated that the best model was found with the NONE method. For the AH model, the effects of the model were close to 0.95 after NONE, MC and MSC pre-processing methods. However, the r p values of the first two were smaller than that of the latter, and RMSEP only achieved 5.20 N. This indicated that the model with MSC processing was better. For the CH prediction model, although the value of r c with MC processing was slightly lower than that of MSC, the value of r p and RMSEP exceeded those of MSC. Therefore, The CH model with MC processing was considered more effective. Shear tests used the two textural parameters of SF and ASF. Table 2 shows that the model with MC pre-processing had the best effect on SF. The r c and r p values were the largest (0.8040 and 0.8572, respectively), and RMSEC and RMSEP values were smallest (13.18 N and 11.33 N, respectively). In the ASF model, it was clear that the NONE pre-processing method was best (r c 0.9901 and r p 0.7960). The identified optimal model was used to verify the accuracy of the models. In the predicted set, the correlations between predicted and measured values of H 1 , chewiness, resilience, PH, AH, CH, SF, and ASF are shown in Figure 5. The correlation coefficient was high between the predicted value and the measured value in each prediction model as shown in Figure 5(a,f). All values exceeded 0.9, indicating that the predicted value was close to the measured value, which could accurately and reliably predict the quality of samples. The last two prediction models in Figure 5(g,h) were ordinary, and the correlation coefficients were low. In this way, samples could not be accurately predicted.
In the optimal model, the RPD values of H 1 , chewiness, resilience, PH, AH, and CH were 2.72, 2.35, 2.65, 2.19, 2.35, and 3.23, respectively, all of which exceeded 2, and indicated better performance. In the shear test, the RPD values of SF and ASF were 1.21 and 1.68, respectively. In the ASF model, the RPD value ranged between 1.5 and 2, which identified the quality of samples with low requirements. The SF detection model could not be used for the quality detection of samples.

Discussion
In this study, eight textural parameters (H 1 , chewiness, resilience, PH, AH, CH, SF, and ASF) of kiwifruits were assessed. Among them, chewiness and resilience were found to be the most suitable indexes for the evaluation of fruit quality, which have often been used to assess fruit quality. The hardness indexes (H 1 , PH, AH and CH) reflected the fruit maturity, freshness, and storage characteristics. SF and ASF also roughly characterized the tenderness of fruit pulp.
These results showed that PH, AH and CH prediction models all achieved good results, CH was the best, followed by PH, while AH was the worst. This result was similar to the conclusion of Shimomura et al' . [ 39 ] Both CH and crispness achieved the best results. The CH model achieved better performance in other fruit quality evaluations. Moreover, three hardness parameters represented different hardness qualities of fruit. PH characterized the freshness of fruit, AH could be used to evaluate maturity of fruit, and CH was used to predict quality changes during storage. If only one hardness parameter was required to directly assess fruit hardness, CH would be the most suitable parameter. Because the calculation of CH not only includes the puncture force but also the puncture displacement, it offers a great advantage for the prediction of fruit quality.
However, the SF and ASF models were not ideal, despite the r p value of 0.8572 and the RMSEP value of 11.33 N of the SF model. This indicated the existence of a correlation between the spectra of samples and the SF parameter. Moreover, the SF model could also be used for the lower undemanding prediction.
Furthermore, the reasons for the poor performance of the shear test parameters were explored. By analyzing the shear test process and combining the problems that occurred in the study of Dahdouh et al, [ 40 ] the flesh was hard with little juice at early stage of test, which was conducive to conduct the test. The friction between the cutter and the bottom groove was small, and the error was negligible. At the middle and late stages of the test, the flesh gradually softened and more juice appeared. Consequently, the friction improved and, in the shear process, several samples were squeezed before cutting. The measured value became small, and the relative error was also amplified. This indicates that, they may include systematic errors and accidental errors.
Firstly, instrumental errors will be a main factor. The shear test consisted of a shearing platform and a shearing cutter. The shearing platform was fixed on an experimental platform, the surface of which was slightly inclined. This was a defect of the equipment and could not be remedied. Therefore, it may affect the results.  Secondly, operating errors are a secondary factor. Independent of the type of fruit, their surfaces were always irregular and almost round. During the cutting process, the fruit could therefore easily slip and cause errors. During sample preparation, it is possible that the thickness of a cylindrical pulp was uneven or that the width of a long strip of flesh did not reach or exceed a given width, even when a skilled operator cut the samples. Because of these problems, further experiments will be conducted, where samples will cut with machines instead of manually, to decrease the errors of sample preparation. If all these problems were to be solved, shear test parameters will hold potential for further development into high-precision prediction models in the future.
Methodological errors can also cause poor model results. Figure 5 shows that the fitting degree of each model differed. Some curves fitted better, while others deviated slightly from the true values. Therefore, the fitting degrees of the models were evaluated by the bias, the slope, and the correlation coefficient (r c ,r p ) to identify models with better generalization performance. The bias and slope were calculated by the results of the selected optimal model, and the results are listed in Table 2. For the slope index, the slopes of the regression curves of the PH and SF models were small (below 0.8), while the slopes of other models were closer to 1, indicating an approximately directly proportional function. This indicated that the predicted values of these models were close to the true values and thus, that the performance of the models was good. With regard to the correlation coefficient, the r c value of the SF model was small (only 0.8040), and the r p value of the ASF model was below 0.8. This showed that the correlation between SF, ASF, and the spectrum was low. Moreover, the data points were scattered and thus, the model needs to be improved. Nevertheless, the correlation of other models was still good. With regard to the bias, the values of the H 1 and chewiness models were large (indicating large bias). The predicted value deviated from the true value, and an underfitting situation may thus occur. Comprehensive analysis showed that the resilience, AH, and CH models had low bias, with a slope closer to 1 and good correlation. The resilience, PH, AH, CH, SF, and ASF models all had low bias. The slopes of the H 1 , chewiness, resilience, AH, CH and ASF models were close to 1. H 1 , chewiness, resilience, PH, AH, and CH models had better correlations. Subsequent research will focus on increasing or decreasing the number of calibration samples to obtain a model with stronger generalization capabilities. Table 2 shows that in the preprocessing method, there were more models of the NONE processing and MC processing, and only the AH model used MSC processing. Considering the differences between different pretreatment approaches, the results of the pretreatment method of the optimal model and the original spectral processing method were analyzed. The results are shown in Table 2. Comparison showed that, except for the chewiness and AH models, the pretreatment effects of other models did not differ much. More importantly, the use of NONE processing (i.e., the original spectrum) achieved a good effect, and exerted a positive effect on the unified development of multiple models.
These factors may affect the performance of the model and decrease model quality. Therefore, in the future, the shearing conditions will be improved and appropriate methods to analyze the models will be selected to decrease the systematic errors of the model and improve both the accuracy and applicability of the model.

Conclusion
A feasibility study was conducted on the textural characteristics of kiwifruit using HSI technology. Different preprocessing methods (NONE, MC, SNV and MSC) were used to establish PLS prediction models. The results showed that each preprocessing method had a certain effect and could increase the performance of the models. According to bias and slope parameters, and with the exception of the chewiness and AH models, the results showed that the pretreatment effects of other models did not differ much. The model with NONE processing achieved a good effect, which had a positive effect on the unified development of multiple models. The H 1 , chewiness, resilience, PH, AH, and CH prediction models of kiwifruit were established by the PLS method. The r c values were 0.9480, 0.9768, 0.9452, 0.9642, 0.9504, and 0.9705, respectively. The RMSEC values were 60.79 N, 44.66 mj, 0.039, 6.50 N, 4.08 N, and 1.52 N/mm, respectively. The r p values were 0.9352, 0.9025, 0.9243, 0.9267, 0.9111, and 0.9532, respectively. The RMSEP values were 72.54 N, 111.32 mj, 0.050, 9.39 N, 5.20 N, and 1.66 N/ mm, respectively. The values of RPD were 2.72, 2.35, 2.65, 2.19, 2.35, and 3.23, respectively. This indicated that these models had an excellent ability to predict samples. In the ASF model, the former was considered as a quantitative analysis model with low accuracy (r p 0.7960, RPD 1.68). The values of r c and r p were smaller in the SF model (0.8040 and 0.8572, respectively). The RMSEC and RMSEP values were 13.18 N, 11.33 N, respectively, while the RPD value was only 1.21. Therefore, it could not be used to predict the SF of samples. The performance of SF and ASF models should be further studied to increase their accuracy.
It is well known that the textural characteristics of agricultural and sideline products can largely reflect their freshness and maturity, and in the process of harvesting, taking kiwifruit [ 41 ] and eggplant [ 42 ] as examples, the texture characteristics can be used as the basis for harvesting.In the next study, we further studied the application of spectral-textural modeling in the field beyond agricultural product classification, especially the key technology of unmanned operation in agricultural production and harvesting process, based on the experience of combining textural characteristics and spectral image information of kiwifruit.

Disclosure statement
No potential conflict of interest was reported by the author(s).

Ehtical approval
This article does not contain any studies with human participants or animals performed by any of the authors.