Image Processing in Agriculture
Image Processing in Agriculture
2
2.1. REMOTE SENSING TECHNIQUE: estimator were also reviewed. RS used
In agriculture, Remote for mapping vegetation which provides
Sensing (RS) technique was widely information of manmade and natural
used for various applications. Remote environments. The focus of review was
Sensing was the science of on remote sensing sensors, image
identification of earth surface features processing algorithms to extract
and estimation of geo-biophysical vegetation information along with
properties using electromagnetic classification and limitations.
radiation. RS data and pattern Vegetation extraction using image
recognition technique was used to processing was in two parts:
estimate direct and independent crop
1. Image preprocessing for bad line
area in the study region. Optical and
replacement, radiometric and
microwave data used to classify the
geometric corrections.
crop. Chlorophyll and water were
2. Image classification such as K-
represented by optical data, crop
mean for unsupervised and MLC for
geometry and dielectric properties were
supervised were reviewed.
characterized by microwave. The crop
Hyper spectral imagery for
discrimination was carried out using
vegetation mapping was widely used
either by visual or digital
as compared to multispectral as it was
interpretation techniques. Visual
capable to discriminate complex mixed
techniques based on FCC (False Color
pixel community.
Composite) were generated at different
bands and were assigned with blue, 2.2 IMAGE FUSION :
green and red colors where as the
Image fusion was
digital techniques applied to each pixel
another technique to improve the
and use full dynamic range of
vegetation classification as individual
observations were preferred for crop
sensor may be incomplete,
discrimination. For accurate
inconsistent and imprecise. They
discrimination a multi-temporal
concluded that the Remote sensing
approach was used when single date
was advantageous over traditional
data fails to do so. Spectral unmixing,
methods of vegetation mapping and
direct estimation, crop area
classification. RS sensed images for
estimation, global estimation using
extracting endmembers was the
confusion matrix and regression
3
difficult problem in vegetation. areas in local scale studies as it was
Vegetation mapping was difficult in directly used as input to classification
case for given vegetation species with algorithm. Green index and Relative
relatively homogenous leaf spectral sensitivity index were calculated on
characteristics as it can exhibit the basis of reflectance and irrigation.
marked spectral variance due to Thermal imaging produces better
variability in background spectra. results but cannot be accepted
Endmember extraction algorithm universally in agriculture applications
(EEA) was used to extract the as the plant physiology and climatic
information from remotely sensed conditions varies from region to region.
images. Its enhanced version support
3. WEED CLASSIFICATION:
vector machine – based endmember
Weed classification is a serious
extraction (SVM-BEE) provides highly
issue in the agricultural research.
accurate results. Complex image
Weed classification is a necessity in
(AVIRIS) which comprise large number
identifying weed species for control.
of classes in limited area was used to
There are two types of weed
test the efficacy of SVM-BEE and N-
classification based on the frequency
FINDR endmember algorithms in
of the edges present in them. They are:
linear mixing models. SVMBEE shows
better performance as compared to N-
FINDR and SMACC. The better
performance of SVMBEE was because
of the capability of support vector to
convex hull was superb as well as
robustly noise-tolerant and was able to
accurately estimate endmembers.
Commonly used image
classification techniques were multi-
stage classification, unsupervised
clustering, density slicing with
thresholds, and decision tree
classifications. Normalized Difference
Vegetation Index (NDVI) proved to be
important for identifying irrigated
4
for identifying outdoor plant using
machine vision uses edge based
classifier to identify broad and narrow
weeds. Images acquired in RGB were
converted to gray scales and used to
process as binary image. Bright pixels
in dark background were identified as
weed and classified as in broad and
narrow using threshold values. The
limitation that proposed model does
not classify mixed weeds. In color
detection method images were
captured adjusting color gains and
shutter time to gray plates. Excessive
green and thresholding was used for
segmenting volunteer and non
volunteer potato plant regions. Image
was then transformed using EGRBI
matrix to separate intensity
information. EG and RB values help to
separate potato pixels from sugar beet
pixels. Pixel classification based on K-
means clustering and Bayes classifier
was used to measure the Euclidean
4. WEED DETECTION :
distance. ART2 classifier was also
The term is occasionally tested for Euclidean distance based
used to broadly describe species clustering. Objects classified on
outside the plant kingdom that can threshold value were identified as
live in diverse environments and potato plants VP and sugar beet SB.
reproduce quickly. Weed detection Excess color Ex-C filter was used to
techniques used algorithms based on remove the color red and blue with
edge detection, color detection, green as an intensity value. Ex-C was
classification based on wavelets, fuzzy implemented using formula 2*G-R-B.
etc. Real time weed recognition system Gray level co occurrence matrix and
5
FFT were used as feature extraction Case based reasoning
tools. GLCM represents the occurrence (CBR) was problem solving technique
of gray levels in an image and its its using previous knowledge about
relationship in co-occurrence matrix. problem and solution. Images were
EX-Color based approach was better categorized into light- sunny or cloudy,
than gray scale for better classification presence of sowing errors-true or false,
of weeds crop growth stage-low, medium, high
Wavelet based and infested field. Images were
classification for weeds using Gabor processed through segmentation
wavelet (GW) and GFD for real time methods -S1, S2, elimination-
herbicide applications classifies weeds E1,E2,E3 and filtering- F1 and F2
into broadleaf and narrow – grass were compared with decisive variables,
categories. Color images captured were advantages and drawbacks.
preprocessed to remove red and blue Characteristic attributes were saved as
using modified excess green MExG. Case indexing, then case
This information was applied as input representation and case base structure
to GW and then followed by Gradient was followed. Case retrieval, case
Field Transform.. Spatial locality, retention and learning were the steps
orientation selectivity and frequency where new cases were considered.
characteristics made Gabor wavelet Evaluation has been performed with
popular in image analysis. Convolution different combinations of CBR
between MExG and GW provides the methods proposed and compared. CBR
best contrast levels between plants technique shows high correlation
and soil compared with R and B coefficient as compared to non-CBR
channels. Gradient field transform was methods, Experts.
applied for feature selection based on Fuzzy algorithm for site specific
histogram or gradient bars and curve herbicide application was developed
fitting on gradient bar which shows for reducing application of herbicides
improved results over GW approach. and protection of environment from
ANN was used as classifier to classify pollution. Fuzzy algorithm was applied
weeds into grass and broadleaves. GW in triangular and trapezoidal
and GFD success rate was higher than membership functions for input and
GW used separately. output: low, normal and high
functions for weed coverage thin,
6
average, thick for weed patchiness and
small, medium and large for herbicide
applications.
In this paper we have
implemented two methods for weed
detection. They are:
Weed
detection
4.1 INTER ROW WEED DETECTION: Fig 3: Inter row weed detection.
In this method we can detect the After obtaining the reference
weed that is present in between the image we will compare the next coming
rows of the crop. Here it will process image with it and we will get the weed
the images taken in real time to get the output. The things which are present
weed areas. We will take pictures at 25 in the processed image and are absent
frames per second. Each frame needs in the reference image will be treated
to be operated for 0.04 sec. Here we as the crop. For this we will do XOR
will take the first eight frames operation of the processed image with
generated in 0.3 sec time and we will the already existing reference image
perform the logical AND operation will give the output image containing
between them to get a reference image the weed that is present in between
called crop row image. This reference the rows.
crop row image will be changed after The main disadvantage of this
0.3 sec and will be replaced by the new method is that it cannot identify the
crop row image formed by the AND weed that is present in between the
operation of the frames obtained in plants in a crop row. Also if the crop is
next 0.3 seconds. present outside the row then it will
take that as a weed. So we cannot
relay much on this method to detect
the weed.
7
4.2 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.
9
frequency range). Here the image after weed is more than that of crop. For
the edge detection in above step as knowing the value of the edge
input. To apply filtering the image has frequency here, first we took a image
to be divided into blocks of certain which contains pure weed and
size. There is a trade-off between the calculated the number of edges in it by
block size and gained accuracy. using “for” loops and then we have
If the block size is too large, calculated the number of edges per
frequency estimation can be block for pure weed. That turned out
faulty due to existence of both to be approximately 900. Then we did
crop and weed in the same the same by taking pure plant image
block. and its edge frequency is
If it is too small, the frequency approximately 100. So in this paper we
cannot be calculated correctly took 500 as threshold value so that all
because of inadequate number weed can be detected. Coming to our
of edges in a block. case in this project we have taken an
A small block may image of the size approximately 400 x
detect the inner part of the weed leaf 500 pixels. And we have divided it into
as the crop because of less number of 100 blocks each of size 40x50 pixels.
edges in it. Also in choosing the In the program which we wrote, we
threshold value we need to take care have used for loops for counting the
because its value depends on two number of pixels and if loop for
factors. They are: keeping the threshold value. If the
1. Type of weed present edge frequency is greater than the
2. Type of crop. threshold value then we detect that
The above factors affect the block as weed block and again by
threshold value in this way: using for loops we convert all the
If we have narrow crop leaves pixels in that block into white pixels.
and wide weed leaves then we can say As a result we will be getting an image
that weed has more edge frequency which contain weed blocks as total
than the crop, so here the threshold white blocks and other blocks remains
value will be more. Otherwise unchanged. We will also display the
threshold value will be less. block number by using display
In this paper we take the case of function in MATLAB. The resulting
corn crop where the edge frequency of image will look like:
10
defects such as dark spots, cracks and
bruises on fresh fruits and seeds, etc.
Image processing concepts
for grading of bakery products, fruits,
vegetables and grains were considered
in. Fruits characterized by color, size
and shape, its condition in pre and
post harvesting, damages were
attributes for grading. Vegetables
specially roots, tomatoes, mushrooms
were also compared with its attributes
for grading purpose. Socio economic
Limitations were also discussed.
Similar kinds of approaches for
Fig 8: Final output after filtering grading of Grains, fruits, vegetables
showing the weed affected areas as were reviewed by other researchers.
white blocks. The methods or techniques
in image processing such as image
segmentation, shape analysis and
5. APPLICATIONS IN FRUIT / FOOD morphology, texture analysis, noise
GRADING: elimination, 3D vision, invariance,
Need of accurate pattern recognition and image
grading, sorting of fruits and foods or modality were applied for grading
agriculture products arises because of these categories. Automated system of
increased expectations in quality food sorting food and agriculture products
and safety standards. It causes provides rapid and hygienic inspection
increased processing and labor work. with computer vision. For raisin
Computer vision and image processing grading specially designed hardware
were non destructive, accurate and which captures the image was
reliable methods to achieve target of developed. Image was processed with
grading. Image processing in VB based algorithm for color and size
agriculture and food industries has of raisins. Pixel colors in RGB form
been applied in the areas of sorting, were calculated and with position
grading of fresh products, detection of control, upper and lower pixels were
11
determined. From these pixels middle single chip microcomputer. Captured
position can be determined and image was converted to G-R so that
features were extracted. Raisins with background can be separated after
bad grade were identified as threshold. K-mean clustering was used
background and others in good to grade the strawberries. Shape was
category. From confusion matrix the graded into long-taper, square, taper
classification rate obtained was higher and rotundity using R-G channel and
as compared to human experts. This segmentation. This was used to find
algorithm was also applicable to lentil out contour helpful in indentifying the
and almond. For detection of skin major axis of direction. Similarly
defects in citrus fruit PCA method was horizontal line with threshold value
used for Multivariate Image Analysis was identified for size. Strawberry
(MIA). Images captured with 3CCD color feature was extracted by the
camera were applied to MIA algorithm dominant color method on a* channel
which unfolds the images in RGB and in La*b* color space. System was also
spatial information. Reference proposed for multi-feature gradation
eigenvector formed by training with system. Size detection observed has
defect free citrus was used to compute average error of 3.55, color detection
T2 matrix. Threshold value decides the success rate was 88.8% and overall
defect in fruit, if the value was greater, grading has 94%. Fruits and
then it was considered as defect. This vegetables classification using features
leads to preparation of defect map. and classifiers with fusion was
Multi-resolution and post processing proposed. Images were the collected as
techniques were used to speed up the a data over the period for distribution
process with three different measures. in supermarkets. 8bit color images
In study of 9 defects detection average were classified on the basis of
correct detection was 91.5% and statistical, structural and spectral
classification into four damaged basis. Image descriptors like global
/sound classes was 94.2%. color histogram, Unser’s descriptors,
K-mean clustering for color coherence vector,
strawberry grading into different border/interior, appearance
categories on the basis of shape, size descriptor, supervised learning
and color was proposed. The hardware techniques were considered. For
includes camera, photo sensors with background subtraction k-mean was
12
utilized. kernels using imaging systems based
Image analysis was on real time soft X-rays or transmitted
carried out by separating R, G and B light was proposed. X-ray images were
using Bayer filtering. Each plane was analyzed using histogram technique.
separated from blank image to identify To avoid illumination
the background and object. Three and manmade disturbances images
intensity histograms extracted as were captured with flat bed scanner.
features were used for classification. Features were extracted using
Each histogram represents the scaled morphological feature analysis and
red, green, or blue pixel. Intensities color feature. Morphological feature
from the wheat kernel image were analysis of corn kernels was used to
computed. Parameters like mean and extract basic geometric features such
standard deviation of the red, green, as area, perimeter and derived shape
and blue intensities were also features. Color analysis was used for
computed. Linear Discriminant classification. Mean and standard
analysis was used as classifier. deviation of these color components
Classification accuracy was 97% were calculated to extract 28 color
compared to histogram feature method features for identification. To reduce
(88%). Average Accuracy of computational burden and to enhance
classification was greater than the the performance of classification
commercial color sorters. stepwise Discriminant analysis was
The hardware based used.
grain classifier was developed with 6. AUTOMATIC SPRAYER:
three CMOS sensor and FPGA To reach our ultimate goal of
combination for higher speed of reducing pesticide usage, we need to
inspection. Red pixels were used to spray it only in the weed areas. Here
classify the red and white wheat we will make use of the image from
grains. Parameter like variance was filtering by taking the weed block
also utilized. The same hardware was numbers. The sprayer we use may be
used for popcorn classification of blue- a robotic hand or a set of sprinklers or
eye damage. Classification accuracy motors etc. Here as per the previous
rate was 91 % in wheat and corn image we have got a total of 100
cases. The classification of vitreous blocks. So to spray pesticide we use a
and non-vitreous durum wheat frame that has got exact dimension of
13
the area for which the photograph is
taken. So the frame will have 10 rows
as we have got 10 rows in the previous
image (image 10x10 blocks). We will be
placing 10 motors one each in all the
10 rows. Then we will connect them to
a driver which is then connected to
“Arduino uno” microcontroller.
sprayer that we have used here will be: with a AC to DC adapter or a battery to
get started. First we will check the first
row of the filtering output to find any
weed blocks. . If any blocks are found
we will give inputs to the controller in
a way that the sprayer goes to that
block and sprays the herbicide. The
only input we need to give to the
sprayer is the time for which the motor
14
has to move to get to the weed block that block it will spray the herbicide by
site. This can be given to the sprayer making use of the sprinkler connected
by using the function “delay” available to it. The pins 3,4,5 of Arduino uno
in the arduino uno. will act as output pins. Pins 3 and 4
Let us consider that the frame are for the movement of the motor and
we took is of 2 meter length. Means the pin 5 will be for the working of
each motor has a maximum distance sprinkler.
of 2 meters to cover. Length of each But here to give the outputs from
block in a row of the frame we built is MATLAB as inputs to the Arduino uno
0.2 meters. The motor in each row has we don’t have any automatic method,
two side wheels arranged to that row so we have to take care of it manually.
of the frame So the motor moves as 8. CONCLUSION AND FUTURE
per the movement in the wheels. Let WORK:
us consider that the motor covers a Image processing
distance of 1 meter in 4 seconds of technique has been proved as effective
time. By making use of the machine vision system for agriculture
circumference of the wheel we can domain. Imaging techniques with
calculate the number of rpm required different spectrum such as Infrared,
for the same. hyper spectral imaging, X-ray were
In order to move the motor we useful in determining the vegetation
need to give the time delay as input to indices, canopy measurement,
the controller. Time delay is the time irrigated land mapping etc with greater
motor travels in a direction. As per the accuracies. Weed classification which
data we have: affects the yield can be correctly
Time to travel 1 meter is = 4 sec classified with the image processing
Time to travel for one block(0.2 m) is algorithms. The accuracy of
= 0.8 sec classification varies from 85% - 96%
Time taken by the motor to travel “x” depending on the algorithms and
blocks from the initial position is limitations of image acquisition. Thus
=0.8*x seconds with such great accurate classification
So the only input we need to farmers can apply herbicides in correct
give is the value of “x” (weed block form. This approach helps to save the
number in that row), that will vary environment as well as the cost. In
from 0 to 9. When our motor reaches case of fruit grading systems the
15
segmentation and classification can In this paper we have developed
also be achieved with great accuracy a method by which we can detect weed
as the case with weed detection. In by using image processing. Then we
this case also the classification gave the input of the weed blocks to
accuracy can be obtained up to 96% the automatic sprayer which sprays
with correct imaging techniques and only in these blocks. By doing so we
algorithms. Then we gave the input of can reduce the usage of weedicides,
the weed blocks to the automatic thus saving the environment. If we
sprayer which sprays only in these have two are more types of weeds of
blocks. By doing so we can reduce the different edge frequencies present in
usage of weedicides, thus saving the the same field. Then the threshold
environment. If we have two are more value must be less than the minimum
types of weeds of different edge edge frequency of the weeds present. If
frequencies present in the same field. a small weed is present separately in
Then the threshold value must be less the field means not in a group then it
than the minimum edge frequency of cannot be detected because it cannot
the weeds present. If a small weed is meet the threshold condition. If both
present separately in the field means the weed and crop have nearly same
not in a group then it cannot be edge frequency we should be very
detected because it cannot meet the careful in selecting the threshold
threshold condition. If both the weed value. The weed block numbers from
and crop have nearly same edge the filtering step cannot be given
frequency we should be very careful in automatically to the motor, it has to be
selecting the threshold value. The done manually. This will take some
weed block numbers from the filtering time.
step cannot be given automatically to REFERENCES:
the motor, it has to be done manually.
1. Ranganath R. Navalgund,
This will take some time. Thus we can
V. Jayaraman and P. S. Roy, 2009,
conclude that image processing was
“Remote sensing applications: an
the non invasive and effective tool that
overview”, current science, vol. 93, no.
can be applied for the agriculture
12, 1747-1766.
domain with great accuracy for
analysis of agronomic parameters. 2. Kamarul Ghazali, Mohd
Mustafa, Aini Hussain, 2009,“Color
16
image processing of weed “Hyperspectral agricultural mapping
classification: A comparison of Two using Support Vector MachineBased
feature extraction technique”, Endmember extraction (SVM-BEE)” ,
proceedings of ICEEI Institute Vol. 17, No. 26 / OPTICS EXPRESS
technology Bangdung, Indonesia, pp 23823
607-610
8. J. Bossua, Ch. Géea, G.
3. Imran Ahmed, Syed shah, Jones, F. Truchetetb, 2012, “Wavelet
Md Islam, Awais Adnan, 2010, “ A Real transform to discriminate between
time specific weed recognition system crop and weed in perspective
using statistical methods” , World agronomic images”, Science
academy of science, engineering and Directcomputers and electronics in
technology, pp 143-145. agriculture 6 5 (2009) 133– 143
18