# A Growth Measuring Approach for Maize Based on Computer Vision

Chuanyu Wang, Boxiang Xiao, Xinyu Guo, Sheng Wu

► To cite this version:

Chuanyu Wang, Boxiang Xiao, Xinyu Guo, Sheng Wu. A Growth Measuring Approach for Maize Based on Computer Vision. 7th International Conference on Computer and Computing Technologies in Agriculture (CCTA), Sep 2013, Beijing, China. pp.183-189, 10.1007/978-3-642-54344-9_23. hal-01220913

HAL Id: hal-01220913

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

Submitted on 27 Oct 2015

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>
# A Growth Measuring Approach for Maize Based on Computer Vision

Chuanyu Wang<sup>1,2,a</sup>, Boxiang Xiao<sup>1,2,b,*</sup>, Xinyu Guo<sup>1,2,c</sup>, Sheng Wu<sup>1,2,d</sup>

¹ Beijing Research Center for Information Technology in Agriculture, Beijing 100097, China;

² National Engineering Research Center for Information Technology in Agriculture, Beijing 100097, China;

a wangcy@nercita.org.cn, b,* xiaobx@nercita.org.cn, c guoxy@nercita.org.cn, d wus@nercita.org.cn

**Abstract.** Growth measuring for plant is an important work both in agriculture and botany. Computer vision provides a convenient non-contact way for measurements in many fields. In this paper, a growth measuring approach for maize based on computer vision is presented. Firstly, a computer vision system for maize in field consisting of binocular camera on a path beam is constructed, and doubles of maize images are captured. Under the definition of average growth velocity of maize, we measure the growth of given maize plant by image processing and relevant calculations. Part of experimental results are given and discussed. Results and analysis show that the presented method is practicable for maize growth measuring in assigned time period. Finally, some limitations are pointed and more future works are addressed in computer vision-based measurement for plants.

**Keywords:** growth measuring; maize; computer vision

## 1 Introduction

In past decades, information technology was deeply used in agriculture, and it provided various tools and devices for promotion modern agricultural productions [1]. Crop growth status is an important target and parameter in many agricultural applications [2-4] such as precision management, crops breeding, production estimation and breed evaluation. Crop growth monitoring became a rising research hot issue in past years, and many researchers proposed various methods for different plants and targets. To detect the growth status and predict the yield of the crop, Cui and coworkers [5] developed a crop growth monitor measuring system about nitrogen content in the plant based on optical principle. Cheng and colleagues [6] presented a plant growth status analyzer based on photoelectric technology by analyzing the variation of chlorophyll content in leaves.

Computer vision-based method is an effective way for non-destructive measurement [[7-9], and it has peculiar advantages comparing to traditional approaches. Brosnan and Sun [8] presented a review on inspection and grading of agricultural and food products by computer vision systems. Yang and Tang [9] carried out research work on target visibility and measure precision analysis of stereo vision systems. Camera
calibration is the most important task in computer vision systems, and Tian et al [10] provided a camera calibration method based on OpenCV. Because of the prominent advantages, computer vision-based methods were widely used in many fields including agricultural applications.

In this paper, the authors presented a maize growth measuring approach for monitoring based on computer vision. By use of binocular stereo camera system, the flowchart of this work is shown in Fig. 1. The main operations include images capture based on computer vision and feature extraction under the definition of maize growth. Finally, the maize growth velocity is calculated by a serious of translations and the growth was measured. The paper is organized as follow: Section 2 introduces the computer vision system and images acquisition; Main growth measuring algorithm including growth definition, image processing and growth calculation was described in Section 3; Part of experimental results and discussions are given in Section 4; Finally, we summarize the whole work and address the future work in Section 5.

<figure><img src="image_2.png" /><figcaption>Fig. 1. The flowchart of this method</figcaption></figure>

## 2 Computer Vision System and Images Capture

To capture images for given maize plants in field, a computer vision system is constructed by use of binocular stereo camera. The frame work and components of the system is shown in Fig. 2. A path beam is supported by two trestles to form a frame, and the frame is placed on the planting line of maize. The length of the path beam in our device is 4m, and the height is 1.8m. The binocular stereo camera is fixed on a platform downwards which can glide along with the path beam. The camera is also linked to a portable computer, and it can be control by the computer to collect images.

<figure><img src="image_3.png" /><figcaption>Fig. 2. The computer vision system of this work</figcaption></figure>
In images acquisition, the device was placed upwards the maize objects. Firstly, the binocular stereo camera was calibrated by a black and white checkerboard mark, and the calibrations were respectively implemented on several prearranged positions which sited at the upper range of aiming maize plants. The experimental maize was planted in farm of Beijing Academy of Agriculture and Forest Science. We selected a maize colony including 4 lines and 8 rows as the images source. For a selected maize plant, two images with different positions were captured by the binocular stereo camera, and Fig. 3 shows an example of images relevant to the same maize plant.

<figure><img src="image_4.png" /><figcaption>Fig. 3. Captured images of maize plant</figcaption></figure>

# 3 Growth Measuring for Maize

In this work, maize is selected as the example plant, and we plant the experimental maize in farm. Firstly, we define the measurement of maize growth according to several relevant works. Secondly, the measuring process is implemented by steps of image processing and calculations. The details of the method are illustrated as follows.

## 3.1 Definition of Maize Growth

Measurement of plant growth is a public topic both in botany and agriculture, and there are many methods that how to measure growth rate of plants. For a typical plant, measuring parameters include fresh weight, dry weight, leaf surface area, and so on [11]. Furthermore, for a crop, calculable parameters include AGR (Absolute Growth Rate), RGR (Relative Growth Rate), LAR (Leaf Area Ratio), NAR (Net Assimilation Ratio), CGR (Crop Growth Rate) [12]. Here, we focus the measure method and system tool, thus we selected a simple definition of maize growth. We selected the same point in a same maize leaf with relevant static locations as reference for growth. The marks are set on selected maize leaf, as shown in Fig. 3. We consider the absolute displacement of marked points as the growth value.
## 3.2 Image Processing

Original images of plant are not directly available for feature extraction because they include lots of noise points. Several image processing operations are implemented in this step including median filter, plant division, binarization and feature points extraction. They are introduction in detail as follow.

Firstly, a median filter algorithm is used for noise data reducing. Most of noise data exist as isolated points which are sensitive to median filter. In operation, we select a 7×7 pixel rectangle centered at the processing pixel, and calculate the middle value of all pixels as the new value of the processing pixel. Circulating operation is implemented for all pixel of image, and the noise data is filtered.

Secondly, we extract the maize plant in the images by division algorithm which can distinguish green plant and soil background. Because of the difficulty of light control in field, the image quality is influenced by many reasons, and simple division approach is not suitable for this task. Here, we propose a decision surface algorithm to divide the plant object in image with complex background. The algorithm can be expressed by Eq. (1)

$$C = \frac{R^2}{V^2} + \frac{(1-G)^2}{(Y \times B + U)^2} \quad (1)$$

Where R, G, B are respectively the normalized value of component of Red, Green and Blue in the image. V, Y, U are parameters which can describe the surface shape. Here we appoint V = 0.85, Y = -0.37, U = 0.74, and relevant C can be calculated. If C < 1, we consider the pixel as the background, otherwise the plant.

Thirdly, binarization is implemented for images which are processed as gray mode. In experiments, we assigned a threshold value μ=25 for gray mode pixels. All pixels upper 25 are set 255, the others are set 0. Fig. 4 shows an example of a couple of maize images.

<figure><img src="image_5.png" /><figcaption>Fig. 4. Processed images by Binarization algorithm</figcaption></figure>

Finally, we extract the marks on maize leaf in binary images. We employ a rectangle 16×16 pixel for mark detection. For a rectangle, if all its border pixels are white with value 255 and there are both black with value 0 and white with value 255 in its inter
area, the rectangle is considered including a mark. If a rectangle includes a mark, its border is reduced. The algorithm recalculates the border pixel value, until all sides of the border include both black pixel and white pixel. The center of the rectangle is the center of the mark. By circulating operation on all pixels, all marks are collected and calculated.

## 3.3 Growth Calculations for Measuring

According to the mark positions in two images, we can calculate the three dimensional coordinate values x, y, z. The projection matrix P expressed in Eq. (2) can be constructed by use of plane calibrating algorithm. The matrix respectively defined for left camera and right camera when i = 1 or 2.

$$ \mathbf{P}_i = \begin{bmatrix} a_{11}^i & a_{12}^i & a_{13}^i & a_{14}^i \\ a_{21}^i & a_{22}^i & a_{23}^i & a_{24}^i \\ a_{31}^i & a_{32}^i & a_{33}^i & a_{34}^i \end{bmatrix} \quad i=1,2 \qquad (2) $$

We define the 3D value of the mark as M[x, y, z], m1(x1,y1) and m2(x2,y2) respectively the projected point of the mark on left and right images. The equation (3) is established as follow which can get the value M[x, y, z].

$$ \begin{bmatrix} (a_{11}^i - a_{31}^i)x_i & (a_{12}^i - a_{32}^i)x_i & (a_{13}^i - a_{33}^i)x_i \\ (a_{21}^i - a_{31}^i)y_i & (a_{22}^i - a_{32}^i)y_i & (a_{23}^i - a_{33}^i)y_i \end{bmatrix} \begin{bmatrix} X \\ Y \\ Z \end{bmatrix} = \begin{bmatrix} (x_i a_{14}^i) \\ (y_i a_{24}^i) \end{bmatrix} \qquad (3) $$

# 4 Results and Discussion

## 4.1 Experiments and part of results

To implement the measuring system, we carried out agricultural experiments in farm of Beijing Academy of Agriculture and Forest Science. A set of original images are collected by the system. To achieve image-based calculation and measurement, we developed a software system for the tool by use of C++ program language and OpenCV library.

In experiments, we measure the average growth velocity of selected maize leaf in different time periods. Table 1 gives part of measuring results of an example leaf in three time periods. The value of growth velocity is calculated by algorithm introduced in upper sections. Finally, the growth curve of maize leaf is generated by calculated parameters.
<table><caption>**Table 1.** Part of experimental results of measured maize growth</caption><thead><tr><td>Order</td><td>Measuring Time</td><td>Average Growth Velocity (cm/h)</td></tr></thead><tbody><tr><td>1</td><td>8:00</td><td>0.27</td></tr><tr><td>2</td><td>14:00</td><td>0.25</td></tr><tr><td>3</td><td>20:00</td><td>0.32</td></tr></tbody></table>

## 4.2 Discussions

Experimental results show that the presented method and system is effective for maize growth measuring. Compare with traditional measuring methods, computer-vision-based way is non-destructive, and the plant organs are protected in measuring. The process is fast and the efficient in experiments. The precision of measurement is satisfied for applications of agriculture such as plant form analysis, growth evaluations.

One of limitation of the method is that the binocular stereo camera device must be fixed on top of measuring maize plant. The limitation of position of measuring is an obvious problem. On the other hand, the device is also difficult for large range maize canopy measurement, and some necessary promotion should be made in future work.

Furthermore, a phenomenon was also discovered that the average growth velocity of maize leaf is larger in night than in daytime. It may be caused by photosynthesis restraint which should be studied deeply in ecophysiology.

## 5 Conclusions

To sum up, a growth measuring approach for maize based on computer vision was proposed in this paper. To achieve the measuring aim for maize growth, we design and install a computer vision-based system including binocular stereo camera. By definition of maize growth, the images were processed and growth velocity was calculated by a serious of transforms. Part of experimental results was given in sections and the approach was discussed subsequently. As a non-destructive measurement way, the presented method provided a technological way for dynamic maize growth measurement. It was also a technological reference for relevant applications in agriculture. In future, we focus on more automatic and robust monitor technology and systems for maize as well as other plants.

## Acknowledgment

This work is supported by National Natural Science Foundation of China (Grant No. 31171454); by Beijing Natural Science Foundation (Grant No. 4132028); by National Science & Technology Pillar Program (Grant No. 2012BAD35B01); by
Special Fund for S&T Innovation of Beijing Academy of Agriculture and Forestry Sciences (Grant No. KJCX201204007).

## References

1. Sidney Cox. Information technology: the global key to precision agriculture and sustainability. Computers and Electronics in Agriculture, 2002, 36, (2-3): 93-111.

2. N. Zhang, M. Wang, N. Wang. Precision agriculture-a worldwide overview. Computers and Electronics in Agriculture, 2002,36(1):113-132.

3. J.I. Ortiz-Monasterio, N. Palacios-Rojas, E. Meng, K. Pixley, R. Trethowan, R.J. Peña. Enhancing the mineral and vitamin content of wheat and maize through plant breeding. Journal of Cereal Science, 2007, 46(3): 293-307.

4. Y. Guo, Y. Ma, Z. Zhan, et al. Parameter Optimization and Field Validation of the Functional-Structural Model GREENLAB for Maize. Annals of Botany, 2006, 97: 217-230.

5. D. Cui, M. Li, Y. Zhu, et al. Monitoring Crop Growth Status Based on Optical Sensor. Proc. of First IFIP TC 12 International Conference on Computer and Computing Technologies in Agriculture(CCTA 2007),2007, 1397-1401.

6. X. Cheng, X. Shang, S. Teng. Design of Plant Growth Status Analyzer Based on Photoelectric Technology. Proc. of International Conference on Electronics and Optoelectronics (ICEOE), 2011, 426-429.

7. J. Noble. From inspection to process understanding and monitoring: a view on computer vision in manufacturing. Image and Vision Computing, 1995,13(3):197-214.

8. T. Brosnan, D. Sun. Inspection and grading of agricultural and food products by computer vision systems-a review. Computers and Electronics in Agriculture, 2002, 36(2-3):193-213.

9. H. Yang, G.Tang. Target Visibility and Measure Precision Analysis of Stereo Vision Systems. Systems Engineering and Electronics,2012,34(9):1889-1894.

10. K. Tian, A. Zhang, S. Wang. A Camera Calibration Method Based on OpenCV. Journal of Capital Normal University(Natural Science Edition), 2008, 29(2):14-17.

11. Judithavory, BR, TheBev, Kalyx. How to Measure Growth Rate of Plants. http://www.wikihow.com/Measure-Growth-Rate-of-Plants, 2013-6-18.

12. Paige Turner, eHow Contributor. How to Calculate Crop Growth. http://www.ehow.com/how_7459815Calculate-Crop-Growth.html, 2013-6-18.