# Image Recognition of Grape Downy Mildew and Grape Powdery Mildew Based on Support Vector Machine

Guanlin Li, Zhanhong Ma, Haiguang Wang

► To cite this version:

Guanlin Li, Zhanhong Ma, Haiguang Wang. Image Recognition of Grape Downy Mildew and Grape Powdery Mildew Based on Support Vector Machine. 5th Computer and Computing Technologies in Agriculture (CCTA), Oct 2011, Beijing, China. pp.151-162, 10.1007/978-3-642-27275-2_17. hal-01361130

HAL Id: hal-01361130

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

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>

Distributed under a Creative Commons Attribution 4.0 International License
Image Recognition of Grape Downy Mildew and Grape Powdery Mildew Based on Support Vector Machine

Guanlin Li, Zhanhong Ma, Haiguang Wang*

Department of Plant Pathology, China Agricultural University, Beijing 100193, China
*Corresponding author: Haiguang Wang, Address: Department of Plant Pathology, China Agricultural University, Beijing 100193, China, Tel.: +86-10-62733877, E-mail: wanghaiguang@cau.edu.cn

**Abstract.** In order to realize automatic disease diagnosis and provide related information for disease prediction and control timely and accurately, the identification and diagnosis of grape downy mildew and grape powdery mildew was conducted based on image recognition technologies. The method based on K-means clustering algorithm was used to implement unsupervised segmentation of the disease images. Fifty shape, color and texture features were extracted from the images of the diseases. Support vector machine (SVM) classifier for the diseases was designed based on thirty-one effective selected features. The training recognition rates of these two kinds of grape diseases were both 100%, and the testing recognition rates of grape downy mildew and grape powdery mildew were 90% and 93.33%, respectively. The recognition results using the SVMs with different kernels indicated that the SVM with linear kernel was the most suitable for image recognition of the diseases. This study provided an effective way for rapid and accurate identification and diagnosis of plant diseases, and also provided a basis and reference for further development of automatic diagnosis system for plant diseases.

**Keywords:** Grape downy mildew, grape powdery mildew, image recognition, support vector machine.

# 1 Introduction

Grape downy mildew caused by *Plasmopara uiticola* (Berk.dt Curtis) Berl. Et de Toni and grape powdery mildew caused by *Uncinula necator* (Schw.) Burr., are two kinds of common grape diseases in greenhouse [1]. They could cause serious damage via affecting grape quality and yield. The pathogens causing plant diseases are always difficult to be identified by using naked-eye observation method directly and disease symptoms are always influenced by various factors. So it is difficult to diagnose plant diseases accurately and effectively by using the traditional plant disease diagnosis method that is mainly dependent on naked-eye observation. Instead of using naked

* Corresponding author: Haiguang Wang, Address: Department of Plant Pathology, China Agricultural University, Beijing 100193, China, Tel.: +86-10-62733877, E-mail: wanghaiguang@cau.edu.cn
eyes, plant disease images could be processed using computer vision. This method could eliminate the image noise caused by environmental factors and image capture elements, and could diagnose the plant diseases by computer automatically. And then diagnosis results could be output directly. Thus the intuitive, practical, reliable and accurate information of plant disease diagnosis could be provided to the agricultural technicians and the farmers, and then could be used to guide plant disease control.

Real-time diagnosis of plant disease could be conducted quickly and accurately by using computer vision. Computer image recognition technologies have been widely used in plant disease studies. Image recognition of plant diseases is usually conducted based on shape features [2], [3], color features [4], [5], [6], [7], [8] or texture features [9] by using the methods, such as artificial neural network (ANN) [10], support vector machine (SVM) [6], [7], [11] and discriminant analysis [9], [12].

SVM is a new kind of pattern recognition algorithm based on VC dimension theory and structural risk minimization principle, which can solve the small sample, nonlinear problems, high dimension and local minimum points and other practical issues [13]. SVMs have been used for image recognition of plant diseases, such as corn leaf diseases [6], [14], cucumber leaf diseases [15] and cotton diseases [11]. However, the SVM based on multiple feature parameters has not yet been applied to image recognition of grape diseases.

In order to provide quick and reliable identification and diagnosis methods for grape downy mildew and grape powdery mildew in greenhouse, image recognition of these two kinds of grape diseases was conducted by using the method based on SVM and multiple feature parameters according to the properties of the disease images in this study.

# 2 Image acquisition and image processing

## 2.1 Disease Image Acquisition and Image Preprocessing

Disease images were acquired from grape leaves that were naturally infected by downy mildew and powdery mildew. In order to obtain clear vertical projection images of diseased single leaves, the diseased grape leaves which surfaces were clean were selected, and then disease images were taken by using common digital camera that was perpendicular to the leaves. Fifty images of grape downy mildew were obtained and thirty-five images of grape powdery mildew were obtained. The size of the original images obtained was 2592×1944 with format of jpg, 24 bitmap. To improve the operation speed of computer programs, the images were compressed from 2592×1944 to 800×600 in the same proportion without changing the image resolution using the nearest neighbor interpolation method. And then the plant disease images were denoised with median filter algorithm.
## 2.2 Disease Color Image Segmentation

The obtained grape disease images were composed of diseased regions and normal leaf regions. In order to extract effective features, disease color image segmentation was conducted to segment diseased regions from the images. It included binary segmentation and color segmentation. The former was to extract shape features from the segmented images and the latter was to extract color features and texture features from the segmented images. Currently, the methods used for plant disease image segmentation are edge detection method [16], fuzzy C-means clustering method [17], segmentation method based on statistical pattern recognition [18], etc. In this study, K-means clustering algorithm was used to segment plant disease images. This algorithm is an unsupervised real-time clustering algorithm proposed by Mac Queen [19]. The basic idea of this algorithm is to identify the regions where the different colors belong to based on the different colors in the image color space, so as to achieve the purpose of image segmentation. The implementation process of this segmentation method has been used in [20]. Using the K-means clustering algorithm, binary segmentation and color segmentation of the images of grape downy mildew and grape powdery mildew were conducted, and the results were as shown in Fig. 1. The results indicated that this method could segment the diseased regions from the color images of the diseases with good accuracy and robustness, and that the binary segmentation images and the color segmentation images of the grape diseases could be used for subsequent image feature extraction.

<figure><img src="image_2.png" /><figcaption>Fig.1. Results of image segmentation of grape downy mildew and grape powdery mildew.</figcaption></figure>
## 3 Disease Image Feature Extraction

Fifty features including four shape features (Table 1), twenty-one color features (Table 2) and twenty-five texture features (Table 3), were extracted from the segmented images of the diseases. These features were regarded as candidate features for subsequent classification and recognition of grape diseases. Among these features, color features and texture features were based on RGB color model and HSV color model.

<table><caption>**Table 1.** Four candidate shape features and their corresponding calculation formulas.</caption><thead><tr><th>Features</th><th>Number of measurements</th><th>Calculation formulas</th><th>Comments</th></tr></thead><tbody><tr><td>Area (S)</td><td>1</td><td>S = &sum;<sub>x=0</sub><sup>N</sup> f(x, y)<br>in which, N is lesion area and f(x,y)<br>is unit coordinate of lesion area.</td><td>S refers to the total number of pixels contained in the lesion areas in the segmented image.</td></tr><tr><td>Perimeter (L)</td><td>1</td><td>L = &sum;<sub>i=1</sub><sup>N</sup> &Delta;l<sub>i</sub><br>in which, N is lesion area, and &Delta;l<sub>i</sub><br>is unit coordinate at the edge of the<br>contour of the lesion area.</td><td>L refers to the total number of pixels at the edge of the contour of the lesion areas in the segmented image.</td></tr><tr><td>Circularity (C)</td><td>1</td><td>C = (4&pi;S)/L<sup>2</sup></td><td>C describing the extent of lesion area close to the circle is between 0 and 1.</td></tr><tr><td>Complexity (E)</td><td>1</td><td>E = L<sup>2</sup>/S</td><td>E describing the complexity and dispersion degree of lesion area is greater than 1.</td></tr></tbody></table>

## 4 Disease image recognition

Disease image recognition was conducted using the SVM classifier designed in MATLAB 7.6. Fifty images including thirty images of grape downy mildew and twenty images of grape powdery mildew which size was 800×600 were randomly chosen as the training set. The remaining thirty-five images including twenty images of grape downy mildew and fifteen images of grape powdery mildew were regarded as the testing set. After preprocessing, segmentation and feature extraction of each disease image, each feature, groups of features and all fifty features were used as inputs to the SVM classifier, respectively. And then the SVM used the features with significant contributions as input nodes to optimize the weights. In all cases, cross validation was used as the evaluation method to evaluate the contribution of each feature to the recognition effect of the SVM. The features with negative contributions to the recognition effect were removed. Finally, the optimal combination of the features was selected to achieve the image recognition of grape downy mildew and grape powdery mildew. Based on the optimal combination of the features, the SVMs with the four basic kernels, i.e. linear, polynomial, radial basis function (RBF) and
sigmoid, were used to recognize the disease images with fifty images as the training set and thirty-five images as the testing set, in order to determine which kernel function was the best suitable for image recognition of grape diseases.

<table><caption>**Table 2.** Twenty-one candidate color features and their corresponding calculation formulas.</caption><thead><tr><th>Features</th><th>Number of measurements</th><th>Calculation formulas</th><th>Comments</th></tr></thead><tbody><tr><td>Mean of gray values of R/G/B component</td><td>3</td><td>μ = <sup>1</sup>&frasl;<sub>G</sub> &sum;<sub>j=1</sub><sup>G</sup> f<sub>j</sub> p(f<sub>j</sub>)</td><td>This feature is the mean of color values in the diseased region in color segmentation image.</td></tr><tr><td>Variance of gray values of R/G/B component</td><td>3</td><td>σ<sup>2</sup> = <sup>1</sup>&frasl;<sub>G</sub> &sum;<sub>j=1</sub><sup>G</sup> (f<sub>j</sub> - μ)<sup>2</sup> p(f<sub>j</sub>)</td><td>This feature is the square difference of color values in the diseased region in color segmentation image.</td></tr><tr><td>Skewness of gray values of R/G/B component</td><td>3</td><td>ε<sup>3</sup> = <sup>1</sup>&frasl;<sub>G</sub> &sum;<sub>j=1</sub><sup>G</sup> (f<sub>j</sub> - μ)<sup>3</sup> p(f<sub>j</sub>)</td><td>This feature is the cubic difference of color values in the diseased region in color segmentation image.</td></tr><tr><td>Color ratio in RGB color model: r, g, b</td><td>3</td><td>r = R/(R + G + B)<br/>g = G/(R + G + B)<br/>b = B/(R + G + B)</td><td></td></tr><tr><td>Mean of gray values of H/S/V component</td><td>3</td><td>μ = <sup>1</sup>&frasl;<sub>G</sub> &sum;<sub>j=1</sub><sup>G</sup> f<sub>j</sub> p(f<sub>j</sub>)</td><td></td></tr><tr><td>Variance of gray values of H/S/V component</td><td>3</td><td>σ<sup>2</sup> = <sup>1</sup>&frasl;<sub>G</sub> &sum;<sub>j=1</sub><sup>G</sup> (f<sub>j</sub> - μ)<sup>2</sup> p(f<sub>j</sub>)</td><td></td></tr><tr><td>Skewness of gray values of H/S/V component</td><td>3</td><td>ε<sup>3</sup> = <sup>1</sup>&frasl;<sub>G</sub> &sum;<sub>j=1</sub><sup>G</sup> (f<sub>j</sub> - μ)<sup>3</sup> p(f<sub>j</sub>)</td><td></td></tr></tbody></table>
<table><caption>**Table 3.** Twenty-five candidate texture features and their corresponding calculation formulas.</caption><thead><tr><th>Features</th><th>Number of measurements</th><th>Calculation formulas</th><th>Comments</th></tr></thead><tbody><tr><td>Contrast in RGB color model</td><td>3</td><td>f<sub>1</sub> = &sum;<sub>n=0</sub><sup>P-1</sup> n<sup>2</sup> {&sum;<sub>i=0</sub><sup>P-1</sup> &sum;<sub>j=0</sub><sup>P-1</sup> p(i, j)},<br/>n = |i - j|<br/>in which, P is the total number of pixels contained in the diseased region, (i,j) is an arbitrary coordinate in the diseased region, and p(i,j) is color value of the point at (i,j).</td><td>Contrast is used to measure the clarity of texture.</td></tr><tr><td>Correlation in RGB color model</td><td>3</td><td>f<sub>2</sub> = &sum;<sub>i=0</sub><sup>P-1</sup> &sum;<sub>j=0</sub><sup>P-1</sup> (i, j)<sup>2</sup> p(i, j)<br/>in which, P, (i,j) and p(i,j) are the same as above.</td><td>Correlation is used to measure the degree of similarity of the elements of gray-level co-occurrence matrix (GLCM) at the row direction or the column direction.</td></tr><tr><td>Energy in RGB color model</td><td>3</td><td>f<sub>3</sub> = &sum;<sub>i=0</sub><sup>P-1</sup> &sum;<sub>j=0</sub><sup>P-1</sup> p<sup>2</sup>(i, j)<br/>in which, P, (i,j) and p(i,j) are the same as above.</td><td>Energy is used to measure the distribution uniformity of image gray.</td></tr><tr><td>Homogeneity in RGB color model</td><td>3</td><td>f<sub>4</sub> = <div style="display: inline-block; vertical-align: middle; text-align: center;"><div style="border-bottom: 1px solid black; padding: 0 5px;">&sum;<sub>i=0</sub><sup>P-1</sup> &sum;<sub>j=0</sub><sup>P-1</sup> p(i, j)</div><div style="padding: 0 5px;">1 + (i - j)<sup>2</sup></div></div><br/>in which, P, (i,j) and p(i,j) are the same as above.</td><td>Homogeneity is used to measure the texture consistency between each pixel in the lesion area.</td></tr><tr><td>Contrast in HSV color model</td><td>3</td><td>f<sub>1</sub> = &sum;<sub>n=0</sub><sup>P-1</sup> n<sup>2</sup> {&sum;<sub>i=0</sub><sup>P-1</sup> &sum;<sub>j=0</sub><sup>P-1</sup> p(i, j)},<br/>n = |i - j|<br/>in which, P is the total number of pixels contained in the diseased region, (i,j) is an arbitrary coordinate in the diseased region, and p(i,j) is color value of the point at (i,j).</td><td>Contrast is used to measure the clarity of texture.</td></tr><tr><td>Correlation in HSV color model</td><td>3</td><td>f<sub>2</sub> = &sum;<sub>i=0</sub><sup>P-1</sup> &sum;<sub>j=0</sub><sup>P-1</sup> (i, j)<sup>2</sup> p(i, j)<br/>in which, P, (i,j) and p(i,j) are the same as above.</td><td>Correlation is used to measure the degree of similarity of the elements of gray-level co-occurrence matrix (GLCM) at the row direction or the column direction.</td></tr><tr><td>Energy in HSV color model</td><td>3</td><td>f<sub>3</sub> = &sum;<sub>i=0</sub><sup>P-1</sup> &sum;<sub>j=0</sub><sup>P-1</sup> p<sup>2</sup>(i, j)<br/>in which, P, (i,j) and p(i,j) are the same as above.</td><td>Energy is used to measure the distribution uniformity of image gray.</td></tr><tr><td>Homogeneity in HSV color model</td><td>3</td><td>f<sub>4</sub> = <div style="display: inline-block; vertical-align: middle; text-align: center;"><div style="border-bottom: 1px solid black; padding: 0 5px;">&sum;<sub>i=0</sub><sup>P-1</sup> &sum;<sub>j=0</sub><sup>P-1</sup> p(i, j)</div><div style="padding: 0 5px;">1 + (i - j)<sup>2</sup></div></div><br/>in which, P is the total number of pixels contained in the diseased region, (i,j) is an arbitrary coordinate in the diseased region, and p(i,j) is color value of the point at (i,j).</td><td>Homogeneity is used to measure the texture consistency between each pixel in the lesion area.</td></tr><tr><td>4×4 binary fractal dimension (D)</td><td>1</td><td>D = lim<sub>r=0</sub> <div style="display: inline-block; vertical-align: middle; text-align: center;"><div style="border-bottom: 1px solid black; padding: 0 5px;">ln N<sub>r</sub>(I)</div><div style="padding: 0 5px;">ln r</div></div><br/>in which, I is the total number of pixels contained in the diseased region, r is an arbitrary pixel in the diseased region, and N<sub>r</sub> is box's size.</td><td>D is used to measure the fractal characteristics. Box's size is 4×4.</td></tr></tbody></table>
# 5 Results and Analysis

## 5.1 Optimization Results of the Features and Analysis

Based on the SVM classifier with the default RBF as kernel function in MATLAB 7.6, optimization of the features and image recognition of grape downy mildew and grape powdery mildew were conducted using the method described above. The results were as shown in Table 4. While each feature was used as input to SVM classifier, the obtained recognition rate was regarded as individual recognition rate. While group of features was used as inputs to SVM classifier, the obtained recognition rate was regarded as group recognition rate. While all fifty features were used as inputs to SVM classifier, the obtained recognition rate was regarded as total recognition rate. And while the optimal combination of the features was used as inputs to SVM classifier, the obtained recognition rate was regarded as best recognition rate.

The results indicated that every individual recognition rate was not exactly the same and that group recognition rate was different with each other. In the groups of color features, recognition effect of the SVM with the first-order moments of color or the second-order moments of color as inputs was better than that with the third-order moments of color as inputs. In the groups of texture features, recognition effect of the SVM with parameters of gray-level co-occurrence matrix (GLCM) in HSV color model as inputs was better than that with parameters of GLCM in RGB color model as inputs.

The results showed that there were eight features with no contributions to the recognition effect, eleven features with negative contributions to the recognition effect and thirty-one features with positive contributions to the recognition effect. Using these thirty-one features as inputs to SVM classifier, the best recognition effect was obtained. Based on these thirty-one features, optimal parameters were obtained after training using SVM classifier, i.e. $c=128$ and $g=0.0625$. The best recognition rate for the fifty images in the training set was 100%, and the best recognition rate for the thirty-five images in the testing set was 91.43%.

## 5.2 Results of Image Recognition Based on the SVMs with Different Kernel and Analysis

Based on the SVMs with different kernel functions, the images of grape downy mildew and grape powdery mildew were recognized using the selected thirty-one features as inputs and the comparison of corresponding recognition effects was conducted. The results were as shown in Table 5. The results showed that, for grape downy mildew and grape powdery mildew, the SVM with linear kernel had the best recognition effect and the average recognition rate of the training set and the testing set was 95.83%. The average recognition rate using the SVM with RBF kernel was 95.42% and that using the SVM with sigmoid kernel was 94.17%. The average recognition rate using the SVM with polynomial kernel was only 54.17%. Therefore, the SVM with linear kernel was the most suitable method for image recognition of
grape downy mildew and grape powdery mildew based on multiple feature parameters. Using the SVM with linear kernel, the recognition rates of these two kinds of grape diseases were both 100% for the training sets, and for the testing sets, the recognition rates of grape downy mildew and grape powdery mildew were 90% and 93.33%, respectively.

<table><caption>**Table 4.** Optimization results of candidate features for image recognition of grape downy mildew and grape powdery mildew.</caption><thead><tr><th>Group</th><th>Feature</th><th>Individual recognition rate/%</th><th>Group recognition rate/%</th><th>Total recognition rate/%</th><th>Cross validation</th></tr></thead><tbody><tr><td rowspan="4">Shape</td><td>Area</td><td>60.00/57.14</td><td>80.00/82.86</td><td>100/85.71</td><td>+</td></tr><tr><td>Perimeter</td><td>92.00/88.57</td><td></td><td></td><td>+</td></tr><tr><td>Circularity</td><td>82.00/88.57</td><td></td><td></td><td>+</td></tr><tr><td>Complexity</td><td>82.00/88.57</td><td></td><td></td><td>—</td></tr><tr><td rowspan="10">The first-order moments of color</td><td>Mean of gray values of R component</td><td>76.00/74.29</td><td>94.00/88.57</td><td></td><td>—</td></tr><tr><td>Mean of gray values of G component</td><td>78.00/71.43</td><td></td><td></td><td>+</td></tr><tr><td>Mean of gray values of B component</td><td>60.00/57.14</td><td></td><td></td><td>+</td></tr><tr><td>Color ratio of R component</td><td>90.00/57.14</td><td></td><td></td><td>+</td></tr><tr><td>Color ratio of G component</td><td>74.00/57.14</td><td></td><td></td><td>+</td></tr><tr><td>Color ratio of B component</td><td>60.00/57.14</td><td></td><td></td><td>+</td></tr><tr><td>Mean of gray values of H component</td><td>68.00/51.43</td><td></td><td></td><td>○</td></tr><tr><td>Mean of gray values of S component</td><td>88.00/60.00</td><td></td><td></td><td>+</td></tr><tr><td>Mean of gray values of V component</td><td>74.00/82.86</td><td></td><td></td><td>—</td></tr><tr><td rowspan="8">The second-order moments of color</td><td>Variance of gray values of R component</td><td>98.00/60.00</td><td>100/82.86</td><td></td><td>○</td></tr><tr><td>Variance of gray values of G component</td><td>74.00/85.71</td><td></td><td></td><td>+</td></tr><tr><td>Variance of gray values of B component</td><td>84.00/48.57</td><td></td><td></td><td>○</td></tr><tr><td>Variance of gray values of H component</td><td>68.00/54.29</td><td></td><td></td><td>+</td></tr><tr><td>Variance of gray values of S component</td><td>80.00/40.00</td><td></td><td></td><td>○</td></tr><tr><td>Variance of gray values of V component</td><td>84.00/48.57</td><td></td><td></td><td>+</td></tr><tr><td>Skewness of gray values of R component</td><td>74.00/77.14</td><td>88.00/80.00</td><td></td><td>—</td></tr><tr><td>Skewness of gray values of G component</td><td>76.00/80.00</td><td></td><td></td><td>+</td></tr><tr><td rowspan="3">The third-order moments of color</td><td>Skewness of gray values of B component</td><td>76.00/82.86</td><td></td><td></td><td>+</td></tr><tr><td>Skewness of gray values of H component</td><td>66.00/51.43</td><td></td><td></td><td>+</td></tr></tbody></table>
<table><thead><tr><th>Group</th><th>Feature</th><th>Individual recognition rate/%</th><th>Group recognition rate/%</th><th>Total recognition rate/%</th><th>Cross validation</th></tr></thead><tbody><tr><td></td><td>component</td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>Skewness of gray values of S component</td><td>60.00/57.14</td><td></td><td></td><td>+</td></tr><tr><td></td><td>Skewness of gray values of V component</td><td>88.00/40.00</td><td></td><td></td><td>+</td></tr><tr><td rowspan="10">Texture in RGB model</td><td>Contrast of R component</td><td>68.00/80.00</td><td>78.00/74.29</td><td></td><td>o</td></tr><tr><td>Correlation of R component</td><td>76.00/80.00</td><td></td><td></td><td>—</td></tr><tr><td>Energy of R component</td><td>80.00/54.29</td><td></td><td></td><td>o</td></tr><tr><td>Homogeneity of R component</td><td>74.00/77.14</td><td></td><td></td><td>o</td></tr><tr><td>Contrast of G component</td><td>74.00/71.43</td><td></td><td></td><td>+</td></tr><tr><td>Correlation of G component</td><td>74.00/80.00</td><td></td><td></td><td>—</td></tr><tr><td>Energy of G component</td><td>72.00/51.43</td><td></td><td></td><td>+</td></tr><tr><td>Homogeneity of G component</td><td>74.00/82.86</td><td></td><td></td><td>+</td></tr><tr><td>Contrast of B component</td><td>70.00/60.00</td><td></td><td></td><td>—</td></tr><tr><td>Correlation of B component</td><td>72.00/77.14</td><td></td><td></td><td>+</td></tr><tr><td rowspan="10">Texture in HSV model</td><td>Contrast of H component</td><td>78.00/82.86</td><td>92.00/85.71</td><td></td><td>+</td></tr><tr><td>Correlation of H component</td><td>74.00/62.86</td><td></td><td></td><td>+</td></tr><tr><td>Energy of H component</td><td>62.00/77.14</td><td></td><td></td><td>+</td></tr><tr><td>Homogeneity of H component</td><td>74.00/85.71</td><td></td><td></td><td>—</td></tr><tr><td>Contrast of S component</td><td>74.00/77.14</td><td></td><td></td><td>—</td></tr><tr><td>Correlation of S component</td><td>72.00/28.57</td><td></td><td></td><td>+</td></tr><tr><td>Energy of S component</td><td>68.00/80.00</td><td></td><td></td><td>—</td></tr><tr><td>Homogeneity of S component</td><td>72.00/85.71</td><td></td><td></td><td>o</td></tr><tr><td>Contrast of V component</td><td>68.00/80.00</td><td></td><td></td><td>+</td></tr><tr><td>Correlation of V component</td><td>76.00/80.00</td><td></td><td></td><td>—</td></tr><tr><td rowspan="2">Fractal dimension</td><td>Energy of V component</td><td>80.00/54.29</td><td></td><td></td><td>+</td></tr><tr><td>Homogeneity of V component</td><td>74.00/77.14</td><td></td><td></td><td>+</td></tr><tr><td></td><td>Fractal dimension</td><td>60.00/57.14</td><td>60.00/57.14</td><td></td><td>+</td></tr></tbody></table>

Note: The feature with positive contribution to the recognition effect was recorded as "+". The feature with no contribution to the recognition effect was recorded as "o". And the feature with negative contribution to the recognition effect was recorded as "-".

## 6 Conclusions

In this study, the binary segmentation and the color segmentation of diseased regions from the color images of grape downy mildew and grape powdery mildew were implemented using K-means clustering algorithm. This method could segment the diseased regions from the color images of the diseases with good accuracy and robustness. Using the SVM classifier with linear kernel based on the thirty-one features selected from the fifty shape, color and texture features extracted from the
images of grape downy mildew and grape powdery mildew, the best recognition rate for the training set including fifty disease images was 100% and the best recognition rate for the testing set including thirty-five disease images was 91.43%. The average recognition rate of the training set and the testing set was 95.83%. For these two kinds of grape diseases, the SVM classifier with linear kernel had the best and stable classification performance. This study provides an approach for rapid and accurate identification and diagnosis of grape downy mildew and grape powdery mildew under the greenhouse environment.

<table><caption>**Table 5.** Results of image recognition using the SVMs with different kernel functions.</caption><thead><tr><th rowspan="2">Kernel function</th><th rowspan="2">Disease</th><th colspan="2">Sample size</th><th colspan="2">Number of correct recognition</th><th colspan="2">Recognition rate/%</th></tr><tr><th>Training set</th><th>Testing set</th><th>Training set</th><th>Testing set</th><th>Training set</th><th>Testing set</th></tr></thead><tbody><tr><td rowspan="2">Linear function</td><td>Grape downy mildew</td><td>30</td><td>20</td><td>30</td><td>18</td><td>100</td><td>90</td></tr><tr><td>Grape powdery mildew</td><td>20</td><td>15</td><td>20</td><td>14</td><td>100</td><td>93.33</td></tr><tr><td rowspan="2">Polynomial function</td><td>Grape downy mildew</td><td>30</td><td>20</td><td>30</td><td>20</td><td>100</td><td>100</td></tr><tr><td>Grape powdery mildew</td><td>20</td><td>15</td><td>2</td><td>1</td><td>10</td><td>6.67</td></tr><tr><td rowspan="2">Radial basis function</td><td>Grape downy mildew</td><td>30</td><td>20</td><td>30</td><td>19</td><td>100</td><td>95</td></tr><tr><td>Grape powdery mildew</td><td>20</td><td>15</td><td>20</td><td>13</td><td>100</td><td>86.67</td></tr><tr><td rowspan="2">Sigmoid function</td><td>Grape downy mildew</td><td>30</td><td>20</td><td>30</td><td>19</td><td>100</td><td>95</td></tr><tr><td>Grape powdery mildew</td><td>20</td><td>15</td><td>19</td><td>13</td><td>95</td><td>86.67</td></tr></tbody></table>

# 7 Discussion

The symptoms are always different during the development of plant disease. And the symptoms on the upper and lower surfaces of a diseased leaf are not always the same. For example, the grape leaves infected with downy mildew shows chlorotic at the early stages, and the color changes of the lesions are not obvious, so it is difficult to carry out image processing. Without taking into account the symptoms at the early stages, this study only dealt with the images with typical symptoms on the upper surfaces of the diseased leaves.

Image acquisition is often influenced by many kinds of factors including ambient lighting conditions, the differences between samples collected, the differences between acquisition devices, etc. In recent years, the common low-resolution digital cameras and even cell phones are used to capture images of plant diseases during the research on image recognition of plant diseases [21]. The common digital cameras or cell phones that are more portable and widely used, are very important to promote practical application of image recognition technologies to the plant diseases.

The methods of plant disease image segmentation in many studies are based on gray differences. The method bases on K\_means clustering algorithm used in this study had good accuracy and robustness, and it could be an effective method to segment plant disease images. However, this method demands high image quality and needs computer to run a long time. Therefore, it is important to control the impact of complex environmental factors in the process of collecting disease images, and it is
better to compress the images in the same proportion without changing the image resolution in order to improve the running of computer programs.

The features of the lesions of different plant diseases are not the same. However, only one feature or no enough features were used in many studies on image recognition of plant diseases, and it is difficult to meet the needs of identification and diagnosis of different targets. It is necessary to utilize shape, color and texture features to image recognition of plant diseases. Fifty shape, color and texture features extracted from the images of grape downy mildew and grape powdery mildew were regarded as candidate features for image recognition in this study. Guan et al [22] extracted sixty-three parameters of shape, color and texture features from disease images for image recognition of rice diseases.

With the development of agricultural informatization, more and more agricultural technicians and farmers could get access to the internet and solve the problems in agricultural production using web-based expert systems. With the popularity of digital photography products, the acquisition of plant disease images is easier. Web-based systems for image recognition of plant diseases should be developed to meet the needs of the agricultural technicians and the farmers. When the users upload digital images of plant diseases to the systems, the names of plant diseases and related information could be provided for plant disease control.

**Acknowledgments.** The work was supported by National Key Technology R&D Program (2007BAD57B02).

**References**

1. Li, H.Y., Chen, Z.Y., Zhou, J.C., Zhang, J.X.: Occurrence and Damage of the Main Diseases of Grape in Greenhouse During Growth Period and Shelf Life (in Chinese). Modern Agricultural Sciences and Technology, 20, 187--189,191 (2010)

2. Sasaki, Y., Okamoto, T., Imou, K., Torii, T.: Automatic Diagnosis of Plant Disease-recognition Between Healthy and Diseased Leaf. Journal of the Japanese Society of Agricultural Machinery. 61, 119--126 (1999)

3. Zhao, Y.X., Wang K.R., Bai, Z.Y., Li, S.K., Xie, R.Z., Gao, S.J.: Research of Maize Leaf Disease Identifying System Based Image Recognition (in Chinese). Scientia Agricultura Sinica. 40, 698--703 (2007)

4. Sanyala, P., Patel, S.C.: Pattern Recognition Method to Detect Two Diseases in Rice Plants. Imaging Science Journal. 56, 319--325 (2008)

5. Cui, Y.L., Cheng, P.F., Dong, X.Z., Liu, Z.H., Wang, S.X.: Image Processing and Extracting Color Features of Greenhouse Diseased Leaf (in Chinese). Transactions of the CSAE. 21(supp.), 32--35 (2005)

6. Tian, Y.W., Zhang, C.H., Li C.H.: Study on Plant Disease Recognition Using Support Vector Machine and Chromaticity Moments (in Chinese). Transactions of the Chinese Society of Agricultural Machinery. 35, 95--98 (2004)

7. Tian, Y.W., Niu, Y.: Applied Research of Support Vector Machine on Recognition of Cucumber Disease (in Chinese). Journal of Agricultural Mechanization Research. 31, 36--39 (2009)

8. Cen, Z.X., Li, B.J., Shi, Y.X., Huang, H.Y., Liu, J., Liao, N.F., Feng, J.: Discrimination of Cucumber Anthracnose and Cucumber Brown Speck Based on Color Image Statistical Characteristics (in Chinese). Acta Horticulturae Sinica. 34, 1425--1430 (2007)
9. Pydipati, R., Burks, T.F., Lee, W.S.: Identification of Citrus Disease Using Color Texture Features and Discriminant Analysis. Computers and Electronics in Agriculture. 52, 49--59 (2006)

10. Pydipati, R., Burks, T.F., Lee, W.S.: Statistical and Neural Network Classifiers for Citrus Disease Detection Using Machine Vision. Transactions of the ASAE. 48, 2007--2014 (2005)

11. Camargo, A., Smith, J.S.: Image Pattern Classification for the Identification of Disease Causing Agents in Plants. Computers and Electronics in Agriculture. 66, 121--125 (2009)

12. Wang, N., Wang, K.R., Xie, R.Z., Lai, J.C., Ming, B., Li, S.K.: Maize Leaf Disease Identification Based on Fisher Discrimination Analysis. Scientia Agricultura Sinica. 42, 3836--3842 (2009)

13. Vapnik, V.N.: The Nature of Statistical Learning Theory. Springer-Verlag, New York (1995)

14. Song, K., Sun, X.Y., Ji, J.W.: Corn Leaf Disease Recognition Based on Support Vector Machine Method (in Chinese). Transactions of the CSAE. 23, 155--157 (2007)

15. Ren, D., Yu, H.Y., Wang, J.H.: Research on Plant Disease Recognition Based on Linear Combination of the Kernel Function Support Vector Machine (in Chinese). Journal of Agricultural Mechanization Research. 29, 41--43 (2007)

16. Zhang, J., Wang, S.X.: A Study on the Segmentation Method in Image Processing for Plant Disease of Greenhouse (in Chinese). Journal of Inner Mongolia Agricultural University. 28, 19--22 (2007)

17. Mao, H.P., Zhang, Y.C., Hu, B.: Segmentation of Crop Disease Leaf Images Using Fuzzy C-means Clustering Algorithm (in Chinese). Transactions of the CSAE. 24, 136--140 (2008)

18. Tian, Y.W., Li, C.H.: Color Image Segmentation Method Based on Statistical Pattern Recognition for Plant Disease Diagnose (in Chinese). Journal of Jilin University (Engineering and Technology Edition). 34, 291--293 (2003)

19. Selim, S.Z., Ismail, M.A.: K-means-type Algorithm: a Generalized Convergence Theorem and Characterization of Local Optimality. IEEE Transactions on Pattern Analysis and Machine Intelligence. 6, 81--87 (1984)

20. Li, G.L., Ma, Z.H., Huang, C., Chi, Y.W., Wang, H.G.: Segmentation of Color Images of Grape Diseases Using K-means Clustering Algorithm. Transactions of the CSAE. 26(Supp.2), 32--37 (2010)

21. Li, Z.R., He, D.J.: Research on Identify Technologies of Apple's Disease Based on Mobile Photograph Image Analysis (in Chinese). Computer Engineering and Design. 31, 3051--3053, 3095 (2010)

22. Guan, Z.X., Tang, J., Yang, B.J., Zhou, Y.F., Fan, D.Y., Yao, Q.: Study on Recognition Method of Rice Disease Based on Image (in Chinese). Chin. J. Rice Sci. 24, 497--502 (2010)