# Correlations between Nitrogen Content and Multispectral Image of Greenhouse Cucumber Grown in Different Nitrogen Level

Wei Yang, Nick Sigrimis, Minzan Li, Hong Sun, Lihua Zheng

► To cite this version:

Wei Yang, Nick Sigrimis, Minzan Li, Hong Sun, Lihua Zheng. Correlations between Nitrogen Content and Multispectral Image of Greenhouse Cucumber Grown in Different Nitrogen Level. 6th Computer and Computing Technologies in Agriculture (CCTA), Oct 2012, Zhangjiajie, China. pp.456-463, 10.1007/978-3-642-36137-1_53. hal-01348263

HAL Id: hal-01348263

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

Submitted on 22 Jul 2016

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
Correlations between nitrogen content and
multispectral image of greenhouse cucumber grown
in different nitrogen level

Wei Yang, Nick Sigrimis, Minzan Li, Hong Sun, Lihua Zheng,

Key Laboratory of Modern Precision Agriculture System Integration
Research,Ministry of Education, China Agricultural University, Beijing, China, (Tel:
+86-10-62737924; e-mail: limz@cau.edu.cn).

**Abstract.** Short fruit cucumber was chosen as object. Different nutrition conditions were applied to cultivate plants.CCD camera with special filters was used to gather images. Correlation analysis results shows that four indexes, CNDVI, GNDVI, NDGI and NDVI, had much higher correlation with nitrogen content of cucumber leaves. LS-SVM algorithm was proposed to construct models between vegetation indexes and nitrogen content. The results verified that the method of CCD camera with filters to get multispectral images could be used for analyzing nitrogen content of cucumber leaves.

**Keywords:** CCD camera, vegetation indexes, multispectral image, LS-SVM

# 1 Introduction

The short fruit cucumber imported recent years is a kind of new variety of cucumber with better taste. It is favored by consumers and has enormous market potential. The short fruit cucumber can grow all year round using soilless culture in greenhouse, and the nitrogen content is the most important factor to cucumber's quality and quantity. The traditional measurement method of nitrogen content is destructive and time-consuming. When cucumber is in deficient nitrogen state, there will be long serials of changes in color, thickness and morphological characteristics of cucumber leaves. It will make light reflectance characteristic (reflectance intensity, color, texture and so on) change. Thus it is important to conduct research on nondestructive measurement of nitrogen content based on reflection spectra and multispectral images. Scholars both in China and abroad have carried out many researches on this subject based on multispectral images. However, complicated algorithm is the main problem of most multispectral cameras used for analysis of plant multispectral image, and besides high cost it also has very strict requirements of condition for taking photos and choosing object. In this paper, we tried to provide a new approach using a CCD camera with special filters to take
spectral images. The demands for the camera were easy to operate, low cost,
and wide application.

## 2 Material and methods

The research chose short fruit cucumber as object. In order to do research in different nutrition level, different nutrition conditions were applied to cultivate plants. Since soilless cultivation technology can make sure samples are not affected by other factors like soil, it was used in planting cucumbers. All cucumbers were divided into four groups in four different nitrogen content conditions, and each group had 10 cucumbers. The standard nitrogen content (N) was set as 0.067 kg/L. The first group was planted in double standard nitrogen content condition (2N); the second group was in standard nitrogen content condition (N); the third group was in half standard nitrogen content condition (0.5N); and the last group was in one fourth of standard nitrogen content condition (0.2N).

The research chose a normal CCD camera with filters to get multispectral images. The central wavelengths of the filters were 670 nm at red band and 780 nm at near infrared (NIR) band with much more information, low correlation between reflectance data, and good separability. The CCD/CMOS used by digital camera can induce infrared light. In order to avoid color shift produced by infrared ray, digital camera manufacturers often put an Infrared Cut Filter (ICF) in front of CCD to shut off infrared ray. When moving away ICF and adding special filters in front of camera, the lens can get multispectral images at specific wavelengths. Figure1 (a) (Figure2 (a)) and Figure3 (a) (Figure4 (a)) were the examples of the images taken by the camera.

## 3 Result and discussion

In order to get characteristic parameters from multispectral image, we needed to do preprocessing of images to decrease the influence of soil background and random factors as much as possible. The preprocessing of multispectral images mainly contained digital image denoising, image enhancement and image segmentation. Spectral information can be decomposing into background noise (normally belongs to low frequency), component information (frequency) and random noise (high frequency). After using Wavelet Packet Transform to spectra, every part of spectra could be totally separated in frequency domain, and then all noise could be easily filtered out.

Steps of the wavelet transform to image denoising were as following. The first was choosing suitable basis functions and decomposition layers (N) to decompose image. The second was quantifying high frequency coefficient and getting rid of high-frequency component of images. The final was, filtering images and eliminating noise according to multi-resolving coefficients of the
wavelet transform and reconstructing of wavelet. The 1-5 lay's image decomposing results were compared based on three basic functions such as bior3.1, coif3, db4. The three-lay image decomposing method based on bior3.1 was chosen to process cucumber multispectral images. Images from wavelet transform are showed in Fig. 1 (b), Fig. 2 (b), Fig. 3 (b) and Fig. 4 (b). From figures we found that the noise of the images had been effectively removed. After wavelet transform, Genetic Algorithm and watershed algorithm were used to separate leaves from background, respectively.

<figure><img src="image_2.png" /><figcaption>(a) Original near infrared image (b) Image with wavelet transform (c) Near infrared binary image</figcaption></figure>

<figure><img src="image_3.png" /><figcaption>(a) Original near infrared image (b) Image with wavelet transform (c) Near infrared binary image using watershed algorithm</figcaption></figure>

<caption>**Fig.2.** Near infrared binary image separated by watershed algorithm</caption>
<figure><img src="image_4.png" /><figcaption>Fig.3. Red binary image separated by Genetic Algorithm</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>Fig.4. Red binary image separated by watershed algorithm</figcaption></figure>

Figure1 shows the near infrared binary images separated by Genetic Algorithm. Fig. 1(a) are two original near infrared images, Fig. 1(b) are images with wavelet transform, Fig. 1(c) shows the near infrared binary image. Fig. 2 shows the near infrared binary image separated by watershed algorithm. Fig. 2 (a) shows two original near infrared images, Fig. 2(b) are images with wavelet transform Fig. 2(c) shows near infrared binary images. Comparing binary images with two different methods, similar good results were obtained. When processing images, any of these two methods was available. When using these
two methods on red images, we also obtained good results, and both of them could be used in image processing.

After filtering and segmentation to multispectral image, the average gray value of NIR, R and G wavelength were got from multispectral image of cucumber leaves. And then vegetation index could be calculated according to the reflectance of NIR, R and G of cucumber leaves. All vegetation indexes we used in research are shown in Table1.

<table><caption>**Table1.** Vegetation value based on multispectral image</caption><thead><tr><th>Name</th><th>Formula</th></tr></thead><tbody><tr><td>DVI</td><td>NIR<sub>IA</sub>-R<sub>IA</sub></td></tr><tr><td>GDVI</td><td>NIR<sub>IA</sub>-G<sub>IA</sub></td></tr><tr><td>RVI</td><td>NIR<sub>IA</sub>/R<sub>IA</sub></td></tr><tr><td>GRVI</td><td>NIR<sub>IA</sub>/G<sub>IA</sub></td></tr><tr><td>NDVI</td><td>(NIR<sub>IA</sub>-R<sub>IA</sub>)/(NIR<sub>IA</sub>+R<sub>IA</sub>)</td></tr><tr><td>SAVI</td><td>(NIR<sub>IA</sub>-R<sub>IA</sub>)/(NIR<sub>IA</sub>+R<sub>IA</sub>+L) (L = 0.5)</td></tr><tr><td>GNDVI</td><td>(NIR<sub>IA</sub>-G<sub>IA</sub>)/(NIR<sub>IA</sub>+G<sub>IA</sub>)</td></tr><tr><td>NDGI</td><td>(G<sub>IA</sub>-R<sub>IA</sub>)/(G<sub>IA</sub>+R<sub>IA</sub>)</td></tr><tr><td>CNDVI</td><td>(2NIR<sub>IA</sub>-R<sub>IA</sub>-G<sub>IA</sub>)/(NIR<sub>IA</sub>+R<sub>IA</sub>+G<sub>IA</sub>)</td></tr></tbody></table>

Analyzing correlation coefficient between nitrogen content of cucumber leaves and all kinds of vegetation index in different growth, the result shows in Table2.

<table><caption>**Table2.** the correlation analysis between nitrogen content and multispectral images of cucumber</caption><thead><tr><th rowspan="2">Index</th><th colspan="4">Teen</th><th colspan="4">Early flowering</th><th colspan="4">Fruit</th></tr><tr><th>2N</th><th>N</th><th>0.5N</th><th>0.2N</th><th>2N</th><th>N</th><th>0.5N</th><th>0.2N</th><th>2N</th><th>N</th><th>0.5N</th><th>0.2N</th></tr></thead><tbody><tr><td>NIR<sub>IA</sub></td><td>0.36</td><td>0.29</td><td>0.24</td><td>0.20</td><td>0.50</td><td>0.54</td><td>0.36</td><td>0.36</td><td>0.50</td><td>0.52</td><td>0.36</td><td>0.36</td></tr><tr><td>DVI</td><td>0.35</td><td>0.37</td><td>0.40</td><td>0.43</td><td>0.26</td><td>0.32</td><td>0.34</td><td>0.32</td><td>0.23</td><td>0.34</td><td>0.32</td><td>0.32</td></tr><tr><td>GDVI</td><td>0.07</td><td>0.05</td><td>0.05</td><td>0.05</td><td>0.14</td><td>0.10</td><td>0.06</td><td>0.05</td><td>0.15</td><td>0.12</td><td>0.06</td><td>0.06</td></tr><tr><td>RVI</td><td>0.26</td><td>0.24</td><td>0.24</td><td>0.24</td><td>0.32</td><td>0.30</td><td>0.25</td><td>0.25</td><td>0.33</td><td>0.32</td><td>0.28</td><td>0.28</td></tr><tr><td>GRVI</td><td>0.39</td><td>0.37</td><td>0.37</td><td>0.36</td><td>0.43</td><td>0.42</td><td>0.38</td><td>0.36</td><td>0.44</td><td>0.40</td><td>0.40</td><td>0.38</td></tr><tr><td>NDVI</td><td>0.56</td><td>0.54</td><td>0.54</td><td>0.54</td><td>0.59</td><td>0.49</td><td>0.55</td><td>0.56</td><td>0.52</td><td>0.53</td><td>0.56</td><td>0.49</td></tr><tr><td>SAVI</td><td>0.50</td><td>0.49</td><td>0.48</td><td>0.46</td><td>0.63</td><td>0.63</td><td>0.60</td><td>0.59</td><td>0.65</td><td>0.63</td><td>0.55</td><td>0.61</td></tr><tr><td>GNDVI</td><td>0.53</td><td>0.52</td><td>0.52</td><td>0.52</td><td>0.66</td><td>0.66</td><td>0.63</td><td>0.60</td><td>0.68</td><td>0.69</td><td>0.59</td><td>0.58</td></tr><tr><td>NDGI</td><td>0.65</td><td>0.65</td><td>0.64</td><td>0.64</td><td>0.68</td><td>0.68</td><td>0.66</td><td>0.65</td><td>0.69</td><td>0.65</td><td>0.64</td><td>0.63</td></tr></tbody></table>
<table><tr><td>CNDVI</td><td>0.67</td><td>0.66</td><td>0.66</td><td>0.65</td><td>0.70</td><td>0.70</td><td>0.67</td><td>0.65</td><td>0.72</td><td>0.73</td><td>0.70</td><td>0.68</td></tr></table>

The results from correlation analysis showed that the correlation between nitrogen content of cucumber leaves and spectral characteristics of the multispectral images was close in teen of cucumbers in different nitrogen levels. The correlation between CNDVI and nitrogen content was higher than others and reached to 0.67. All of them, the correlation coefficients between GNDVI, NDVI, NDVI and nitrogen content were all higher than 0.50. In early flowering stage, the correlations between nitrogen content of cucumber leaves and spectral characteristics of the multispectral images in different nitrogen levels were close. In fruit stage, the correlations between nitrogen content of cucumber leaves and spectral characteristics of the multispectral images in different nitrogen levels existed remarkable difference, and the correlation of 2N level and N level was higher than the correlation of 0.2N level. The results suggested that vegetation index based on multispectral image had been used to reflect nitrogen content of cucumbers in different growth. CNDVI, GNDVI, NDVI and NDVI these four indexes have better ability in nitrogen content detection than other indexes.

After image processing, reflectance of cucumber leaves could be calculated from image, and then vegetation index of cucumber leaves could be obtained from the calculation of reflectance of three wavelengths. The vegetation indexes were important land vegetation ecosystem status parameters and have been found wide application in agriculture, environment and ecological environment. According to chief content of the research, four indexes, including CNDVI, GNDVI, NDVI and NDV, were chosen, and then building the correlation model between these four vegetation indexes and nitrogen content of cucumber leaves. Least squares support vector machines (LS-SVM) model was proposed to construct model in the paper.

Support Vector Machine (SVM) was a new machine learning method based on Statistical Learning Theory (SLT). The data space was mapped to high dimension feature space with nonlinear Kernel function, so that it could be used to process Higher-Order Nonlinearity classification and regression. It could overcome the shortcomings of ANN BP Networks, like long training time, easy to fall in local optima and limited recognizing range. SVM was trained with LIBSVM algorithm and radial base kernel function. Radial base kernel function had fewer parameter and value limit, and reduced the complexity of model and improved training speed. Cross-validation was used to determine related parameter, and ample data were divided into training part and testing part.

In modeling, four kinds of vegetation indexes were chosen as input, and the nitrogen content of cucumber leaves was set as output. SVM was used to fit and forecast the nitrogen content of cucumber and built the correlation model. Fig. 5 shows the forecasting model of nitrogen content of cucumber leaves based on SVM, calibration $R^2$ was 0.92 and verification $R^2$ was 0.69. The result showed high correlation between vegetation index and nitrogen content of cucumber leaves. This method provided feasibility of collecting and testing growth information of cucumber.
<figure><img src="image_6.png" /><figcaption>(a) Prediction result of SVM model</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>(b) Verifying result of SVM model</figcaption></figure>

<caption>Fig.5. SVM prediction result of nitrogen content of cucumber leaves</caption>

4 Conclusions

The research chose a CCD camera with special filters as multispectral image gathering platform to gather images of cucumber leaves in different growth. After Wavelet De-noising and Image Segmentation, we got reflectance of cucumber leaves, and vegetation indexes of cucumber leave samples. Correlation analysis was made between vegetation indexes and nitrogen content of cucumber leaves, and the results shows that four indexes, CNDVI, GNDVI, NDGI and NDVI, had much higher correlation with nitrogen content of cucumber leaves. Least squares support vector machines (LS-SVM) algorithm was proposed to construct models between vegetation indexes and nitrogen content. The correlation coefficient between vegetation indexes and nitrogen content of cucumber leaves was 0.92, and verifying coefficient was 0.69. These results had ideal estimations, and the vegetation indexes were comprehensive reflection of nitrogen content of cucumber.
**Acknowledgments.** This study was supported by Chinese National Science and Technology Support Program (2011BAD21B01), Chinese National Programs for High Technology Research and Development Research Fund (2011AA100703, 2011AA100704), Doctoral Program of Higher Education of China (20110008130006, 20100008110030).

References

1. Fukagawa T., Noguchi N., Ishi K.: Paddy field application of monitoring system for crop status using multi-spectral imaging sensor. J. Journal of Hokkaido Branch of the Japanese Society of Agricultural Machinery. 37--42(2003)

2. Qin Xiao, Hen Lansun. Wavelet Transform and Its Application in Spectral Analysis. J. Spectroscopy and Spectral Analysis. 20(06), 892--897(2000)

3. Tian Gaoyou, Yuan Hongfu, Liu Huiying. The Application of Wavelet Transform in Near Infrared Spectroscopy. J. Spectroscopy and Spectral Analysis. 23(06), 1111--1114(2003)

4. Raymond E. E., Jongschaa. Run-time calibration of simulation models by integrating remote sensing estimates of leaf area index and canopy nitrogen. J. Europe Journal Agronomy. 24, 316--324(2006)

5. Tang Qiang, Li Shaokun, Wang Keru. Monitoring Canopy Nitrogen Status in Winter Wheat of Growth Anaphase with Hyper spectral Remote Sensing. J. Spectroscopy and Spectral Analysis. 11, 3061--3066(2010)

6. Richardson A. J., Wiegand C. L. Distinguishing vegetation from soil background information. J. Photogram Eng Remote Sensing. 43(12), 1541--1552(1977)

7. Li Hongjun, Zhang Lizhou, Chen Ximing. Image analysis method in application of digital image on diagnosing wheat nitrogen status. J. Chinese Journal of Eco-Agriculture. 1, 155--159(2001)

8. Guo Jianhua, Chen Liping, Yang Yueying. Effect of Nitrogen Nutrition Diagnosis on Cucumber in Greenhouse. J. Journal of Changjiang Vegetables. 22, 60--63(2010)

9. Li Yingxue, Zhu Yan, Cao Weixing. Characterizing Canopy Hyper spectral and Multispectral Reflectance under Different N-application Conditions in Wheat. J. Journal of Triticeae Crops. 2, 103--108(2006)

10. Li Junhua, Dong Zhixin, Zhu Jizheng. Present Application and Outlook for Method of Nitrogen Nutrition Diagnosis. J. Journal of Shihezi University (Natural Science). 7(1), 80--83(2003)

11. Wang Ke, Shen Zhangquan, Wang Renchao. Effects of Nitrogen Nutrition on the Spectral Reflectance Characteristics of Rice Leaf and Canopy. J. Journal of Zhejiang Agricultural University. 24(1), 93--97(1998)

12. Van Henten E J, Hemming J, van Tuijl B A J, et al. An autonomous robot for harvesting cucumbers in greenhouses. J. Autonomous Robots. 13(3), 241--258(2002).

13. Van Henten E J, Tuijl B J, Hoogaker G J, et al. An autonomous robot for de-leafing cucumber plants grown in a high-wire cultivation system. J. Bio stems Engineering. 94(3), 317--323(2006)

14. Van Henten E J, Dijk G, Kuypers M C, et al. IFAC modeling and control in agriculture. C. Horticulture and Post harvesting Processing. Wageningen, Netherlands. 39--44(2000)