# The Detection of Early-Maturing Pear's Effective Acidity Based on Hyperspectral Imaging Technology

Pengbo Miao, Long Xue, Muhua Liu, Jing Li, Xiao Wang, Chunsheng Luo

► To cite this version:

Pengbo Miao, Long Xue, Muhua Liu, Jing Li, Xiao Wang, et al.. The Detection of Early-Maturing Pear's Effective Acidity Based on Hyperspectral Imaging Technology. 4th Conference on Computer and Computing Technologies in Agriculture (CCTA), Oct 2010, Nanchang, China. pp.528-536, 10.1007/978-3-642-18369-0_63. hal-01564882

HAL Id: hal-01564882

https://inria.hal.science/hal-01564882

Submitted on 19 Jul 2017

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# The detection of early-maturing pear's effective acidity based on hyperspectral imaging technology

苗蓬勃 Pengbo Miao¹, 薛龙 Long Xue², 刘木华 Muhua Liu¹*, 黎静 Jing Li¹, 王晓 Xiao Wang¹, 罗春生 Chunsheng Luo¹

(1. Engineering College, Jiangxi Agricultural University, Nanchang, Jiangxi 330045, P. R. China;

2. School of Mechanical and Electronic Engineering, East China JiaoTong University, Nanchang, Jiangxi 330013, P. R. China)

E-mail: suikelmh@sohu.com

**Abstract.** The hyperspectral imaging technology is used to detect early-maturing pear's effective acidity nondestructively, and effective prediction model is established. 145 pears' hyperspectral images are obtained in the wavelength range of 400nm-1000nm. Total 145 pears are separated into the calibration set (77 samples) and prediction set (68 samples). Early-maturing pear's effective acidity partial least squares (PLS) prediction model is built in different range of spectrum band. By comparison, the range 498 nm - 971 nm was selected in using partial least squares (PLS) to build early-maturing pear's effective acidity prediction model. The experimental results show that, PLS prediction model of early-maturing pear's effective acidity has the best effect in this range of wavelength. The correlation coefficient R between early-maturing pear's actual effective acidity and predicted effective acidity is 0.9944 and 0.9233 for calibration set and prediction set respectively, the root mean squared error of prediction samples (RMSEP) is 0.022 and 0.072 for calibration set and prediction set respectively.

**Keywords:** early-maturing pear, hyperspectral image, effective acidity, partial least squares (PLS) ¹

¹* Corresponding Author Muhua Liu, E-mail: suikelmh@sohu.com
# 1. Introduction

Hyperspectral imaging technology is applied in research of detecting agricultural products' quality these years; it has much potential in nondestructive inspection area. Xuehua pear's sugar content and water content's sensitive moisture absorption spectrum was picked up by hyperspectral imaging system, artificial neural networks is used to establish Xuehua pear's sugar content and moisture content prediction model, in this study, the feasibility of nondestructive testing of Xuehua pear's quality in using hyperspectral imaging technology was discussed [1]. Hyperspectral imaging technology was used to predict apple's internal quality including firmness and soluble solid [2]. Spectral bands 640-750 nm had the best effect for detecting tomatoes' damage; this result was based on the application of partial least-square method and genetic algorithm on hyperspectral data[3]. The prediction model was obtained based on BP neural network for detecting apples' maturity and soluble solids content from wavelength 500nm to 1000nm by using hyperspectral imaging technology [4].

As people's life quality improved, consumer choose fruit pay more attention in internal quality such as sugar content, acidity value etc. not only in the size, color and appearance these external quality. For the quality of fruit acidity, if there is too low, the fruit will lack of flavor [5].

The acidity which people in the taste mainly depends on the acid in the state of ions, which is effective acidity, usually use pH to express and not depend on the amount of acid [6]. So, this study selects one kind of early-maturing pears—Cuiguan pear as samples to inspect effective acidity. Early-maturing pears' hyperspectral images are collected in wavelength 400-1000nm, and partial least squares (PLS) is used to establish Early-maturing pears' effective acidity prediction model.

# 2. Methods and Procedure

## 2.1 Fruit Samples

This study selected the common early-maturing pears in south - Cuiguan pear. Cuiguan pears are wide in northern area of Jiangxi province; it has the characteristic of early maturity, adaptability, good quality and good harvest [7]. Cuiguan pears are
round in general, and mature in early August. Its flesh is white and tender, its core is
small, and has a good taste.

Fresh early-maturing pears are purchased from local market for this experiment,
samples are randomly selected in size and shape representatively in early August
2009. Then pears had been kept in cold storage at 4℃. Samples had 145 pears in all
which are separated into the calibration set (77 samples) and prediction set (68
samples).

## 2.2 Instrument Setup

Early-maturing pears hyperspectral imaging experiment device is shown in fig.1, this
platform mainly include hyperspectral camera(ImSpector, V10E, Finland), light
source, manual lifting device, electronic mobile platform and computer with
Spectralcube software. Two 500W tungsten halogen lamps are light source.

<figure><img src="image_2.png" /><figcaption>Fig.1 Hyperspectral imaging platform sketch, 1. Hyperspectral camera, 2. Light source, 3. Manual lifting device, 4. Electronic mobile platform 5.Computer</figcaption></figure>

## 2.3 Hyperspectral Image Collections

The exposure time of hyperspectral camera should be predefined before acquiring
hyperspectral data to ensure the image is clear and the speed of mobile platform
should be set reasonably to avoid distortion of image size and the spatial resolution.
Early-maturing pear samples are took from the refrigerator and put in the tray under
temperature of 24°C, after the water on surface evaporated, early-maturing pears samples are in accordance with experimental environment, then the numbers could be marked on samples respectively. Standard white hyperspectral image is collected by using standard white board in the same condition with collecting samples' images. Then the standard black hyperspectral image is collected by covering the lens. The collection of pear samples' hyperspectral reflection images is according to the numbers marked in advance. After collecting Every 10 samples' images, the standard white and black images should be collected again.

## 2.4 Effective Acidity Measurement

pH=4 standard buffer solution is used in this experiment. Using potassium hydrogen phthalate 10.21 grams dissolved in distilled water of 1000mL and set aside. The instrument for inspecting effective acidity is PHS - 3B precise digital acidometer (HongYi Instrument Co., LTD Shanghai), which is sensitive and reliable and has accurate reading. Specific operating processes are as follows:

(1) The electrode on acidometer should be connected first, and turn on the power for 30 minutes for preheating. After adjusting the temperature compensation knob, electrode are immersed in the buffer solution. Digital display of pH value on electrode is 4 (pH value of buffer solution) by adjusting potential regulator.

(2) Pulp of early-maturing pear sample is peeled, and mashed with the mortar for pear fluids.

(3) Electrode is washed with distilled water and dried with filter paper firstly, and washed with sample's some fluids once more, then inserted into the sample's fluids that is prepare to be examined. When the reading on acidometer's display screen stable, the corresponding sample's effective acidity is acquired.

Early-maturing pears' effective acidity statistics are acquired through effective acidity measurement method as shown in table 1.

<table><caption>**Table.1 Statistics of effective acidity measurements of Cuiguan pear samples (pH)**</caption><thead><tr><th></th><th>Mean</th><th>SD<sup>※</sup></th><th>Min</th><th>Max</th><th>Samples</th></tr></thead><tbody><tr><td>Calibration set</td><td>5.24</td><td>0.201</td><td>4.73</td><td>5.62</td><td>97</td></tr><tr><td>Predication set</td><td>5.267</td><td>0.180</td><td>4.96</td><td>5.52</td><td>68</td></tr></tbody></table>

SD*: Standard deviation
# 3 Spectral image preprocessing

## 3.1 Image Preprocessing

In the continuous working process, the luminous intensity of light source will gradually decrease. Hyperspectral camera's stability and repeatability will be affected because of light attenuation in the study. The images obtained would contain much noise in the band which has weak light intensity because of the uneven distribution of light intensity under the band and dark current in sensor. So image calibration is needed [8]. The standard white board is used for light calibration and standard black board is used for eliminating dark current noise in equipment etc.

Sample's original hyperspectral images turn into the absolute images after preprocessing (as shown in fig.2) in using calibrated formula.1 [9].

$$I_{\text{norm}}(x, y) = \frac{I_{\text{sample}}(x, y) - I_{\text{black}}(x, y)}{I_{\text{white}}(x, y) - I_{\text{black}}(x, y)} \quad (1)$$

(formula.1)

In formula.1, $I_{sample}$ is original image, $I_{black}$ is standard black board image, $I_{white}$ is standard white board image, $I_{norm}$ is the normalized data. Effective value from 0 to 1 could be obtained by calibrating the original image. And the image calibration can reduce distraction due to such as uneven light these factors for hyperspectral image.

<figure><img src="image_3.png" /><figcaption>a. before preprocessing</figcaption></figure>
<figure><img src="image_4.png" /><figcaption>b. after preprocessing using formula 1</figcaption></figure>

<caption>**Fig.2.** The Vis-NIR Spectrum of sample</caption>

Early-maturing pear samples' images are processed for compression by using the nearest neighbor domain method in ENVI software, and make x and y directions scale down for 0.5. Data could be reduced for this method, so image reading and data processing could be quick and could save storage space in the same time. After the image processing, early-maturing pear's hyperspectral image is as fig.3 shown.

<figure><img src="image_5.png" /><figcaption>**Fig.3** The hyperspectral image at 723nm</figcaption></figure>
## 3.2 Region of Interest (ROI) Selection

Early-maturing pear's effective acidity measuring area is the reflecting area in filming. So visible region on early-maturing pear sample's image is selected as interested region when process the image.

The region of interest has strong brightness, which could wipe out the effect from pear's edge and provide better data relative with early-maturing pear's quality highly [10]. Region of interest of early-maturing pear sample is selected as shown in fig.4. Early-maturing pear sample's reflected data could be generated from this area directly after the selection of region of interest (ROI), in order to analysis and process data later.

<figure><img src="image_6.png" /><figcaption>Fig.4 Region of Interest at 723nm</figcaption></figure>

# 4 Results and Discussion

## 4.1 Spectral Range Selection

Seventy-seven early-maturing pear modeling samples are tried in different wave bands many times, and different models' effect of spectral range are discussed through partial least squares (PLS) in software of Unscrambler. Compare with the models built in other spectral range, predicted model by PLS in spectral bands 498nm – 971nm has better effect by comparison, the accuracy is highest, and comparison result is shown in table.2.
<table><caption>Table.2 The model comparison in different bands</caption><thead><tr><th>No.</th><th>Correlation</th><th>R-Square</th><th>RMSEC<br>※</th><th>SEC※</th><th>Bias</th><th>Band</th></tr></thead><tbody><tr><td>1</td><td>0.7824</td><td>0.6136</td><td>0.6248</td><td>0.6286</td><td>1.724e-08</td><td>399.2nm-1000.1nm</td></tr><tr><td>2</td><td>0.8203</td><td>0.6728</td><td>0.5749</td><td>0.5784</td><td>-5.745e-09</td><td>447.5nm-917.6nm</td></tr><tr><td>3</td><td>0.9561</td><td>0.9142</td><td>0.2944</td><td>0.2961</td><td>-1.281e-06</td><td>477.9nm-993.6nm</td></tr><tr><td>4</td><td>0.9695</td><td>0.9399</td><td>0.2462</td><td>0.2477</td><td>-1.55e-06</td><td>493.1nm-980.5nm</td></tr><tr><td>5</td><td>0.9372</td><td>0.8783</td><td>0.3506</td><td>0.3527</td><td>-3.441e-06</td><td>600.8nm-917.6nm</td></tr><tr><td>6</td><td>0.9944</td><td>0.9888</td><td>0.022</td><td>0.022</td><td>-8.670e-07</td><td>498.2nm-971.5nm</td></tr><tr><td>7</td><td>0.9491</td><td>0.9000</td><td>0.3164</td><td>0.3183</td><td>-1.476e-06</td><td>518.6nm-971.8nm</td></tr><tr><td>8</td><td>0.8873</td><td>0.7874</td><td>0.4635</td><td>0.4664</td><td>-5.429e-06</td><td>652.6nm-810.5nm</td></tr><tr><td>9</td><td>0.9068</td><td>0.8224</td><td>0.4237</td><td>0.4262</td><td>-2.172e-05</td><td>704.8nm-810.5nm</td></tr><tr><td>10</td><td>0.9371</td><td>0.8783</td><td>0.3506</td><td>0.3527</td><td>-3.441e-06</td><td>704.8nm-917.6nm</td></tr></tbody></table>

RMSEC*: Root means standard error of calibration.

SEC*: Standard error of calibration.

From the table, predicted model established by PLS in spectral band 498nm – 971nm has better effect, and has better characteristic parameter compare with the models in other bands. Therefore, the spectral band 498nm – 971nm is selected as effective band for establishing early-maturing pear’s effective acidity predicted model.

## 4.2 Effective Acidity's Calibration Model

The quantity of early-maturing pear samples for building effective acidity predicted model is 77. Partial least squares (PLS) in software of Unscrambler is applied in excellent spectral band from 498nm to 971nm. Through the internal cross validation, relevance between predicted effective acidity value and actual of calibration set is shown in fig.5.
<figure><img src="image_7.png" /><figcaption>Fig.5. The calibration model of Cuiguan pear's effective acidity</figcaption></figure>

By analyzing the figure, the predicted model of early-maturing pear's effective acidity is built under spectral band of 498nm-971nm. The correlation coefficient R between early-maturing pear's actual effective acidity and predicted effective acidity is 0.9944, the decisive coefficients R² is 0.989, standard error of calibration (SEC) is 0.022 and root means standard error of calibration (RMSEC) is 0.022 in calibration set.

## 4.3 Model Prediction

Another 68 early-maturing pears are samples in prediction set for predicting the stability of the model and the accuracy of the predicted results. The predicted results obtained from Unscrambler analysis software shown in fig.6.
<figure><img src="image_8.png" /><figcaption>Fig.6. The prediction model of Cuiguan pear's effective acidity</figcaption></figure>

68 early-maturing pears are samples in prediction set for detecting the accuracy of model (shown in fig.6). From the figure, the correlation coefficient R between early-maturing pear's actual effective acidity and predicted effective acidity is 0.923, the decisive coefficients R² is 0.835, standard error of calibration (SEC) is 0.022 and root means standard error of prediction (RMSEP) is 0.072 in prediction set.

**5 Conclusion**

Hyperspectral imaging system is used for detecting early-maturing pear's effective acidity which is based on hyperspectral imaging technology. Early-maturing pear's hyperspectral images are processed, the data from that are calculated by partial least squares (PLS) in the software Unscrambler for the study of detecting early-maturing pear's effective acidity.

The study indicates that, the wavelength from 498 nm to 971 nm is the best band to build early-maturing pear's effective acidity prediction model. The correlation coefficient R between early-maturing pear's actual effective acidity and predicted effective acidity is 0.9233 for prediction set; the root mean squared error of prediction samples (RMSEP) is 0.072 for prediction set. So the early-maturing pears' effective acidity prediction model has good prediction effect and good stability. Further studies are needed to evaluate the potential of using hyperspectral technology to detect more samples for improving the model's accuracy.
## Acknowledgement

This work was supported in part by the National Natural Science Foundation of China (No. 30760101), Jiangxi Provincial Department of Science and Technology (No. 2009BNB05705) and Jiangxi Provincial Department of Education (No.GGJ08513).

## References

[1] Shengtian Hong, Jun Qiao, Zuoxi Zhao, Zhen Li. "Nondestructive Detection of Xuehua Pear's Quality Based on Hyperspectral Imaging Technology". Journal of agricultural engineering. 2007, 23 (2):151-155.

[2] Qin J, Lu R. "Measurement of the Optical Properties of Apples Using Hyperspectral Diffuse Reflectance Imaging". ASAE Paper 2006, No.063037.St.Joseph, Mich.:ASAE.

[3] Juan Xing, Michael Ngadi, Ning Wang, Josse De Baerdemaeker. "Wavelength Selection for Surface Defects Detection on Tomatoes by Means of a Hyperspectral Imaging System". ASAE Paper 2006, No. 063018. St.Joseph, Mich.:ASAE.

[4] Lu, R. "Imaging Spectroscopy for Assessing Internal Quality of Apple Fruit". ASAE Paper 2003, No. 036012. St.Joseph, Mich.:ASAE.

[5] YING Yi-bin, LIU Yan-de. Chinese Journal of Zhejiang University [J].2003.29 (2):125.

[6] Xiaotong Wu. Food inspection technology [M]. Chemical industry press.2008:120.

[7] Tianzhen Du. "Main techniques for forest cultivation".Nanchang: Jiangxi science and technology publishing company.2005:158.

[8] Lu Leng, Ming Li, Xiaoqin Yang. "A Positioning Method of Calibrating Symbols Based on High Noise Background Image". Computer and modernization. 2008, (10):30-33.

[9] Tianchang Liu."The Detection of Residues Fruit and Surface Contaminant Based on Laser and Hyperspectral Technology".Nanchang: Jiangxi agricultural university.2008, 6.

[10] Lijun Li."The No Divided Space Color Image Retrieval Method Based on Thumbail and EMD".Journal of Liaoning petroleum chemical industry university.2009.29(1):73-75.

[11] Wanzhen Lu, Hongfu Yuan, Guangtong Xu. Modern technology of NIR analysis.Beijing: China petroleum chemical industry press, 2000:129-192.

[12] Fuller M P, Ritter G L, Draper C S. "Partial least squares quantitative analysis of infrared spectroscopic data". Part I: Algorithm implementation. 1988, 42(2):217-227.