Plant Leaf Recognition using Shape based Features and Neural Network classifiers

This paper proposes an automated system for recognizing plant species based on leaf images. Plant leaf images corresponding to three plant types, are analyzed using two different shape modeling techniques, the first based on the Moments-Invariant (M-I) model and the second on the CentroidRadii (C-R) model. For the M-I model the first four normalized central moments have been considered and studied in various combinations viz. individually, in joint 2-D and 3-D feature spaces for producing optimum results. For the C-R model an edge detector has been used to identify the boundary of the leaf shape and 36 radii at 10 degree angular separation have been used to build the feature vector. To further improve the accuracy, a hybrid set of features involving both the M-I and C-R models has been generated and explored to find whether the combination feature vector can lead to better performance. Neural networks are used as classifiers for discrimination. The data set consists of 180 images divided into three classes with 60 images each. Accuracies ranging from 90%-100% are obtained which are comparable to the best figures reported in extant literature. Keywords-plant recognition; moment invariants; centroid-radii model; neural network; computer vision.


INTRODUCTION
Plants play an important role in our environment.Without plants there will be no existence of the earth's ecology.But in recent days, many types of plants are at the risk of extinction.To protect plants and to catalogue various types of flora diversities, a plant database is an important step towards conservation of earth's biosphere.There are a huge number of plant species worldwide.To handle such volumes of information, development of a quick and efficient classification method has become an area of active research.In addition to the conservation aspect, recognition of plants is also necessary to utilize their medicinal properties and using them as sources of alternative energy sources like bio-fuel.There are several ways to recognize a plant, like flower, root, leaf, fruit etc.In recent times computer vision methodologies and pattern recognition techniques have been applied towards automated procedures of plant recognition.
The present paper proposes a scheme for automated recognition of three types of plant species by analyzing shape features from digital images of their leaves.The organization of the paper is as follows: section 2 provides an overview of related work, section 3 outlines the proposed approach with discussions on overview, feature computation and classification schemes, section 4 provides details of the dataset and experimental results obtained and section 5 provides the overall conclusion and the scope for future research.

II. PREVIOUS WORK
Many methodologies have been proposed to analyze plant leaves in an automated fashion.A large percentage of such works utilize shape recognition techniques to model and represent the contour shapes of leaves, however additionally, color and texture of leaves have also been taken into consideration to improve recognition accuracies.One of the earliest works [1] employs geometrical parameters like area, perimeter, maximum length, maximum width, elongation to differentiate between four types of rice grains, with accuracies around 95%. Use of statistical discriminant analysis along with color based clustering and neural networks have been used in [2] for classification of a flowered plant and a cactus plant.In [3] the authors use the Curvature Scale Space (CSS) technique and k-NN classifiers to classify chrysanthemum leaves.Both color and geometrical features have been reported in [4] to detect weeds in crop fields employing k-NN classifiers.In [5] the authors propose a hierarchical technique of representing leaf shapes by first their polygonal approximations and then introducing more and more local details in subsequent steps.Fuzzy logic decision making has been utilized in [6] to detect weeds in an agricultural field.In [7] the authors propose a twostep approach of using a shape characterization function called centroid-contour distance curve and the object eccentricity for leaf image retrieval.The centroid-contour distance (CCD) curve and eccentricity along with an angle code histogram (ACH) have been used in [8] for plant recognition.The effectiveness of using fractal dimensions in describing leaf shapes has been explored in [9].
In contrast to contour-based methods, region-based shape recognition techniques have been used in [10] for leaf image classification.Elliptic Fourier harmonic functions have been used to recognize leaf shapes in [11] along with principal component analysis for selecting the best Fourier coefficients.In [12] the authors propose a leaf image retrieval scheme based on leaf venation for leaf categorization.Leaf venations are represented using points selected by the curvature scale scope corner detection method on the venation image and categorized by calculating the density of feature points using non parametric estimation density.In [13] 12 leaf features are extracted and orthogonalized into 5 principal variables which www.ijacsa.thesai.orgconsist of the input vector of a neural network (NN).The NN is trained by 1800 leaves to classify 32 kinds of plants with accuracy greater than 90%.NNs have also been used in [14] to classify plant based on parameters like size, radius, perimeter, solidity and eccentricity.An accuracy of about 80% is reported.Wavelet and fractal based features have been used in [15] to model the uneven shapes of leaves.Texture features along with shape identifiers have been used in [16] to improve recognition accuracies.Other techniques like Zernike moments and Polar Fourier Transform have also been proposed [17] for modeling leaf structures.An accuracy of 64% has been reported.In [18] authors propose Hybrid Image Segmentation Algorithm for Leaf Recognition and Characterization.
A new approach that combines a thresholding method and H-maxima transformation based method is proposed to extract the leaf veins.Compared with other methods, experimental results show that this combined approach is capable of extracting more accurate venation modality of the leaf for the subsequent vein pattern classification.In [19] authors propose Guiding Active Contours for Tree Leaf Segmentation and Identification.Combining global shape descriptors given by the polygonal model with local curvature-based features, the leaves are classified over nearly 50 tree species.Finally in [20] a combination of all image features viz.color, texture and shape, have been used for leaf image retrieval, with a reported accuracy of 97.9%.

III. PROPOSED APPROACH
The present paper proposes a scheme for automated detection of 3 classes of plant category by analyzing shapes obtained from a collection of their leaf images, using features based on Moment-Invariants and Centroid-Radii approaches, with various types of neural network classifiers:

A. Moment Invariants (M-I)
M-K Hu [21] proposes 7 moment features that can be used to describe shapes and these are invariant to rotation, translation and scaling.For a digital image, the moment of a pixel ( , ) P x y at location ( , ) xy is defined as the product of the pixel value with its coordinate distances i.e.

. . ( , ) m x y P x y 
. The moment of the entire image is the summation of the moments of all its pixels.More generally the moment of order ( , ) pq of an image ( , ) Based on the values of p and q the following are defined : The first four Hu invariant moments which are invariant to rotation are defined as follows To make the moments invariant to translation the image is shifted such that its centroid coincides with the origin of the coordinate system.The centroid of the image in terms of the moments is given by: To compute Hu moments using central moments the φ terms in equation ( 2) need to be replaced by μ terms.It can be verified that μ 00 = m 00 , μ 10 = 0 = μ 01 .
To make the moments invariant to scaling the moments are normalized by dividing by a power of μ 00 .The normalized central moments are defined as below , where 1 ( ) 2 In [22] K. L. Tan et al. proposes the centroid-radii model for estimating shapes of objects in images.A shape is defined to be an area of black on a background of white.Each pixel is represented by its color (black or white) and its x-y coordinates on the canvas.The centroid is located at the position (Cx, Cy) which are respectively, the average of the x and y coordinates for all black pixels.The boundary of a shape consists of a series of boundary points.A boundary point is a black pixel with a white pixel as its neighbor.A radius is a straight line joining the centroid to a boundary point.In the centroidradii model, lengths of a shape's radii from its centroid at regular intervals are captured as the shape's descriptor using the Euclidean distance.More formally, let θ be the regular interval (measured in degrees) between radii (Figure 1).Then, the number of intervals is given by k =360/θ.All radii lengths are normalized by dividing with the longest radius length from the set of radii lengths extracted.Furthermore, without loss of generality, suppose that the intervals are taken clockwise starting from the x-axis direction.Then, the shape descriptor can be represented as a vector : { , , ,..., } k S r r r r Here r iθ , 0 ≤ i ≤ (k-1) is the (i+1)-th radius from the centroid to the boundary of the shape.With sufficient number of radii, dissimilar shapes can be differentiated from each other.I.

A. Moment-Invariants (M-I) Representations
The first 4 normalized central moments M1, M2, M3, M4 of each image of the training and testing sets were computed as per equation (6).Various combination of the features in individual and joint configurations were fed to neural network (NN) classifiers to study which combinations produce the best results

1) Individual Features:
Individual features values M1, M2, M3, M4 for the training and testing images for the 3 classes are first used.Results are summarized in Table II    Table II indicates that of the individual moment values M 1 provides the best results of 88.9 %.The number of images (out of 30) correctly identified, are also indicated in parenthesis.The corresponding NN output for the 3 classes, is shown below in Figure 3.The class files are arranged sequentially i.e. the first 30 files belong to Class-A the next 30 to Class-B and the last 30 to Class-C.

2) Joint Features:
To improve upon the results obtained using individual features, joint features are next considered in 2-D feature spaces i.e.M 1 -M 2 , M 1 -M 3 , M 1 -M 4 .M 1 is kept common since it is seen to produce the best accuracies.Results are summarized in Table III.

B. Centroid-Radii (C-R) Representations
Each image is converted to binary form and the Canny edge detector is used to identify its contour.Its centroid is computed from the average of its edge pixels.
Corresponding to each edge pixel the angle it subtends at the centroid is calculated and stored in an array along with its x-and y-coordinate values.From the array 36 coordinate values of edge pixels which join the centroid at 10 degree intervals from 0 to 359 degrees are identified.The radii length of joining these 36 points with the centroid are calculated using the Euclidean distance and the radii lengths are normalized to the range [0,1].For each leaf image 36 such normalized lengths are stored in an ordered sequence.Figure 8 shows a visual representation of a leaf image, the edge detected version, the location of the centroid and edge pixels, and the normalized radii vector.The average of the 36 radii lengths for each image of each class both for the training and testing sets, is plotted in Figure 9, which depicts the overall feature range and variation for each class.
Classes are discriminated using NN.The results are summarized in Table V.An overall accuracy of 100% is achieved.The NN convergence plot and output are shown in Figure 10.Convergence takes place in 38280 epochs with an MSE of 0.005.The overall accuracy is observed to be 100% using the 38element hybrid vector, but convergence takes place much quicker requiring only 20706 epochs for an MSE of 0.005, in contrast to 38280 epochs when using only the C-R vector.The convergence plot and NN output is shown in Figure 11.
Regarding the system implementation, computation of 36radii vector for 30 images takes around 35 seconds, while computation of the first four moments for 30 images takes around 300 seconds, on a 2.66 GHz P4 system with 1 GB RAM.NN convergence for the 38-element hybrid vector takes around 2 minutes for a training set of 30 images.The system has been observed to be stable for all the 3 categories of the leaf images displaying almost the same timings over the entire dataset.
Figure 10.NN convergence and output for C-R vector V. ANALYSIS Automated discrimination between three leaf shapes was done using a variety of approaches to find the optimum results.The study reveals that for M-I approach joint features in general provide better accuracies than individual features.Accuracies based on C-R method are better than individual M-I features and comparable to joint M-I features.Performance was found to improve when C-R features were combined with M-I features in a hybrid feature space, the accuracy of 100% being same as that for the C-R vector, but requiring almost half the number of epochs.Accuracy results obtained using different methods are summarized in Table VII.To put the above results in perspective with the state of the art, the best results reported in [8] is a recall rate of 60% for discrimination of chrysanthemum leaves from a database of 1400 color images.Accuracy for classification for 10 leaf categories over 600 images is reported to be 82.33% in [10].Overall classification accuracy reported in [11] for 4 categories of leaf images obtained during three weeks of germination, is around 90%. Accuracy reported in [13] for classification of 32 leaf types from a collection of 1800 images is around 90%.An overall classification of 80% is reported in [14] for identifying two types of leaf shapes from images taken using different frequency bands of the spectrum.www.ijacsa.thesai.orgBest accuracies reported in [17] are around 93% using Polar Fourier Transforms.Results reported in [19] are in the region of 80% for classifying 50 species.Accuracies of around 97% have been reported in [20] for a database of 500 images.It therefore can be said that the accuracies reported in the current paper are comparable to the best results reported in extant literature.It may however be noted that in many of the above cases color and geometrical parameters have also been combined with shape based features to improve results, while the current work is based solely on shape characteristics.

VI. CONCLUSIONS AND FUTURE SCOPES
This paper proposes an automated system for plant identification using shape features of their leaves.Two shape modeling approaches are discussed: one technique based on invariant-moments model and the other on centroid-radii model, and the two are compared with regard to classification accuracies.Such automated classification systems can prove extremely useful for quick and efficient classification of plant species.The accuracy of the current proposed approach is comparable to those reported in contemporary works.A salient feature of the current approach is the low-complexity data modeling scheme used whereby dimensionality of the feature vectors are typically below 40.

Future work would involve research along two directions:
(1) combining other shape based techniques like Hough transform and Fourier descriptors, and (2) combining color and texture features along with shape features for improving recognition accuracies. www.ijacsa.thesai.org

Figure 2 .
Figure 2. Samples of leaf images belonging to 3 classes For computing recognition rates, comparisons between training and testing sets are done using neural network (Multilayer perceptrons : MLP) with feed-forward back-propagation architectures.The legends used in this work are listed in TableI.
below.The first column depicts the feature used, the second column shows the neural network configuration (NNC) viz.1-3-3 indicates 1 input unit (for the individual feature), 3 units in the hidden layer and 3 units in the output layer (corresponding to the 3 classes to be distinguished).www.ijacsa.thesai.orgThe third, fourth and fifth columns indicate the percentage recognition accuracies for the three classes, the sixth column provides the overall accuracy for the three classes and the last column indicates the best Mean Square Error (MSE) obtained during the training phase of the NNs.
that of the joint 2-D feature values M 1 -M 3 provides the best results of 95.5 %.The corresponding NN output for the 3 classes, is shown below in Figure 4. To conclude analysis of joint spaces, features are also considered in 3-D feature spaces : M 1 -M 2 -M 3 , M 1 -M 2 -M 4 , M 1 -M 3 -M 4 .Results are summarized on Table IV below.that of the joint 3-D feature values M 1 -M 3 -M 4 provides the best results of 93.3 %.The corresponding NN output for the 3 classes, is shown in Figure 5.

Figures 6
Figures 6 and 7 shows the variation of the best features M 1 , (M 1 -M 3 ), (M 1 -M 3 -M 4 ) over the training and testing files for the 3 classes.

Figure 11 .
Figure 11.NN convergence and output for 38-e hybrid vector

TABLE I .
LEGENDS

TABLE II .
ACCURACY USING INDIVIDUAL M-I FEATURES

TABLE III .
ACCURACY USING JOINT 2-D M-I FEATURES