Content uploaded by Gabriel Spadon
Author content
All content in this area was uploaded by Gabriel Spadon on Dec 16, 2017
Content may be subject to copyright.
A smartphone application to measure the quality of pest control
spraying machines via image analysis
Bruno Brandoli Machado∗
Computer Science Department
Federal University of
Mato Grosso do Sul
Ponta Pora, Brazil
Gabriel Spadon
Institute of Mathematics
and Computer Science
University of Sao Paulo
Sao Carlos, Brazil
Mauro S. Arruda
Computer Science Department
Federal University of
Mato Grosso do Sul
Ponta Pora, Brazil
Wesley N. Goncalves
Computer Science Department
Federal University of
Mato Grosso do Sul
Ponta Pora, Brazil
Andre C. P. L. F. Carvalho
Institute of Mathematics
and Computer Science
University of Sao Paulo
Sao Carlos, Brazil
Jose F. Rodrigues-Jr
Institute of Mathematics
and Computer Science
University of Sao Paulo
Sao Carlos, Brazil
ABSTRACT
The need for higher agricultural productivity has demanded the
intensive use of pesticides. However, their correct use depends on
assessment methods that can accurately predict how well the pesti-
cides’ spraying covered the intended crop region. Some methods
have been proposed in the literature, but their high cost and low
portability harm their widespread use. This paper proposes and
experimentally evaluates a new methodology based on the use of
a smartphone-based mobile application, named DropLeaf. Exper-
iments performed using DropLeaf showed that, in addition to its
versatility, it can predict with high accuracy the pesticide spray-
ing. DropLeaf is a ve-fold image-processing methodology based
on: (i) color space conversion; (ii) threshold noise removal; (iii)
convolutional operations of dilation and erosion; (iv) detection of
contour markers in the water-sensitive card; and, (v) identication
of droplets via the marker-controlled watershed transformation.
The authors performed successful experiments over two case stud-
ies, the rst using a set of synthetic cards and the second using a
real-world crop. The proposed tool can be broadly used by farmers
equipped with conventional mobile phones, improving the use of
pesticides with health, environmental and nancial benets.
CCS CONCEPTS
•Human-centered computing →Mobile computing
;
Mobile
phones
;
•Computing methodologies →Image segmenta-
tion;Computer vision;
∗Corresponding author — brunobrandoli@gmail.com.
Permission to make digital or hard copies of all or part of this work for personal or
classroom use is granted without fee provided that copies are not made or distributed
for prot or commercial advantage and that copies bear this notice and the full citation
on the rst page. Copyrights for components of this work owned by others than ACM
must be honored. Abstracting with credit is permitted. To copy otherwise, or republish,
to post on servers or to redistribute to lists, requires prior specic permission and/or a
fee. Request permissions from permissions@acm.org.
SAC 2018, April 9–13, 2018, Pau, France
©2018 Association for Computing Machinery.
ACM ISBN 978-1-4503-5191-1/18/04. . . $15.00
https://doi.org/10.1145/3167132.3167237
KEYWORDS
Mobile Application, Image Processing,
Pesticide Spraying Analysis, Deposition Analysis
ACM Reference Format:
Bruno Brandoli Machado, Gabriel Spadon, Mauro S. Arruda, Wes-
ley N. Goncalves, Andre C. P. L. F. Carvalho, and Jose F. Rodrigues-Jr. 2018.
A smartphone application to measure the quality of pest control spray-
ing machines via image analysis. In Proceedings of SAC 2018: Symposium
on Applied Computing (SAC 2018). ACM, New York, NY, USA, 8 pages.
https://doi.org/10.1145/3167132.3167237
1 INTRODUCTION
The world population is estimated to be 7 billion people with a
projection of increasing to 9.2 billion by 2050. An increase that will
demand nearly 70% more food due to changes in dietary habits
(more dairy and grains) in underdeveloped countries [
4
]. To cope
with such a challenge, it is mandatory to increase the productivity
of existing land, which is achieved by means of less waste along the
food chain, and by the use of pesticides. Pesticides correspond to
chemical preparations for destroying weed plants (via herbicides),
fungal (via fungicides), or insects (via insecticides) [
1
]. The use of
pesticides is disseminated worldwide, accounting for a 40-billion-
dollar annual budget [
13
] with tons of chemicals (roughly 2 kg per
hectare [
10
]) being applied in all kinds of crops with the aim of
increasing the production of food. Current trends point that a large
range of agricultural and horticultural systems are to face heavier
pressures from pests, leading to a higher demand for pesticides.
In this scenario, it is important that the correct amount of pes-
ticide is sprayed on the crop elds. Too much and there might be
residues in the produced food along with environmental contam-
ination; too little and there might be regions of the crop that are
not protected, reducing the productivity. Besides, irregular spray
coverage might cause pest and/or weed resistance or behavioral
avoidance [
11
,
15
]. In order to evaluate the pulverization, it is nec-
essary to measure the spray coverage, that is, the proportional area
covered by the pesticide formulation droplets (water carrier, active
ingredients, and adjuvant).
The problem of measuring the spray coverage abridges to know-
ing how much pesticide was sprayed on each part of the crop eld.
The standard manner to do that is to distribute oil or water-sensitive
SAC 2018, April 9–13, 2018, Pau, France B. B. Machado et al.
cards (WSC) over the soil; such cards are coated with a bromoethyl
dye that turns blue in the presence of water [
7
]. The problem, then,
becomes assessing each card by counting the number of droplets per
unit area, by drawing their size distribution, and by estimating the
percentage of the card area that was covered; these measures allow
one to estimate the volume of sprayed pesticide per unit area of the
crop. If done manually, this process is burdensome and imprecise.
This is where automated solutions become the rst need, motivat-
ing a number of commercial solutions including the Swath Kit [
12
],
a pioneer computer-based process that uses image processing to
analyze the water-sensitive cards; the USDA-ARS system [
17
], a
camera-based system that uses 1-
cm2
samples from the cards to
form a pool of sensor data; the DropletScan [
14
], a atbed scanner
dened over a proprietary hardware; the DepositScan system, made
of a laptop computer and a handheld business card scanner [
19
];
and the AgroScan system
1
, a batch-based outsource service that per-
forms analyzes over collected cards. All these systems, however, are
troublesome to carry throughout the eld, requiring the collection,
scanning, and post-processing of the cards, a time-consuming and
labor-intensive process. An alternative is to use wired, or wireless,
sensors [
2
]; an expensive solution that demands constant mainte-
nance.
Since there is a consensus with respect to the need of achieving
a homogeneous spray coverage to gain productivity in agricultural
and horticultural systems, there is room for research in innovative
means of evaluating the spraying of pesticides. Such means might
benet from the current commodity technology found in mobile
cell phones, which carry computing resources powerful enough to
perform a wide range of applications. In the form of a cell phone
application, it is possible to conceive a readily-available solution,
portable up to the crop eld, to aid farmers and agronomists in the
task of measuring the spray coverage and, hence, in the decision-
making process concerning where and how to pulverize. This is the
aim of the present study, in which we introduce DropLeaf, a cell
phone application able to estimate the amount of pesticide sprayed
on water-sensitive cards. DropLeaf works on regular smartphones,
what signicantly simplies the assessment of the pesticide appli-
cation. It uses the cell phone’s camera to capture images of the
spray cards, instantly producing estimates of the spray coverage
by means of image processing techniques.
The remainder of the paper is structured as follows. Section 2
describes the steps of the proposed approach to measure the quality
of pest control spraying. In addition, in this section, we describe
the techniques implemented in the mobile application. In Section 3,
we show the results achieved by our application. Section 4 reviews
major points related to our results. Conclusions come in Section 5.
2 METHODOLOGY & APPLICATION
In this section, we introduce our methodology, named DropLeaf, to
estimate the pesticide spray coverage. The aim of the technique is
to measure the coverage area of water-sensitive spray cards, so to
aid in the estimation of the crop pesticide coverage, as discussed in
Section 1. DropLeaf is based on image processing techniques built
up on a mobile application that is functional on commodity cell
phones. The software calculates measures from the drops observed
1http://www.agrotec.etc.br/produtos/agroscan/
on the spray cards, presenting statistics that enable the assessment
of the spraying:
•Coverage Density (CD)
: given in percentage of covered
area per area unit in cm2;
•Volumetric Median Diameter (VMD)
: given by the 50th
percentile DV0.5of the diameter distribution;
•Diameter Relative Span (DRS)
: given by
DRS =
DV0.9−DV0.1
DV0.5
, where
DV0.1
is the 10th percentile and
DV0.9
is the 90th percentile of the diameter distribution.
The three measures are used to understand how much of the
eld was covered with pesticide and how well the pesticide was
dispersed; the ner the diameters and the higher the coverage area,
the better the dispersion.
In order to calculate those measures, it is necessary to determine
the diameter (in micrometers) of each drop observed in a given
card. Manually, this is a laborious task that might take hours per
card. Instead, DropLeaf uses an intricate image processing method
that saves time and provides superior precision when compared to
manual inspection and to former techniques.
Figure 1 illustrates the image processing method of DropLeaf,
which consists of ve steps applied to each spray card image: (I)
color space conversion to grayscale; (II) binarization by thresh-
olding (noise removal); (III) dilation and erosion in distinct copies
of the image; (IV) complement operation over dilated and eroded
images to produce contour markers; (V) drop identication via
marker-controlled watershed. Following, we explain each step spec-
ifying why it was necessary and how it relates to the next step. To
illustrate the steps of the method, we provide a running example
whose initial spray card image is presented in Figure 1(a).
2.1 Grayscale transformation
After the acquisition of an image via the cellphone camera
Ior i дin al (x,y)=(Rxy,Gxy,Bxy)∈
[0
,
1]
3
, the Step 1 is to con-
vert it to a grayscale image
Iдr ay(x,y)∈
[0
,
1]. This is necessary to
ease the discrimination of the card surface from the drops that fell
on it. We use the continuous domain of [0,1] so that our formalism
is able to express any color depth; specically we use 32 bits for
RGB and 8 bits for grayscale. Color information is not needed as it
would make the computation heavier and more complex. This rst
step, then, transforms the image into a grayscale representation,
see Figure 1(b), according to:
Iдr ay(x,y)=0.299 ∗Rxy+0.587 ∗Gxy+0.114 ∗Bxy(1)
2.2 Binarization
Here, the grayscale image
Iдr ay
passes through a threshold-based
binarization process – Step 2, a usual step for image segmenta-
tion. Since the grayscale is composed of a single color channel,
binarization can be achieved simply by choosing a threshold value.
Gray values
Iдr ay(x,y)
below the threshold become black, and
Iдr ay(x,y)
values above the threshold become white. Since spray
cards are designed to stress the contrast between the card and the
drops, the threshold value can be set as a constant value – we use
value 0
.
35 corresponding to value 90 in the 8-bit domain [0
,
255].
This is a choice that removes noise and that favors faster processing
if compared to more elaborated binarization processes like those
A smartphone application to measure the quality of spraying machines via image analysis SAC 2018, April 9–13, 2018, Pau, France
Figure 1: The image processing method of DropLeaf. It starts by loading an image of a water sensitive paper. Then, it performs a color-space
transformation to obtain a grayscale version of the same image — Step 1. Subsequently, the grayscale image is binarized to isolate the drops
and to remove noise — Step 2. Next, in two distinct copies of the noisy-removed image, it applies morphological operations of Dilation and
Erosion; the dilated image is inverted to contrast with the color of the eroded one — Step 3. The next step is to compute the dierence between
the two images, delineating the contours (masks) of the droplets. The resulting image is used to identify the contours’ markers that delimit
the area of each drop — Step 4. Finally, the contours are used to segment the drops in sheds — Step 5, providing the tool with a well-dened
set of droplets.
based on clustering or on gray-levels distribution. Figure 1(c) de-
picts the result, an image Ibi nar y(x,y)∈ {0,1}given by:
Ibi na ry(x,y)=
0,if Iдr ay(x,y)<0.35
1,otherwise (2)
2.3 Dilation and erosion
At this point, we need to identify the contours of the drops – Step
3, which will delimit their diameters. We use an approach based on
convolution operators of dilation
⊕
and erosion
⊖
[
9
]. We proceed
by creating two copies of the binary image. One copy passes through
dilation – Figure 1(d), a morphological operation that probes and
expands the shapes found in an image. For dilation to occur, a
structuring element (a square binary matrix) is necessary so to
specify the extent of the dilation. We used a 3
×
3matrix
B
so to
dilate the drops by nearly 1 pixel. Note that, at this point, we still
do not know about the drops; rather, the dilation convolution has
the mathematical property of interacting with potential shapes to
be segmented, thus allowing for drop identication. After dilation,
the shapes that correspond to the drops will be 1 pixel larger all
along their perimeters. Formally, we produce an image
Idi l at i on
according to:
Idi l at i on =Ib in ar y⊕B(3)
After that, the second copy of the binary image passes through
erosion – Figure 1(e), also a morphological operation that, contrary
to dilation, contracts the shapes found in the image. Again, we use
a3
×
3matrix
B
as the structuring element so to erode the drops by
nearly 1 pixel. Formally, we produce an image
Ier o si on
according
to:
Ier o si on =Ib inar y⊖B(4)
2.4 Contour identication
Given the two images produced by dilation and erosion —
Idi l at i on
with drops larger than the original and
Ier o si on
with drops smaller
than the original — the trick then is to identify the contours of
the drops by measuring the dierence between the dilated and the
SAC 2018, April 9–13, 2018, Pau, France B. B. Machado et al.
eroded drops. This is achieved by applying a complement operation
over the two binary images – Step 4. To do so, rst, we invert the
eroded image, so that 1’s become 0’s and vice versa, obtaining image
ˆ
Ier o si on =¬Ie r os ion
. Then, it is sucient to perform the following
pixel by pixel logic AND:
Ico nt ou r (x,y)=Idi la ti on (x,y)AND ˆ
Ier os ion (x,y)(5)
The result is the binary image
Ico nt ou r
that is depicted in Fig-
ure 1(f), in which only contour pixels have value 1.
2.5 Marker-based watershed segmentation
In the last step – Step 5, with contours properly marked on the
image, we proceed to the drop identication considering the previ-
ously identied contours. To this end, we used the marker-based
watershed segmentation. Watershed [
16
] is a technique that consid-
ers an image as a topographic relief in which the gray level of the
pixels corresponds to their altitude. The transform proceeds by sim-
ulating the ooding of the landscape starting at the local minima.
This process forms basins that are gradually fullled with water.
Eventually, the water from dierent basins meet, indicating the
presence of ridges (boundaries); this is an indication that a segment
was found and delimited. The process ends when the water reaches
the highest level in the color-encoding space. The problem with
the classical watershed is that it might over-segment the image in
the case of an excessive number of minima. For a better precision,
we use the marker-controlled variation of the algorithm [
6
]. This
variation is meant for images whose shapes dene proper contours
previously given to the algorithm. Given the contours (markers),
the marker-based watershed proceeds by considering as minima,
only the pixels within the boundaries of the contours. Watershed is
an iterative algorithm computationally represented by a function
watershed(Image i, Image[] contours). We use such a function to pro-
duce a set of segments (drops) over the gray-level image
Iдr ay
while
considering the set of contours identied in the image
Ico nt ou r
, as
follows:
wat er shed (Iдr ay,f indCont ours (Icont our )) (6)
where
Imaдe
[]
f indContours (Imaдe i)
is a function that, given an
image, returns a set of sub images (matrices) corresponding to the
contours found in the image; meanwhile, watershed is a function
that, given an input image and a set of sub images corresponding
to contours, produces a set of segments stored in the array of input
contours.
We use the product of the watershed function to produce our
nal output
Ise дme nt e d
simply by drawing the segments over the
original image, as illustrated in Figure 1(g). Notice, however, that
the last image of the process,
Ise дme nt e d
, is meant only for visu-
alization. The analytical process, the core of the methodology, is
computed over the set of segments.
2.6 Diameter processing
After segmentation is concluded, we have a set of segments, each
corresponding to a drop of pesticide. The nal step is to compute
the measures presented at the beginning of this section: coverage
density (CD), volumetric median diameter (VMD), and diameter
relative span (DRS). Since we have the segments computationally
represented by an array of binary matrices, we can calculate the
area and the diameters of each drop by counting the pixels of each
matrix. After counting, it is necessary to convert the diameter given
in pixels into a diameter given in micrometers (
µm
), which, for the
i-th drop, goes as follows:
diamet er µm(dr opi)=widthpx (dr opi)∗widthca r d
µm
widthc ar d
px
(7)
where,
widthp x (dropi)
is the width in pixels of the
i
-th drop;
widthc ar d
px
is the width of the card in pixels; and
widthc ar d
µm
is the
width of the card in micrometers. Notice that we used
width
, but
we could have used
heiдht
as well; what matters is that the fraction
provides a conversion ratio given in
px/µm
, which is not sensi-
ble to the axis; horizontal or vertical, the ratio is the same for a
non-distorted image.
Notice that
widthp x (dropi)
and
widthc ar d
px
are obtainable via
image processing, after the segmentation method; meanwhile,
widthc ar d
µm
is a constant provided by the user, corresponding to
the real-world width of the card. Also, notice that we are consid-
ering that the diameter corresponds to the horizontal axis (the
width) of the drop; it is possible, however, that the diameter cor-
responds to the vertical axis, in which case the formulation is
straightly similar. Choosing between the horizontal and the ver-
tical axes might be tricky in case the drop is elliptical, rather
than circular. We solved this issue by extracting the diameter
from the area of the drop. We use the formula of the circle area
aci r cle =π∗r adius2=π∗(d i amet e r
2)2
. With simple algebra, we
conclude that given the area in pixels of the
i
-th drop, its diameter
in pixels is given by the following equation:
diamet erpx (dr opi)=2∗sareap x (dropi)
π(8)
Rewriting Equation 7 by means of Equation 8, we get:
diamet er µm(dr opi)=2∗sareap x (dropi)
π∗widthc ar d
µm
widthc ar d
px
(9)
Once the diameter is converted into micrometers, it becomes
trivial to compute all the measures that support the spray card
analysis, as described in the beginning of Section 2.
Implementation details
The use of mobile devices to perform automatic tasks has increased
fast [
18
]. The main reasons for it are the recent advances in hard-
ware, such as sensors, processors, memories, and cameras. Thereby,
smartphones have become new platforms for applications of image
processing and computer vision [8].
Mobile devices are an adequate mean to perform tasks in real-
time in situ far from the laboratory. In this context, besides this
methodology, the contribution of this paper is the development of a
mobile application to measure the quality of pesticide spraying on
water-sensitive cards. The methods that constitute the process were
imported from the OpenCV library
2
. Java was the programming
language. The application is fully functional as depicted in Figure 2.
2http://opencv.org
A smartphone application to measure the quality of spraying machines via image analysis SAC 2018, April 9–13, 2018, Pau, France
Figure 2: A preview of our fully functional application.
Figure 3: Control card provided by Hoechst.
3 EXPERIMENTAL RESULTS
In this section, we evaluate our methodology in the task of mea-
suring the spray coverage deposition on water-sensitive cards. The
goal is to have our technique correctly identifying the spray drops
both in terms of density of spraying (percentage of coverage per
cm2
) and in terms of drop diameter. As so, the rst set of experi-
ments was conducted over a control card provided by enterprise
Hoechst, demonstrating the accuracy in controlled conditions. The
second set of experiments was conducted over a real water-sensitive
card that was used on soy crops, demonstrating that the application
works even during in situ conditions.
3.1 Control-card experiments
In this set of experiments, we use the card provided by the Agrotech-
nical Advisory of the German enterprise Hoechst. The card holds syn-
thetic drops with sizes 50
µm
, 100
µm
, 250
µm
, 500
µm
, and 1,000
µm
,
as shown in Figure 3; this card is used to calibrate equipment and
to assess the accuracy of manual and automatic measuring tech-
niques. Since the number and sizes of drops are known, this rst
experiment works as a controlled validation of the methodology.
To measure the drops of the control card, we used a smartphone
to capture the image of the card. In Table 3, we present the average
diameter of the drops, the area covered by the drops given in cm2,
the density given in drops per
cm2
, the coverage density given in
percentage of the card area, and the volumetric median diameter. We
do not present the diameter relative span because, as all the drops
are equal, there is no signicant span. From the table, it is possible
to conclude that the accuracy of the methodology is in accordance
with the controlled protocol; that is, the known and measured
SAC 2018, April 9–13, 2018, Pau, France B. B. Machado et al.
(a) (b) (c) (d) (e) (f)
Figure 4: Drop identication over cards used in a real crop. The cards are categorized in: sparse – images (a) and (b); medium – images (c) and
(d); and dense – images (e) and (f). The ones on the left are the original cards, and at the right are the segmented cards.
Diameter (µm)DropLeaf Error DepositScan Error Microscope Error
Area (µm2) Diameter (µm) Area (µm2) Diameter (µm) Area (µm2) Diameter (µm)
50 2,693 58 16% 6,093 88 76% 3,390 66 32%
100 15,687 141 41% 21,505 165 65% 15,906 142 42%
250 53,470 246 1.6% 52,688 259 3.6% 45,342 240 4%
500 214,970 467 6.6% 196,236 500 0% 201,924 507 1.4%
1,000 901,811 1,009 0.9% 777,954 995 0.5% 797,752 1,008 0.8%
Table 1: DropLeaf measures compared to the tool DepositScan and to a stereoscopic microscope.
Dropleaf
Sample Drops Area (µm2)Density Coverage Volumetric Median Diameter Relative
Card (drop/cm2) Density (%) Diameter (µm) Span (µm)
sparse (a) 255 250,138 12.90 4.54% 452 1.22
sparse (b) 359 261,464 18.16 6.45% 425 1.55
medium (c) 448 355,712 22.67 9.99% 448 1.83
medium (d) 444 357,005 22.46 9.71% 428 2.22
dense (e) 923 364,749 46.71 18.22% 246 3.75
dense (f) 1,150 215,090 58.19 15.44% 239 3.40
Table 2: Drop identication over cards used in a real crop.
Dropleaf
Diameter (µm) Coverage Density Coverage Volumetric Median
Controlled Measured Area (µm2) (drop/cm2) Density (%) Diameter (µm)
50 58 2,693 594.31 5.32% 58
100 141 15,687 399.01 15.01% 141
250 246 53,470 229.73 23.46% 246
500 467 214,970 37.20 11.8% 467
1,000 1,009 901,811 3.65 3.72% 1,009
Table 3: Drop identication over the set of control cards.
diameters matched in most of the cases. Notice that it is not possible
to achieve a perfect identication because of printing imperfections
and numerical issues that inevitable rise at the micrometer scale.
For example, for 1,000
µm
drops, the average diameter was 1,007
µm
. This rst validation was necessary to test the ability of the tool
in telling apart card background and drops.
For a comparative perspective, in Table 1, we compare the cov-
ered area and the average diameter measured by our tool, by the
tool DepositScan, and by a stereoscopic microscope (provided in
the work of Zhu et al. [
19
]). The results demonstrated that the
stereoscopic microscope had the best performance, as expected,
since it is a ne-detail laborious inspection. DropLeaf presented
A smartphone application to measure the quality of spraying machines via image analysis SAC 2018, April 9–13, 2018, Pau, France
the best results after the microscope, beating the precision of De-
positScan for all the drop sizes, but 500
µm
; for 1,000
µm
drops,
the two tools had a similar performance, diverging in less than 1%.
In the experiments, one can notice that the bigger the drop, the
smaller the error, which ranged from 41% to less that 1%. For bigger
drops, the drop identication is next to perfect; for smaller ones,
the error is much bigger; this is because of the size scale. When
measuring drops as small as 50
µm
, a single extra pixel detected by
the camera is enough to produce a big error. This problem was also
observed in the work of Zhu et al. [19]).
By analyzing the data, we concluded that the error due to the
size scale is predictable. Since it varies with the drop size, it is not
linear; nevertheless, it is a pattern that can be corrected with the
following general equation:
diamet er ′=a∗diameterb(10)
In the case of our tool, we used
a=
0
.
2192733 and
b=
1
.
227941.
These values shall vary from method to method, as we observed
for DepositScan and for the stereoscopic microscope.
3.2 Card experiments
In the second set of experiments, we used six cards evaluated in
the work of Cunha et al. [
3
]. The cards were separated into three
groups of two cards, which were classied as sparse, medium, and
dense with respect to the density of drops, as can be veried in
Figure 4. These experiments aimed at testing the robustness of the
methodology, that is, its ability in identifying drops even when they
are irregular and/or they have touching borders. Table 2 shows
the numerical results, including the number of drops, the cover-
age area, the density, the coverage density, the volumetric median
diameter, and the diameter relative span. In this case, the table
must be interpreted along with the gure, which presents the drops
as identied by our methodology. The rst four measures can be
inspected visually. It is also possible to see that the right-hand side
images in Figure 4 (the tool’s results stressed with colored drops),
demonstrate that the segmentation matches the expectations of
a quick visual inspection. The drops at the left are perfectly pre-
sented on the right. Other features are also noticeable. Density, for
instance, raises as we visually inspect Figure 4(a) to Figure 4(f);
the corresponding numbers in the table raise similarly. Counting
the number of drops requires close attention and a lot of time; for
the less dense Figure 4(a) and Figure 4(b), however, it is possible to
verify the accuracy of the counting and segmentation provided by
the tool.
The last two measures, VMD and DRS, provide parameters to
understand the distribution of the drops’ diameters. For example,
it is possible to see that, being more dense, cards (e) and (f) had a
smaller median and a larger span of diameters. These measures in-
dicate that the spraying is irregular and that it needs to be adjusted.
Meanwhile, cards (a) and (b) are more regular, but not as dense as
necessary, with a lot of blank spots. Cards (c) and (d), in turn, have
a more uniform spraying and a more regular coverage.
4 DROP DETECTION ISSUES
This section discusses issues to be considered when developing
technologies for spray card inspection. We faced such issues during
our research; we discuss such issues as a further contribution that
shall guide other researchers that deal with the same and with
related problems.
4.1 Coverage factor
In our experience, we noticed that when the spraying gets too dense,
not all of the information about the drops can be detected, no matter
which technique is used for measuring; for instance, information
about the number of drops, and their diameter distribution cannot
be tracked anymore. This eect was already pointed out by Fox et
al. [
5
], who claims that a total coverage on the card above 20% causes
results to be unreliable; and coverages close to 70% are unfeasible.
This is because, with too much spray, the drops fall too close one
to each other, causing overlaps; visually, is it like two or more drops
became one. Eectively, this is what happens in the crop due to the
intermolecular forces present in the water drops, which causes them
to merge, forming bigger drops. Hence, it is needed caution, no
matter which technique of assessment, whenever the total coverage
area surpasses 20%, a circumstance when the diameter distribution
is no longer accurate, and one must rely only on the coverage area
for decision making. Although the diameter is not available, the
large drops that might be detected indicate an excessive amount of
pesticide or a malfunctioning of the spray device.
4.2 Angle of image capture
We also noticed that the image processing methodology used to
detect the drops of all the studies presented so far, including ours,
works only if the capture angle of the card is equal to 90 degrees.
That is, the viewing angle of the camera/scanner must be orthogo-
nal to the spray card surface. This is necessary because the pixels
of the image are converted into a real-world dimension to express
the diameter of the drops in
µm
; therefore, it is necessary that the
dimensions of the image be homogeneous with respect to scale.
In case, the capture angle is not of 90 degrees, the image is dis-
torted, resulting in dierent scales in each part of the image. For
atbed scanners, this is straightforward to guarantee; however, for
handheld devices (cameras and smartphones), additional care is
necessary. In such cases, one might need a special protocol in order
to capture the image, like using a tripod, or some sort of apparatus
to properly place the capturing device with respect to the spray
card. This problem might also be solved by means of an image
processing algorithm to remove eventual distortions, in which case,
additional research and experimentation are necessary.
4.3 Minimum dots per inch (dpi)
Our experiments also reviewed that there must be a minimum
amount of information on the spray card images in order to achieve
the desired precision regarding the drops’ diameter. This minimum
information is expressed by the dots per inch (dpi) property of the
image capturing process; dpi is a well-known resolution measure
that expresses how much pixels are necessary to reproduce the
real-world dimension of one linear inch. If not enough pixels are
captured per inch of the spray card during the capturing process, it
becomes impossible to estimate, or even to detect, the diameter of
the smallest drops. This might inuence the diameter distribution
analysis hiding problems in the spraying process.
SAC 2018, April 9–13, 2018, Pau, France B. B. Machado et al.
In order to guide our research and development, we calculated
and tested on the minimum dpi’s that are necessary for each desired
drop diameter. In Table 4 one can see the minimum number of
pixels to express each drop diameter for each dpi value; notice that
some cells of the table are empty (lled with a hyphen) indicating
that the diameter cannot be computationally expressed in that dpi
resolution. Also, notice that, in the columns, the number of pixels
for one same diameter increases with the resolution. Obviously, the
more information, the more precision at the cost of more processing
power, substantially more storage, and more network bandwidth
when transferring images. From the table, it is possible to conclude
that 600 dpi is the minimum resolution for robust analyses, since it
can represent diameters as small as 50
µm
; meanwhile, a resolution
of 1,200 dpi, although even more robust, might lead to drawbacks
regarding the management of image les that are way too big.
Notwithstanding, the fact that a resolution is enough to represent
a given diameter is not a guarantee that drops with that diameter
size will be detected; this is because the detection depends on other
factors such as the quality of the lenses, and the image processing
algorithm.
Table 4 is a guide for developers willing to computationally
analyze spray cards, and also for agronomists who are deciding
which equipment to buy in face of their needs.
HHHH
H
µm
dpi 50 100 300 600 1200 2400 2600
10 - - - - - - 1
50 - - - 1 2 5 5
100 - - 1 2 5 9 10
250 - 1 3 6 12 24 26
500 1 2 6 12 24 47 51
1,000 2 4 12 24 47 94 102
10,000 20 39 118 236 472 945 1024
Table 4: Pixels needed to represent a given length, given a dpi.
5 CONCLUSIONS
We introduced DropLeaf, a portable application to measure the
pesticide coverage by means of the digitalization of water-sensitive
spray cards. We veried that the precision of DropLeaf was enough
to allow the use of mobile phones as substitutes for more expensive
and troublesome methods of quantifying pesticide application in
crops. The methodology was instantiated in a tool to be used in
the inspection of real-world crops. We tested our tool with two
datasets of water-sensitive cards; our experiments demonstrated
that DropLeaf accurately tracks drops, being able to measure the
pesticide coverage and the diameter of the drops. Furthermore,
our mobile application detects overlapping drops, an important
achievement because a ner precision provides not only better
accuracy but also more information.
ACKNOWLEDGEMENTS
The authors are thankful to Dr. Claudia Carvalho who kindly pro-
vided annotated cards; to the Sao Paulo Research Foundation (grants
2011/02918-0, 2016/02557-0 and CEPID CeMEAI grant 2013/07375-
0); to the National Council for Scientic and Technological Devel-
opment (CNPq); and to the Coordination for the Improvement of
Higher Education Personnel (Capes).
REFERENCES
[1]
Hubert Bon, Joel Huat, Laurent Parrot, Antonio Sinzogan, Thibaud Martin, Eric
Malezieux, and Jean-Francois Vayssieres. 2014. Pesticide risks from fruit and
vegetable pest management by small farmers in sub-Saharan Africa. A review.
Agronomy for Sustainable Development 34, 4 (2014), 723–736.
[2]
T. G. Crowe, D. Downey, and D. K. Giles. 2005. Digital device and technique for
sensing distribution of spray deposition. Transactions of the American Society of
Agricultural and Biological Engineers 48, 6 (2005), 2085–2093.
[3]
Mario Cunha, Claudia Carvalho, and Andre R.S. Marcal. 2012. Assessing the
ability of image processing software to analyse spray quality on water-sensitive
papers used as articial targets. Biosystems Engineering 111, 1 (2012), 11–23.
https://doi.org/10.1016/j.biosystemseng.2011.10.002
[4]
Food and Agriculture Organization. 2009. Feeding the world in 2050. Technical
Report. United Nations. World agricultural summit on food security.
[5]
R.D. Fox, R.C. Derksen, J.A. Cooper, C.R. Krause, and H.E. Ozkan. 2003. Visual
and image system measurement of spray deposits using water sensitive paper.
Applied Engineering In Agriculture 19, 5 (2003), 549–552.
[6]
Raaele Gaetano, Giuseppe Masi, Giuseppe Scarpa, and Giovanni Poggi. 2012. A
marker-controlled watershed segmentation: Edge, mark and ll. In Geoscience and
Remote Sensing Symposium (IGARSS), 2012 IEEE International. IEEE, 4315–4318.
[7]
D. K. Giles and D. Downey. 2003. Quality Control Verication and Mapping for
Chemical Application. Precision Agriculture 4, 1 (2003), 103–124.
[8]
Farinella Giovanni Maria, Ravì Daniele, Tomaselli Valeria, Guarnera Mirko,
and Battiato Sebastiano. 2015. Representing Scenes for Real–Time Context
Classication on Mobile Devices. Pattern Recognition 48, 4 (2015), 1086–1100.
https://doi.org/10.1016/j.patcog.2014.05.014
[9]
Rafael C Gonzalez and Richard E Woods. 2007. Image processing. Digital image
processing 2 (2007).
[10]
Yongbo Liu, Xubin Pan, and Junsheng Li. 2015. A 1961–2010 record of fertilizer
use, pesticide application and cereal yields: a review. Agronomy for Sustainable
Development 35, 1 (2015), 83–93.
[11]
Xavier Martini, Natalie Kincy, and Christian Nansen. 2012. Quantitative impact
assessment of spray coverage and pest behavior on contact pesticide performance.
Pest Management Science 68, 11 (2012), 1471–1477.
[12]
Karl Mierzejewski. 1991. Aerial spray technology: possibilities and limitations for
control of pear thrips. Technical Report. U.S. Department of Agriculture, Forest
Service. 317–331 pages. Tech. Rep. NE-147.
[13]
Jozsef Popp, Karoly Peto, and Janos Nagy. 2013. Pesticide productivity and food
security. A review. Agronomy for Sustainable Development 33, 1 (2013), 243–255.
[14]
Wolf R.E. 2003. Assessing the ability of DropletScan to analyze spray droplets
from a ground operated sprayer. Applied Engineering In Agriculture 19 (2003),
525–530.
[15]
Michael Renton, Roberto Busi, Paul Neve, David Thornby, and Martin Vila-Aiub.
2014. Herbicide resistance modelling: past, present and future. Pest Management
Science 70, 9 (2014), 1394–1404.
[16]
Luc Vincent and Pierre Soille. 1991. Watersheds in digital spaces: an ecient
algorithm based on immersion simulations. IEEE transactions on pattern analysis
and machine intelligence 13, 6 (1991), 583–598.
[17]
Homan W.C. and Hewitt A.J. 2005. Comparison of three imaging systems for
water-sensitive papers. Applied Engineering In Agriculture 21 (2005), 961–964.
[18]
Feng Xia, Ching-Hsien Hsu, Xiaojing Liu, Haifeng Liu, Fangwei Ding, and Wei
Zhang. 2015. The power of smartphones. Multimedia Systems 21, 1 (2015), 87–101.
https://doi.org/10.1007/s00530-013- 0337-x
[19]
Heping Zhu, Masoud Salyani, and Robert D. Fox. 2011. A Portable Scanning
System for Evaluation of Spray Deposit Distribution. Computer and Electronics
in Agriculture 76, 1 (2011), 38–43.