Mistal, Ma. Lourdes L. - Article

You might also like

You are on page 1of 9

Early Warning Device for Brown Plant

Hopper Detection in Palay Using Wireless


Sensor Networks
Ma. Lourdes L. Mistal1, Jocelyn Flores Villaverde1* and Buyung Hadi2
1School of Electrical, Electronics, and Computer Engineering

Mapúa University, Manila, Philippines


2International Rice Research Institute

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. 3. Diagram of the early warning device. This is


composed of microscopic camera that captures images of the
insects, raspberry pi which acts as the main controller and Xbee
module that acts as the transmitter and receiver of data. The
master node is composed of Xbee module that serves as the
receiver of data, Arduino which controls the XBee module and
the GSM module and SIM800 that sends text to a predefined Fig. 4. Final Prototype of the Early Warning Device. This shows
mobile number. that nodes 1-3 are set-up with the insect, camera, raspberry pi and
Xbee module. The master node is also running. The nodes and
the master node are connected with power supply.
B. Development Phase D. Testing Phase
In the development phase, the researchers In the testing phase, the system is tested if it
gathered all the necessary materials/equipment used properly detects BPH pest and if it sends text
in the study and set-up the needed hardware. The message to the farmer. Initially, the microscopic
sensor nodes are set-up according to the required camera is set by calibrating its focus to the sharpest
operation and structure. The system programs are detail possible. This will give a clear and define
developed in this phase and tested if it runs properly. image of the pest. The camera is set 5-inch away
For Raspberry Pi, the latest version of Raspbian from the plant. Once set, the sensor nodes and master
Operating System (OS) which is Raspbian Stretch is node are initialized to process the captured data. Only
installed. The application and system files are also a single frame that matches the BPH cascade
updated. Also, the Python-OpenCV package is classifier is needed to trigger the system to send an
installed. The XBee modules are updated to the latest SMS to the mobile phone. The message contains
firmware version. One (1) of the XBee modules is string that says that a pest was detected which also
set-up as master node and two (2) nodes are set-up as contains the node number. The system only covers
sensor nodes. These nodes are set to connect to the until the sending of SMS message to farmer. The
master node. For Arduino that will act as master interventions are done by the farmer.
node, the XBee connectivity is first tested by
connecting it to a PC using XCTU platform III. RESULTS AND DISCUSSION
application. Packets of data are sent to an XBee that The researcher performed detection of the BPH
is connected to the Arduino microcontroller. The through getting a random sample of 50 BPH and
Arduino is then tested to send text message to a caged it individually. The system was set-up and the
mobile number using the GSM module (SIM800). camera was focused on to the sharpest detail
The code to send the said text message is developed possible. The researchers also tested the validity of
to a predefined mobile number which is assumed to the system by testing other pests such as 10 Green
be the farmer’s number. A text message is sent when Leaf Hoppers (GLH) and 10 black bugs. Fig. 5 shows
the XBee module receives data from any sensor the actual detection of the BPH when the system was
node. run. The system boxed the rear part of the insect
The Raspberry Pi as sensor node is developed which entailed positive detection of the BPH under
with test code using Python OpenCV library with the study.
generated cascade classifier to detect the BPH from
video feed. Another code is developed to test the
connectivity of sensor node to the master node. For
The accuracy from the confusion matrix table can
be computed using the formula,

Accuracy (ACC) = Σ True positive + Σ True


negative / Σ Total population (1)

Thus, the accuracy of the detection of BPH is,


Accuracy = ((48+20)/70) x 100 = 97.14%

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

Predicted Table 2 shows that the system was able to detect


the pest and sent the text message to the farmer with
n=70 BPH Non-BPH
an interval of two minutes. For testing purposes, the
Actual BPH TP=48 FP=2 50
researcher set the system to two minutes instead of
Non-BPH FN=0 TN=20 20 12 hours.
48 23 70
IV. CONCLUSION
In the confusion matrix, of the 50 actual BPHs,
the system predicted that two were not BPH, and of From this paper, an accurate detection of BPH is
the 10 Green Leaf Hoppers and 10 Black Bugs, it presented, tested and implemented. The prototype
predicted that all were not BPH. Fig. 6 shows the was designed using microscopic camera to
images that have been tested by the system to get the efficiently capture the images of the BPH and
percentage accuracy of classifying the BPH installed in strategic locations within the palay area
correctly. under study. This is connected to the Raspberry Pi
which is the main controller of the nodes. It is coded
in Python with OpenCV library that is used for
computer vision. It is also responsible for
transmitting data through XBee module to master
node while the Arduino is the one that controls the
(a) XBee module and the GSM module in the master
node. The information from nodes is passed on to the
nearest node until it reaches the master node.
Through the data received, Arduino formats the text
message string replacing variables with node
(b) (c) number. The researcher gained a result of correctly
sending an SMS to the farmer through the GSM
Fig. 6. Example of Test Captured Images for (a) BPH, (b) GLH module when BPH is detected.
and (c) Black Bug. This shows that the BPH were correctly
boxed and detected. The GLH and Black Bugs were also Also, the researcher used the image processing
predicted as non-BPH technique such as Haar feature-based cascade
classifier for pre-processing of the images. This [10] P. Cabauatan, R. Cabunagan, and R. Choi, “Rice viruses
process gave percentage accuracy of 97.14% were transmitted by the brown planthopper Nilaparvata lugens
Stål,” International Rice Research Institute: 2009
the differences vary from the manner the image is
[11] N.R. Prasannakumar, S. Chander, R.N. Sahoo, V.K, Gupta,
captured. “Assessment of Brown Planthopper, (Nilaparvata lugen)
Based on the findings and results of the trainings [Stal], damage in rice using hyperspectral remote sensing,”
International Journal of Pest Management, vol. 59, no. 3,
and testing that have been done, the researcher pp180-188, 2013
recommends the following for the improvement of [12] S. Datir, and S. Wagh, “Monitoring and Detection of
the system: for better image quality, it is better to use Agriculture Disease Using WSN,” IJCA, vol 87: 0975-
camera with higher specification especially on 8887:2014.
magnification capability and to include in the system [13] J. Miranda, B. Gerardo, and B. Tanguilig III, “Pest
the ability to determine the number of BPH present Detection and Extraction Using Image Processing
in the area for appropriate intervention to be done by Technique,” International Journal of Computer and
Communication Engineering, vol. 3, no. 3.
the farmer.
[14] J.L.A. Catindig, G.S. Arida, S.E. Baehaki, J.S. Bentur, L.Q.
ACKNOWLEDGMENT Cuong, M. Norowi, W. Rattanakarn, W. Sriratanasak, J.
Xia, and Z. Lu, “Situation of planthoppers in Asia,
The authors are thankful to the entomologists “International Rice Research Institute, Los Baños, Laguna,
under Crop and Environmental Sciences Division in Philippines. Pp. 191-220: 2009.
IRRI, Los Baños, Laguna for providing necessary [15] K.L. Heong, K.H. Tan, C.P.F. Garcia, Z. Liu, and Z. Lu,
“Research Methods in Toxicology and Insecticide
facility and materials to undertake this research. Resistance Monitoring of Rice Planthoppers”, International
Also, this research has been funded by the Rice Research Institute, Los Baños, Laguna, Philippines.
Engineering Research and Development for Pp. 3-17: 2013.
Technology under the Department of Science and [16] P. Viola, M.J. Jones, “Rapid object detection using a
Technology (DOST). boosted cascade of simple features,” CVPR ’01:
Proceedings of the Conference on Computer Vision and
Pattern Recognition, Los Alamitos, California, USA. Pp
511-518: 2001.

REFERENCES

[1] V. A. Dyck, and B. Thomas, “The brown planthopper


problem. In: Brown planthopper: threat to rice production
in Asia,” International Rice Research Institute, Los Baños,
Laguna, Philippines. Pp. 3-17: 1979.
[2] G.R. Wu, X.P. Yu, L.Y. Tao, “Long-term forecast on the
outbreak of brown planthopper (Nilaparvata lugens Stal)
and white-backed planthopper (Sogatel la f urcif era
Horvath). Sci. Agric. Sinica Pp. 30, 26–30: 1997
[3] O. Mochida, and T. Okada, “Taxonomy and biology of
Nilaparvata lugens (Hom: Delphacidae). In: Brown
planthopper: threat to rice production in Asia,” Los Baños
(Philippines): International Rice Research Institute. P 21-
43.
[4] Y. Qing, X. Ding-xiang, L. Qing-jie, Y. Bao-jun, D. Guang-
qiang, and T. Jian, “Automated Counting of Rice
Planthoppers in Paddy Fields Based on Image Processing,”
Journal of Integrative Agriculture, August 2014, 13(8):
1736-1745.
[5] N. Mongkolchart, and M. Ketcham, “The Measurement of
Brown Planthopper by Image Processing,” International
Conference on Advanced Computational Technologies and
Creative Media (ICACTCM’2014).
[6] S. Xu, Z. Zhou, H. Lu, X. Luo, Y. Lan, Y. Zhang, and Y.
Li, “Estimation of the Age and Amount of Brown Rice Plant
Hoppers Based on Bionic Electronic Nose Use,” Sensors,
14, 18114-18130; doi:10.3390/s141018114: 2014
[7] Y. Yang, B. Peng and J. Wang, “A System for Detection
and Recognition of Pests in Stored-Grain Based on Video
Analysis,” vol. 344, D. Li, Y. Liu and Y. Chen, Eds. Berlin,
Heidelberg: 2011.
[8] C. Priya, K. Praveen, and A. Srividya, “Monitoring of Pest
Insect Traps Using Image Sensors & Dspic,” International
Journal of Engineering Trends And Technology, vol 4 Issue
9.
[9] G. Bhadane, S. Sharma, and V. Nerkar, “Early Pest
Identification in Agricultural Crops using Image Processing
Techniques,” International Journal of Electrical, Electronics
and Computer Engineering, 2(2): 7 -82(2013), ISN No.
(Online): 27-2626.
Haar Feature-Based Cascade Classifier for
Nilaparvata Lugens Detection
Ma. Lourdes L. Mistal1, Jocelyn Flores Villaverde1* and Buyung Hadi2
1School of Electrical, Electronics, and Computer Engineering

Mapúa University, Manila, Philippines


2International Rice Research Institute

Laguna, Philippines
*jfvillaverde@gmail.com

Abstract—Detection of pest in palay is important designs an automatic measurement system to also


to the farmers for better production. Manual pest detect and count the population of the brown
survey methods in palay farms are time-consuming planthopper. They use Image Processing Technique
and tedious. This paper aims to develop a device that such as image processing, binarization and edge
can detect Nilaparvata lugens through an OpenCV- detection. The system detects the adult BPH at the
Python code using Haar feature-based cascade accuracy rate of 69.76%. The study of [7] uses
classifier algorithm. Currently, BPH are among the various techniques to count the number of pests.
outbreak pests of rice that have brought heavy losses These techniques involve motion estimation and
in several Asian countries including the Philippines. Its
multiple frame verification. Cameras were used [12]
early detection is crucial because this pest is a virus
carrier that can cause tremendous yield loss to rice.
to capture still images of mono crops infested with
With this, designing a detection device is a critical coffee berry or aphids. Various algorithms were used
element for BPH pest management system. Image in the study such as k-means, fuzzy c-means and
processing is one of the early detection mechanisms Expectation-Maximization which easily identified
proposed in the literature. The Python code was tested the pest infested areas of the crop. In [13], it uses
and its output was validated which achieved a 97.14% camera to capture the images of the infested leaf and
accuracy rate. the bio-aggressors were automatically detected using
computer vision techniques. The processing of image
Keywords—Nilaparvata lugens, Image Processing, is done through various processes such as filtering,
Haar feature-based cascade classifier, Pest Detection
segmentation and object extraction. However, object
I. INTRODUCTION detection through the use of Haar feature-based
cascade classifiers can easily detect pests. The study
The method of converting an image into digital conducted [14] showed a simple yet efficient way to
form is called image processing. This technique is detect and extract pests in the palay practice farm in
employed to various fields such as agricultural sector Pampanga. The researchers used background
specifically rice farming to detect pests. Rice Brown modelling that determined the presence of pests and
Planthoppers (BPH) or Nilaparvata lugens (Stål) are median filter to remove noise that was produced by
among the outbreak pests of rice that has brought different lightning conditions. This paper is similar
heavy losses in several Asian countries including the to the research of [1] but the researchers used
Philippines [1-3]. microscopic camera, microcontroller and develop
There were various studies conducted in Haar feature-based cascade classifier [15].
response to the possible threat of BPH and other In recent years, the BPH has caused extensive
pests/diseases through inputs such as video or still damage to rice crop in Asia namely Brunei,
images [4-11]. In [4], it uses a handheld device for Bangladesh, China, Malaysia, Sri Lanka, Thailand
detecting and assessing the population density of the and Vietnam [16]. But the insect’s large scale
RPH based on image processing. For detection, they damage has been reported in India, Indonesia, Sri
use a digital camera with Wi-Fi, a smart phone and Lanka and the Philippines. The BPH is regarded by
an extendable pole. While for counting, they adopt many as the number-one insect pest of rice in Asia
the AdaBoost classifier based on Haar features, today. Thus, if not detected early, its unpredictable
Support Vector infestation could result to severe damage in palay and
Machine (SVM) classifier based on Histogram of loss of production for farmers. Also, BPH’s sudden
Oriented Gradient (HOG) features and the threshold occurrence may force the farmers to use unnecessary
judgment of the three features. They achieve an insecticides which could lead to its outbreak because
85.2% detection rate which proves that this method of the death of natural enemies [17].
is easy and accurate for the estimation of the The general objective of the study is to develop a
population density of RPH in palay areas. In [5], it device that can detect BPH in palay. Specifically, this
used a microscopic camera to capture video feeds of sample images are trained which were captured using
the BPH on palay plant and to develop OpenCV- the microscopic camera. The positive images are
Python code using Haar feature-based cascade images that contain the BPH and the negative images
classifier algorithm. are those that do not contain the object. Then the
positive images are marked. These are the rear part
The system was beneficial to the farmer because (butt) of the BPH. A vector data file was created
it provided a rapid system for detection of BPH based on the positive marked images which contain
through image processing. It also gave the farmer the names of positive images and the location of the
sufficient time to plan and employ appropriate pest
objects in each image. The classifier is then trained
control methods such as natural chemical and and ran using an OpenCV file. Haar-like features
biological control, integrated pest management and shown in Fig. 1 are used. Through subtracting the
other methods which can be very beneficial to the sum of pixels that are under the white rectangle from
farmer and most importantly to the environment. sum of pixels under the black rectangle, a single
The study was designed to detect BPH pest of value is obtained from each feature.
palay crop at reproductive stage under controlled
environment. This followed the recommended
fertilizer and temperature requirements and the usual
farm practice and care for this crop. The system
captured the video images of the BPH pests using
microscopic camera and not the image of the damage
it caused to the plant. The obtained images were then
programmed into the system through Haar feature-
based cascade classifiers. Necessary interventions
were done by the farmer and not by the system.
Fig. 1. Examples of Haar-liked Features

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,

Accuracy (ACC) = Σ True positive + Σ True


negative / Σ Total population (1)

Thus, the accuracy of the detection of BPH is,

Accuracy = ((48+20)/70) x 100 = 97.14%

This means that the early warning device is


capable of detecting the BPH for about 97 percent.
Fig. 3. Individual cages of the insect that were used during
actual testing. Each cage contained one (1) insect and labeled
accordingly. IV. CONCLUSION
The following tables were used to show that the From this paper, an accurate detection of BPH is
proposed system can detect captured images of the presented, tested and implemented. The prototype
BPH through Haar feature-based cascade classifier. was designed using microscopic camera to
efficiently capture the images of the BPH and
installed in strategic locations within the palay area
under study. This is connected to the Raspberry Pi
TABLE I. CONFUSION MATRIX FOR TESTING OF BPH
which is the main controller of the node. It is coded
AND NON-BPH
in Python with OpenCV library that is used for
computer vision. The researchers used the image
processing technique such as Haar feature-based
cascade classifier for pre-processing of the images.
This process gave percentage accuracy of 97.14%
were the differences vary from the manner the image [11] F. Ghobadifar, A. Wayayok, M. Shattri, and H. Shafri,
is captured. “Using SPOT-5 images in rice farming for detecting BPH
(Brown Plant Hopper),” IOP Conf. Series: Earth and
Based on the findings and results of the trainings Environmental Science 20, 012015: 2014.
and testing that have been done, the researchers [12] M. Krishnan, G. Jabert, “Pest Control in Agricultural
recommend the following for the improvement of the Plantations Using Image Processing,” IOSR Journal of
Electronics and Communication Engineering (IOSR-
system: for better image quality, it is better to use JECE), vol. 6, issue 4, pp. 68-74, 2013
camera with higher specification especially on [13] G. Bhadane, S. Sharma, and V. Nerkar, “Early Pest
magnification capability and to include in the system Identification in Agricultural Crops using Image Processing
the ability to determine the number of BPH present Techniques,” International Journal of Electrical, Electronics
in the area for appropriate intervention to be done by and Computer Engineering, 2(2): 7 -82(2013), ISN No.
the farmer. (Online): 27-2626.
[14] J. Miranda, B. Gerardo, and B. Tanguilig III, “Pest
ACKNOWLEDGMENT Detection and Extraction Using Image Processing
Technique,” International Journal of Computer and
The authors are thankful to the entomologists Communication Engineering, vol. 3, no. 3.
under Crop and Environmental Sciences Division in [15] F. Jalled, and I. Voronkov, “Object Detection Using Image
IRRI, Los Baños, Laguna for providing necessary Processing,” Department of Radio Engineering &
facility and materials to undertake this research. Cybernetics, Moscow:2016
Also, this research has been funded by the [16] J.L.A. Catindig, G.S. Arida, S.E. Baehaki, J.S. Bentur, L.Q.
Cuong, M. Norowi, W. Rattanakarn, W. Sriratanasak, J.
Engineering Research and Development for Xia, and Z. Lu, “Situation of planthoppers in Asia,
Technology under the Department of Science and “International Rice Research Institute, Los Baños, Laguna,
Technology (DOST). Philippines. Pp. 191-220: 2009.
[17] K.L. Heong, K.H. Tan, C.P.F. Garcia, Z. Liu, and Z. Lu,
“Research Methods in Toxicology and Insecticide
Resistance Monitoring of Rice Planthoppers”, International
REFERENCES Rice Research Institute, Los Baños, Laguna, Philippines.
[1] V. A. Dyck, and B. Thomas, “The brown planthopper Pp. 3-17: 2013.
problem. In: Brown planthopper: threat to rice production [18] O. Mochida, and T. Okada, “Taxonomy and biology of
in Asia,” International Rice Research Institute, Los Baños, Nilaparvata lugens (Hom: Delphacidae). In: Brown
Laguna, Philippines. Pp. 3-17: 1979. planthopper: threat to rice production in Asia,” Los Baños
[2] G.R. Wu, X.P. Yu, L.Y. Tao, “Long-term forecast on the (Philippines): International Rice Research Institute. P 21-
outbreak of brown planthopper (Nilaparvata lugens Stal) 43.
and white-backed planthopper (Sogatel la f urcif era [19] P. Viola, M.J. Jones, “Rapid object detection using a
Horvath). Sci. Agric. Sinica Pp. 30, 26–30: 1997 boosted cascade of simple features,” CVPR ’01:
[3] O. Mochida, and T. Okada, “Taxonomy and biology of Proceedings of the Conference on Computer Vision and
Nilaparvata lugens (Hom: Delphacidae). In: Brown Pattern Recognition, Los Alamitos, California, USA. Pp
planthopper: threat to rice production in Asia,” Los Baños 511-518: 2001.
(Philippines): International Rice Research Institute. P 21-
43.
[4] Y. Qing, X. Ding-xiang, L. Qing-jie, Y. Bao-jun, D. Guang-
qiang, and T. Jian, “Automated Counting of Rice
Planthoppers in Paddy Fields Based on Image Processing,”
Journal of Integrative Agriculture, August 2014, 13(8):
1736-1745.
[5] N. Mongkolchart, and M. Ketcham, “The Measurement of
Brown Planthopper by Image Processing,” International
Conference on Advanced Computational Technologies and
Creative Media (ICACTCM’2014).
[6] S. Xu, Z. Zhou, H. Lu, X. Luo, Y. Lan, Y. Zhang, and Y.
Li, “Estimation of the Age and Amount of Brown Rice Plant
Hoppers Based on Bionic Electronic Nose Use,” Sensors,
14, 18114-18130; doi:10.3390/s141018114: 2014
[7] Y. Yang, B. Peng and J. Wang, “A System for Detection
and Recognition of Pests in Stored-Grain Based on Video
Analysis,” vol. 344, D. Li, Y. Liu and Y. Chen, Eds. Berlin,
Heidelberg: 2011.
[8] C. Priya, K. Praveen, and A. Srividya, “Monitoring of Pest
Insect Traps Using Image Sensors & Dspic,” International
Journal of Engineering Trends And Technology, vol 4 Issue
9.
[9] O. Lopez, M. Rach, H. Migallon, M.P. Malaumbres, A.
Bonastre, J.J. Serrano, “Monitoring Pest Insect Traps by
Means of Low-Power Image Sensor Technologies,”
Sensors ISSN, 1424-8220: 2012.
[10] N. Gopal, “Micro-Controller Based Autoirrigation and Pest
Detection Using Image Processing International Journal of
Advances in Agricultural Science and Technology, Vol.3
Issue.1, Pp. 37-42: March- 2016.

You might also like