<figure><img src="image_1.png" /></figure>

HAL
open science

# Development of a Recognition System for Alfalfa Leaf Diseases Based on Image Processing Technology

Feng Qin, Haiguang Wang

► To cite this version:

Feng Qin, Haiguang Wang. Development of a Recognition System for Alfalfa Leaf Diseases Based on Image Processing Technology. 10th International Conference on Computer and Computing Technologies in Agriculture (CCTA), Oct 2016, Dongying, China. pp.218-235, 10.1007/978-3-030-06155-5_22 hal-02179986

HAL Id: hal-02179986

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

Submitted on 12 Jul 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_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Development of a Recognition System for Alfalfa Leaf Diseases Based on Image Processing Technology

Feng Qin and Haiguang Wang (✉)

Department of Plant Pathology, China Agricultural University, Beijing 100193, China

✉ Corresponding author: Haiguang Wang, E-mail: wanghaiguang@cau.edu.cn, ORCID: 0000-0003-0796-725X

**Abstract.** To implement rapid and accurate identification and diagnosis of leaf diseases on alfalfa, an image-based recognition system was developed using the GUIDE platform under MATLAB software environment. Lesion image segmentation was implemented by using a segmentation method integrating with KMedian clustering algorithm and linear discriminant analysis. A multinomial logistic regression model for disease recognition was built based on 21 color, shape and texture features selected by using correlation-based feature selection method. Using this system, disease image reading, image segmentation and lesion image recognition can be done. This system can be applied to conduct image recognition of four common kinds of alfalfa leaf diseases including alfalfa Cercospora leaf spot, alfalfa rust, alfalfa common leaf spot and alfalfa Leptosphaerulina leaf spot. Some basis was provided for further development of image recognition system of various alfalfa diseases and for building a network-based automatic diagnosis system of alfalfa diseases.

**Keywords:** alfalfa leaf disease, image processing, image recognition, GUIDE platform, multinomial logistic regression analysis.

# 1 Introduction

As an important kind of cultivated herbage grasses, alfalfa is rich in various nutrients and is of great importance for the development of animal husbandry [1]. There are more than ten kinds of leaf diseases on alfalfa which are very common in alfalfa cultivation areas worldwide [2,3,4]. The diseases can impact on photosynthesis and respiration of alfalfa, resulting in decreased contents of some materials such as soluble sugar and crude protein, increased content of crude fiber, and yield reduction of hay and seeds [4]. Consequently, the diseases may play important roles in restricting the healthy and sustainable development of alfalfa industry. Generally, the identification and diagnosis of the leaf diseases on alfalfa mainly relies on naked-eye observation of agricultural experts or agricultural technicians. For this traditional method, the identification and diagnosis accuracy mainly depends on the experience of the experts or the technicians. This method is subjective, time-consuming and laborious. Especially, when there are many kinds of alfalfa diseases, it is difficult to achieve an accurate identification and diagnosis only by this artificial method. With the rapid development of information technology, artificial intelligence and network technology, image processing technology and image recognition technology have been widely applied in the identification, diagnosis and monitoring of plant diseases [5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]. The image-based recognition technology is a kind of rapid and nondestructive detection technology. It could accurately provide

✉ Corresponding author: Haiguang Wang, E-mail: wanghaiguang@cau.edu.cn, ORCID: 0000-0003-0796-725X.
disease diagnosis results in time. Therefore, it is conducive to timely disease forecast and early measure-making for preventing disease epidemics and reducing disease-caused losses.

It is feasible and practical to develop plant disease image processing systems for the realization of automatic diagnosis and severity evaluation of plant diseases. Zheng and Liu [20] developed an Android-based rice disease recognition system for image-based recognition of four kinds of leaf diseases on rice including rice blast caused by *Magnaporthe oryzae*, rice brown spot caused by *Bipolaris oryzae*, rice white tip disease caused by *Aphelenchoides besseyi* and rice bacterial leaf blight caused by *Xanthomonas oryzae* pv. *oryzae*. Using this Android-based recognition system, a rice leaf image can be collected, preprocessed and enhanced, and then 15 shape, color and texture features can be automatically extracted by using fuzzy C-means clustering algorithm and the dimension of the extracted features can be reduced by using principal component analysis method. The image recognition of the four rice leaf diseases can be finally conducted by using back propagation (BP) neural network. Xie et al. [10] developed a detection system for plant leaves damaged by pests based on extracted image features and spectral features. BP neural network was integrated into this system to implement quantificational evaluation of the damaged degrees of leaves. Using this system, image and spectral data of a piece of leaf damaged by pests can be automatically collected, and then can be processed. Finally, the damage degree can be evaluated and the corresponding result can be displayed directly. Li et al. [21] developed an image-based plant disease severity automatic grading system by using GUIDE (Graphical User Interface Development Environment) platform in MATLAB. Using this system, a digital image of a leaf can be input into the system, image segmentation can be conducted, and then the disease severity of this single leaf can be automatically assessed and graded. To automatically and accurately rate plant-level images of sugar beet infected with Cercospora leaf spot (CLS) in the real field, Atoum et al. [22] constructed a computer vision system called as CLS Rater. Firstly, CLS Rater extracts superpixel-based Histogram of Importances features. And then these features could be used for building an image-level regression model to conduct the evaluation of the rating for each plant image. To reduce the rating error, an enhanced CLS Rater was also constructed with a label enhancement module.

Cercospora leaf spot caused by *Cercospora medicaginis*, rust caused by *Uromyces striatus*, common leaf spot caused by *Pseudopeziza medicaginis* and Leptosphaerulina leaf spot caused by *Leptosphaerulina briosiana* are four common kinds of leaf diseases on alfalfa [4]. To realize the rapid identification and diagnosis of these leaf diseases on alfalfa, an image-based recognition system was developed by using the software MATLAB 8.2 (MathWorks, Natick, MA, USA) in this study. For building this recognition system, the segmentation of disease lesions on alfalfa leaf was conducted by using a segmentation method integrating with KMedian clustering algorithm and linear discriminant analysis, and a disease recognition model built by using multinomial logistic regression method [23] was applied for image-based recognition of the four leaf diseases on alfalfa. The recognition system is easy to operate for users and could be very helpful in rapid identification and diagnosis of the diseases. Furthermore, some basis was provided for constructing image recognition system of various alfalfa diseases and for building a network-based automatic diagnosis system of alfalfa diseases.

## 2 General Structure of the Image-Based Recognition System

General structure of the image recognition system for alfalfa leaf diseases was as shown in Fig. 1. The recognition system is composed of five main function modules, including image loading module, leaf region segmentation module, interested region cropping module, lesion image segmentation module and disease identification module. Using the image loading module, an image of alfalfa leaf disease can be input into the system for recognition. Using the leaf region segmentation module, a rectangle image containing only leaf area can be cut out from the original image automatically. Using the interested region cropping module, the region of interest (ROI) can be cut out artificially. Using the lesion image segmentation module, lesion segmentation of the ROI image can be implemented, and a binary image in which the white region is the lesion region can be obtained. Using the disease identification module, color, texture and shape features can be extracted automatically, and then based on these features, the
probability values that each lesion may belong to each of the four leaf diseases on alfalfa can be calculated via the multinomial logistic regression model embedded in the recognition system, finally, according to the values, the disease category that each lesion should belong to can be determined.

<figure><img src="image_3.png" /><figcaption>Fig. 1. The structural diagram of the image recognition system for alfalfa leaf diseases</figcaption></figure>

# 3 System Development Environment

The image recognition system for alfalfa leaf diseases was developed by using the software MATLAB 8.2 in the Windows environment. The graphical user interface (GUI) of the recognition system was designed with required controls using the GUIDE tool set in the MATLAB GUIDE platform. The algorithm operations and the related functions in the recognition system were programmed using the programming language MATLAB.

# 4 System Functions and Their Realization

## 4.1 The System Interface

According to the general structure of the recognition system described above, the main GUI of the recognition system was designed by using the MATLAB GUIDE platform and was as shown in Fig. 2. The GUI mainly includes three functional areas, i.e., algorithm operation area, display area of image processing result and output area of disease identification result. The main functions of the image recognition system for alfalfa leaf diseases including image loading, leaf region segmentation, interested region cropping, lesion image segmentation and disease identification, can be carried out in the algorithm operation area. The display area of image processing result is designed to display the image of alfalfa leaf disease loaded for recognition, leaf region segmentation result, interested region cropping result and lesion image segmentation result. The output area of disease identification result is used to show the lesion number in the ROI image or in the lesion image and the probability that each lesion may belong to each of the four kinds of alfalfa leaf diseases.
<figure><img src="image_4.png" /><figcaption>Fig. 2. The graphical user interface of the image recognition system for alfalfa leaf diseases</figcaption></figure>

## 4.2 Disease Image Loading

After entering the image recognition system for alfalfa leaf diseases, a pop-up dialog box can be displayed by clicking the “Image loading” button in the algorithm operation area on the GUI. Through the dialog box, an image of alfalfa leaf disease for recognition can be selected, and then be input into the recognition system and be displayed in the display area of image processing result (Fig. 3).

<figure><img src="image_5.png" /><figcaption>Fig. 3. Realization of disease image display using the image recognition system for alfalfa leaf diseases</figcaption></figure>

## 4.3 Leaf Region Segmentation

To display the disease image for recognition more clearly, to remove the white background in the image and to facilitate cutting out the ROI image from the original image, Otsu's method [24] was used to implement leaf region segmentation. In this process, firstly, the gray image of B component of the original diseased alfalfa leaf image was transferred into a binary image with “im2bw”, a MATLAB system function. The threshold of the function “im2bw” was determined automatically by the MATLAB system function “graythresh”. Secondly, black and white negative processing of the binary image was conducted resulting in the alfalfa leaf area turned into white and the background turned into black. Then hole filling processing was carried out in the alfalfa leaf area. The minimum enclosing rectangle was achieved by using a system function “regionprops” of the software MATLAB. Finally, according to the location information and the size of the minimum enclosing rectangle, leaf region segmentation was implemented with the MATLAB function system “imcrop”. By clicking the button “Leaf region segmentation” on the GUI of the recognition system, the rectangle image
containing only the alfalfa leaf area that is cut out from the original image automatically,
can be displayed in the display area of image processing result (Fig. 4).

<figure><img src="image_6.png" /><figcaption>**Fig. 4.** Realization of leaf region segmentation using the image recognition system for alfalfa leaf diseases</figcaption></figure>

4.4 Interested Region Cropping

To process and analyze a disease lesion image rapidly and pertinently, the ROI
containing disease lesions should be selected firstly. In this study, the MATLAB
system function “imcrop” was used to implement interested region cropping. A cross
cursor will appear on the GUI of the recognition system after clicking the “Interested
region cropping” button in the algorithm operation area. After placing the cursor on the
upper left corner of the ROI that will be cut out, holding down the left mouse button and
dragging to lower right, a rectangular box will appear on the GUI. As shown in Fig. 5,
the image in the rectangular box was the ROI that would be cut out. After determining
the size of the rectangular box, clicking the right mouse button should be done. Then a
pop-up dialog box will appear. After selecting the tab “Crop image” in the dialog box,
the ROI image will be displayed in the lower left side of the display area of image
processing result as shown in Fig. 6.

<figure><img src="image_7.png" /><figcaption>**Fig. 5.** Realization of ROI selection using the image recognition system for alfalfa leaf diseases</figcaption></figure>
<figure><img src="image_8.png" /><figcaption>Fig. 6. Realization of ROI display using the image recognition system for alfalfa leaf diseases</figcaption></figure>

## 4.5 Lesion Image Segmentation

**Lesion Image Segmentation Method.** In this disease image recognition system, a segmentation method integrating with KMedian clustering algorithm and linear discriminant analysis that was described in [25], was used to implement lesion segmentation of the ROI image. After the ROI image was converted from RGB color space into HSV color space and L*a*b* color space, respectively, a* component value and b* component value of each pixel in the image were treated as the color features of the pixel, and all the pixels in the image were clustered into ten categories with the KMedian clustering algorithm. Based on the mean of the H components of all pixels in each category, the pixels in the category with the minimum mean were selected and treated as the typical lesion pixels, and the ones in the seven categories with the largest means were selected and treated as the typical healthy pixels. Based on the training set composed of both the typical lesion pixels and the typical healthy pixels, a model for classification of all the pixels in the ROI image was built with the values of a* component and b* component of each pixel in the training set as the feature variables using linear discriminant analysis method.

To evaluate the integrated segmentation method applied in this recognition system, this method was used to segment the acquired disease images of alfalfa leaves in the MATLAB software environment before building the system. A total of 899 alfalfa leaf images (4256x2832 pixels per image) in jpg format with typical disease symptoms were taken with white background, including 456, 136, 76 and 231 images of Cercospora leaf spot, rust, common leaf spot and Leptosphaerulina leaf spot. A sub-image with one or multiple typical lesions was achieved from each original alfalfa leaf image by artificial cutting operation. Then each sub-image was segmented by using the integrated segmentation method described above. Manual lesion segmentation was also performed to determine the pixel category using the software Adobe Photoshop CC. Recall and Precision, two evaluation indices of the classification models built for pattern recognition [26], were used to evaluate the segmentation effects of the integrated segmentation method. In this study, they were calculated using the formulas: $Recall=N_1/N_2$ and $Precision=N_1/N_3$, where N₁ is the number of lesion pixels classified correctly by using the segmentation method integrated with KMedian clustering algorithm and linear discriminant analysis, N₂ is the number of lesion pixels classified by using the manual lesion segmentation method with Adobe Photoshop CC, and N₃ is the number of all the pixels in an obtained sub-image. For the image dataset composed of the sub-images of the four kinds of alfalfa leaf diseases, the means of Recalls and Precisions were 0.8294 and 0.9249, respectively. This indicated that the segmentation effects of the integrated segmentation method applied in this recognition system were satisfactory.

**Implementation of Lesion Image Segmentation Using the Recognition System.** By clicking the “Lesion image segmentation” button in the algorithm operation area on the GUI of the recognition system, lesion segmentation of the ROI image can be implemented. A binary image in which the white area is the lesion location can be
obtained. The binary image can be displayed in the display area of image processing result on the GUI of the recognition system (Fig. 7). As shown in Fig. 7, there were two lesions in the ROI, and these two lesions were both well segmented.

<figure><img src="image_9.png" /><figcaption>Fig. 7. Lesion segmentation implemented using the image recognition system for alfalfa leaf diseases</figcaption></figure>

## 4.6 Disease Image Identification

**Extraction of Features from Lesion Images.** Before building the disease image recognition system, the 899 images of the four kinds of alfalfa leaf diseases described above were segmented using the integrated segmentation method applied in the recognition system, and 1651 typical lesion images (each contained only one lesion) were achieved for further feature extraction, feature selection and disease image recognition. To build alfalfa leaf disease recognition model, the obtained typical lesion images were divided into the training set and the testing set with a ratio of 2:1. The training set included 351, 267, 111 and 371 typical lesion images of alfalfa Cercospora leaf spot, alfalfa rust, alfalfa common leaf spot and alfalfa Leptosphaerulina leaf spot. The remaining 551 typical lesion images composed the testing set, including 177, 133, 56 and 185 typical lesion images of alfalfa Cercospora leaf spot, alfalfa rust, alfalfa common leaf spot and alfalfa Leptosphaerulina leaf spot.

To fully mine the feature information from the lesion images for disease recognition, a total of 129 color, shape and texture features were extracted from each of the obtained typical lesion images of the four kinds of alfalfa leaf diseases. The first, second and third moments of the gray images of the nine components in RGB, HSV and L*a*b* color spaces and three color ratios of R, G and B components were extracted, and 30 color features were totally achieved. The nine extracted shape features included circularity of disease lesion, complexity of disease lesion and seven Hu invariant moments of the binary lesion image. The 90 extracted texture features included Hu invariant moments (63 features) and contrast, energy and homogeneity of the gray images of the nine components in RGB, HSV and L*a*b* color spaces.

The calculation formulas of the first moment, the second moment and the third moment were described in [27]. The color ratio r of R component, the color ratio g of G component, the color ratio b of B component, circularity and complexity could be calculated using the formulas as described in [8]. After calculation using the formulas as described in [28], the values of Hu invariant moments were obtained. According to the formulas described in [29], contrast, energy and homogeneity were calculated.

Considering the great differences between the values of the different features may affect the recognition accuracy of the built model for identification of the four kinds of alfalfa leaf diseases, the values of the extracted features were normalized to the range of 0-1 by using a formula as follow:

$$X_{\text{norm}}^{i} = (X^{i} - X_{\text{min}}^{i})/(X_{\text{max}}^{i} - X_{\text{min}}^{i}) \quad (1)$$

where $X_{\text{norm}}^i$ is the normalized value of the ith feature, $X^i$ is the value of the ith feature before normalization, and $X_{\text{min}}^i$ and $X_{\text{max}}^i$ are the minimum and maximum values of
the feature before normalization.

In the process of image-based plant disease recognition, excessive features may increase the complexity of image recognition and reduce the accuracy and applicability of recognition method. Therefore, it is necessary to effectively screen the extracted features. Before building the image recognition system for alfalfa leaf diseases, feature selection was performed using the correlation-based feature selection (CFS) method [30] after the feature normalization was conducted based on the training set in this study. The aim of the CFS method is to achieve the optimal feature subset. To achieve this aim, it is required that the correlation between the optimal feature subset and dependent variable is as large as possible and that the correlations among the features in the optimal feature subset are as small as possible. Using the open source software Weka (Waikato Environment for Knowledge Analysis) 3.7 developed by The University of Waikato in Hamilton, New Zealand, the CFS method was implemented in this present study.

Using the CFS method, a total of 21 features including ten color features, three shape features and eight texture features were selected. The selected color features included the first and second moments of the gray image of *G* component, the first moment of the gray image of *B* component, color ratio *r* of *R* component and color ratio *g* of *G* component in RGB color space, the first and second moments of the gray image of *H* component, the first moment of the gray image of *V* component and the third moment of the gray image of *S* component in HSV color space, and the first moment of the gray image of *b*<sup>*</sup> component in L<sup>*</sup>a<sup>*</sup>b<sup>*</sup> color space. The selected shape features were circularity, complexity and the first Hu invariant moment of the binary lesion image. The selected texture features included energy of the gray image of *B* component in RGB color space, the first Hu invariant moment of the gray image of *H* component, the first Hu invariant moment, energy and homogeneity of the gray image of *S* component in HSV color space, and the first Hu invariant moment and contrast of the gray image of *a*<sup>*</sup> component and homogeneity of the gray image of L<sup>*</sup> component in L<sup>*</sup>a<sup>*</sup>b<sup>*</sup> color space. The automatic extraction and normalization of these 21 selected features can be realized in the alfalfa leaf disease recognition system developed in this study.

**Building of Alfalfa Leaf Disease Recognition Model.** In the image recognition system for alfalfa leaf diseases developed in this present study, a multinomial logistic regression model for alfalfa leaf disease recognition was built based on the 21 selected features described above. Multinomial logistic regression analysis can be used to solve multi-classification problems, and the probability that a sample belongs to a category can be given [23]. Before building the image recognition system, the multinomial logistic regression model was built based on the training set which was composed of 1100 typical lesion images described above. To avoid the impact on the stability of the model that may be caused by over-high dimensions of the features, the coefficients in the model were determined by using the ridge estimator method. The multinomial logistic regression model was built by using the software Weka 3.7. According to the average recognition accuracy of the model on the training set obtained by running the complete 10-fold cross validations, the ridge value was determined, and the other parameters of the model used the default values.

To determine the optimal value of ridge, a comparison of the effects of different ridge values with the step equal to 0.002 in the range of 0-0.050 on modeling was carried out. The results were as shown in Fig. 8. For the different ridge values, the average recognition accuracies obtained by running the complete 10-fold cross validations based on the training set, were all approximately 88%. As the ridge value was 0.014, the average recognition accuracy reached the maximum value of 88.35%. Therefore, the ridge value was set as 0.014 when the multinomial logistic regression model for alfalfa leaf disease image recognition was built in this study. For this multinomial logistic regression model, the recognition accuracy of 90.45% for the training set was achieved and the recognition accuracy of the testing set composed of 551 typical lesion images described above was 90.20%. The results indicated that the satisfactory recognition effects could be achieved using this multinomial logistic regression model and that the model could be used for image-based recognition of the four kinds of alfalfa leaf diseases. This multinomial logistic regression model was packaged into the image recognition system for alfalfa leaf diseases developed in this study.
<figure><img src="image_10.png" /><figcaption>**Fig. 8.** The recognition results of the multinomial logistic regression models with different values of ridge</figcaption></figure>

**Implementation of Alfalfa Leaf Disease Identification Using the Recognition System.** By clicking the “Disease identification” button in the algorithm operation area on the GUI of the recognition system, feature extraction, feature normalization and disease recognition based on the multinomial logistic regression model can be automatically implemented and the recognition results can be output. Firstly, the number of connected components (i.e. lesion areas) in the image after lesion segmentation is calculated and is regarded as the number of lesions in the lesion image or in the ROI image. Secondly, 21 features of each lesion in the lesion image are extracted and then are normalized. Thirdly, the probability values that each lesion may belong to each of the four alfalfa leaf diseases are calculated via the multinomial logistic regression model embedded in the recognition system. Finally, the total number of the lesions in the lesion image is displayed in the output area of disease identification result on the GUI of the recognition system, and the display of the probability values that each lesion may belong to each of the four alfalfa leaf diseases in a column chart is implemented by using the MATLAB system function “bar”. As shown in Fig. 9, the lesion image or the ROI image contained two lesions. As shown in the column chart in Fig. 9, the probability values that the two lesions may belong to alfalfa Cercospora leaf spot were the maximum and were both very close to 1, so it could be inferred that these two lesions were the lesions of alfalfa Cercospora leaf spot. These results were consistent with the diagnosis results of experts.

Using the image recognition system for alfalfa leaf diseases developed in this study, the recognition results of rust, common leaf spot and Leptosphaerulina leaf spot on alfalfa were as shown in Fig. 10, Fig. 11 and Fig. 12, respectively.

<figure><img src="image_11.png" /><figcaption>**Fig. 9.** Identification results of alfalfa Cercospora leaf spot using the developed image recognition system for alfalfa leaf diseases</figcaption></figure>
<figure><img src="image_12.png" /><figcaption>**Fig. 10.** Identification results of alfalfa rust using the developed image recognition system for alfalfa leaf diseases</figcaption></figure>

<figure><img src="image_13.png" /><figcaption>**Fig. 11.** Identification results of alfalfa common leaf spot using the developed image recognition system for alfalfa leaf diseases</figcaption></figure>

<figure><img src="image_14.png" /><figcaption>**Fig. 12.** Identification results of alfalfa Leptosphaerulina leaf spot using the developed image recognition system for alfalfa leaf diseases</figcaption></figure>
Recognition System

An executable program of the developed image recognition system for alfalfa leaf diseases was built by using MATLAB Compiler. It is convenient for users to utilize the recognition system to recognize, diagnose and identify the four kinds of alfalfa leaf diseases based on acquired digital images.

6 Conclusions and Discussion

An image recognition system for alfalfa leaf diseases was developed using MATLAB GUIDE platform in this study. Using this recognition system, the image-based recognition of the four kinds of alfalfa leaf diseases including alfalfa Cercospora leaf spot, alfalfa rust, alfalfa common leaf spot and alfalfa Leptosphaerulina leaf spot was implemented. Image processing operations on the images of alfalfa leaf diseases taken with white background could be conducted using this recognition system. The redundant white background could be removed. The ROI could be cut out artificially. Lesion image segmentation, feature extraction and feature normalization could be implemented. The number of lesions in the ROI image or in the lesion image could be detected. The probability values that each lesion may belong to each of the four kinds of alfalfa leaf diseases could be calculated and displayed. These values could be used as a reference for disease identification and diagnosis. It is easy for users to utilize the recognition system to recognize, diagnose and identify alfalfa leaf diseases based on the acquired alfalfa leaf images.

The recognition system is only suitable for the alfalfa leaf disease images taken with white background and its application scope is limited. Because of the large amount of calculation and high complexity of the lesion segmentation method used in this recognition system, it will take a long time during lesion segmentation if the size of the ROI is too large. Using this recognition system, the disease images should be processed and analyzed one by one, and batch analysis could not be performed. Thus it is not suitable for recognition of large quantities of disease images. The developed system is only applicable to recognize the images of the four kinds of alfalfa leaf diseases with typical symptoms. Using this developed system, the recognition accuracy of the typical segmented lesions was approximately 90%. However, in the practical application, the symptoms are very complicated at different stages of disease development under different environmental conditions, and a large number of atypical lesions may lead to erroneous disease recognition. Therefore, when the developed system is used to recognize an image of a kind of alfalfa leaf disease, the disease should not simply be classified as the corresponding category with the maximum probability. The probability values that each lesion may belong to each of the four kinds of alfalfa leaf diseases should be considered. In addition, the disease recognition decision should be made in combination with the actual situations. There is still a lot of work to be done for improvement of this image recognition system.

Many modeling methods have been applied for disease recognition based on image processing. In the image-based recognition system for the four common kinds of alfalfa leaf diseases developed in this study, only one modeling method (multinomial logistic regression) was used to conduct disease recognition based on the selected image features. In a reported study [25], Naive Bayes method, linear discriminant analysis and support vector machine (SVM) were used as the modeling methods to perform image-based recognition of the same four alfalfa leaf diseases, the recognition accuracies more than 90% were achieved using the latter two methods. The image-based recognition of the same four kinds of alfalfa leaf diseases was also implemented using three supervised learning methods (random forest, K-nearest neighbor and SVM) and one semi-supervised modeling method [31]. For the same four kinds of alfalfa leaf diseases, image features were extracted from the typical lesion images using convolutional neural networks (deep learning method), then image-based recognition was conducted using SVM, finally, the satisfactory results were also achieved [32]. More modeling methods including the ones described above could be used in further improvement of the developed image recognition system for the four alfalfa leaf diseases.

The image recognition system for alfalfa leaf diseases developed in this study can be
applied to implement recognition and identification of the four kinds of alfalfa leaf
diseases. However, there are more than ten kinds of leaf diseases on alfalfa [2,3,4]. Therefore, it is very important to develop an image-based recognition system for the diagnosis and identification of a variety of alfalfa diseases. The image recognition system that can realize image-based recognition of various diseases on one kind of plant or can realize image-based recognition of various diseases on many kinds of plants is rarely reported. To develop such a disease recognition system, a considerable number of images of a variety of diseases should be acquired, in addition, the appropriate image processing methods and the suitable pattern recognition methods should be available. Therefore, it is very important to carry out image data sharing and interdisciplinary cooperation.

With the advancement of computer processing capability and the rapid development of network technology, the developed image recognition system for alfalfa leaf diseases could be used as a module of an alfalfa production management system or as a module of a field management system, which will be very helpful for the macromanagement of alfalfa production. At present, there are some reports on the development of image-based plant pathogen recognition system [33] and plant disease severity assessment system based on image processing [21,22]. Therefore, crop production management system or field management system, which has the functions of image-based plant pathogen recognition, image-based disease recognition and image-based severity assessment, could be developed for serving the healthy development of agricultural production. In addition, remote sensing system for monitoring diseases and pests in field crops or field remote monitoring and management system could be developed in combination with the Internet of things technology that is developing with high speed.

So far, some plant disease recognition systems based on mobile terminals such as mobile phones have been reported [20], [34,35,36] and have caused widely concern. With the development of network technology and the popularity of smart phones, plant disease image recognition systems based on network or mobile terminals will be gradually improved and will become more and more perfect. In the future, these systems will have a wider application space.

**Acknowledgments.** This work was supported by Special Fund for Agro-scientific Research in the Public Interest of China (201303057).

**References**

1. He, F., Han, D.M., Wan, L.Q., Li, X.L.: The Nutrient Situations in the Major Alfalfa Producing Areas of China (in Chinese). J. Plant Nutri. Fert. 20, 503-509 (2014)

2. Liu, A.P., Hou, T.J.: Pests and Their Control of Grassland Plants (in Chinese). China Agricultural Science and Technology Press, Beijing (2005)

3. Samac, D.A., Rhodes, L.H., Lamp, W.O.: Compendium of Alfalfa Diseases and Pests (Third Edition). APS Press, St. Paul (2014)

4. Li, Y.Z., Nan, Z.B.: The Methods of Diagnose, Investigation and Loss Evaluation for Forage Diseases (in Chinese). Phoenix Science Press, Nanjing (2015)

5. Pydipati, R., Burks, T.F., Lee, W.S.: Identification of Citrus Disease Using Color Texture Features and Discriminant Analysis. Comput. Electron. Agr. 52, 49-59 (2006)

6. Sankaran, S., Mishra, A., Ehsani, R., Davis, C.: A Review of Advanced Techniques for Detecting Plant Diseases. Comput. Electron. Agr. 72, 1-13 (2010)

7. Patil, J.K., Kumar, R.: Advances in Image Processing for Detection of Plant Diseases. J. Adv. Bioinfo. Res. 2, 135-141 (2011)

8. Li, G.L., Ma, Z.H., Wang, H.G.: Image Recognition of Wheat Stripe Rust and Wheat Leaf Rust Based on Support Vector Machine (in Chinese). J. China Agric. Univ. 17, 72-79 (2012)

9. Li, G.L., Ma, Z.H., Wang, H.G.: Image Recognition of Grape Downy Mildew and Grape Powdery Mildew Based on Support Vector Machine. In: Li, D., Chen, Y. (eds.). CCTA 2011, Part III, IFIP AICT 370, pp. 151-162. Springer, New York (2012)

10. Xie, C.Y., Wu, D.K., Wang, C.Y., Li, Y.: Insect Pest Leaf Detection System Based on Information Fusion of Image and Spectrum (in Chinese). Trans. Chin. Soc. Agric. Mach. 44, 269-272 (2013)

11. Phadikar, S., Sil, J., Das, A.K.: Rice Diseases Classification Using Feature Selection and Rule Generation Techniques. Comput. Electron. Agr. 90, 76-85 (2013)

12. Barbedo, J.G.A.: Digital Image Processing Techniques for Detecting, Quantifying and Classifying Plant Diseases. Springerplus 2, 660 (2013)

13. Barbedo, J.G.A.: An Automatic Method to Detect and Measure Leaf Disease Symptoms
Using Digital Image Processing. Plant Dis. 98, 1709-1716 (2014)

14. Zhou, R., Kaneko, S., Tanaka, F., Kayamori, M., Shimizu, M.: Image-Based Field Monitoring of Cercospora Leaf Spot in Sugar Beet by Robust Template Matching and Pattern Recognition. Comput. Electron. Agr. 116, 65-79 (2015)

15. Tan, W.X., Zhao, C.J., Wu, H.R., Gao, R.H.: A Deep Learning Network for Recognizing Fruit Pathologic Images Based on Flexible Momentum (in Chinese). Trans. Chin. Soc. Agric. Mach. 46, 20-25 (2015)

16. Mutka, A.M., Bart, R.S.: Image-Based Phenotyping of Plant Disease Symptoms. Front. Plant Sci. 5, 734 (2015)

17. Barbedo, J.G.A.: A Review on the Main Challenges in Automatic Plant Disease Identification Based on Visible Range Images. Biosyst. Eng. 144, 52-60 (2016)

18. Ye, H.J., Lang, R., Liu, C.Q., Li, M.Z.: Recognition of Cucumber Downy Mildew Disease Based on Visual Saliency Map (in Chinese). Trans. Chin. Soc. Agric. Mach. 47, 270-274 (2016)

19. Mengistu, A.D., Alemayehu, D.M., Mengistu, S.G.: Ethiopian Coffee Plant Diseases Recognition Based on Imaging and Machine Learning Techniques. Int. J. Database Theor. Appl. 9, 79-88 (2016)

20. Zheng, J., Liu, L.B.: Design and Application of Rice Disease Image Recognition System Based on Android (in Chinese). Comput. Eng. Sci. 37, 1366-1371 (2015)

21. Li, G.L., Ma, Z.H., Wang, H.G.: Development of a Single-Leaf Disease Severity Automatic Grading System Based on Image Processing. Lect. Notes Electr. Eng. 212, 665-675 (2013)

22. Atoum, Y., Afridi, M.J., Liu, X.M., McGrath, J.M, Hanson, L.E.: On Developing and Enhancing Plant-Level Disease Rating Systems in Real Fields. Pattern Recogn. 53, 287-299 (2016)

23. Le Cessie, S., Van Houwelingen, J.C.: Ridge Estimators in Logistic Regression. J. Roy. Stat. Soc. Series C (Appl. Stat.) 41, 191-201 (1992)

24. Otsu, N.A.: Threshold Selection Method from Gray-Level Histograms. IEEE T. Syst. Man Cy. 9, 62-66 (1979)

25. Qin, F., Liu, D.X., Sun, B.D., Ruan, L., Ma, Z.H., Wang, H.G.: Recognition of Four Different Alfalfa Leaf Diseases Based on Image Processing Technology (in Chinese). J. China Agric. Univ. 21, 65-75 (2016)

26. Powers, D.M.W.: Evaluation: from Precision, Recall and F-Measure to ROC, Informedness, Markedness and Correlation. J. Mach. Learn. Tech. 2, 37-63 (2011)

27. Stricker, M.A., Orengo, M.: Similarity of Color Images. Proc. SPIE Int. Soc. Opt. Eng. 2420, 381-392 (1995)

28. Gonzalez, R.C., Woods, R.E., Eddins, S.L.: Digital Image Processing Using MATLAB (in Chinese). Publishing House of Electronics Industry, Beijing (2005)

29. Gonzalez, R.C., Woods, R.E.: Digital Image Processing (Third Edition) (in Chinese). Publishing House of Electronics Industry, Beijing (2011)

30. Hall, M.A.: Correlation-Based Feature Selection for Machine Learning. PhD Thesis, The University of Waikato, Hamilton, New Zealand (1999)

31. Qin, F., Liu, D.X., Sun, B.D., Ruan, L., Ma, Z.H., Wang, H.G.: Identification of Alfalfa Leaf Diseases Using Image Recognition Technology. PLoS ONE 11, e0168274. doi:10.1371/journal.pone.0168274 (2016)

32. Qin, F., Liu, D.X., Sun, B.D., Ruan, L., Ma, Z.H., Wang, H.G.: Image Recognition of Four Different Alfalfa Leaf Diseases Based on Deep Learning and Support Vector Machine (in Chinese). J. China Agric. Univ. 22, 123-133 (2017)

33. Liu, L.Q., Yuan, Z.B., Deng, J.Z., Li, M., Jin, J.: Construction of *Tilletia* Diseases Diagnosis System (in Chinese). Plant Quarantine 28, 10-15 (2014)

34. Aji, A.F., Munajat, Q., Pratama, A.P., Kalamullah, H., Aprinaldi, Setiyawan, J., Arymurthy, A.M.: Detection of Palm Oil Leaf Disease with Image Processing and Neural Network Classification on Mobile Device. Int. J. Comput. Theor. Eng. 5, 528-532 (2013)

35. Xia, Y.Q., Wang, H.M., Zeng, S.: Plant Leaf Image Disease Detection Based on Android (in Chinese). J. Zhengzhou Univ. Light Ind. (Nat. Sci. Ed.) 29, 71-74 (2014)

36. Qu, Y., Tao, B., Wang, Z.J., Wang, S.T.: Design of Apple Leaf Disease Recognition System Based on Android (in Chinese). J. Agric. Univ. Hebei 38, 102-106 (2015)