# Application of Machine Vision Technology in the Diagnosis of Maize Disease

Liying Cao, Xiaohui San, Yueling Zhao, Guifen Chen

► To cite this version:

Liying Cao, Xiaohui San, Yueling Zhao, Guifen Chen. Application of Machine Vision Technology in the Diagnosis of Maize Disease. 5th Computer and Computing Technologies in Agriculture (CCTA), Oct 2011, Beijing, China. pp.188-194, 10.1007/978-3-642-27275-2_20. hal-01361137

HAL Id: hal-01361137

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

Submitted on 6 Sep 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>
Application machine vision technology in the diagnosis
of maize disease

Liying Cao Xiaohui San Yueling Zhao Guifen Chen*

College of Information and Technology Science, Jilin Agricultural University, Changchun
130118.
{caoliying99, umbrella,zyueling,guifchen}@163.com

**Abstract:** In order to identify the rapid diagnosis of diseases of corn, to take timely preventive measures to improve the diagnosis of diseases of corn. Machine vision technology will be introduced to the diagnosis and identification of maize diseases, laboratory tests show that the uses of machine vision technology, disease recognition model for the disease sample collection process to identify, analyze findings and to get the real practical applications, consistent with the conclusions, to meet the agricultural production practical application. The technology for the diagnosis of diseases of corn provides a quick, inexpensive, non-destructive testing of possible means.

**Key words:** corn diseases; machine vision technology; mathematical morphology; neural network algorithm

# 1 Introduction

With the computer image processing technology, machine vision technology in agriculture more and more attractive. As in the agricultural production process, there are a lot of man-made and natural factors, if applied only to the traditional manual way, not only time consuming, laborious and supplies, and production efficiency is very low, to a large extent affect the production of precision. Machine vision technology is the human eye and brain function extension, instead of using machine vision systems or auxiliary manual operation is a trend in modern agriculture [1].

Huge collection of agricultural information work, the reality of the information, timeliness and accuracy of agricultural production and scientific research issues of common concern, maize growth and development process, often subject to various factors, leading to occurrence of disease[2]. Common corn disease diagnosis is mainly by virtue of experience in human judgments. How timely to quickly determine the exact disease to corn has been the field of computer technology for agricultural research is an important content. Corn disease control methods in order to achieve the automation and modernization of the urgent need for a way to simulate the human visual function and can exceed the performance of machine vision systems [3-4].

<footnote>*Corresponding author</footnote>
## 2 The experimental data

### 2.1 Experimental method of image data acquisition

The experimental design of a high 1 m, the length and width are 30 cm, black box, the box laying opaque, non-reflective black cloth, fixed a steady flow connected to the power of the ring light source, the light source stability, uniform to meet the needs of image acquisition, decrease the natural light conditions, brightness, color differences produced by the uncertainty and shadow noise, the acquisition results more clear, precise, easier to analyze. Devices and photographic equipment, according to meters, computer work together to build the image acquisition hardware platform. Foliar disease first collection of white flat on the cardboard, then use HP camera to shoot. Then use the scanner with a resolution set at 4800 dpi, scan and generate 256 gray values of digital images, sample images were normalized to 148 × 256 pixel size. Here the use of gray value image processing to meet the needs of both can also reduce the amount of information operations, to bring up a great deal of convenience.

<figure><img src="image_2.png" /><figcaption>Fig.1 Experimental images</figcaption></figure>

### 2.2 The characteristic analysis of the common corn plant diseases and insect pests

#### (1)Corn big spot disease

Main symptom: There is the shuttle type disease spot, generally the disease spot length is 5-10 cm, the breadth is 1-2 cm, sometimes the length can be 20 cm above, and breadth is over 3 cm.

#### (2)Corn small spot disease

Main symptom: There is the oval, circular type disease spot, size is 5-10(mm)×3-4(mm), the disease spot often connects with each other to a slice when disease spot crowded, becoming a bigger and withered spot.

#### (3)Corn gray spot disease
Main symptom: There is the rectangle disease spot, the disease spot size is: 2-4 (mm)×1-6 (mm).

(4) Corn Curvularia lunata (Wakker) Boed spot disease

Main symptom: The typical symptom is that it have circular or oval type disease spot with green and transparent, and center withered white, the edge is dark and brown, having a thin and yellow and dizzy turn around, the disease spot all of the general0.5-4 (mm) ×0.5-2 (mm), big of them can reach to 7 (mm) × 3(mm).

(5) The corn circle spot disease

Main symptom: There is the circular going to egg circular spot round a vein. size is 5~15(mm)×3~5(mm)。

(6) Corn brown spot disease

Main symptom: There is the Circular, oval spot, swell up the pimple type, the diameter is 1 mm or so, can greatly reach to 3-5 mm more on the main vein.

To sum up, this kind of disease usually concentrated on corn's leaf, and there is apparently different between the disease leaf and normal leaf, normal leaf present green or deeply green, but the ill leaf appear tan or dark brown spot, which their shape is circular, oval, rectangle and the shuttle type so on. So we withdraw the characteristic from both the color and the shape.

# 3 Experimental methods and experiment

## 3.1 Experimental Methods

The main experimental methods and processes shown in Fig, 2

<figure><img src="image_3.png" /><figcaption>Fig. 2 Experimental procedures</figcaption></figure>

## 3.2 Image Denoising

First, the background noise in the image analysis of information characteristics, type in VC ++ development platform, smoothing filter-based image denoising method of beans. Smoothing filter mask is used to determine the neighborhood of pixel values instead of the average gray value of each pixel image, this method can
significantly reduce the gray-scale image of the "sharp" change that "noise" [6]. Bean disease in this study applied the linear image smoothing method, select the 3 × 3 neighborhood template smoothing filter, it can effectively filter out noise and to maximize the retention of soybean clear image of the target image.

## 3.3 Objectives and background segmentation

In order to extract the characteristics of disease, disease need to target and background segmentation. Background separation method is based on the classic gray threshold segmentation method. It does this by setting the threshold, the pixel grayscale divided into several categories, in order to achieve image segmentation. To a gray image into binary image thresholding is the most simple form [7]. Set a grayscale image of f (x, y), first to certain criteria in f (x, y) to find a gray value of t as the threshold, the image is divided into two parts, that is greater than or equal to the threshold pixel value is set to 1, less than the threshold pixel value is set to 0 [8].

<figure><img src="image_4.png" /><figcaption>Fig. 3 histogram</figcaption></figure>

## 3.4 image segmentation

This study uses the iterative type threshold selection method. First choose a threshold value as the initial estimate, and then according to certain rules, continuously improve the estimated value until meet given standards [9] so far. In the iterative process, to select the right threshold value improvement measure. In general to meet two conditions: one is enough, the second is the rapid convergence in each iteration threshold value better than the last time new produce threshold. This paper will be divided into several images, areas in each area for the first for the biggest image segmentation grey value and minimum gray value, and then ask Zk Z1 and maximum and minimum gray value of the mean value T0 [10];

$$T^0 = \frac{Z_1 + Z_2}{2} \qquad (1)$$

According to mean the image into two parts A and B. Then A, B, respectively for the two parts of the Z0 average gray and the ZB,
$$Z_0 = \frac{\sum_{z(i,j)=T} z(i,j) * N(i,j)}{\sum_{z(i,j)=T^*} N(i,j)} \qquad (2)$$

$$Z_B = \frac{\sum_{z(i,j)=T^*} z(i,j) * N(i,j)}{\sum_{z(i,j)<T^*} N(i,j)} \qquad (3)$$

Type (3) z (I, j) is the image (I, j) point gray value, N (I, j) is (I, j) point, take the weight coefficient of general 1.0. According to the two parts average gray new threshold value calculation, j N (I) = 1.0.

$$T^{k+1} = \frac{Z_0 + Z_B}{2} \qquad (4)$$

Will the new threshold toshimi koitabashi + 1 and former a threshold, meet some comparison, toshimi koitabashi requirements then stop the iteration, or access to the circulation. Using vc ++, program set a cyclic number 60 times, so that when the history of not termination conditions met, could force terminated. Using this method adhesion effect is good after grain segmentation, as shown in Fig. 4 shows.

<figure><img src="image_5.png" /><figcaption>Fig.4 Binary image after segmentation</figcaption></figure>

## 3.5 Feature extraction

In fact we consider classification problem is in the feature space, always identify some characteristics of the object, whether physical or form, to the digital, and according to the principle of certain chosen, thus forming characteristics of a vector space, and used to represent a consider recognition object, such, can in the feature space to these vector classified discrimination. Feature extraction involve is very wide, identification of the object the parameters can be used as a measure of the way, table 1 below.

## 3.6 BP neural network based detection of lesions

This study needs to be fine-spot disease identification, which is the output vector to be determined with a link with the input vector process. Therefore, we as a
development platform based on Matlab using the function to build a three-newff BP neural network. One hidden layer neurons using tan-sigmoid transfer function type function taming, the last layer of the network is prelim linear neurons, so that the entire output of the network can take any real number. When building a neural network input into the number of neurons is 23, the output layer node number is 1.

<table><caption>Table 1 Each disease of the characteristic parameters</caption><thead><tr><td>No.</td><td>Area(pixel)</td><td>Perimeter(pixel)</td><td>Circular degree</td><td>The position of gravity (pixel)</td></tr></thead><tbody><tr><td>0</td><td>21718</td><td>928.82</td><td>0.1410</td><td>(215.320)</td></tr><tr><td>1</td><td>2308</td><td>274039</td><td>0.2149</td><td>(324.107)</td></tr><tr><td>2</td><td>9460</td><td>352.85</td><td>0.3256</td><td>(401.196)</td></tr><tr><td>3</td><td>4152</td><td>894.63</td><td>0.2658</td><td>(490.098)</td></tr><tr><td>4</td><td>8570</td><td>367.98</td><td>0.0948</td><td>(584.469)</td></tr></tbody></table>

Experimental procedure, we set the number of iterations to 150, learning rate 0.2, momentum factor of 0.9, the maximum number of 1000 training, the training accuracy of 1 × 10-6. We selected 640 samples for training, 160 samples for testing. After 720 times training, Figure 7 can be introduced by the mean square error of approximation error fitting convergence objective, to achieve the intended accuracy.

<figure><img src="image_6.png" /><figcaption>Fig.5 Training result</figcaption></figure>

Collected by a group of diseases of the data analysis of the sample picture identification, the system identified by the diseased sample and the actual disease situation, and so the comparison sample and found that not all diseases can be identified correctly identified the system, there are some error, the applicability of our results given by table 2 and comparative analysis of the actual situation.

At the different disease conditions discussed, the system identified the disease as the number of I1, the actual sample data with the disease represented by I2.
<table><caption>Table 2 Results comparison table</caption><thead><tr><th>The category of Corn plant diseases and insect pests</th><th>Identified to discovered the number of Plant diseases and insect pests I1</th><th>In the sample actual the number of plant diseases and insect pests I2</th><th>Recognition accuracy</th></tr></thead><tbody><tr><td>Big spot disease</td><td>29</td><td>34</td><td>85.3%</td></tr><tr><td>Small spot disease</td><td>35</td><td>32</td><td>92.3%</td></tr><tr><td>Gray spot disease</td><td>13</td><td>18</td><td>72.3%</td></tr><tr><td>The corn Curvularia lunata (Wakker)</td><td>14</td><td>16</td><td>87.5%</td></tr><tr><td>Boed spot disease</td><td>23</td><td>24</td><td>95.8%</td></tr><tr><td>Circle spot disease</td><td>23</td><td>22</td><td>95.7%</td></tr></tbody></table>

Identified by the experimental data of disease data and real data for comparison of disease, identify disease found in corn can be used in agricultural production, that we plant diseases in agriculture in the actual application is valid.

## 4 Conclusion

In this study, combined with image processing and neural network technology, using VC++ programming, select the smoothing filter, threshold segmentation algorithm on the acquisition of corn diseases of image demise, background segmentation, image segmentation, can be clearly and effectively isolate the more accurate morphological characteristics of corn disease parameters and parameters of color features. These parameters will be entered into the MATLAB development environment to construct the neural network training; can identify corn diseases, recognition rate of 88.2%. Experimental tests have shown that the use of machine vision technology, disease identification system for collecting samples of the disease process to identify, meet the practical application of agricultural production. Illustrates the system's effectiveness in the field of agricultural production.

## Acknowledgments

This work was funded by the Youth Foundation of Jilin Agricultural University under Grant No.2010041, 201136; the National High-Tech Research and Development Plan of China under Grants Nos.2006AA10A309 and 2006AA10Z245; the National Spark Program Nos. 2008GA661003. Changchun Technology Correspondent Project (2009245).
References:

1. Chen Bingqi, Sun Ming: The Visual C++ Practical Image Processing[M], Peking, Tsinghua University Press(2004)

2. Yuan Qiuqi, The Digital Image Processing[M], Peking, Alectronics Industrial Press, 2001.

3. Zhang Hongmei, Liu Suhua, The Corn Pest Image Identifies A Medium Mathematics To Statistics A Characteristic To Withdraw, The Computer Application And Software, 22,(3), pp. 126-127(2005)

4. Mingwu R, Jingyu Y, Han S. Tracing Boundary Contours in A Binary Image[J]. Image and Vision Computing, 20(2): pp.125-131(2002).

5. Sankur, B., and M. Sezgin. 2001. Image Thresholding Techniques: A Survey over Categories. Pattern Recognition (2001).

6. Zhou Changfa, Mastering In The Visual C++ Image programing, Peking, Electronics Industrial Press(2000).

7. Milan Sonka,Vaclav Hlavac,Roger Boyle: The Image Processing, Analysis, The And Machine Vision, Peking, People The Post And Tele Press(2002).

8. Wang Yao nan, Li Shutao, Mao Jianxu , The Calculator Image Processsing And Identification Technique, The Higher Education Press(2000).

9. Li Ming, ZhangChangLi, WangXiaoNan. Based on image processing technology of wheat form detection method [J]. Journal of northeast China agricultural university, 40(3):pp.111- 115(2009).

10. Cui Yi, The Image Processing And Analysis Mathematics Appearance Learn The Method And Application, Peking, Science Press(2000).