04-10-2016, 03:19 PM
1457702874-IJIREEICE1FaamarnathImageProcessing.pdf (Size: 285.01 KB / Downloads: 19)
Abstract: Agriculture is the backbone of human sustenance on this world. Now a days with growing population we
need the productivity of the agriculture to be increased a lot to meet the demands. In olden days they used natural
methods to increase the productivity, such as using the cow dung as a fertilizer in the fields. That resulted increase in
the productivity enough to meet the requirements of the population. But later people started thinking of earning more
profits by getting more outcome. So, there came a revolution called „Green Revolution‟. After this period usage of
deadly poisons as herbicides has increased to a drastic level. By doing so we got success in increasing the productivity
but we have forgot damage done to the environment, which will arise a doubt in our sustenance on this beautiful earth.
So, in this project we have implemented some methods to reduce the usage of herbicides by spraying them only in the
areas where weed is present. In this paper we implemented image processing using MATLAB to detect the weed areas
in an image we took from the fields.
INTRODUCTION
In olden days weed detection was done by employing some
men especially for that purpose. They will detect the weed
by checking each and every place of the field. Then they
will pluck them out manually using their hands. Later with
the advancement in the technology they started using the
herbicides to remove the weeds. But to detect the weeds
they are still using manual power in many parts of the
world.
Later there came few methods to detect the weeds
automatically but due to lack of their accuracy they are
unable to reach to the people. Then they started using
image processing for this purpose.
In this paper our main aim is to detect the weed in the crop
by using image processing. Then we will give the inputs of
the weed areas to an automatic spray pesticide only in those
areas. For this we need to take a photograph of the field
with good clarity to detect the weeds with more accuracy.
Taking a photograph can be done by attaching a camera to
a tractor or taking them manually. Then we will apply
image processing to that image using MATLAB to detect
the weed.
In this paper we have implemented two methods for weed
detection. They are:
1. Inter row weed detection
2. Inter plant weed detection
The final result will be containing the weed areas which we
will give as inputs to the automatic sprayer, implemented
using „Arduino uno‟ microcontroller.
WEED DETECTION
A weed is a plant considered undesirable. Weeds have no
botanical classification value, since a plant that is a weed in
one context is not a weed when growing where it is wanted.
It is applied to any plant that grows or reproduces
aggressively, or is outside its native habitat. The term is
occasionally used to broadly describe species outside the plant kingdom that can live in diverse environments and
reproduce quickly. These have seeds that persist in the soil
seed bank for many years. They compete with the desired
plants for the resources that a plant typically needs,
namely, direct sunlight, soil nutrients, water, and (to a
lesser extent) space for growth.
Weed classification is a serious issue in the agricultural
research. Weed classification is a necessity in identifying
weed species for control. There are two types of weed
based on the frequency of the edges present in them. They
are:
1. Weed with narrow leaves (have less edge frequency).
2. Weed with wide leaves (have more edge frequency).
INTER ROW WEED DETECTION
In this method we can detect the weed that is present in
between the rows of the crop. Here it will process the images taken in real time to get the weed areas. We will
take pictures at 25 frames per second. Each frame needs to
be operated for 0.04 sec. Here we will take the first eight
frames generated in 0.3 sec time and we will perform the
logical AND operation between them to get a reference
image called crop row image. This reference crop row
image will be changed after 0.3 sec and will be replaced by
the new crop row image formed by the AND operation of
the frames obtained in next 0.3 seconds. After obtaining the reference image we will compare the
next coming image with it and we will get the weed output.
The things which are present in the processed image and
are absent in the reference image will be treated as the
crop. For this we will do XOR operation of the processed
image with the already existing reference image will give
the output image containing the weed that is present in
between the rows.
The main disadvantage of this method is that it cannot
identify the weed that is present in between the plants in a
crop row. Also if the crop is present outside the row then it
will take that as a weed. So we cannot relay much on this
method to detect the weed.
IV. INTER PLANT WEED DETECTION
Inter row weed detection does not deal with the weed
between the plants in the rows. In order to overcome this
problem Inter Plant Weed Detection is employed
This part of the algorithm prepares an image for further
advanced processing and is consists of: Loading the image
from source, color segmentation and edge detection.
Color segmentation is one of the image segmentation
method used to separate the crop (which also include weed)
from the background. This is done through Kmeans
clustering. The method helps in separating all the visually
distinguishable colors from one another. The L*a*b* color
space (also known as CIELAB or CIE L*a*b*) enables to
quantify these visual differences. The L*a*b* space
consists of a luminosity layer 'L*', chromaticity-layer 'a*'
indicating where color falls along the red-green axis, and
chromaticity-layer 'b*' indicating where the color falls
along the blue-yellow axis. All of the color information is
in the 'a*' and 'b*' layers. The difference between two
colors can be measured using the Euclidean distance
metric.
Clustering is used to group the pixels of same colors into
group of objects, thereby making it easy to segment. The
output image comprises of only two colors. The desired
image after color segmentation consists of green color (the
crop and the weed) and the remaining part of image black,
making the image feasible to the step in the process, edge
detection.
Edge detection is also a method of image segmentation
which uses the fact that the edge frequencies and veins of
both the crop and the weed have different density
properties (strong and weak edges), to separate the crop
from the weed.
The image after both color segmentation and edge
detection is left with the edges and veins of both the crop
and the weed in white and the remaining part completely
black.
Although several sophisticated and accurate methods for
color segmentation exist, many of them are not fast enough
for real-time purposes. As in color segmentation, several
methods with different accuracy and speed are available
which their most well-known ones are Canny and Sobel
edge detection algorithms. The operations like color
segmentation, edge detection make the image ready for the
next operation called filtering.
Filter here is used for recognizing regions in which edges
appear with a frequency in a specific range (weed
frequency range). Here the image after the edge detection
in above step as input. To apply filtering the image has to
be divided into blocks of certain size. There is a trade-off
between the block size and gained accuracy. If the block
size is too large, frequency estimation can be faulty due to
existence of both crop and weed in the same block. If it is
too small, the frequency cannot be calculated correctly
because of inadequate number of edges in a block. A small
block may detect the inner part of the weed leaf as the crop
because of less number of edges in it. Also in choosing the
threshold value we need to take care because its value
depends on two factors. They are:
1. Type of weed present
2. Type of crop
The above factors affect the threshold value in this way: if
we have narrow crop leaves and wide weed leaves then we
can say that weed has more edge frequency than the crop,
so here the threshold value will be more. Otherwise
threshold value will be less. In this paper we take the case
of corn crop where the edge frequency of weed is more
than that of crop. For knowing the value of the edge
frequency here, first we took a image which contains pure
weed and calculated the number of edges in it by using
„for‟ loops and then we have calculated the number of
edges per block for pure weed. That turned out to be
approximately 900. Then we did the same by taking pure
plant image and its edge frequency is approximately 100.
So in this paper we took 500 as threshold value so that all
weed can be detected. Coming to our case in this project