Skip to main content

Design and Development of Automated Weed Seeker and Tracker

Page 1

International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395 -0056

Volume: 03 Issue: 12 | Dec -2016

p-ISSN: 2395-0072

www.irjet.net

Design and Development of Automated Weed Seeker and Tracker Sourabh Savadatti1, Soumya S Tuppad2, Ankit A Ullikashi3, Sachin Arakeri4, Harsh Karjigi5, Mahabaleshwar S Hegde6 1, 2UG Student, Department of Instrumentation Technology, B V Bhoomaraddi College Of Engineering and

Technology, Hubballi, Karnataka, India

4UG Student, Department of Industrial Production, B V Bhoomaraddi College Of Engineering and Technology,

Hubballi, Karnataka, India

6UG Student, Department of Mechanical Engineering, B V Bhoomaraddi College Of Engineering and Technology,

Hubballi, Karnataka, India

3,5UG Student, Department of Automation Robotics, B V Bhoomaraddi College Of Engineering and Technology,

Hubballi, Karnataka, India ---------------------------------------------------------------------***---------------------------------------------------------------------

Abstract - Abstract: In agriculture fields, weed is threat for

differentiates the weeds from crops and sprays herbicides only on the weeds. This method not only helps in reducing the wastage of herbicides but also it is more effective. It avoids decay in the fertility of soil, doesn’t require labours. Here the robot must differentiate crop and weed accurately. So, differentiating weeds from the crops is the important task for the robot. This paper provides methods for differentiating a crop from the weed through two different techniques. Both the techniques are carried through image processing. One method is Area Thresholding and the other is colour segmentation. Area Thresholding method depends on difference in the area or the size of the crop and the weed. In this paper the crop under study is the cotton crop. The need for spraying herbicide arises when the cotton crop is 30days old as it is the crucial period for the growth of the crop. Once the herbicide is sprayed for 30 days old Cotton crop, then there will be no need of spraying the herbicide till harvesting, because after 30 days of crop growth when the weeds are removed, the growing of weeds henceforth will not affect the growth of the crops as the crops will already have the necessary nutrients absorbed from the soil. Hence there will be no need of getting rid of the weeds later. To spray the herbicide efficiently only on the crops requires the robot to be embedded with proper software which will differentiate weed and crop properly. This paper includes algorithms which gives programs and therefore providing the base for software to differentiate weed from crop. This paper includes two algorithms which work through image processing, one is Area Thresholding and the other is Color segmentation. In Area Thresholding method weed and crops are differentiated considering the difference in their area. Since the herbicides are to be sprayed when cotton plant is 30 days old, the area difference will be too enough to differentiate weed from crop.

growth of crops. One way of controlling/removing the weeds is through spraying herbicides. Spraying herbicides can either be manual or automatic (using robots). Manual spraying herbicide requires man power and it is time consuming and in current scenario everyone looks to it that work has to be done quickly. The solution for this problem is the automatic method. We have many existing techniques to differentiate any given two objects using different algorithms. Spot spraying uses more amounts of weedicides which causes the wastage of weedicides and therefore money, also the quality of the soil underneath the crops will be in vain. Thus to prevent all these wastages, this idea is of the automated weed seeker which will not only minimize the use of weedicides but also maintains the soil richness of the fields. In this paper two algorithms have been stated, one is area thresholding and the other is color segmentation. These algorithms have been studied using image processing method the crop that is used for study is cotton crop. The actual need for spraying herbicide arises when the crop is of 30 days old. Because this is crucial period for the growth and development of the crop, in area thresholding method, differentiation takes place considering are as the main criteria. In color segmentation method, desired feature is extracted and the rest gets blurred. We have tested some images for algorithms and verified the result. The MATLAB is the basic tool for this project. Key words: MATLAB, Weedicides, herbicides

1

Introduction

In agriculture field, one of the main problems faced by farmer is weeds, which will suppress the growth of the crops. One way of controlling the growth of weeds is through spraying herbicides. Usually herbicide is sprayed all over the field instead of spraying only on weeds. Due to this, the fertility of soil will decrease and there is wastage of herbicides. Spraying herbicide efficiently on the weeds needs skilled labours and also it requires more time. So, the alternative solution for spraying herbicides efficiently only on weeds is through the help of robots which accurately

© 2016, IRJET

|

Impact Factor value: 4.45

Motivation Our farmers are getting money scarce day by day because of various reasons, and usage of herbicide inefficiently is one reason. Due to spot spraying more amount of weedicides will be wasted and therefore money. And also the quality of the soil underneath the crops will be in vain. Thus to prevent all

|

ISO 9001:2008 Certified Journal

|

Page 136


International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395 -0056

Volume: 03 Issue: 12 | Dec -2016

p-ISSN: 2395-0072

www.irjet.net

these wastages, we thought of the automated weed seeker which will not only minimize the use of weedicides but also maintains the soil richness of the fields. Objective 1. 2. 3. 4.

unwanted data and classification based on area thresholding. The system consists of three main steps: 1.

More effective and efficient control of intermittent weeds. Reduced herbicide use and reduced loss of herbicides in run-off, delivering cost savings and environmental benefits, To develop precision spraying technology in sugarcane crop, it must be combined with shields/hoods. Precision spot spaying technology allows growers to selectively apply weedicides on weeds in the inter-row.

2. 3. Method I:

Image acquisition: The first method preferred in the project is using Area Thresholding. The images of the crops on fields are taken and they are processed to decide whether the encountered plant is a weed or a crop. Three main parts are presented for weed and crop classification. It has got (1) Image acquisition and gray transformation. (2) Image segmentation and noise removal. (3) Classification of weed and crop. Cameras are used to take the pictures of the fields and these images are processed and differentiated between weed and crop is performed using Gray transformation. Two different methods are proposed in this paper. In Area Thresholding method, the primary steps involves gray transformation, firstly, the images of the crops and weeds are converted to gray format for easy processing in the MATLAB, this is done because gray transformed images take less time to process and leads to perfect results. Median filter is applied to these images to reduce the noises in the image and to reduce the size of the image. Binarisation is done to scale the images to black and white pixels. Finally Area Thresholding method is applied to distinguish between crop and weeds.

Organization of the report The first chapter gives different techniques for differentiating weed and crop. The two algorithms used for detection of weed from image is done with the help of area thresholding algorithm and color segmentation using kmeans algorithm. Second chapter includes brief description of two algorithms performed for differentiating weed and crop. The steps involved in Area Thresholding and Color segmentation using k-means algorithm. Third chapter includes the block diagram and flow chart of those two algorithms. Fourth chapter includes matlab code and steps involved for detecting weed and crop for both two proposed works. Fifth chapter includes the results obtained from both algorithms, using matlab as tool. Literature survey In this project, method [1] describes the detection of weeds and crops using area thresholding method. The base of this method is Image processing. In this method, three main parts presented for weed and crop classification. It has got 1. 2. 3.

The next step is to determine the bounding blocks related to connected components of that particular image viz., green components of the image is separated from the background. In MATLAB, bwconcomp command uses a default connectivity of 8 connected neighbourhoods for two dimensions, 26 connected neighbourhoods for three dimensions. This command can be used to replace BWLABEL and BWLABELN commands. Two key components here are the Area and the Bounding box. Area is the actual number of pixels in the region and Bounding box is the smallest rectangular containing the region 1-by-Q*2 vector, where Q is the number of image dimensions. A threshold value is calculated and that obtained value is assigned to that image. If the pixel value of the connected component is greater than the threshold value, that area is distinguished as the crop otherwise, it is distinguished as weed. This is the main

Image acquisition and gray transformation. Image segmentation and noise removal. Classification of weed and crop.

Two classification methods are studied in this project. They are classification based on area thresholding [1] and color segmentation [3] classification method. First method is executed depending on the size of plants. By using digital camera, the input image is obtained. Most of images are needed to change from the color images into gray scale images for easy and fast processing. The segmentation step implemented by using threshold method. In this classification part, the areas of segmented image are then compared with the selected threshold for classification of weed and crops. The area thresholding classification system includes the five steps. They are Excess Green Gray transformation, segmentation, label the image, removing the

© 2016, IRJET

|

Impact Factor value: 4.45

The Excess green fray transformation 2-G-R-B is executed to easy and fast processing for segmentation stage. Background and plants of the image is separated according to the gray index. Extraction of weed and crop from the segmented image by area thresholding.

|

ISO 9001:2008 Certified Journal

|

Page 137


International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395 -0056

Volume: 03 Issue: 12 | Dec -2016

p-ISSN: 2395-0072

www.irjet.net

function of Area thresholding method in differentiating the weed and crops. The steps involved in this process are described as below.

weed images are used to differentiate the weeds from the crop and helps the spraying automatic robot to spray the weedicides the weedicides over the detected weeds on the fields.

Image acquisition and gray Transformation: The final segmented image is used as the input of the weed and crop classification stage. Weed detection is executed depended on their areas. Firstly, the segmented binary image is labeled using 8-connected components. In this way, it can easy to evaluate the areas of the objects. And then, a threshold value is set at 6000 for this research. The corps plant is detected when the object areas are less than threshold value. in the other way, the remaining objects are classified as crop plants. The ares of the individual objects are calculated according to the equation (3). In this equation, F(j,K) is binary segmented image, xj and yk are scaled co ordinate in row and column and J and K are aow and column of binary image. The detected weed and crop images are obtained by comparing the threshold value and their areas [1].

Fig 2. Filtered Image

Fig.3. Detected weed Image Method 2 The second method that is color segmentation is a very emerging topic for image processing method. Color Segmentation: Segmentation- segmentation is an important issue in the field of image processing for classifying and detecting from an object from an image. The main task of this algorithm is to differentiate for ground object from background object. The purpose of color segmentation is to partition an image into meaningful regions with respect to particular application. The segmentation is based on measurements taken from image and might be grey level, color, texture, depth or motion. There are different techniques for segmentation, clustering is best technique among them. Clustering is a process of grouping of similar data together of captured images. Clustering using k-means algorithm is the technique for differentiating weed from the crop. From color segmentation results it is possible to identify region of interest and objects in the scene, which is very beneficial to the subsequent image analysis. Color segmentation is an initial and vital step in understanding the overall image. Few areas where color segmentation is useful are 1.in object based measurements object from the scene is identified based on size and shape. 2. In video compression an object is identified from moving scene. 3. Identifying objects which are of different distances from a sensor using depth measurement from a laser range finder enabling path planning for a mobile robots. Color segmentation can be

Fig 1. Binary Image Binary and filtering Segmentation of the image through various procedures gives us the binary form and the filtered forms of the given input image. The next step in the algorithm is the conversion of gray images into binary form. There are various types of procedures through which this can be done, such as the thresholding based segmentation, edge-based segmentation, color based segmentation as a tool to get the binary images. Below are the images of binary and filtered ones. Classification The next stage in detecting the weeds from the crops is the classification stage. The segmented image us given as an input to the classification algorithm. The whole image is labeled as connected components of the weeds and crops and then a threshold value is given so that the algorithm can differentiate the crops and weeds based on that threshold value. A threshold value is something that is used as a tool to separate the weeds and crops based on the method of area thresholding. In this project, we have used the optimum threshold value of 6000. The connected components whose area value is more than the threshold value are considered to be weeds. The threshold value for a given algorithm is calculated by a small algorithm in MATLAB. This threshold value calculated determines exactly which crop and what is in weed in a given set of images. These detected crop and

© 2016, IRJET

|

Impact Factor value: 4.45

|

ISO 9001:2008 Certified Journal

|

Page 138


International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395 -0056

Volume: 03 Issue: 12 | Dec -2016

p-ISSN: 2395-0072

www.irjet.net

broadly classified into seven main groups, 1. Histogram, 2. Clustering, 3. Region rowing, 4. Edge based,, 5. Physical model based 6. Fuzzy approaches and 7. Neural network and genetic algorithm (GA). And the most widely used method is clustering method.

resulting from the previous step. After we have these k new centroids, a new binding has to be done between the same data set points and the nearest new centroid. K means clustering is an algorithm to classify or to group the objects based on attributes or features into k number of group where k is positive integer [3].

2

DESIGN METHODOLOGIES

Method I: The below figure 5 shows the algorithm used for differentiating weed and crop. The process begins with capturing of image as an input. For processing the input image it has to be converted into gray transformation and then to binary image. The last important step is to apply area thresholding algorithm to get desired output. Fig.4. Detected crop Image Clustering Clustering group’s data objects based only on the information found in the data that describes the objects and the relationships. The goal is that the object within a group be similar to one another and different from the objects. A common approach to image clustering involves addressing the following issues. 1. Image features-how to represent image. 2. Organization of feature data-how to organize the data. 3. Classifier-how to classify a image to a certain cluster. In an image grouping of data is done based on keyword (Meta data) or its content (description). Keyword gives the description of image. Content refers to shape morphological features which are extracted from the image [3].There are different types of algorithms followed in clustering method and one of them is ‘K means clustering’ method. Here we are using this K means clustering method to develop an algorithm to differentiate crop and weed.Here we have explained second algorithm which is colour segmentation using clustering technique using K-means algorithm. The image is captured, the captured image is converted from RGB colour space to L*a*b colour space. There are two types of colour space excluding RGB colour space they are L*a*a*b colour space and H(hue)S(saturation)V(visible) colour space. The foreground object is differentiated from background object in an image through clustering method, using K-means method crop is differentiated from an image.

Fig.5. Proposed Image Processing simulation The below figure 6 shows the flow in which process is carried out. Capture the input image. Highlight the green, red and blue content in captured image. Convert the input image into binary image and filter if there is any disturbance present in converted binary image. Get connected images which highlights green colour with the help of bounding box. Calculate the threshold value with the threshold value of each connected images. If calculated threshold value is greater than that of threshold value of connected components, then it is considered as crop or else it is treated as a weed.

K-means is one of the simplest unsupervised learning algorithms that solve the well-known clustering problem. The procedure follows a simple and easy way to classify a given data set through a certain number of clusters (assume k cluster) fixed a prior. The main idea is to define k centroids, one for each cluster. These centroids should be placed in a cunning way because of different location causes different result. So, the better choice is to place them as much as possible far away from each other. The next step is to take each point belonging to a given data set and associate it to the nearest centroid. When no point is pending, the first step is completed and an early group age is done. At this point we need to re-calculate k new centroids of the clusters

© 2016, IRJET

|

Impact Factor value: 4.45

|

ISO 9001:2008 Certified Journal

|

Page 139


International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395 -0056

Volume: 03 Issue: 12 | Dec -2016

p-ISSN: 2395-0072

www.irjet.net

has the closet centroid. When all objects have been assigned, recalculate the position of the K centroids. Repeat above steps until the centroids no longer moved. This provides a separation of the objects into groups from which the metric to be minimized can be calculated.

Fig.6. Flow Chart Method II Figure.8. Flow chart fork-means clustering

The below figure 7 shows the K-means clustering algorithm to detect weed from crop in image. The process begins with capturing of image as an input. For processing the input image it has to be converted to L*a*b colour space from RGB colour space. Apply the clustering method which is used to differentiate foreground from background of image. K-means algorithm is used for differentiating weed from crop.

Selection of components MatLab The availability of technical computing environment such as MATLAB is now reshaping the role and applications of computer laboratory projects to involve students in more intense problem-solving experience. This availability also provides an opportunity to easily conduct numerical experiments and to tackle realistic and more complicated problems. The name MATLAB stands for MATrixLABoratory. MATLAB was written originally to provide easy access to matrix software developed by the LINPACK(linear system package) and EISPACK(Eigen system package) projects. MATLAB is a high-performance language for technical computing. It integrates computation, visualization and programming environment. Furthermore, MATLAB is a modern programming language environment: it has sophisticated data structures, contains built-in-editing and debugging tools and supports object-oriented programming. These factors make MATLAB an excellent tool for teaching and research. MATLAB has many advantages compared to conventional computer languages (e.g. C, FORTRAN) for solving technical problems. MATLAB is an interactive system whose basic data element is an array that does not require dimensioning. The software package has been commercially available since 1984 and is now considered as a standard tool at most universities and industries worldwide.

Fig.7. MEANS Clusting The below figure 8 shows the flow in which process is carried out. Place K points into the space represented by the objects that are being clustered. These points represent initial group centroids. Assign each object to the group that

© 2016, IRJET

|

Impact Factor value: 4.45

|

ISO 9001:2008 Certified Journal

|

Page 140


International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395 -0056

Volume: 03 Issue: 12 | Dec -2016

p-ISSN: 2395-0072

www.irjet.net

It has powerful built-in routines that enable a very wide variety of computations. It also has easy to use graphics commands that make the visualization of results immediately available. Specific applications are collected in packages referred to as toolbox. There are toolboxes for signal processing, symbolic computation, control theory, simulation, optimization and several other fields of applied science and engineering.

windows. The major tools within or accessible from the desktop are: Step1: The Command Window. Step2: The Command History. Step3: The Workspace. Step4: The Current Directory. Step5: The Help Browser. Step6: The Start button. Introduction Matrices are the basic elements of the MATLAB environment. A matrix is a two-dimensional array consisting of m rows and n columns. Special cases are column vectors(n=1) and row vectors(m=1). In this section we will illustrate how to apply different operations on matrices. The following topics are discussed: vectors and matrices in MATLAB, the inverse of a matrix, determinants and matrix manipulation. MATLAB supports two types of operations known as matrix operations and array operations. Matrix operations will be discussed first. Matrix generation Matrices are fundamental to MATLAB. Therefore we need to become familiar with matrix generation and manipulation. Matrices can be generated in several ways. Entering a vector A vector is a special case of a matrix. The purpose of this section is to show how to create vectors and matrices in MATLAB. As discussed earlier, an array of dimensions 1 n is called a row vector, whereas an array of dimension m 1 is called a column vector. The elements of vectors in MATLAB are enclosed by a square brackets and are separated by spaces or by commas. Furthermore, to access blocks of elements, we use MATLABs colon notation (:) produces a column vector, whereas writing 1: end produces a row vectors. Entering a matrix is an array of numbers. To type a matrix into MATLAB you must

The primarily objective is to help you learn quickly the first steps. The emphasis here is learning by doing. Therefore, the best way to learn is by trying it yourself. Working through the examples will give you a feel for the way that MATLAB operates. In this introduction we will describe hoe MATLAB handles simple numerical expressions and mathematical formulas. The name MATLAB stands for MATrix LABoratory. MATLAB was written originally to provide easy access to matrix software developed by the LINPACK (linear system package) and EISPACK(Eigen system package) projects. MATLAB is a high-performance language for technical computing. It integrates computation, visualization and programming environment. Furthermore, MATLAB is a modern programming language environment: it has sophisticated data structures, contains built-in-editing and debugging tools and supports object-oriented programming. These factors make MATLAB an excellent tool for teaching and research. MATLAB has many advantages compared to conventional computer languages (e.g. C, FORTRAN) for solving technical problems. MATLAB is an interactive system whose basic data element is an array that does not require dimensioning. The software package has been commercially available since 1984 and is now considered as a standard tool at most universities and industries worldwide. It has powerful built-in routines that enable a very wide variety of computations. It also has easy to use graphics commands that make the visualization of results immediately available. Specific applications are collected in packages referred to as toolbox. There are toolboxes for signal processing, symbolic computation, control theory, simulation, optimization and several other fields of applied science and engineering. Basic features as we mentioned earlier, the following tutorial lessons are designed to get you started quickly in MATLAB. The lessons are intended to make you familiar with the basics of MATLAB.

1. 2. 3. 4.

Once we have entered the matrix, it is automatically stored and remembered in the Workspace. We can refer to it simply as matrix A. We can then view a particular element in a matrix by specifying its location. Its value is Matrix indexing. We select elements in a matrix just as we did for vectors, but now we need two indices. The element of row I and column j of the matrix A is denoted by A (i,j). Thus, A (i,j) in MATLAB refers to the element Aij of matrix A. the first index is the row number and the second index is the column number.

A minimum MATLAB session the goal of this minimum session (also called starting and exiting sessions) is to learn the first steps: Step1: How to log on. Step2: Invoke MATLAB. Step3: Do a few simple calculations. Step4: How to quit MATLAB. Starting MATLAB After logging into your account, you can enter MATLAB by double-clicking on the MATLAB shortcut icon (MATLAB 7.0.4) on your Windows desktop. When you start MATLAB, a special window called the MATLAB desktop appears. The desktop is a window that contains other

© 2016, IRJET

|

Impact Factor value: 4.45

Begin with a square bracket, [ Separate elements in a row with spaces or commas (,) Use a semicolon (;) to separate rows End the matrix with another square bracket, ].

MATLAB provides extensive documentation, in both printed and online format, to help you learn about and use all of its features. If you are a new user, start with the MATLAB specific sections in this book. It covers all the primary MATLAB features at a high level, including many examples. The MATLAB online help provides task-oriented and reference information about MATLAB features. MATLAB documentation is also available in printed form and in PDF

|

ISO 9001:2008 Certified Journal

|

Page 141


International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395 -0056

Volume: 03 Issue: 12 | Dec -2016

p-ISSN: 2395-0072

www.irjet.net

format. MATLAB Online Help to view the online documentation, select MATLAB Help from the Help menu in MATLAB.

You can enter matrices into MATLAB in several different ways: 1. 2. 3. 4.

The MATLAB documentation is organized into these main topics: 1.

Desktop Tools and Development Environment Start up and shutdown, the desktop and other tools that help you use MATLAB. 2. Mathematics Mathematical operations and data analysis. 3. Programming The MATLAB language and how to develop MATLAB applications. 4. Graphics Tools and techniques for plotting, graphs annotation, printing and programming with Handle graphics. 5. 3-D Visualisation Visualising surface and volume data, transparency and viewing and lighting techniques. 6. Creating Graphical User Interfaces GUI-building tools and how to write call-back functions. 7. External Interfaces MEX-files, the MATLAB engine, and interface to Java, COM and serial port. MATLAB also includes reference documentation for all MATLAB functions. 8. Functional categorical List Lists all MATLAB functions grouped into categories. 9. Handle Graphics property Browser Provides easy access to descriptions of graphics object properties. 10. External Interface Reference Covers those functions used by the MATLAB external interface, providing information on syntax in the calling language, description, arguments, return values. Examples: An index of examples included in the documentation, release Note: new features and known problems in the current release. 11. Printable Documentation PDF versions of the documentation suitable for printing For more information about using the Help browser.

5. 6. 7.

Like most other programming languages, MATLAB provides mathematical expression, but unlike most programming languages, these expressions involve entire matrices. The building blocks of expressions are: 1. 2. 3.

Number: MATLAB uses conventional decimal notation, with an optional decimal point and leading plus or minus sign, for numbers. Scientific notation uses the letter e to specify a power of ten scale factor. Imaginary numbers use either I or j as suffix. MATLAB provides a large number of standard elementary mathematical functions, including abs, sqrt, exp, and sin. Taking the square root or logarithm of a negative number is not an error the appropriate complex result is produced automatically. MATLAB also provides many more advanced mathematical functions, including Bessel and gamma functions. Most of these functions accept complex arguments. Some of the functions, like sqrt and sin, are built in. Built in functions are part of the MATLAB core so they are very efficient, but the computational details are not readily accessible. Other functions, like gamma and sinh are not implemented in M-files. There are some differences between built in functions and other functions. For example, for built in functions, one cannot see the code.

Entering Matrices: The best way for you to get started with MATLAB is to learn how to handle matrices. Start MATLAB and follow along with each example.

|

Impact Factor value: 4.45

Variables Numbers Functions

Variables: MATLAB does not require any type declarations or dimensions statements. When MATLAB encounters a new variable name, it automatically creates the variable and allocates the appropriate amount of storage. If the variable already exists, MATLAB changes its contents and if necessary allocates new storage. Variable names consist of a letter, followed by any number of letters, digits, or underscores. MATLAB is case sensitive It distinguishes between uppercase and lowercase letters. A and a are not same variable.

Matrices and magic squares: In MATLA, a matrix is rectangular array of numbers. Special meaning is something attached to 1-by-1 matrices, which are scalars, and to matrices with only one row or column, which are vectors. MATLAB has other ways of storing both numeric and nonnumeric data, but in the beginning, it is usually best to think of everything as a matrix. The operations in MATLAB are designed to be as natural as possible. Where other programming languages work with numbers one at a time, MATLAB allows you to work with entire matrices quickly and easily.

© 2016, IRJET

Enter an explicit of elements. Load matrices from external data files. Generate matrices using built-in functions. Create matrices with your own functions in M-files. Start by entering Drers matrix as a list of its elements. You only have to follow a few basic conventions. Separate the elements of a row with blanks or commas. Use a semicolon, : , to indicate the end of each row. Surround the entire list of elements with square brackets, [].

|

ISO 9001:2008 Certified Journal

|

Page 142


International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395 -0056

Volume: 03 Issue: 12 | Dec -2016

p-ISSN: 2395-0072

www.irjet.net

4. IMPLEMENTATION Method 1 Step1: We read the input image and display that image with the help of ‘imshow’. Step2: We make that input image into double precision with the help of double which is an inbuilt function. Step3: We initialize red, Green and blue components. Step 4: we make use of RGB equals to (sum double (oo),3) to add up the red, green and blue components three dimensionally. Step5: we find the average values of the red, blue, green. Step6: Next we excess green, Blue and red component of an image separately and displaying all three components. Step7: we are converting green content of image into binary image and we are filtering out the noises from it with the help of median filter and displaying that image. Step8: with the help of bwconncomp we connect the neighborhood components in an image. Step 9: We have used region props to specify which properties we will be using. Step10. Initialize a mask representing each bounding box. Step11: get the coordinates of the boxes. Step12: Get the boxes around the original blobs, of connected images. Step13: We are considering area as a property using region props. Step14: We are getting the pixel values from left to right and from top to bottom. Step15: We are giving some pixel value as a threshold value, if pixel value is greater than threshold value that image turns into white image and if pixel value is lesser than threshold value the images turns into black and that image is displayed. Methods 2

Fig.9. Output of method 1 Fig.9 consists series of output images obtained from area thresholding method. This includes captured input images, extracted green content, red content and blue content present in an input image. Convert input image into binary image. If there is any disturbance present in an converted binary image remove it by using an filter connected components consists of green content of an image which is highlighted by bounding box.

Fig.10. Detected Crop from Method 1 Fig.10, shows the detected crop from captured input image. Only crop content from an image is displayed and this is done with the help of an algorithm called area thresholding method. The obtained image consists of differentiated crop image without any disturbance.

Step1: place K points into the space represented by the objects that are being clustered. These points represent initial group centroids. Step2: Assign each object to the group that has the closest centroid. Step3: When all objects have been assigned, recalculate the positions of the K centroids. Step4: Repeat step2 and step 3 until the centroids no longer move. This produces a separation of the objects into groups from which the metric to be minimized can be calculated. 5. RESULTS Results of matlab code in differentiating crop and weed.

Fig.11. Detected weed from Method 1 Fig.11 shows the detected weed from captured input image. Only weed content from an image is displayed and this is done with the help of an algorithm called area thresholding method. The spraying of herbicide is done only on detected

© 2016, IRJET

|

Impact Factor value: 4.45

|

ISO 9001:2008 Certified Journal

|

Page 143


International Research Journal of Engineering and Technology (IRJET)

e-ISSN: 2395 -0056

Volume: 03 Issue: 12 | Dec -2016

p-ISSN: 2395-0072

www.irjet.net

weed image. We have successfully differentiated weed and crop as shown in fig2 and 3, with the help f area thresholding method.

crops. Hence the further part of developing the weed seeker can be done using the output obtained from area thresholding method. This algorithm can be used for hardware implementation, which can be further used for spraying of herbicides over detected crop image, which is differentiated from are thresholding method. Acknowledgment: We would like to extend my sincerest thanks to Department of Instrumentation Technology, B.V. Bhoomaraddi College of Engineering and Technology, Hubballi, Karnataka for supporting this work 7. REFERENCE [1]. Faisal Ahmed, Hasanul KAbir, Shayla Azad Bhuyan, Hossain Bari, and Eman Hossain, Automated Weed classification with Local pattern based texture descriptors, International Arab Journal of Information Technology, volume 9, pp.384-391. [2]. Mehmet Sezgin, Bulent sankar. Survey over image thresholding techniques and quantitative performance evaluation, journal of electronic imaging.13 (1): 146-165, 2004. [3]. Venkata subbaiah, Gaddam Susmila Aparna, Prashanth B.U.V and D.V.R.sai Gopal, Coumputer aided molecular approach of H and E(Heamotoxylin and Eosin) images of colon cancer, International journal of computer application, Volume44-No.9,April 2012. [4]. Area Thresholding su Hnin Hlaing1, Aung Soe Khaing21 Demonstrator, Department of electronis engineering, Mandalay Technological University, Myanmar Associate Professor, Department of Electronic Engineering, Mandalay Technological university, Myanmar. [5]. Ground based sensing system for weed mapping in cotton Ruixiu suia, J. Alex thomassona, James Wootenc. Biological and agricultural engineering department, Texas A and M University, 2117 TAMu, College station, TX 77843, USA USDA ARS, Stoneville, MS 38776, USA. Agricultural and biological Engineering department, Mississippi state university, Mississippi State, MS 39762, UUSA. [6]. Stackoverflow.com [7]. www.mathwork.com [8]. En.wikipedia.org/wiki/MATLAB

Fig.12.output method 2 Fig.12, consists series of output images obtained from color segmentation K-means clustering method. The output image consists of image labeled by cluster index. We have used three loops of clusters in K-means clustering algorithm. The image shows the result of clusters1, cluster2 and cluster3 with the help of clustering algorithm.

Fig.13 Detected weed from Method 2 Fig.13 shows the detected weed from the captured input image with the help of color segmentation K-means clustering method. Only weed content of an image is highlighter. The obtained image consists of differentiated weed from a captured input image. 6. Conclusion and Future Work The algorithms were implemented in MATLAB and both the outputs were compared. IT was found that the result got from the area thresholding algorithm was better than the one got from color segmentation algorithm because the image outputs from the latter more noise and it can be made better. So opting for the area thresholding method is a good choice among the two for differentiating between the weed and the

© 2016, IRJET

|

Impact Factor value: 4.45

|

ISO 9001:2008 Certified Journal

|

Page 144


Turn static files into dynamic content formats.

Create a flipbook
Design and Development of Automated Weed Seeker and Tracker by IRJET Journal - Issuu