Machine Vision for Precise Control of Weeds

geckokittenAI and Robotics

Oct 17, 2013 (4 years and 6 months ago)


Machine Vision for Precise Control of Weeds
Jose Blascol, Jose V. Benlloch2, Manuel Agusti2, Enrique Moltol
NIA. Cra Moncada-Naquera km 4,5,46113 Moncada, Valencia (Spain).
2 DISCA-Univ.Pol. Valencia: Apartado 22012.46071 Valencia (Spain)
Consumers demand for natural qua1ity products and concem about the ecological impact of agriculture is growing
in all European countries. For the fanners to fo1low the evolution of the market, new pr()cedures have to be introduced in
agriculture to obtain satisfactory production levels, keeping high quality standards, without damaging the environment.
Image processing techniques have been traditionally used in the industry, where controlling most of the
environmental variables (mainly lighting, background and speed) uses to be easy. Although these techniques can be also
useful in agriculture, working outdoors is much more complicated, mainly due to the variability of the natural objects and the
environmental conditions. European Project AIR-cr93-1299 (P A TCHWORK) was aimed at reducing or eliminating the use
of chemicals by automatical1y detecting the position and/or density of weeds using computer vision and applying an
herbicide treatment, which could be chemical or mechanical. This paper descnDes the work carried out in developing image
analysis procedures for two different pwposes:
-In horticultura1, row crops, the aim was to develop a real-time machine vision system that provides the position of
weeds to a moving robot that will apply an electric discharge to them, thus eliminating the use ofherbicides.
-In cereals, the objective was to create weed density maps that will help an especia1 sprayer boom, inco1porating a
GPS sensor, to dose the herbicide at 4 concentrations, corresponding to 4 infestation levels during operation.
The first system is based on a Bayesian algorithm for segmenting the images, which requires to be previously
trained by an expert, who selects areas of different images, trying to represent the colour variability of the p1ants, the soil and
the weeds. After segmentatioD, pixels belonging to class soil are correctly classified and morphologica1 operatioDS are
applied to discriminate between plants and weeds. The system is able to properly locate more than 90% of weeds with very
ljttle confusjon with the crop ( 1 %)in lettuce cultures. Current processing time is under 500 IDS.
The second vision system uses a nonnalised difference index (green and red channels ) to enhance the contrast of the
field images. The~ growing techniques are applied to di$criminate between vegetation and background. Once p1ant pixels
are identified, weeds are distiñgülshed fiom ilie- crop by estimating the positlon of the row and oriljjlóyi1igshape ana1ysis
techniques. The perfonnance of the method showed that more than 85% of weeds were properly detected.
Keywords: machine vision, weed control, robotics,
Digital image analysis has been traditionally used in industrial environments for automation of different tasks,
where workilig conditions can be easily controlled. However, these techniques are especially useful in agriculturaJ
Part of the SPIE Conference on Precision Aoriculture and
Bioloaical Qualitv .Boston. Massachusetts .November 1998
SPIE Vol. 3543. 0277-786X199/$10.00
In the case of cereals, neá.r-ground images were taken during 1995/6 springtime in Danish fields, under actual field
conditions. Either photographic cameras or CCD colour cameras were used to sample areas of about 0.25 m2, since this area
has been COnm1Only used in visual surveyings, and included examples with different row crop densities, various weed
species, diverse soil background, etc. Images were digitised using a colour scanner and a frame grabber respectively.
Starting from the colour image, a nom1alised difference index (green and red cbannels) was introduced to enbance
the contrast between vegetation and background. Then, a global thresholding followed by a growing process lets vegetation
pixels to be discriminated. Starting from the segmentation results, the position of crop rows could be computed by defining a
kind of histogram so that plant pixels were summed per columns (in the row crop direction). In order to determine the row
position, after applying a low-pass filter to the resultant curve, their absolute maxima were computed.
Since in the context of row crops, a weed rnay be considered as a plant out of place, a first approxirnation to detect
weeds is to look for plants in betwe~n the rows. Forthisstrategy to succeed, it would be advisable that cereal crops should
have a certain one-dimension periodicity, i:e:-fuedlSt-ance be~een rows shoú1d be approximately consfáñt (a góod seed bed
preparation would be required). Nevertheless, using on1y colour inforrnation, pieces of crop not connected to the rows
(mainly due to twisted leaves) were considered as weeds, resulting in an important error source. Taking into account that
shape features of cerealleaves are different from those of broad-leaf weeds, shape analysis techniques have been introduced
before considering an object as a weed.
The flrst step ín shape analysis aimed at describíng labelled objects as a vector ín a geometrica1 feature space
(major axis length, aspect ratio, area, roundness, geometric invariants based on norma1ised central moments, etc.) In order to
determine which features were the most useful to discriminate between both classes (weeds and crop), an initia1 selection
process was carried out. For each feature, the Fisher ratio [5] was used as a measure of how overlapped the classes were.
Once the best features were selected, different Pattern Recognition methods have been essayed to design and evaluate the
optimum classifiers. Three methods have been studied: heuristic approach, Bayes rule and K-Nearest Neighbour [6]. Images
3,4 and 5 show the process described aboye.
Figure 3. Original image
Figure 4. NDI image.
Figure 5. Final irnage.
The results of the non-linear Bayesian Discriminant Analysis segmentation a1gorithm applied to lettuce culture
images are shown in the table 1. These results show a correct pixel classification between the classes plant and soil.
Table 1. Pixel segmentation result per image
In order to describe the nature of the iIDages tested, table 3 shows average parameters of 60 iIDages. It can be
observed that there was an average of 11.4 weeds per iIDage. An average of 9.5 weeds per iIDage was correctly detected,
which corresponds with the 84% of the total weeds. 1.4 false detections per iIDage were caused Inain1y by stones and 0.8
weeds were detected twice due to the system detected different 1eafs of the sarne weed as different weeds. The tiri1e
consumed by the system to analyse an iIDage depends on the number of weeds present in the image. With the average of 11,4
weeds per image, the average time for the process was 482 ms.
Table 3.Average results ofthe vision system
Figure. 6: Relationship between visual and automatic weed detection
Accomplishing the initial specifications, this work demons1rates the feasibility of a machine vision system based in
non-Iinear Bayesian Discriminate Analysisin the RGB space that can be used in a robotic system for non-chemical weeding.
The vision system is able to properlylocate weeds in artificially shadowed scenes.
Time consumed for the whole process (acquisition) processing and transfer ofweed coordinates to the robot) allows
the robot to make the weeding process in real time. The current system is unable to separate weeds individually in severely
infested fields.
Because the image analysis procedure strongly depends on color and is based in a previous training, the perforrnance of
the system cou1d vary depending of external variables affecting to light conditions, as clouds. For this same reason, the
procedure has to be tested in more lighting conditions in the field. However, it is envisageab]e to create a database of
discriminating functions in different lighting conditions to be autornatica1ly applied in each lighting case.
The next development step would probably require a new prototype design, and would allow more detailed studies
and experimentation (percentage ofweed control, etcetera). The goal is now to evaluate and continuously improvethe
performance ofthe machine, including the use ofDigitaI SignaI Processors (D.S.P .) and para1IeI processing.
In cereals, weed detection using image processing techniques bas shown a good p()tential to estimate weed density
distribution in spite the perceived difficu1ties. The similarity in spectral reflectance betWeen weed and crop plants together
with the great variability of nat\ri"al scenes (1ighting conditions, groWth stage, crop geometry) are the Inain error sources. In
particular, it seerns possible to obtain more accurate estimation of weed leaf area or coverage with the vision method than
with the visual surveyings, in spite of deviations around the regression line (number of ).
However, it looks convenient that this approach be complemented by other sources of information (species
identification, historic yield maps, etc.) before generating weed maps sufficiently comprehensive for using in a patch
spraying system
In order to improve tbe success rate, different approaches rnay be undertaken. Concerning acquisition, B/W video
cameras equipped witb NJR fi1ters, seems to provide enhanced irnages which facilitates initia1 segmentatioD; In tbe same
way, techniques for controlling lightíng conditions, such as tbe utilisation of a diffuser, would simplify tbe se~entation
process. On tbe otber hand, more resolution irnages shou1d be obtained to reduce tbe error rate of both segmentation and
shape analysis steps. Finally, using "double space" between rows wou1d máke easier tbe detection of weeds and probably
improve the results.
This research has been partially supported by the Directorate-General VI for Agricu1ture oí the European
Community, contracts AIR3-CT93-1299 and AIR3-BM93-1488.
[1] Thompson, J.F., Stafford, J.V, and Miller, P.C.H. 1991. Potential for automatic weed detection and selective herbicide
application. Crop-Protection Vol.10: pp. 254-259.
[2] Pardo, A., Suso, M.L., EchavaIri, F. and Lomas, A. 1993. Discriminación entre pimiento (capsicum annum L.) y malas
hierbas por medio de técnicas de reflectancia. Actas del Congreso de la Sociedad Española de Malherbología. pp. 268-