# Design and Implementation of the Wheat Population Nutrition Detection System

Lei Shi, Qiguo Duan, Mingyang Xiong, Juanjuan Zhang, Lihong Song, Xinming Ma

► To cite this version:

Lei Shi, Qiguo Duan, Mingyang Xiong, Juanjuan Zhang, Lihong Song, et al. Design and Implementation of the Wheat Population Nutrition Detection System. 11th International Conference on Computer and Computing Technologies in Agriculture (CCTA), Aug 2017, Jilin, China. pp.185-193, 10.1007/978-3-030-06179-1_19. hal-02111541

HAL Id: hal-02111541

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

Submitted on 26 Apr 2019

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
# Design and Implementation of the Wheat Population Nutrition Detection System

Lei Shi¹, Qiguo Duan², Mingyang Xiong¹, Juanjuan Zhang¹, Lihong Song¹, and Xinming Ma¹(✉)

¹College of Information and Management Science, Henan Agricultural University/Collaborative Innovation Center of Henan Grain Crops, Zhengzhou 450002 China
sleicn@126.com, 2577341098@qq.com, zhangjuan_2003@126.com, 1565406188@qq.com, xinmingma@126.com

²Zhengzhou Commodity Exchange, Zhengzhou 450008, China
dqgcn@126.com

**Abstract.** It will impact the overall yield and quality of wheat if the malnutrition in the wheat growing season is not timely found. Thus, it is necessary to carry out timely nutrition detection of the wheat population in the field. Based on the techniques of Java web development and image processing, this paper constructs the estimation model of the field wheat population condition, designs and implements the automatic nutrition detection and analysis system based on field wheat population images. By using the received images of crop growth group, the system detects the nutrition condition of wheat population cultivated in the field quickly, and gives assisted fertilization decision to farmers for reducing the effect of wheat malnutrition on the yield and quality of wheat.

**Keywords:** Image processing · Wheat population · Nutrition detection · Intelligent diagnosis

## 1 Introduction

Wheat is one of the most important food crops in the world, and it is also an important grain crop in China. It is very important to improve the yield and quality of wheat for ensuring the safety of grain production in China. Current research on wheat automatic monitoring in China mainly focused on environmental testing [1, 2, 3], the seedlings diagnosis [4, 5], anomaly detection [6, 7, 8] and et al. The nutritional status of wheat is an important factor, and timely detection of the nutritional status of wheat at each growth stage is very significant for food production. Previous nutritional status of different growth stages of wheat were carried out extensive analysis experiments, studies have shown that chemical analysis in the laboratory can accurately measure the nutritional status of wheat, but this method would cause damage to the wheat plants, and the experimental results tend to be a lagging indicator and in a low detection efficiency. SPAD chlorophyll meter is more accurate. However, the plant leaf area determined by this method is limited, and it is difficult to apply in field conditions. The current identification mean is according to the experts in the field of the nutrition. This method is time-consuming and laborious, and is affected by personal experience. At present, it has been shown that the changes of crop leaf color can reflect the nutritional status of the plant leaves, and application of image processing technology in detecting nutrition status in the wheat growth has become a
hot research topic [9, 10].

In recent years, computer image processing technology has been widely used in the fields of industry and agriculture. For example, Zhang et al used the RGB and HSI color models to analyze the related characteristics of cucumber leaf nitrogen content, phosphorus ratio and water content, and realized the nutrient detection of greenhouse cucumber plants [11]. Jia et al used the image processing software applications such as color depth rice canopy and the corresponding elongation stage in rice crop nutrition analysis, and rice nitrogen nutrition rapid diagnostic method was established [12]. Wang et al applied image data processing exchange in the tobacco samples, established TMDHSV model to determine the maturity of tobacco [13]. Liu extracted image of rice plant morphological parameters and used image to achieve the detection of rice growing [14]. The above studies are based on the test sample obtained from an individual sample and crop ideal results, however the research of nutrition detection system in wheat field environment is rarely reported.

In this study, available wheat nutritional surveillance model is researched based on image processing technology, JavaEE technology platform is used to design and implement the field wheat population image analysis system for nutrition detection. The system aims to solve the problem that the modern farmers can not accurately detect the nutritional status of the wheat population in the field environment, and provide technical support for the future farmland real-time monitoring system.

# 2 The Overall System Design Framework

Wheat nutrition detection system uses the images. The acquired images of wheat are analyzed and processed, and the model features are extracted. The nutritional status and the corresponding solutions are given to the users through the human interface.

## 2.1 The Three-tier Architecture of the System

The system is mainly based on B/S (Browser/Server) structure. The three-tier structure, i.e., data layer, logic layer and presentation layer are used for the field wheat population image collection, storage and processing analysis, decision of the nutritional status of wheat populations [15]. The system structure is shown in Fig. 1.

<figure><img src="image_2.png" /></figure>
<caption>**Fig. 1.** System Architecture Diagram</caption>

(1)The data layer is located on the server and database side, which stores the core data of the system. It includes various user data, image feature model and the corresponding auxiliary fertilization program to provide image analysis support, decision-making knowledge warehouse. Thus, it plays the role to support the entire system.

(2)The logic layer is the main function and business logic of the core processing module. The main functions of the image processor and the decision support module are two key parts. The image processor receives image information from the interface. After the process of image normalization, image segmentation and image denoising, features are extracted based on model and the decisions are given.

(3)The presentation layer is the interface that the user interacts with the system. Wheat population nutrition diagnosis system is displayed to the user. The user can upload images in the presentation layer.

The system used the three-tier design to obtain good stability and scalability, so it is easy to maintain the system.

## 2.2 The Main Process Design System

In the wheat population nutrition detection system, users upload images to a Web server and select wheat varieties. The images is applied in normalization, segmentation, de-noising process by the image processor module, and then the image color characteristics of wheat colony is extracted. Then, the decision support module extracts the analysis results, these color features will be matched with the estimated model, and feature of those analysis are stored into the database. Finally, decision support system gives targeted fertilization views, and the user can access the system through the Web page to view the results of the analysis about the image and expert advice [16]. The specific processes are shown in Fig. 2.

<figure><img src="image_3.png" /></figure>
<caption>**Fig. 2.** Systems Business Flowchart</caption>

**2.3 System main function modules**

The function module of the system includes five parts, i.e., professional knowledge integration, intelligent diagnostics, user management, system management, help module. The function module of the system is shown in Fig. 3.

<figure><img src="image_4.png" /><figcaption>**Fig. 3.** System Functional Schematic</figcaption></figure>

Integration of professional knowledge. The content of professional knowledge integration includes image model specification and expert knowledge integration. This section uses a variety of image models and the corresponding nutritional status data to determine the nutritional status of the wheat group images.

Intelligent diagnosis. The intelligent diagnosis module is the core part of the system. This part combines the experts' experience and the research results of modern agriculture, and obtains the regularity between the wheat nutrition status and the group image parameters. The specific process is used to analyze the data and the appropriate expert advice is given.

User management. The users of the system are divided into three kinds of authority: ordinary users, expert users and administrator users. The administrator user is responsible for assigning the rights of the expert user and the ordinary user. The expert user can add or modify the expert knowledge base. Ordinary users can only query and browse the results.

# 3 Implementation and Application of System

## 3.1 Developing and Operating Environment

The system is based on B/S (Brower/Server) mode, and follows the JavaEE (Java Platform Enterprise Edition). The three-tier Web architecture is designed, and SSH2 (Struts2+Spring+Hibernate) is used to develop the framework. The MySQL is used as database. The open source Apache Tomcat 6.0 Server is used as WEB application server, and Java language is used for program development. Color image segmentation, normalization and morphological denoising are used to complete the image processing.

## 3.2 System Implementation

### 3.2.1 Image processing system working method
The role of the image processing system is to get the original image normalization, segmentation, denoising, and image model extraction [17]. This system mainly uses three image processing techniques to carry on the processing and to identify wheat population images.

(1) The image normalization. Wheat image processing system can be applied for images collected from the open field environment. In order to avoid the effects of light and shadow on the images, the images need to be normalized. Normalization methods are shown as equation (1), (2) [18].

$$ (1) \qquad \begin{cases} r = \frac{R}{R+G+B} \\ g = \frac{G}{R+G+B} \\ b = \frac{B}{R+G+B} \end{cases} $$

$$ (2) \qquad \begin{cases} r = \frac{R}{\sqrt{R^2 + G^2 + B^2}} \\ g = \frac{G}{\sqrt{R^2 + G^2 + B^2}} \\ b = \frac{B}{\sqrt{R^2 + G^2 + B^2}} \end{cases} $$

(2) Image segmentation. This system creates the image segmentation method based on pattern recognition technology. In order to build an unsupervised image segmentation model, this paper uses the RGB color model to create pattern recognition and classification rules by Mahalanobis distance [18]. Methods are shown as equation (3) [19].

$$ D(z, a) = \left[ (z - a)^T C^{-1} (z - a)^2 \right]^{\frac{1}{2}} \qquad (3) $$

(3) Morphological image Clean-up. After image segmentation of wheat population images, the result is a binary image. It contains a lot of noise formed by the image segmentation, the system uses the morphological image processing for the image denoising. The method is shown as equation (4), (5) [19].

$$ A \circ B = (A \ominus B) \oplus B \qquad (4) $$

$$ A \cdot B = (A \oplus B) \ominus B \qquad (5) $$

In this system, the image processing module is achieved in Matlab, and then is compiled and integrated into the system by Matlab Builder JA. The server deploys MCR (Matlab Compiler Runtime) to provide the runtime environment and dependencies.

### 3.2.2 Decision Support System

Decision support mechanism is associated with every component of the system. Decision support system contributes to provide users with the necessary data and information from the intelligent simulation expert, to help users identify the problems, to match the correct decision model, to query the information required by various users. The man-machine interface returns information to the user, provides the necessary support for the right decisions.
### 3.2.3 System Database

The function of the system database is to organize the large amount of estimating model parameters and knowledge of agricultural experts in a certain pattern. It provides knowledge storage, maintenance and data retrieval [20, 21]. The system adopts the top-down strategy and distributed database design strategy [22, 23].

## 3.3 System Application

The system interface is shown in Fig. 4. The user can upload the collected images of wheat population. The results returned by the system is shown in Fig. 5.

After comparing with the conclusions from multiple sets of image systems and suggestions from experts, it shows that the detection results and treatment advices of the wheat nutrition status are basically consistent with the expert suggestions. The nutritional status of the system meets the basic application requirements. The system is designed and developed reasonably, so it has simple interface operation, and has good stability and practicality.

<figure><img src="image_5.png" /><figcaption>Fig. 4. User interface of uploading images</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>Fig. 5. Interface of presenting System analysis results</figcaption></figure>

## 4 Conclusion

In this paper, wheat population nutrition detection system is designed and implemented by using Java web developing technology framework. The functions of the system have been tested and applied in the demonstration areas. The results show that the advantages
of systems are accurate identification and rapid diagnosis in nutrition detection of field population wheat. In the future work, the improvement of the model and pattern recognition methods are important research direction.

## Acknowledgement

This work is supported by the National Natural Science Foundation of the People's Republic of China (Grant No.31501225), the Key Scientific Research Projects of Colleges and Universities of Henan Province (Grant No.16A520055), the Modern Agriculture Industry Technology System in Henan Province (Grant No. S2010-01-G04), the National Key Research and Development Program of China (Grant No. 2016YFD0300609) and the China Scholarship Council (No.201709160005).

## References

1. Sun, Z.F., Cao, H.T., Li, H.L.: Based on GPRS and WEB achieve the greenhouse environment information collection system. Agricultural Engineering, 22(6): 131-134(2006)

2. Lv, Y.T., Du, K.M., Sun Z.F.: Greenhouse remote monitoring and diagnosis Management System Agriculture Network Information, (9): 14-16(2008)

3. Zhao, W., Sun, Z.F., Du, K.M.: GPRS and WEB-based greenhouse remote automatic control system design and implementation. Microcomputer Information, 26(11): 20-22, 11(2010)

4. Xia, Y., Sun, Z.H., Du, K.M.: Things wheat-based growth of the seedlings Diagnosis and Management System Design and Implementation. Agricultural Engineering, 29(5): 117-124 (2013)

5. Zhang, Q., Huang, W.J., Xu, T.Y.: Wheat growth of the seedlings remote monitoring and diagnostic system. Agricultural Engineering, 27(12): 115-119(2011)

6. Wang, Z.L., Wang, B., Wang, Z.J.: Farmland Soil Moisture Monitoring and Predicting System Design and Implementation. Agricultural Engineering, 22(2): 188-190(2006)

7. Zhou, Y., Gao, P.: Design and implementation of integrated crop pest forecasting system. Computer Applications, 34: 141-144(2014)

8. Zhu, X.F.: Weed Research in Support Vector Machine. Jiangsu University, 2010

9. Lin, K.Y., Xu, L.H., Wu, J.H.: Advances in computer vision technology in crop growth monitoring. Agricultural Engineering, 20(2):279-283(2004)

10.Ma, X.M.: Introduction to Agricultural Information. China Agricultural Science and Technology Press, 2009

11.Zhang, Y.N., Li, M.Z., Zhang, X.J.: Greenhouse cucumber leaves nutrition information based on computer vision technology. Agricultural Engineering, 21(8):102-105(2005)

12.Jia, L.L., Fan, M.S., Zhang, F.S.: Application of digital camera Rice Nitrogen Nutrition Diagnosis. Spectroscopy and Spectral Analysis, 29(8): 2176-2179(2009)

13.Wang, Q., Xi, L., Ren, Y.N.: Determination method based on leaf maturity computer vision technology. Agricultural Engineering, 28(4): 175-179(2012)

14.Liu, J.C.: Based on digital image processing technology to detect rice growing research. Nanjing Agricultural College, (2007)

15.Wang, J.: Three-tier B / S mode. Software GUIDE, 10(3): 30-31(2011)

16.Pang, X.D.: Based on digital image processing technology wheat nutritional status of remote detection system and implementation of. Henan Agricultural University, 2014

17.Chen, B.Q., Guo, X.M., Li, X.H.: Wheat disease diagnostic image processing algorithms. Based Agricultural Machinery, 40(12): 190-195(2009)

18.Shi, L., Pang, X.D., Yu, Y.: Unsupervised Segmentation of wheat color image based on Mahalanobis distance. Henan Agricultural University, 48(1): 87-90(2014)

19.Gonzalez, W., Ruan, Q.Q.: Digital image processing technology. Beijing: Electronic Industry Press, (2011)

20.Guo, L., Wang, F., Zhang, Y.: Crop remote-sensing monitoring management system design and implementation. Agricultural Engineering, 29(3): 132-138(2013)

21.Xi, L., Zhang, H., Guo, W.: Distributed free agricultural digital authentication system construction and realization. Agricultural Engineering, 26(8): 236-242(2010)

22. Shao, P.Y.: Distributed Database System and Its Application. 2nd Edition, Beijing: Science Press, 39-65(2005)

23.Li, S.J., Yang, H.J., Huang, Y.H., Zhou, Q.: Geo-spatial Big Data Storage Based on NoSQL Database. Geomatics and Information Science of Wuhan University, 42(2): 163-169(2017)
<figure><img src="image_7.png" /></figure>