|
1.IntroductionLawn plants are classified based on corresponding standards to enable green units to formulate reasonable plans and select suitable lawn grass species. This can help maintenance staff and promote the construction of modern ornamental gardens and sport lawns. Different turf species have dissimilar growth characteristics, resulting in different stubble heights and thus different maintenance and pruning cycles; therefore, the plant species must be classified. This study focused on tall fescue, ryegrass, bluegrass, carpet grass, and other common lawn grasses and used image recognition technology to classify them. After lawn types are identified, the theoretical basis for setting the height of a lawnmower can be determined according to the respective growth characteristics of the lawns to realize scientific and efficient mowing operations. In plant identification processes, flowers and fruits may last for only a few weeks,1–3 whereas plant leaves remain nearly constant throughout the year.4,5 Furthermore, leaf shape is one of the most important visual features for describing many plants; therefore, classification based on leaf characteristics is crucial. Common classification techniques include the k-nearest neighbor (KNN), probabilistic neural network (PNN), and support vector machine (SVM) classifiers; however, these techniques have obvious drawbacks. For example, the KNN technique is expensive for testing every instance,6,7 sensitive to noise, and provides irrelevant inputs. Moreover, a PNN has a large network structure and an excessive number of attributes.8,9 An SVM classifier cannot easily be trained on large-scale training samples and can only classify them into two categories.10 This study addresses these shortcomings by effectively classifying leaves using a least squares SVM (LS-SVM) classifier.11 Ingrouille and Laird12 classified oak species with 27 leaf shape features using the principal composition analysis method. Sixta13 used the internal distance of shape context for leaf recognition. Rossatto et al.14 used the volume fractal dimension and naive Bayesian classification for leaf image recognition. Mallah et al.15 described a method for improving the recognition rate with a small training set and incomplete feature extraction. They used a K-nearest value classifier combined with a feature vector and density estimation method to improve the recognition rate. The recognition rate reached 96% when three features were combined, whereas it was 91% when four features were used. Du et al.16 extracted plant leaf shape features and image-invariant moments, and they used a mobile center hypersphere classifier to recognize more than 20 plants. Wu et al.3 orthogonalized the shape and texture features and increased the number of recognition categories to more than 30 using a PNN. Priya et al.17 used the same feature dataset as Ref. 3 to improve the recognition rate using an SVM. Elhariri et al.18 combined the color features on the basis of the shape and texture features to recognize more than 30 types. Most lawn leaves have different shapes, rich colors, and textures. Therefore, these are the main characteristics used to distinguish plant species.19 Most of the leaves identified in articles, such as Refs. 3 and 1213.14.15.16.17.–18, are relatively flat and broad. However, the objects of leaf recognition in this paper are all slender and clustered lawn plants, and the background information is relatively more complex. Therefore, the study in this paper is conducive to the development of intelligent lawn mowers. The main contributions of this study are as follows: (1) based on the LS-SVM segmentation algorithm, an algorithm was developed for effectively identifying and segmenting turf plant images; (2) common turf plants were classified using the improved algorithms; and (3) the accuracy and effectiveness of the turf identification were evaluated qualitatively for different weather conditions. 2.Lawn Recognition AlgorithmLawn images may contain random noise due to the influence of light, uneven exposure, camera distortion, or other types of interference. To suppress the background interference and random noise and to highlight the object region of the image in the identification process, the image can be segmented using an LS-SVM method with a dynamic threshold. When a dynamic threshold is used for selecting the training sample, a fast, stable, and reasonable training sample can be obtained. When images are identified using the LS-SVM method, the equality constraint in the standard SVM is changed to an inequality constraint, and the quadratic programming problem is transformed into a problem of linear equations. Therefore, the computational complexity is reduced considerably, and the computational speed becomes higher than that of a general SVM. Figure 1 shows a detailed description of the specific process steps for categorizing turf plants using an LS-SVM and a dynamic threshold. In the experiment conducted in this study, a Daheng Image Company’s Mercury series mer-231-41u3c camera was used to collect lawn images. The camera resolution was determined to be , and it was matched with an m0814-mp2 8-mm-focal-length lens. During the collection of lawn images, the lawn height was 30 to 180 mm. To ensure that the lawn was in the camera shooting range, the distance between the camera bracket and the lawn level was set at 600 mm, and the camera center was 90 mm from the ground. A total of 240 images of four common lawns, tall fescue, perennial ryegrass, Kentucky bluegrass, and carpet grass, were collected under sunny and cloudy conditions, as shown in Fig. 2. 2.1.Dynamic ThresholdDue to shadows, different background contrast levels, burst noise, and background gray-level changes, the lawn images cannot be segmented effectively using traditional methods, such as those involving a global fixed threshold20,21 or an Otsu threshold.22 Therefore, a set of dynamic thresholds related to pixel position can be used for local dynamic threshold processing in a local neighborhood. The basic steps of dynamic threshold segmentation are as follows:
2.2.Color Spatial Feature ExtractionCompared with red, green, and blue (RGB) color space, hue, saturation, and value (HSV) color space can express the tone and brightness of color more directly. Furthermore, it can separate color and brightness information. The equation23 for conversion from RGB to HSV is as follows: where represent the red, green, and blue coordinates, respectively; (saturation) and (value) lie in the range [0, 1], and (hue) lies in the range [0, 360]. To eliminate the influence of light on color, only pixel-level color features are considered from the color space of . Figure 3 shows the , , and components of an image in the HSV color space.In the proposed algorithm, the pixel-level color features that conform to the human visual system are divided into two parts: discontinuity and standard deviation. Here, indicates that the pixel is located at with three components in an size image, and represents the color features of pixel . 2.2.1.Compute the noise discontinuityDiscontinuity refers to the inconsistency of pixel gray values at the junction of different regions; it mainly describes the edge amplitude. The discontinuity of color components, , selected in this study is represented by . Sobel, Canny, Derish, Laplacian, and other edge operators were used for the edge computation of the same noisy images. The results show that the performance of the second-order differential Laplacian operator is better than that of other traditional edge operators. However, the images must be enhanced and smoothed before the gradient calculation is performed. Because determining the exact edge position is not necessary, the discontinuity and gradient can be calculated using the simple Sobel operator: where and are the components of the gradient in the and directions, respectively.2.2.2.Compute the standard deviationBy assuming that the signal is ergodic, the standard deviation, , describes the intensity variation within a local image window and is calculated for a pixel component, , as follows: where , , , , is the mean value of the color component, , in local window, and is defined as where is a local window of whose center is pixel , and is an odd number .2.2.3.Compute the pixel-level color featuresHerein, the local homogeneity of image pixels is defined by pixel-level color features. Homogeneity is closely related to the local information extracted from an image, and it reflects the consistency of the color features in the local region. However, the aim of image segmentation is to divide the image into several homogeneous regions; therefore, the local homogeneity, as a color feature for regional segmentation, plays a major role in the process. The local homogeneity consists of the standard deviation and discontinuity of the color component, , and it is represented by where Here, and represent the standard deviation and discontinuity, respectively, of the pixel color component, , located at .Finally, the pixel, , with can be obtained at location . Figure 4 shows the pixel-level color characteristics of the and components. 2.3.Texture Feature ExtractionTexture is usually combined with the color features and applied to image segmentation. In this algorithm, the local energy, local gradient, and local second moment are extracted from the six directional subbands of the Gabor filter as pixel-level texture features. The Gabor filter can not only reduce the influence of illumination and noise but it also preserves the edge information of texture in different scales and directions through its good bandpass and directional selectivity. Figure 5 shows the six directional subbands of the Gabor filter. 2.3.1.Selection of the color spaceThe component of the HSV color space is selected to represent the texture because it closely matches the human perception of lightness, and this color space can control the color and brightness information independently. 2.3.2.Application of the Gabor filter to the S componentIn this study, a Gabor filter with six orientations and two scale bands was used to decompose the component. Khan et al.’s24 research shows that 4 to 6 orientation subbands could approximate the directional selectivity of the human visual system, and two-level decomposition could be selected for turf images. Figure 6 shows the Gabor filter’s six directional and two scale subbands. 2.3.3.Extraction of the local energyThe local energy of the component can be calculated24 as follows: where * denotes the convolution, and and denote a pair of parity symmetric filters that, respectively, represent the real and imaginary parts of the Gabor filter.Here, represents the Gabor subband coefficients at location that corresponds to the scale and orientation. The local energy, , is defined as the maximum (in absolute value) of the 12 coefficients at location , which is one-pixel texture feature at location : 2.3.4.Extraction of the local gradientThe gradient is used to measure the change in pixel value in the and directions, which is an important measure of image features. If a region is smooth, its gradient is small. In this algorithm, is used to represent the maximum value of the 12 gradient magnitudes at location , which is another pixel texture feature at location : 2.3.5.Extraction of the local second moment matrixTo describe the texture of lawn leaves, a texture feature based on the local second-order moments can be used, which can be considered as the covariance matrices of two-dimensional random variables. The energy values in the two main directions in the neighborhood are represented by their eigenvalues. When one eigenvalue is greater than the others, the local neighborhood represents the texture and dominates the orientation. The second moment, , of the Gabor filter subband coefficient, , is expressed as follows: Here, * represents the convolution, represents the gradient, and , respectively, represent the components of the gradient in the and directions, and is a separable binomial approximation to a Gaussian smoothing kernel with a variance :Here, is a symmetric semipositive definite matrix; and are defined as the eigenvalues of ; and is the main eigenvector of . When and are negligible, the local neighborhood is approximated by a constant, representing a nontextured area. In contrast, a large value represents a textured area. In the proposed algorithm, the sum of the eigenvalues and of the second moment matrix, , is defined as the pixel-level feature, . The maximum value of the sum of 12 eigenvalues is represented by , which is the third pixel texture feature: Finally, the texture feature, , of the image pixel, , is obtained at location : The image of each pixel-level texture feature is shown in Fig. 7.2.4.Shape Feature ExtractionIn addition to the color and texture characteristics, shape features constitute another typical characteristic of lawn plants. Therefore, shape features can be added to the classification and recognition processes. In this paper, the method presented in Ref. 25 is used to extract the geometric parameters of four plants by the frequently used Fourier harmonic function. The shapes of different lawn plants have obvious differences, which can be adequately described by their rectangularity, aspect ratio, roundness, and sphericity. The aspect ratio is defined as the ratio of the length to the width of the rectangular blade. Rectangularity is defined as the ratio of the blade area to the minimum outer rectangle, which reflects the degree to which the object fills the minimum external rectangle and lies in the range (0, 1). Circularity is defined as the ratio of times the blade area to the square of the circumference, ; it reflects the degree of compact correlation between the blade and the circumferential circle. Sphericity is the ratio between the blade area and the circumference of the smallest circumscribed rectangle. Eccentricity is defined as the ratio between the long axis and the short axis of the blade. Lobation is defined as the ratio of the shortest distance between the center of gravity of the blade area and the boundary to the short axis of the blade; it can reflect the amplitude characteristics of the blade boundary. The circumference-to-diameter ratio is defined as the ratio of the blade circumference to the long axis (Table 1). Table 1The lawn shape characteristic formulas.
The geometric parameters of the blade region can be calculated according to the extracted blade profile of the lawn, including the blade area, , blade area perimeter, , length, , and width, , of the minimum external rectangle of the blade region, the long axis and short axis of the blade region, and the shortest distance, , from the center of the blade region to the boundary. Table 2 shows the shape characteristics of lawn plants. Table 2Shape characteristics of lawn plants.
2.5.Least Squares Support Vector Machine Identification ModelThe classification and recognition of lawn plants is essentially a complex multiclass discrimination problem. The classification of lawn plants is a small sample and multiclass classification problem that can be solved using an SVM classifier. Therefore, a classifier model based on an LS-SVM, an improved version of the traditional SVM method, was developed. This method adopts a least squares linear system as the loss function and solves a set of linear equations instead of the complex quadratic programming problem in the SVM. Moreover, this method has a low computational complexity and has the advantages of good generalization and a fast learning speed. Assume that the given training set is where is the input vector, is the number of samples, is the dimension of the input vector, and is the type of input vector.The basic idea of the LS-SVM method is to find the smallest hyperplane in a separable hyperplane, which is the same as the classical SVM. However, the LS-SVM method gives an correction for each data point; therefore, the problem of finding the hyperplane optimization is transformed to a convex optimization problem: The Lagrangian method is used to solve the mentioned optimization problem, which is transformed into solving a linear equation: where is the Lagrange multiplier, , , , .In the LS-SVM method, the supporting value is proportional to the error of the data points, , and is 1. This method nonlinearly maps input parameters to the high-dimensional feature space and constructs the same optimal decision function as the classical SVM according to the principle of structural risk minimization. Then, each test sample, , is substituted into , and the type of test sample can be obtained.3.Results and AnalysisAn experiment was performed using a computer with an Intel(R) i5-2520M 2.5 GHz quad-core processor with 4 GB of memory. The algorithm was developed using VS2012 C# along with the HALCON© 12.0.1 image processing library (MVTec Software GmbH, Germany). The proposed algorithm was evaluated using three evaluation criteria. In Sec. 3.1, the segmentation performance of the fuzzy threshold method, maximum between-group variance method (Otsu), and the proposed algorithm are compared with a complex background. In Sec. 3.2, the radial basis function (RBF) kernel function of the LS-SVM and multifeature fusion are selected as the recognition method through several experimental comparisons. In Sec. 3.3, the stability and accuracy of the algorithm under different illumination conditions are verified. 3.1.Image Segmentation Evaluation ResultsFour images with different complex backgrounds were selected from the collected samples to evaluate the proposed segmentation method. Figure 8(a) shows the original images, and Fig. 8(b) shows the segmented images obtained using the proposed algorithm. To further evaluate the segmentation performance of the proposed method, the performance of the proposed method was compared with that of the fuzzy threshold method and Otsu method for various categories, and the results are presented in Figs. 8(c) and 8(d). As presented in Fig. 8, all three image segmentation algorithms provided good segmentation performance levels for a single plant with a simple background. For the relatively complex background of the last three images ( perennial ryegrass; tall fescue; carpet grass), the proposed algorithm could ignore the remaining small weed areas and identify the region of interest directly; this capability is consistent with the human visual observation characteristics and demonstrates the strong adaptability of the algorithm to changes in lighting conditions. 3.2.Discrimination Using Support Vector MachinesThis study proposes an LS-SVM-based method for segmenting and recognizing common lawn plants. First, a square area of serves as the convolution unit, and the pixel color features of the and components are selected as two color input features. Second, the local energy, gradient, and second moment are selected as the texture input features. The leaf aspect ratio, rectangularity, circularity, sphericity, eccentricity, lobation, and the circumference-to-diameter ratio of the blade region are then selected as shape input features. Finally, a suitable local threshold is selected based on dynamic threshold processing, and 13 feature vectors are constructed as the input for LS-SVM training samples for the recognition and classification of lawn plant images. In this study, four kinds of common lawn plants were selected as objects to be identified. A total of 240 images of the four selected plants are available, and every kind of these selected plants can be found in the 60 images. A total of 120 lawn images were selected randomly as the SVM training set, and the others were selected as the test set. To observe the recognition accuracy of the SVM RBF, a linear kernel function, polynomial kernel function, RBF, and multilayer perceptron kernel function (sigmoid) were used for comparison. Table 3 shows the characteristics of the identification test data for the different kernel functions and their comparison. Table 3Recognition rate using different kernel functions based on multiple features.
Table 3 shows that when the RBF was used as the kernel function of the SVM, the classification rate for the training and test sets could reach 99.9% or more. This was the best result among all the kernel functions. Bayesian optimization,26 grid search,27 random search, and other methods have been applied by many researchers to determine the values of the penalty coefficient, , and the kernel parameter . After a certain range of sample testing and comparison, the Bayesian optimization was found to be the best choice in this study, and the best values of and were obtained ( and ). Based on the same characteristics of the input vector, the performance of the traditional SVM method was compared with that of the proposed LS-SVM method. Table 3 shows the classification results. Figure 9 shows that the LS-SVM combined with color, texture, shape, and dynamic threshold parameters provided the best segmentation results, and the overall recognition rate for the four types of turf reached 92.88%. In addition, the recognition results for the four types of turf were compared; the recognition rate for carpet grass was the highest (94.1%), whereas that for Kentucky bluegrass, it was only 85.37%. This is because the difference between the shape and texture characteristics of Kentucky bluegrass and other lawns is not obvious and is affected by illumination and other noise. To further improve the recognition accuracy, the number of shape and texture feature parameters can be increased in a later stage. 3.3.Lighting Performance DiscriminationTo verify the practicability of the proposed algorithm under different weather conditions, a green lawn area was selected as an experimental site. A total of 240 images were collected at two times: once at noon on a sunny day and once at ∼ 3:00 PM on a cloudy day. The experiment showed that the overall recognition rate on a sunny day was 92.3%, whereas that on a cloudy day was higher, mainly because the light on sunny days is direct, and the light on cloudy days is diffused, resulting in a higher contrast between the plants and the background, which makes the recognition rate on cloudy days higher. Furthermore, the average recognition time on a sunny day was 1.42 s higher than that on a cloudy day; nonetheless, this can meet the requirements of actual classification (Table 4). Table 4Recognition rate under different weather conditions.
4.ConclusionThis paper proposes an image segmentation method based on dynamic threshold and LS-SVM techniques. This method adopts a square area as separate units. Then, it selects two pixel color features, local energy, gradient, and the second moment, which are taken as three texture features, and seven blade shape regional characteristics as input characteristics. Next, it applies the feature vector as the LS-SVM input and adds the LS-SVM local dynamic threshold to obtain the training sample used to classify images taken for identification. The experiments showed that the algorithm is highly accurate in different environments. For the recognition of turf plants with similar shapes and texture features, more feature vectors can be added to the LS-SVM recognition model to train the samples. Considering the limitations of the proposed algorithm, it is necessary to further optimize the penalty coefficient, , and parameters for more complex environments to achieve the classification and recognition requirements. In future work, we plan to optimize and improve the algorithm and to classify more lawn plants to establish a complete database for lawn plant identification and classification. This can provide a theoretical basis for accurately setting the height of cutters for ZTR mowers. ReferencesR. L. Zimdahl et al.,
“Weed classification,”
Fundamentals of Weed Science, 47
–60 5th ed.Academic Press(2018). Google Scholar
S. Zhang et al.,
“Label propagation based supervised locality projection analysis for plant leaf classification,”
Pattern Recognit., 46
(7), 1891
–1897
(2013). https://doi.org/10.1016/j.patcog.2013.01.015 Google Scholar
S. G. Wu et al.,
“A leaf recognition algorithm for plant classification using probabilistic neural network,”
in IEEE Int. Symp. Signal Process. and Inf. Technol.,
11
–16
(2007). https://doi.org/10.1109/ISSPIT.2007.4458016 Google Scholar
S. H. Lee et al.,
“How deep learning extracts and learns leaf features for plant classification,”
Pattern Recognit., 71 1
–13
(2017). https://doi.org/10.1016/j.patcog.2017.05.015 Google Scholar
D. Hall et al.,
“Evaluation of features for leaf classification in challenging conditions,”
in IEEE Winter Conf. Appl. Comput. Vision,
797
–804
(2015). https://doi.org/10.1109/WACV.2015.111 Google Scholar
Q. Liu et al.,
“A novel locally linear KNN model for visual recognition,”
in Proc. IEEE Conf. Comput. Vision and Pattern Recognit.,
1329
–1337
(2015). https://doi.org/10.1109/CVPR.2015.7298738 Google Scholar
Q. Liu et al.,
“A novel locally linear KNN method with applications to visual recognition,”
IEEE Trans. Neural Networks Learn. Syst., 28
(9), 2010
–2021
(2017). https://doi.org/10.1109/TNNLS.2016.2572204 Google Scholar
R. Tadeusiewic et al., Exploring Neural Networks with C#, CRC Press, Taylor & Francis Group, Boca Raton, Florida
(2014). Google Scholar
S. Y. Ooi et al.,
“Image-based handwritten signature verification using hybrid methods of discrete radon transform, principal component analysis and probabilistic neural network,”
Appl. Soft Comput., 40 274
–282
(2016). https://doi.org/10.1016/j.asoc.2015.11.039 Google Scholar
C. Sukalpa et al.,
“Text independent writer identification for Oriya script,”
in Proc. Tenth IAPR Int. Workshop IEEE Doc. Anal. Syst.,
(2012). https://doi.org/10.1109/DAS.2012.86 Google Scholar
J. A. K. Suykens and J. Vandewalle,
“Chaos control using least-squares support vector machines,”
Int. J. Circuit Theory Appl., 27
(6), 605
–615
(1999). https://doi.org/10.1002/(SICI)1097-007X(199911/12)27:6<605::AID-CTA86>3.0.CO;2-Z ICTACV 0098-9886 Google Scholar
M. J. Ingrouille and S. M. Laird,
“A quantitative approach to oak variability in some north London woodlands,”
London Nat., 65 35
–46
(1986). Google Scholar
T. Sixta, Image and Video-Based Recognition of Natural Objects, Czech Technical University, Prague
(2011). Google Scholar
D. R. Rossatto et al.,
“Fractal analysis of leaf-texture properties as a tool for taxonomic and identification purposes: a case study with species from neotropical Melastomataceae (Miconieae tribe),”
Plant Syst. Evol., 291
(1–2), 103
–116
(2011). https://doi.org/10.1007/s00606-010-0366-2 Google Scholar
C. Mallah, J. Cope and J. Orwell,
“Plant leaf classification using probabilistic integration of shape, texture and margin features,”
01
–06
(2014) http:www. Actapress.com/Abstract.aspx Google Scholar
J.-X. Du et al.,
“Leaf shape based plant species recognition,”
Appl. Math. Comput., 185
(2), 883
–893
(2007). https://doi.org/10.1016/j.amc.2006.07.072 Google Scholar
C. A. Priya, T. Balasaravanan and A. S. Thanamani,
“An efficient leaf recognition algorithm for plant classification using support vector machine,”
in Proc. Int. Conf. Pattern Recognit., Inf. and Medical Eng.,
428
–432
(2012). https://doi.org/10.1109/ICPRIME.2012.6208384 Google Scholar
E. Elhariri, N. El-Bendary and A. E. Hassanien,
“Plant classification system based on leaf features,”
in Proc. 9th Int. Conf. Comput. Eng. and Syst.,
271
–276
(2014). https://doi.org/10.1109/ICCES.2014.7030971 Google Scholar
Q. P. Wang et al.,
“Recognition of leaf image based on ring projection wavelet fractal feature,”
Lect. Notes Comput. Sci., 6216 240
–246
(2010). https://doi.org/10.1007/978-3-642-14932-0 LNCSD9 0302-9743 Google Scholar
H. K. A. Devi,
“Thresholding: a pixel-level image processing methodology preprocessing technique for an OCR system for the Brahmi script,”
Ancient Asia, 1 161
–165
(2006). https://doi.org/10.5334/aa.06113 Google Scholar
Y. Solihin and C. Leedham,
“The multi-stage approach to grey-scale image thresholding for specific applications,”
1
–27 Nanyang Avenue, Republic of Singapore
(2000). Google Scholar
T. Y. Goh et al.,
“Performance analysis of image thresholding: Otsu technique,”
Measurement, 114 298
–307
(2018). https://doi.org/10.1016/j.measurement.2017.09.052 0263-2241 Google Scholar
V. Chernov et al.,
“Integer-based accurate conversion between RGB and HSV color spaces,”
Comput. Electr. Eng., 46 328
–337
(2015). https://doi.org/10.1016/j.compeleceng.2015.08.005 CPEEBQ 0045-7906 Google Scholar
J. F. Khan, R. R. Adhami and S. M. A. Bhuiyan,
“A customized Gabor filter for unsupervised color image segmentation,”
Image Vision Comput., 27
(4), 489
–501
(2009). https://doi.org/10.1016/j.imavis.2008.07.001 Google Scholar
J. C. Neto et al.,
“Plant species identification using elliptic Fourier leaf shape analysis,”
Comput. Electron. Agric., 50
(2), 121
–134
(2006). https://doi.org/10.1016/j.compag.2005.09.004 CEAGE6 0168-1699 Google Scholar
A. Wilson, A. Fern and P. Tadepalli,
“Using trajectory data to improve bayesian optimization for reinforcement learning,”
J. Mach. Learn. Res., 15
(1), 253
–282
(2014). Google Scholar
P. C. Bhat et al.,
“Optimizing event selection with the random grid search,”
Comput. Phys. Commun., 228 245
–257
(2018). https://doi.org/10.1016/j.cpc.2018.02.018 CPHCBZ 0010-4655 Google Scholar
|