Professional Documents
Culture Documents
Mistal, Ma. Lourdes L. - Article
Mistal, Ma. Lourdes L. - Article
Mistal, Ma. Lourdes L. - Article
Laguna, Philippines
*jfvillaverde@gmail.com
Abstract— Rice (oryza sativa) is one of the most in enemies that could have provided ecosystem services
demand staple foods in the world because of its to reduce vulnerability to outbreaks. Rice Brown
versatility in processing and consumption. But due to Planthoppers (BPH) Nilaparvata lugens (Stål) are
the ever increasing human population, rice farmers among the outbreak pests of rice that has brought
and producers are pressured to produce more from heavy losses in several Asian countries including the
just one to three cropping seasons. Climatic change Philippines [1-3].
also affects rice production as well as the heavy use of
chemical inputs. These factors contribute to the There were various studies conducted in
problems of pest outbreaks and disease attacks to rice. response to the possible threat of BPH and other pest
Brown planthoppers (BPH, Nilaparvata lugens) are and diseases [4-9]. Early detection systems are
among the outbreak pests of rice that have brought crucial to fight this pest since they are also a virus-
heavy losses in several Asian countries including the disease-carrier such as the Rice Ragged Stunt and
Philippines. Its early detection is crucial because this Rice Grassy Stunt diseases which can immediately
pest is a virus carrier that can cause tremendous yield spread in the entire palay area [10]. In [11], the
loss to rice. With this, designing an early warning detection of pest and diseases particularly on the
device is a critical element for BPH pest management BPH use hyperspectral remote sensing. It can detect
system. Image processing is one of the early detection
stress on potted rice plants through reflectance
mechanisms proposed in the literature. In this
compared to the uninfected plants. The BPH is
research, an early warning device using Wireless
Sensor Network (WSN) through Haar feature-based destructive because visible symptoms to palay only
cascade classifiers for BPH detection is being proposed appear when the stage of infestation is severe. With
which can be installed in strategic locations in the leaf discoloration, it is too late to save the palay and
palay-farm-area under study. This device is preventive actions are effectual. However, the use of
programmed to send warning messages when Wireless Sensor Networks (WSNs) [12] with Xbee
acceptable range of the BPH cascade classifiers is for network and microscopic camera as sensor can
obtained; thereby, allowing the end-users to check the easily detect pests through object detection using
status of the palay farm area. The researcher develops computer vision. The study [13] showed a simple yet
an early warning device prototype and performs an efficient way to detect and extract pests in the palay
extensive set of experiments measuring its image practice farm in Pampanga. The researchers used
detection capability. background modelling that determined the presence
Keywords— Wireless Sensor Network (WSN), of pests and median filter to remove noise that was
Brown Plant Hopper (BPH), Image Processing, Short produced by different lightning conditions. As of
Message Service (SMS), Pest Detection now, there are no similar studies recorded on the
detection of Brown Planthopper specifically on palay
I. INTRODUCTION crop using image analysis and sends alerts to the
Rice (Oryza sativa), along with wheat and corn, farmer of its occurrence. However, the study of
is the most widely cultivated crops in the world for automation in counting of planthoppers based on
centuries. Due to its demand to feed billions of image processing can be used but needs further
rapidly increasing human population, rice farmers research and developments for its applicability on
and producers are pressured to resort to intensified palay.
production from just one to three cropping seasons In recent years, the BPH has caused extensive
annually. This factor had worsened the occurrence of damage to rice crop in Asia namely Brunei,
pest and disease attacks in rice because of the Bangladesh, China, Malaysia, Sri Lanka, Thailand
increasing popularity of heavy chemical input. The and Vietnam [14]. But the insect’s large scale
pest outbreaks and disease attacks are because of damage has been reported in India, Indonesia, Sri
pesticide resistance and the death of natural rice-pest Lanka and the Philippines. The BPH is regarded by
many as the number-one insect pest of rice in Asia and milking stage (46 to 75 days after crop
today. Thus, if not detected early, its unpredictable establishment).
infestation could result to severe damage in palay and
loss of production for farmers. Also, BPH’s sudden
occurrence may force the farmers to use unnecessary
insecticides which could lead to its outbreak because
of the death of natural enemies [15]. (a)
The general objective of the study is to develop
an early warning device that can detect BPH in palay
using Wireless Sensor Networks. Specifically, this
used a microscopic camera to capture video feeds of (b)
the BPH on palay plant using Haar feature-based
Fig. 1. (a) BPH as the Positive images and (b) Green Leaf
cascade classifier and send an SMS message to the Hopper and Black Bugs as the Negative Images. There were 200
farmer informing of the occurrence of the said pest. positive and 200 negative sample images that were trained and
created a cascade classifiers based on Haar-liked features.
The early warning system would be beneficial to
the farmer because it would reduce the farmer’s time Object detection using Haar feature-based
and effort in monitoring the palay farm physically. It cascade classifier is used in the study. This is an
would also give the farmer sufficient time to plan and effective object detection method that was proposed
employ appropriate pest control methods such as by Paul Viola and Michael Jones in their paper
natural chemical and biological control, integrated entitled “Rapid Object Detection using a Boosted
pest management and other methods which can be Cascade of Simple Features” [16]. A cascade
very beneficial to the farmer and most importantly to function is trained from a number of positive and
the environment. negative images. To create cascade classifiers based
on Haar-like features, 200 positive and 200 negative
The study is designed to detect BPH pest of palay
sample images are trained which were captured using
crop at reproductive stage under controlled the microscopic camera as shown in Fig. 1. The
environment. This followed the recommended positive images are images that contain the BPH and
fertilizer and temperature requirements and the usual
the negative images are those that do not contain the
farm practice and care for this crop. The system object. Then, the positive images are marked. These
captured the video images of the BPH pests using
are the rear part (butt) of the BPH. A vector data file
microscopic camera and not the image of the damage was created based on the positive marked images
it caused to the plant. The obtained images were then which contain the names of positive images and the
programmed into the system through Haar feature-
location of the objects in each image. The classifier
based cascade classifiers and warning signals were is then trained and run using an OpenCV file. Haar-
sent to the farmer through SMS messaging.
like features shown in Fig. 2 are used. Through
Necessary interventions were done by the farmer and subtracting the sum of pixels that are under the white
not by the system. rectangle from sum of pixels under the black
II. METHODOLOGY rectangle, a single value is obtained from each
feature.
A. Evaluation Phase
In the evaluation phase of the research, the
researchers gathered the necessary equipment to be
used in obtaining the images of the BPH. The
International Rice Research Institute (IRRI) in Los
Baños, Laguna provided the needed pests, palay
plant and its container. The insects and palay plant
are kept in a cage made of Mylar plastic film that
encloses the cage and organza cloth that serves as the
door (front) and exhaust (back) of the cage. The
experiment is done using microscopic camera to Fig. 2. Examples of Haar-liked Features
capture video and still images of the BPH. It is There are three sensor nodes and one master
further conducted at the insectary of IRRI. Pot node that are placed in strategic locations within the
culture rice is used with seeds of Taichung Native 1 area under study. One sensor node is composed of
(TN1) variety. The age of the palay plant is 50-60 microscopic camera, Raspberry Pi 3 Model B and
days after transplanting. The BPH is 2-3 day old XBee module. The master node is responsible in the
adults and reared in covered cages under natural notification of the farmer. The master node is
temperature. All experiments are conducted under composed of Arduino, XBee module and GSM
the same natural temperature. module. Fig. 3 shows the diagram of the early
Per container, approximately 200 adult BPH is warning device. The microscopic camera is placed 5
placed into the palay plant that is on its reproductive inches away from the palay plant. Mesh is the type of
stage. Reproductive stage refers to the stage from networking topology that is used in the study. All the
booting to blooming, flowering, heading, tasseling
sensor nodes are designed to communicate with the the sensor node, code is developed to first, sends data
master node as well as with each other. to the master node once BPH from the video feed is
detected and second, allows the receiving of data
from other sensor nodes which is to be sent to the
master node.
C. Implementation Phase
In this phase, all the necessary materials and
equipment are installed. The researchers also set-up
the farm prototype as shown in Fig. 4 with the BPH
pests and integrates it with the program. Test run is
done if the system is correctly running according to
the desired output.
Fig. 5. Actual detection of the BPH. This shows that the rear This means that the early warning device is
part of the insect was boxed when the system was run. capable of detecting the BPH for about 97 percent.
From gathering 70 images of pests that were
The second testing was done to test the sending composed of 50 BPH, 10 GLH and 10 BB, 48 out of
of text to the predefined cellular phone number when 50 images of BPH were detected correctly and 20
the pest is detected from one node. The researchers out of 20 images of non-BPH (GLH and BB) were
started to test all the nodes separately by setting the correctly detected by the system. The two (2) BPH
camera and sensor node with BPH. Then the that were not detected was due to some data that was
researchers tested all nodes (1) with BPH and (2) not trained considering the pest position.
only nodes 1 and 3 have BPH. All text messages
were sent to the cellular number with the correct node TABLE II. DETECTION OF BPH AND SENDING OF TEXT
number. MESSAGE
The third testing was done to test the system if it Detected? Sent Message?
Test No. Time
(Yes or No) (Yes or No)
will send the text message within the two (2) minute 1 2:24:34 AM Yes Yes
period. Only node 1 was used and set to have the 2 2:26:34 AM Yes Yes
BPH. As a result, the system correctly sent messages 3 2:28:31 AM Yes Yes
every two (2) minutes with node 1 as the sensor that 4 2:30:31 AM Yes Yes
detected the pest. 5 2:32:27 AM Yes Yes
6 2:34:27 AM Yes Yes
Table 1 was used to show that the proposed 7 2:36:41 AM Yes Yes
8 2:38:41 AM Yes Yes
system can detect captured images of the BPH
9 2:40:27 AM Yes Yes
through Haar feature-based cascade classifier. 10 2:42:27 AM Yes Yes
TABLE I. CONFUSION MATRIX FOR TESTING OF BPH 11 2:44:14 AM Yes Yes
12 2:46:14 AM Yes Yes
AND NON-BPH
REFERENCES
Laguna, Philippines
*jfvillaverde@gmail.com
II. METHODOLOGY
A. Evaluation Phase
In the evaluation phase of the research, the
researcher gathers the necessary equipment to be (a)
used in obtaining the images of the BPH. The
International Rice Research Institute (IRRI) in Los
Baños, Laguna provided the needed pests, palay
plant and its container. The insects and palay plant (b)
are kept in a cage made of Mylar plastic film that
encloses the cage and organza cloth that serves as the
door (front) and exhaust (back) of the cage. The Fig. 2. (a) BPH as the Positive images and (b) Green Leaf
Hopper and Black Bugs as the Negative Images. There were 200
experiment is done using microscopic camera to positive and 200 negative sample images that were trained and
capture video and still images of the BPH and is created a cascade classifiers based on Haar-liked features.
conducted at the insectary of IRRI. Pot culture rice is
used with seeds of Taichung Native 1 (TN1) variety. Shown in Fig. 2 are some of the positive images
The age of the palay plant is 50-60 days after and negative images used in the system.
transplanting. The BPH is 2-3 day old adults and Detecting the BPH is the sensor node. It is
reared in covered cages under natural temperature. composed of microscopic camera and Raspberry Pi
All experiments are conducted under the same 3 Model B. The microscopic camera is placed 5
natural temperature. inches away from the palay plant.
Per container, approximately 200 adult BPH is B. Development Phase
put into the palay plant that is on its reproductive
In the development phase, the researchers
stage. Reproductive stage refers to the stage from
gathered all the necessary materials/equipment used
booting to blooming, flowering, heading, tasseling
in the study and setup the needed hardware. The
and milking stage (46 to 75 days after crop
sensor nodes are set-up according to the required
establishment).
operation and structure. The system programs are
Object detection using Haar feature-based developed in this phase and tested if it runs properly.
cascade classifier is used in the study. This is an For Raspberry Pi, the latest version of Raspbian
effective object detection method that was proposed Operating System (OS) which is Raspbian Stretch is
by Paul Viola and Michael Jones in their paper installed. The application and system files are also
entitled “Rapid Object Detection using a Boosted updated. After which, the Python-OpenCV package
Cascade of Simple Features” [19]. A cascade is installed.
function is trained from a number of positive and
The Raspberry Pi as sensor node is developed
negative images. To create cascade classifiers based
with test code using Python OpenCV library with the
on Haar-like features, 200 positive and 200 negative
generated cascade classifier to detect the BPH from Predicted
video feed. n=70 BPH Non-BPH
Actual BPH TP=48 FP=2 50
Non-BPH FN=0 TN=20 20
C. Implementation Phase 48 23 70
In this phase, all the necessary materials and
equipment are installed. The researchers also set-up In the confusion matrix, of the 50 actual BPHs,
the farm prototype with the BPH pests and integrates the system predicted that two were not BPH, and of
it with the program. Test run is done if the system is the 10 Green Leaf Hoppers and 10 Black Bugs, it
correctly running according to the desired output. predicted that all were not BPH. Fig 7 shows the
images that have been tested by the system to get the
percentage accuracy of classifying the BPH correctly
as shown in figure 6.
D. Testing Phase
In the testing phase, the system is tested if
properly detects BPH pest. Initially, the microscopic
camera is set by calibrating its focus to the sharpest
detail possible. This will give a clear and define (a)
image of the pest. The camera is set 5-inch away
from the plant. Once set, the sensor node is initialized
to process the captured data.
(b) (c)
III. RESULTS AND DISCUSSION
The researcher performed detection of the BPH Fig. 4. Example of Test Captured Images for (a) BPH, (b) GLH
through getting a random sample of 50 BPH and and (c) Black Bug. This shows that the BPH were correctly
caged it individually as shown in Fig. 3. Each cage boxed and detected. The GLH and Black Bugs were also
predicted as non-BPH
contained one (1) BPH pest. The system was set-up
and the camera was focused to the sharpest detail
possible. The researcher also tested the validity of the
system by testing other pests such as 10 Green Leaf The accuracy from the confusion matrix table can
Hoppers (GLH) and 10 black bugs. be computed using the formula,