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

. 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 K _median 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.


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 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 K_median 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.

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.

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.

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.

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).

Fig. 3.
Realization of disease image display using the image recognition system for alfalfa leaf diseases

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).

Fig. 4.
Realization of leaf region segmentation using the image recognition system for alfalfa leaf diseases

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.
Fig. 5. Realization of ROI selection using the image recognition system for alfalfa leaf diseases Fig. 6.Realization of ROI display using the image recognition system for alfalfa leaf diseases

Lesion Image Segmentation
Lesion Image Segmentation Method.In this disease image recognition system, a segmentation method integrating with K_median 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 K_median 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 (4256×2832 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 1 is the number of lesion pixels classified correctly by using the segmentation method integrated with K_median clustering algorithm and linear discriminant analysis, N 2 is the number of lesion pixels classified by using the manual lesion segmentation method with Adobe Photoshop CC, and N 3 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.Fig. 7. Lesion segmentation implemented using the image recognition system for alfalfa leaf diseases

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: where i X norm is the normalized value of the ith feature, i X is the value of the ith feature before normalization, and i X min and i X max 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 * component in L * a * b * 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 * component and homogeneity of the gray image of L * component in L * a * b * 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.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.

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.

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 be 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 conducted 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 module of an alfalfa production management 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.

Fig. 1 .
Fig. 1.The structural diagram of the image recognition system for alfalfa leaf diseases

Fig. 2 .
Fig. 2. The graphical user interface of the image recognition system for alfalfa leaf diseases

Fig. 8 .
Fig. 8.The recognition results of the multinomial logistic regression models with different values of ridgeImplementation 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.11and Fig.12, respectively.

Fig. 9 .
Fig. 9. Identification results of alfalfa Cercospora leaf spot using the developed image recognition system for alfalfa leaf diseases

Fig. 10 .Fig. 11 .Fig. 12 .
Fig. 10.Identification results of alfalfa rust using the developed image recognition system for alfalfa leaf diseases