Study of Nondestructive Testing of Nanguo Pear Quality Using Vis-NIR Spectroscopy

, ,
Spectroscopy, June 2022, Volume 37, Issue 6
Pages: 26–32

When evaluating fruit, such as the Nanguo pear, ensuring high quality of the product is a top priority. The quality of a Nanguo pear will directly affect its appearance, taste, and commodity value. Currently, most of the quality detection methods of Nanguo pears are destructive. In this work, nondestructive testing methods for the internal and external quality of the Nanguo pear were studied. First, the spectral curves of the Nanguo pear were collected to establish the internal comprehensive quality indicators. Second, the successive projection algorithm was used to extract the spectral characteristics of samples. Based on the gray level co-occurrence matrix, texture features of the sample image were extracted. Finally, the model was established by fusing spectral and image features together, and good modeling results were achieved. The internal and external quality of the Nanguo pear were detected simultaneously. The accuracy of the external quality assessment was 97.14%. For the internal quality prediction model, the correction set R2c and RMSEC are 0.959 and 0.483, respectively, and the prediction set R2P and RMSEP are 0.920 and 0.615, respectively. It provides a theoretical basis for the development of an online nondestructive testing system for fruit.

Nanguo pears are known as the “king of pears.” Nanguo pears can be made into fruit juices, preserved fruits, pear pastes, dried fruits, and other byproducts that not only improve the added value of other products, but also plays an important role in promoting the development of the Nanguo pear industry. However, in the blind pursuit of generating a higher yield, the quality of the Nanguo pear fruit has declined, a trend that has resulted in a sharp decrease in its commodity value and quality. This decline of Nanguo pear quality has affected the development of the Nanguo pear industry and the related economic chain.

Currently, fruit quality detection and classification relies on the look, smell, and touch of the fruit under observation. However, that approach to quality detection method requires a sizable labor force and remains an inefficient process. In addition to these disadvantages, quality cannot be accurately judged by visual inspection. At this time, most of the internal quality research needs to be conducted by chemical detection, which causes damage to the fruit itself. Therefore, nondestructive testing and research of the internal quality based on hyperspectral imaging can effectively overcome these shortcomings to achieve rapid and nondestructive testing, which has become the focus of researchers. Currently, the application of hyperspectral imaging technology is used to detect the internal and external qualities (11) of several fruits and vegetables, including apples (2,5), bananas (7), peaches, pears, dates, navel oranges, blueberries (4), Hami melons, oranges, potatoes, spinach, and tomatoes (14). Hyperspectral imaging technology has been widely used in various fields. It has applications in product safety (1,3,12), pest identification, especially in vegetables, fruits (6,10), meat (13), grain (15), and agricultural products (18).

Looking at the literature, we can see that there is increased interest in studying the Nanguo pear. However, most of the studies are about trace elements in a Nanguo pear, the effects of lipids on the aroma and coloring, the effects of enzymes on the decay and storage time of Nanguo pear, and the effects of different regions, climates, and environments on the Nanguo pear. There are few studies on the nondestructive detection and recognition of the internal quality of Nanguo pears, especially on assessing quality using hyperspectral imaging technology.

Hyperspectral imaging can simultaneously detect the spectral and image information of the measured object. We conducted long-term research on the Nanguo pear previously. In that work, the external quality identification of the Nanguo pear was achieved (16), and a nondestructive method for testing the internal quality of Nanguo pear was studied (17).

It can be seen that hyperspectral imaging can detect the internal and external quality of the Nanguo pear. However, using hyperspectral imaging for simultaneous external and internal quality detection has been rarely reported.

Following our past research on the Nanguo pear, the purpose of the current study was to use hyperspectral imaging technology to explore the development of a comprehensive detection method to evaluate the internal and external quality of the Nanguo pear in a nondestructive manner. Our study offers a theoretical basis for the follow-up development of an online quality detection and grading system based on hyperspectral imaging technology. It also provides a theoretical basis and technical support for the development of real-time, online, and nondestructive detection systems for the fruit industry.

Materials and Methods

Test Materials

The experimental materials were purchased from the Datun fruit farm in Haicheng City. In total, 420 fresh Nanguo pears were collected, including 200 external defect samples (50 heteromorphic fruits, 50 pest damaged fruits, 50 rust fruits, and 50 brown rot fruits) and 220 intact fruit samples. There were 280 correction sets (30 abnormal fruits, 30 pest fruits, 30 rust fruits, 30 brown rot fruits, and 160 intact fruits) and 140 prediction sets (20 abnormal fruits, 20 pest fruits, 20 rust fruits, 20 brown rot fruits, and 60 intact fruits).

Hyperspectral Image Acquisition and Correction

The hyperspectral image was collected by the system. First, the parameters of the hyperspectral image acquisition system were adjusted. Next, the distance between the sample and the lens was set at 272 mm, the platform moving speed was set at 1.1 mm/s, and the camera exposure time was set at 79 ms. Then, according to the above method, the collected hyperspectral images were corrected by the blackboard and whiteboard. Finally, the sample images of Nanguo pears were collected. The black and white correction formula was as follows:

where R is the relative reflectivity of the black-and-white corrected hyperspectral image; I is the original hyperspectral image; D is the hyperspectral image calibrated by the blackboard; and W is the hyperspectral image calibrated by the whiteboard.

Selection Method of Quality Index

According to the agricultural industry standard of the People’s Republic of China (NYT 1076-2006), the external and internal quality indexes of the Nanguo pear were selected. The detection index of the external quality of Nanguo pear samples examined whether there were surface defects. The types of surface defects selected in this paper are common defects, namely abnormal fruit, insect-damaged fruit, rust fruit, and brown rot fruit. Soluble solid content (SSC), titratable acid content (TAC), fruit firmness (FF), and vitamin C (VC) were selected as the evaluation indexes to characterize the internal quality of the Nanguo pear. Based on the study of the four internal quality indicators, the internal comprehensive quality indicators, which can represent the four internal quality indicators, were determined and used for subsequent internal and external quality research and analysis.

Determination of Physical and Chemical Indexes

For the determination of pulp hardness, refer to “NY/T 2009-2011 determination of fruit hardness” (22). For the determination of the content of soluble solids, please refer to “GB/T 12295 determination of soluble solids in fruit and vegetable products refractometer method” (23). For the determination of titratable acid content, refer to “GB/T 12293 determination of titratable acid in fruit and vegetable products” (24). For the determination of vitamin C, refer to “GB/T 6195-86 determination of vitamin C in fruits and vegetables (2,6-dichloroindo-phenol titration)” (25).

Determination of an Internal Comprehensive Quality Index

First, the correlation analysis of the internal quality indicators was examined. Second, the Kaiser-Meyer-Olkin (KMO) (20) and Bartlett (21) tests were used to determine whether these variables were suitable for factor analysis. Finally, Statistical Package for the Social Sciences (SPSS) software was used to analyze the original variables of internal quality indicators, and the principal component eigenvalues and contribution rates were extracted. The score of the coefficient matrix of components was calculated by the regression method to comprehensively evaluate several quality indexes of the Nanguo pear. The rotation score coefficient matrix was used to establish and analyze the subsequent principal factor expression.

Feature Extraction Method

In this study, successful projection algorithms (SPA) (9) were used to extract feature variables. In this paper, Gray level co-occurrence matrix (GLCM) (8), was used to extract and analyze the image texture features. The best wavelength extraction method was selected, and the image with the best wavelength was taken as the feature image. Based on the feature image, five texture features, namely contrast, homogeneity, correlation, energy, and entropy, were extracted for subsequent modeling analysis.

Identification Method

The least squares–support vector machine (LS-SVM) (19) has clear advantages in processing nonlinear, small sample, and high-dimensional data. It has been widely used in image recognition, electricity, food inspection, communication, and other fields. Based on the LS-SVM algorithm, the internal quality model of the Nanguo pear was established using the spectral and image information as the input of the model and the internal comprehensive quality index as the output. By taking the spectral and image information as the input of the model and the external quality index as the output, the external quality model of Nanguo pear was established. Nanguo pear samples with five different external quality indexes (heteromorphic fruit, insect damaged fruit, rust fruit, brown rot fruit, and normal fruit) were assigned 1, 2, 3, 4, and 5, respectively. If the difference between the predicted value of Nanguo pear sample and the hypothetical category was within ± 0.5, the sample discrimination was correct. For example, if the prediction result of the Nanguo pear sample was between 0.5 and 1.5, the discrimination was correct for heteromorphic fruit. If the prediction result of the Nanguo pear sample was between 1.5 and 2.5, the discrimination was correct for insect damaged fruit. If the prediction result of the Nanguo pear sample was between 2.5–3.5, the discrimination was correct for rust fruit. If the prediction result of Nanguo pear sample of brown rot fruit was between 3.5–4.5, the discrimination was correct. If the prediction result of Nanguo pear sample of normal fruit was between 4.5–5.5, the discrimination was correct.

Results and Discussion

Measurement and Correlation Analysis of Internal Quality Index

After the hyperspectral images of Nanguo pear samples were collected and the spectral curve data were obtained, the internal quality indexes of the Nanguo pear were detected, including SSC, TAC, FF, and VC.

The correlation analysis of the SSC, TAC, FF, and VC physical and chemical indexes were made. The results appear in Table I. It can be seen from Table I that there was significant correlation among SSC, TAC, FF, and VC. SSC is highly correlated with TAC and VC, and FF is also highly correlated with SSC, TAC, and VC.

Selection of Internal Quality Comprehensive Indicators

It can be seen that there was significant correlation between the four internal quality indicators. If any of them were used to establish the internal quality model of the Nanguo pear, the model would be affected by the other three quality indicators. Therefore, it was necessary to conduct factor analysis on these four indicators to find the comprehensive quality indicators that can represent the four internal quality indicators of Nanguo pears.

KMO and Bartlett tests were conducted on the four indicators of internal quality to determine whether these variables were suitable for factor analysis. The KMO test coefficient was 0.692, which was greater than 0.5. The significance of the Bartlett test was 0.02—less than 0.05. It showed that the partial correlation between the variables was strong and independent, making it suitable for factor analysis.

SPSS software was used to analyze the original variables of the internal quality index of the Nanguo pear samples, and principal component analysis (PCA) was used to extract the eigenvalues. The main component analysis method was used to determine the common factor variance statistics for the internal quality index variables.

Variance between the common factors of the four indicators of internal quality was above 0.8, which indicated that the common factors, after being extracted by factor analysis, retained most of the original information and had good interpretation ability for each indicator variable. In the process of factor analysis, PCA was used to extract the characteristic value and the principal component contribution rate, and the maximum variance method was used to rotate. The extracted characteristic values and contribution rates of principal components are shown in Table II.

It can be seen from Table II that the first two factors of the Nanguo pear samples have covered the main information of internal quality indicators.

The regression method was used to calculate the score coefficient matrix of components. It can be seen from Table III that in the composition matrix of the original variable of quality index, the score effect of TAC and hardness was not good, but in the composition matrix after rotation, the score effect of both was significantly improved, and the overall effect of the rotation composition matrix was good. Therefore, the rotation score coefficient matrix was used to establish and analyze the subsequent main factor expression.

From Table III, we can get two main factor scores of the component matrix as follows (for equations 2–4, X1 is SSC value of each sample; X2 is TAC value of each sample; X3 is FF value of each sample; X4 is VC value of each sample; Y1 is the first main factor score expression for the quality indicators‘ rotated score matrix; Y2 is the second main factor score expression for the quality indicators‘ rotated score matrix; and Y is the internal comprehensive quality index of Nanguo pear):

Based on the contribution rate and factor score of the two main factors, the internal comprehensive quality index y of Nanguo pears was established. The expression is as follows:

Using the internal comprehensive quality index formula, the Y-value of each sample of Nanguo pears was calculated.

The average value of the comprehensive quality index of external defect samples is lower than that of intact fruit samples, and the average value of the comprehensive quality index of external defect and intact fruit samples is lower than that of intact fruit samples. However, the standard deviation of the comprehensive quality index of external defect and intact fruit samples is greater than that of intact fruit samples, which is because of rust fruit disease that reduces the SSC and VC values. The SSC, FF, and VC values of brown rot fruit decreased more than the SSC, TAC, and VC values of pest fruit, but both decreased.

Spectral Curve Analysis

The hyperspectral image acquisition system was used to collect the samples of Nanguo pears, extract the region of interest (ROI) (100 pix * 100 pix) of the five types of samples, and obtain the average reflectance spectrum curve of the heteromorphic area, insect damaged area, rust area, brown rot area, and normal fruit area, as shown in Figure 1. The spectral curve range was 400–1000 nm.

It can be seen from Figure 1 that the absorption peak of relative reflectance curve of intact fruit sample appears at 675 nm, which is mainly caused by the absorption of chlorophyll in the pulp and epidermis of Nanguo pears. The shape of the relative reflectance curve of the heteromorphic fruit is most similar to that of the intact fruit, but the relative reflectance of the intact fruit is higher. The absorption peak of the rusty fruit decreased with the decrease of chlorophyll. After being attacked by insects, Nanguo pears formed a standing hole on their surface, where the chlorophyll was missing, so there was no obvious absorption peak. There was also no obvious absorption peak in the brown rot fruit.

Spectral Feature Extraction and Analysis

After preprocessing the spectral data, SPA was used to select the characteristic wavelengths. The minimum effective wavelength was set to four and the maximum effective wavelength was set to 18. The wavelength selection process is shown in Figure 2.

It can be seen from Figure 2 that when the number of characteristic wavelengths is 6, there is a turning point in RMSE, and the RMSE value is 0.25317. Therefore, the number of characteristic wavelengths is 6, which are 527 nm, 606 nm, 750 nm, 796 nm, 825 nm, and 902 nm, respectively.

Texture Feature Extraction Results and Analysis of Image

Here, 750 nm was selected as one of the characteristic wavelengths by SPA, and it can be seen from Figure 1 that the spectral curves of the five samples have the largest difference at the wavelength of 750 nm. Therefore, the images at 750 nm were selected as the feature images. The characteristic images of heteromorphic fruit, insect damaged fruit, rust fruit, brown rot fruit, and intact fruit are shown in Figure 3.

GLCM was used to extract the gray level co-occurrence matrix in the direction of 0° from the feature images of each sample, and then extract five texture feature parameters (contrast, correlation, entropy, homogeneity, energy) from each gray level co-occurrence matrix.

Internal Comprehensive Quality Inspection

Characteristic wavelengths of internal quality comprehensive index extracted by SPA are selected as the spectral characteristic. The texture features extracted by GLCM are taken as image features. The LS-SVM model are established based on spectral features, image features, the fusion information of spectral features, and image texture features to predict the internal comprehensive quality of the samples.

The modeling results show that the LS-SVM model based on spectral characteristics has a good effect. The corrected set R2C and RMSEC are 0.905 and 0.798, respectively, and the predicted set R2P and RMSEP are 0.882 and 0.937, respectively. The discriminant result of the model based on the texture feature is slightly lower than that of the model based on spectral feature. The corrected set R2C and RMSEC are 0.895 and 0.992, respectively, and the predicted set R2P and RMSEP are 0.878 and 1.285, respectively. The accuracy of the LS-SVM model based on the fusion information of spectral features and texture features has been significantly improved compared with the model of single spectral and texture feature. The prediction results of fusion information are shown in Figure 4.

The accuracy of the LS-SVM model based on the fusion information of spectral and texture features was high. The correction set R2C and RMSEC are 0.959 and 0.483, respectively, and the prediction set R2P and RMSEP are 0.920 and 0.615, respectively. It shows that the spectral feature data and the texture feature data play a good cooperative role and improves the accuracy and stability of the model.

External Quality Inspection

Spectral features, image features, the fusion information of spectral features, and image features were used as the input. The LS-SVM model was used to distinguish the external quality of samples.

The modeling results show that the discrimination result of the LS-SVM model based on spectral characteristics is good. There were 15 samples that were misjudged, and the correct discrimination rate was 89.29%. The discrimination rate of the LS-SVM model based on texture features is slightly higher than that of the model with spectral features, and the discrimination accuracy rate is 91.43%. The model discrimination result based on the fusion information of the spectral feature and texture feature is the best, as shown in Figure 5.

It can be seen from Figure 5 that the model recognition result based on the fusion information of spectral and texture features is the best, with only four samples being misjudged. Among them, two normal fruits are misjudged as heteromorphic fruits and two heteromorphic fruits are misjudged as normal fruits, with the recognition accuracy being 97.14%, which is because the spectral characteristics and texture characteristics of the two fruits were similar; as a result, it is easy to misclassify them. The correct rate of identifying insect-damaged fruit, brown rot fruit, and rust fruit is 100%. It can be seen that the fusion of feature information can promote each other between single features and make the feature information more effective and advantageous, thus improving the discrimination effect of the model.

Conclusion

The study revealed the simultaneous detection of the internal and external quality of the Nanguo pear. The detection effect of the LS-SVM model based on the fusion information was great, and the accuracy of external quality detection was 97.14%. The internal quality prediction model, the correction set R2c and RMSEC are 0.959 and 0.483, respectively, and the prediction set R2P and RMSEP are 0.920 and 0.615, respectively.

The research method of this paper realizes the effective, fast, and nondestructive testing of Nanguo pear quality, and provides the theoretical basis for the development of the nondestructive online testing system of fruit quality.

Funding

This study was funded by guidance program project of Liaoning Province Natural Science Foundation (grant number 2019-ZD-0260).

References

(1) I. Chandrasekaran, S. Panigrahi, L. Ravikanth, and C.B. Singh, Food Anal. Method 12, 2438–2458 (2019). DOI: 10.1007/s12161-019-01609-1

(2) J.L. Dong and W.C. Guo, Food Anal. Method 8, 2635–2646 (2015). DOI: 10.1007/s12161-015-0169-8

(3) Y.Z. Feng and D.W. Sun, Crit. Rev. Food Sci. 52, 1039–1058 (2012). DOI: 10.1080/10408398.2011.651542

(4) G.A. Leiva-Valenzuela, R. Lu, and J.M. Aguilera, Innov. Food Sci. Emerg. 24, 2–13 (2014). DOI: 10.1016/j.ifset.2014.02.006

(5) J.C. Keresztes, M. Goodarzi, and W. Saeys, Food Control 66, 215–226 (2016). DOI: 10.1016/j.foodcont.2016.02.007

(6) G.A. Leiva-Valenzuela, R. Lu, and J.M. Aguilera, J. Food Eng. 115, 91–98 (2013). DOI: 10.1016/j.jfoodeng.2012.10.001

(7) N.D.T. Nghia, J.C. Dusabumuremyi, and W. Saeys, J. Food Eng. 238, 85–94 (2018). DOI: 10.1016/j.jfoodeng.2018.06.013

(8) X. Ou, W. Pan, and P. Xiao, Int. J. Pharmaceut. 460, 28–32 (2014). DOI: 10.1016/j.ijpharm.2013.10.024

(9) T.T. Pan, E. Chyngyz, D.W. Sun, J. Paliwal, and H.B. Pu, Postharvest Biol. Tec. 154, 96–104 (2019). DOI: 10.1016/j.postharvbio.2019.04.005

(10) Y.Y. Pu and D.W. Sun, Biosyst. Eng. 156, 108–119 (2017). DOI: 10.1016/j. biosystemseng.2017.01.006

(11) J.Y. Shi, W.T. Li, X.D. Zhai, Z.M. Guo, M. Holmes, H.E. Tahir, and X.B. Zou, J. Plant Nutr. 42, 2773–2783 (2019). DOI: 10.1080/01904167.2019.1659332

(12) A. Siedliska, P. Baranowski, M. Zubik, W. Mazurek, and B. Sosnowska, Postharvest Biol. Tec. 139, 115–126 (2018). DOI: 10.1016/j.postharvbio.2018.01.018

(13) F. Tao and Y. Peng, J. Food Eng. 126, 98–106 (2014). DOI: 10.1016/j. jfoodeng.2013.11.006

(14) R.J. Van, J.C. Keresztes, N. Wouters, D.B. Ketelaere, and W. Saeys, Postharvest Biol. Tec. 129, 79–89 (2017). DOI: 10.1016/j.postharvbio.2017.03.006

(15) P.J. Williams and S. Kucheryavskiy, Food Chem. 209, 131–138 (2016). DOI: 10.1016/j.foodchem.2016.04.044

(16) D.M. Yu, T.Y. Xu and K. Song, Spectrosc. Lett. 51, 197 (2018). DOI: 10.1080/00387010.2018.1447968

(17) D.M. Yu, T. Y. Xu, and K. Song, J. Appl. Spectrosc. 87, 364–371 (2020). DOI: 10.1007/s10812-020-01008-z

(18) S. Zou, Y.C. Tseng, A. Zare, D.L. Rowland, B.L. Tillman, and S.C. Yoon, Biosyst. Eng. 188, 165–177 (2019). DOI: 10.1016/j.biosystemseng.2019.10.019

(19) Y.H. Song , X.Q. Rao, and Y.B. Ying, Chin. J. Agr. Eng. 28, 114–118 (2012). DOI: 10.3969/j.issn.1002-6819.2012.09.019

(20) F.L. Ren and Y.N. Zhang, J. Xuzhou I. Eng. 31(5), 1–53 (2016). DOI: 10.15873/j.cnki.jxit.eighty-seven

(21) J. Lin, G.J. Cai, S.Y. Liu, and H.F. Zou, Geo. Mech. 38, 1413–1423 (2017). DOI: 10.16285/j.rsm.2017.05.024

(22) NY/T 2009-2011, Determination of Fruit Firmness, Agricultural Industrial Standard, B31, 67.080.10 (2011).

(23) GB/T 12295-1990, Fruit and Vegetable Products–Determination of Soluble Solids–Refractometric Method, Chinese National Standard, B30, 67.080 (1990).

(24) GB/T 12293-1990, Fruit and Vegetable Products–Determination of Titratable Acidity, Chinese National Standard, B30, 67.080 (1990).

(25) GB/T 6195-1986, Determination of Vitamin C in Vegetables and Fruits (2,6-dichloro-indophenol Titration Method), Chinese National Standard, B31, 67.080 (1986).

Kai Song is with Shenyang Ligong University, in Shenyang, China. Dongmin Yu is with Shenyang Polytechnic College, in Shenyang, China. Dong Yang is with the Academy of National Food and Strategic Reserves Administration, in Beijing, China. Direct correspondence to Dongmin Yu at Hello8658@163.com