Statistical Based Real-Time Selective Herbicide Weed Classifier

This paper deals with the development of an algorithm for real time specific weed recognition system based on Sample Variance of an image that is used for the weed classification and comparison of its result with the algorithm based on population variance. The population variance has been used before for weed classification. The processing time for calculating population variance and sample variance for different samples is given. This algorithm is specifically developed to classify images into broad and narrow class for real-time selective herbicide application. The developed system has been tested on the weeds in the lab along with the prior algorithm based on population variance, which have shown that the system is very effective in weed identification and efficient than the algorithm based on population variance. Further the results show a very reliable performance on images of weeds taken under varying field conditions. The analysis of the results shows over 97 percent classification accuracy over 140 sample images (broad and narrow) with 70 samples from each category of weeds. The algorithm developed in this paper has improved efficiency.


Introduction
Weeds are "Any plant growing in the wrong place at the wrong time and doing more harm than good".Weeds compete with the crop for water, light, nutrients and space, and therefore reduce crop yields and also affect the efficient use of machinery.A lot of methods are used for weed control.Mechanical cultivation is commonly practiced in many vegetable crops to remove weeds, aerate soil, and improve irrigation efficiency, but this technique cannot selectively remove weeds from the field.The most popular used method for weed control is to use agricultural chemicals (herbicides and fertilizer products).In fact, the success of agriculture is attributable to the effective used of chemicals.

Weed control
Weed control is a critical farm operation and can significantly affect crop yield.Herbicides have vital importance in weed control and high crop yield however these have potential to produce harmful effects [1].Herbicides are applied to whole field uniformly without considering the weed density.Weeds are often patchy rather than even or randomly distributed in the crop fields [2].Total variable costs in 2002 for U.K were within a range of £1,720/ha and £1,870/ha for main crop potatoes, of which herbicides accounted for between 3% and 4% of costs, fungicides accounted for about 8% of variable costs and nematicides accounted for about 14%-16% of variable costs.United States farmers applied about $16 billion of herbicides in 2005 (The Value of Herbicides in U.S. Crop Production: 2005 Update, Crop Life Foundation), in 1965 pesticide use was $474.1 million for the United States.By 1970 the use of pesticides doubled to $960 million for the United States and between 1975 and 1999 pesticide use grew 383% for the United States (Agribusiness and Applied Economics Report No. 456), representing a significant portion of the variable costs of agricultural production.Obviously, if a more sophisticated chemical delivery system is develop which applied chemicals where weeds existed and abstained where there are no weeds, chemical usage would be reduced and chemicals would be more effectively placed.These practices would result in lower environmental loading and increased profitability in the agricultural production sector.Selectively spraying, spot spraying, or intermittent spraying are different names which are attached to this herbicide application method.The amount of herbicides in a control patch sprayer has been potentially reduced when realtime weed sensing is used.Patch spraying using remote sensing and machine vision are successful systems [3].Weed Features: A verity of visual characteristics that have been used in plant identification can be divided into three categories: Spectral Reflectance, Morphology and texture.The photosensor-based plant detection systems [4], [5] can detect all the green plants and spray only the plants.A machine-vision guided precision band sprayer for small-plant foliar spraying [6] demonstrated a target deposition efficiency of 2.6 to 3.6 times that of a conventional sprayer, and the non-target deposition was reduced by 72% to 99%.Certain accurate methods for weed detection have been developed, which included wavelet transformation to discriminate between crop and weed in perspective agronomic images [7] and spectral reflectance of plants with artificial neural networks [8].Other researchers have investigated texture features [7] or biological morphology such as leaf shape recognition [6].So in real time for the identification and classification of crop rows in images, a lot of fast methods have been implemented [9]; some of them are based on Hough transform [10], Fourier transform [13], Kalman filtering [11] and linear regression [12].Consequently, there are various vision systems available on autonomous weed control robots for mechanical weed removal.

Statistical weed classifier
Statistical classification is a supervised machine learning procedure in which entities are placed into cluster based on quantitative information on one or more characteristics inherent in the items and based on a training set of previously labeled items.Figure .2 shows the Flow Chart of a Real-Time Specific Weed Recognition System which were developed to accomplish the broad and narrow weed classification.The algorithm was based on a variance of an image taken from the grayscale image which is obtained from the color image after pre-processing to detect the target area in the fields.

a. Image Pre-processing
Color images were taken from the field.Three arrays were defined to store Red, Green and Blue colors of RGB image in their respective arrays.Then the corresponding pixels from these three arrays were converted in to a single gray scale pixel using the formula GrayPixel=0.299Red+0.587Green + 0.1 14Blue (1) The gray levels are from 0 to 255.To distinguish weeds from background objects in a grayscale image, a grayscale segmentation image-processing step is conducted where objects are classified into one of two classes (weeds and background) by their grayscale difference.Reference [14], indicated that weeds in field images must be carefully segmented; otherwise the feature extraction will yield unreliable results from analyzing soil and weeds.
To identify weeds and classify them into one of two classes (broad and narrow) feature extraction are developed.

b. Classification of Images using Statistical Population
Variance and Sample Variance Statistical approach is used to describe the texture of an image.Variance is of particular importance in texture description of plants.After converting the color image into grayscale and segmentation step, the variance is then calculated.Variance for a 2D image from population data can be calculated as   For areas where weeds are detected, results show 98 percent classification accuracy over 140 sample images with 70 samples from each class as shown in Table 1.The population variance and the sample variance of an image are calculated.Different samples were taken.1. Sample Variance is calculated much faster than Population Variance while retaining the same accuracy for weed detection.The result of taking the Population and Samples were found the same.Less number of samples is good for high processing speed in real time environment.

Fig. 1 .
Fig. 1.(a) Automated Weed Sprayer Arm (b) Control Panel (images are courtesy of HARDI Australia Pty Ltd) www.intechopen.comM represents the total number of rows and N represents the total number of columns in the image.Variance of a 2D image from a sample data can be calculated using a variance of an image, the variance is compared with the thresholds TI and T2 to classify the weed into broad, narrow, and little weed as If S2 < TI, then there is Little Weed in the processed Image Else if TI < S2 < T2, then it is Narrow Weed Else if S2 > T2, then it is Broad weed TI and T2 are set after a series of experiments done on the images.

Figure. 3
show the classification images of broad and narrow weeds, which are taken in the field.These images are processed by using Statistical Population Variance and Sample Variance of an image.The algorithm gave 100% accuracy to detect the presence or absence of weed cover.

Table 1 .
Results of the weeds in fig 3 using population variance and sample variance for different samples The time taken for calculating Population Variance and Sample Variance is given in Table