Introduction
70% of rural population economy in India is dependent on agriculture and associated categories. In addition to this, national and international economic growth is favored by farming and is the highest private-sector occupation and created employment to approximately 60 % of country’s work force. However, agriculture is in a sad state in India. Today’s farmers are in pathetic condition as they are facing so many problems. The biggest enemies of farmers are pests. For centuries, farmers are battling pests on the field with both inorganic and organic agents that directly affect the plants. In the current situation, farmers need to monitor the health of plants constantly which is practically laborious, and it adds to labor cost. In addition to this, farmers suffer from lack of knowledge on proper quantity of pesticide usage. Bacteria, viruses, and fungi can all cause plant diseases.1-4 On the other hand, excess spraying affects the food chain which indirectly affects the consumers’ health which has direct impact on ecological balance.5-7
A pest termed Whitefly is a tiny organism which is highly invasive, troublesome and destructive to tomato plants. More recently, it is causing huge harm and a drop in tomato harvest. In this standpoint, it is imperative to scientifically detect the tiny insect, which is less than 0.1-inch size, at its early infestation and to obliterate the pest effectively, using precise amount of pesticides. This challenge is addressed in the presented work by employing a new method of pest detection specifically, on tomato leaves based on video processing and automated application of optimal amount of pesticides.
Different techniques are found in literature to detect the pests in the plants. Pests are detected by using image processing technique,8,9 deep neural networks10-12 and wireless sensor networks.1 In most of these research works, traditional methods or image processing methods with non-real time analysis of pest management scenarios are considered. These solutions may be inaccurate in deciding the stage of pest infestation and their subsequent control methods. The proposed work caters to process the video data analysis captured by robotic car and computes appropriate amount of pesticide to the infested plant leaf. This leads to reduced damage to the food chain as well as better control of pests. The suggested system could increase crop yields while lowering pesticide usage, leading to sustainable agriculture.
System Design
![]() |
Figure-1: Block diagram of the system |
The design of a system includes architecture, identifying components, data and modules for a system to cater specified requirements. The block diagram for automatic pest detection and spraying system is as shown in the Figure-1. This system constantly monitors the plant for pests. If in case, it detects any pests it will stop automatically and spray the pesticides. This design basically consists of a robotic car, FPGA, camera and a sprayer. The robotic car has a camera and a sprayer fitted on the top of it.
Camera
The camera constantly sends the live feed of the pests to the video processor which is downloaded onto an FPGA.
FPGA
FPGA unit houses the video processor which monitors the pest. This video processing unit is the main heart of the system. The basic operations of this unit are: a) It will identify whether the pest is present or not and b) It will count the number of pests present.
In video processing the following image processing operations is carried out.
Preprocessing
It selects the suitable color model and converts the captured image for further processing.13
Segmentation
The detection step that follows preprocessing stage is segmentation. The basic function of this step is to isolate the object of interest from the color converted grey image of the leaf.
Noise removal
While extraction process using segmentation method, the noise in terms of water-droplets, dust and remaining parts of leaf are visible in the segmented image. It is essential to eliminate the noise to identify only the whiteflies. The resulting image consists of pixels belonging to whiteflies only.
Identification and estimation of number of pests
Once a noise free image is obtained, the whiteflies are now represented as white colored blobs in the image. These blobs have to be counted to estimate the number of whiteflies.
Prescription of pesticides
Depending on the number of pests counted, the FPGA will prescribe the amount of pesticides to be sprayed.
Control System of Sprayer
This unit sprays the prescribed amount of pesticides. Sprayer is controlled by DC motor. The motor controls the movement of the car. If any pest is identified, then immediately the signal will be sent to the robot to stop; and simultaneously a control signal is sent to the sprayer to spray the pesticide.
System Implementation
Capturing Images
The images of pest infected plants are captured using Camera and the examples of captured images are as shown in Figure-2. These images are further fed as input to the system, to be processed and enable pest detection.
![]() |
Figure 2: Captured images of pest infected plants |
Preprocessing
The captured image will be converted to an image which is suitable for further processing. It selects the suitable color model for processing.14,15 Selection of appropriate color model plays an important role in this algorithm. The default color model is RGB. As it can be seen in the images, based on RGB it cannot extract white flies easily because RGB is brightness dependent, and color is not constant for all flies. Hence image will is converted from RGB to YCbCr and HSV.
Segmentation
The mechanism of segmentation involves dividing digital image into several parts in order to identify some pertinent information in the digital images.16,17 This process is applied on color transformed images to isolate object of interest from leaf. This mechanism is applied on the color-converted image in order to separate the object-of-interest from the leaf. Segmentation basically simplifies the image representation in meaningful form and enables easy and effective analysis.
Mathematically three required segmented images can be obtained by the condition mentioned in equation (1)

Where, X1 and X2 are the minimum and maximum intensity of the color component.
The segmentation algorithm that is chosen here, is color-based thresholding. The principle of this algorithm is to acquire an image and perform image-analysis to identify small object counts. The identified objects are differentiated by color.
Color based thresholding
In this thresholding method, it replaces each pixel in an image with a black-pixel, if the intensity of the image-Ii,j is less than some fixed constant -T (i.e., Ii,j < T) and replaces with white-pixel if the image intensity is greater than that constant.18
Noise Removal
It is always desirable to eliminate the noise present in the processed image in order to obtain only the white flies.19 Noise removal is the process of eliminating the noise in the segmented image. Rule based dilation and erosion, being the common structural operation is applied to corresponding pixel and its closest ones in the input image. Thus, based on the rules employed to process the pixel, it determines the functioning of dilation and erosion mechanism.
Dilation rule followed is that the output pixel value is assigned maximum value of all pixels which are in the neighborhood of input pixel. In other words, in two level images, if any of the pixel is assigned 1, the output pixel is also assigned 1. And for erosion if any of the input pixel is set to 0, the output pixel will follow the same.
Structuring Element
Structuring is basically a window which acts as a mask. The pixels which are inside the window are considered and the rest are ignored. It is fundamentally a matrix constituted of 0s and 1s that can take random shape and size. The neighborhood pixels are described through pixels of value 1. The shape of the structuring element can be disk, square, rectangle etc. Once the erosion and dilation are done on that particular area, the structuring element moves right by one column and jumps to the next row and this continues until it reaches the last set of pixels.
Identification of Pests
Depending on the color of pests, the pest is identification from the background. Here we are considering white pixels as pests and black as background. And the algorithm for this is as shown in the flow chart of Figure-3. If the pixel value lies within the selected intensity range, then that pixel is made white else, it is made black.
![]() |
Figure 3: Flow chart for segmentation process |
Estimation of Number of Pests and Prescription of Pesticides
Once a noise free image is obtained, the whiteflies are now represented as white colored blobs in the image. These blobs must be counted to estimate the number of whiteflies. And prescription of pesticides is done depending on the number of pests counted. The FPGA will prescribe the amount of pesticides to be sprayed.
Motors of Robot for Movement
From FPGA, a signal with 2-values is sent. Value ‘0’ indicates the presence of pests and robotic car should stop at that place. Value ‘1’ indicates that the plant is free from pests and robotic car should continue moving. To interpret these logic levels for motors in terms of voltages, motor-controlled board is being used.
Motor Controlled Board
![]() |
Figure 4: L293D Pin diagram |
Figure-4 illustrates a 16-pin L293D motor-driver IC which allows DC-motor to drive in either direction. On the basis of inputs as Logic-0 and Logic-1 motors are rotated. This IC works on the concept of H-bridge which allows the voltage to be moved in both the directions. This L293D IC has two enable pins that is pin number 1 and 9 and both the pins are set to be high to drive the motor. For driving the motor with left H-bridge it is necessary to enable pin 1 to high and for right H-bridge it is required to enable pin 9 to high.
Control System of Sprayer
The output of FPGA is either 0 or 1. Spraying action will be according to these values. If the value is 0, the spraying action will take place else sprayer will not spray.
Peristaltic motor as indicated in Figure-5 is used for spraying the prescribed amount of pesticides. Peristaltic motor is a 6V DC motor and the working is based on intermittent compression and relaxation of hose and subsequently putting the contents into hose. The chance of pesticide to be sprayed coming in contact with the moving part is less as it is absolutely contained inside a robust, heavy-duty hose.
![]() |
Figure 5: Peristaltic motor |
Results and Discussion
![]() |
Figure 6: Pest infected plant leaf as input image and segmented image as output image |
Figure-6 shows the example of a pested input and output image. The input is fed to FPGA for processing. The output image has been segmented, eroded and dilated. The areas of interest where pests are present have been extracted.
![]() |
Figure 7: Output of motor control board in absence of pests |
![]() |
Figure 8: Output of motor control board in presence of pests |
In Figure-7, as no pests are detected the control signals given to the wheels of the robotic car are turned to alternative 0s and 1s, which indicates the car should continue its movement. Where as in Figure-8 few pests are detected, and the control signals change to 0s. This indicates car should stop.
![]() |
Figure 9: Action of sprayer when pest is detected |
The Figure-9 shows the spraying mechanism on detection of pests. As and when pests on the plant are detected, the control signal of sprayer is turned ON automatically. Hence spraying action takes place. When the pest is not detected, control signal of sprayer is not turned ON, resulting with no spraying action.
Following are the advantages of pest detection and obliteration system
This system reduces the consumption of pesticides and makes a wise usage of it.
Fully automated system thus reducing the human labor.
Monitoring of pests 24*7 by farmers is avoided by this system.
Saves precious time of the farmers.
Developed and designed in a very affordable cost which can reach all classes of people.
Accurately counts the pests and sprays accordingly.
Conclusions
The research paper presents the design and implementation of pest detection and obliteration system with real time video processing using FPGA. This implemented system constitutes a preprocessing stage on the captured image followed by segmentation, noise removal using erosion and dilation and identification and estimation of pests and prescription of pesticides. The prototype of FPGA based tomato pest detection system mounted on robot vehicle can be utilized by farmers to economically kill pests in real time and manage pests in farms. The farmers are relaxed from continuous monitoring of their agricultural fields for detecting the presence of pests using this implemented model. This model comprises the video processing to detect the pests on plant which will be monitored by it-self all the time thus making the farmer’s work easier. Farmer with no proper knowledge of pesticides can use this system effectively, thereby reducing the consumption of pesticides by retaining the quality of the crop, while protecting the crops from getting infected. The designed model also results with cost effective solution to this problem. In future, the statistical analysis will be carried out for this work.
Acknowledgement
The authors would like to acknowledge the Sri Siddhartha Academy of Higher Education, Tumkur and Precidency University, Bengaluru for providing opportunity to carry out this research work.
Funding Sources
The author(s) received no financial support for the research, authorship, and/or publication of this article.
Conflict of Interest
The authors do not have any conflict of interest.
Data Availability Statement
The manuscript incorporates all datasets produced or examined throughout this research study.
Ethics Statement
This research did not involve human participants, animal subjects, or any material that requires ethical approval.
Author Contributions:
Vinutha Chandrashekarappa Basavaraju: Supervision, Conceptualization, Methodology, Writing–Original Draft.
Madihally Nagaraja: Analysis, Writing – Review & Editing.
Ashwini Bhat: Data Collection, Visualization, Project Administration.
References
- Lopez O.E.O, Cervera J.J.Q Chong A.V. Wireless-based pest control in tomato crops. Presented at: 2022 IEEE 40th Central America and Panama Convention (CONCAPAN); 09-12 November 2022; Panama. https://doi.org/1109/CONCAPAN48024.2022.9997624
CrossRef - Daniel F, Janos S, Monika H.R. The challenge of Feeding the World. 2019; 11: 5816. https://doi.org/10.3390/su11205816
CrossRef - Md Wasim A, Sengupta D, Ashim C. Impact of Pesticides use in agriculture: their benefits and hazards. Interdisciplinary Toxicology. 2009; 2: 1-12. https://doi.org/2478/v10102-009-0001-7
CrossRef - Jun L, Xueweiwang. Early recognition of tomato gray leaf spot disease based on mobile Netv2-YOLOV3 model. Plant Methods. 2020; 83: 1-16. https://doi.org/1186/s13007-020-00624-2.
CrossRef - Stefanie S, John A.P, Michael A.B. Prospects for management of whitefly using plant Semiochemicals compared with related pests. Pest Management Science. 2018; 74(11): 2405-2411. https://doi.org/1002/ps.5058
CrossRef - Estefania R, Tellaz M.M, Janssen D. Whitefly Control Strategies against Tomato leaf curl New Delhi Virus in Green house Zucchini. International Journal of Environment Research and Public Health. 2019; 16(15): 1-12. https://doi.org/3390/ijerph16152673.
CrossRef - Santosh A, Bikesh S, Bibek B, Saban Kumar K.C. Tomato Plant Diseases Detection System using Image Processing. Presented at: 1st KEC Conference; September 27, 2018; Kantipur Engineering College, Dhapakhel, Lalitpur.
- Nagar H, Sharma R.S, Pest Detection on Leaf using Image Processing. Presented at: 2021 International Conference on Computer Communication and Informatics (ICCCI); 27-29 January 2021; Coimbatore, India, https://doi.org/1109/ICCCI50826.2021.9402606.
CrossRef - Prathibha G.P, Goutham T.G, Thejaswini M.V, Rajas P.R, Kamalam B. Identification of Groundnut Bud Necrosis Virus on Tomato Fruits using Machine Learning based Segmentation Algorithm. International Journal of Future Generation Communication and Networking. 2020; 13(2), 259-264.
- Suárez A, Molina R.S, Ramponi G, Petrino R, Bollati L, Sequeiros D. Pest detection and classification to reduce pesticide use in fruit crops based on deep neural networks and image processing,” Presented at: 2021 XIX Workshop on Information Processing and Control (RPIC); 03-05 November 2021; SAN JUAN, Argentina. https://doi.org/1109/RPIC53795.2021.9648485
CrossRef - Kuzuhara H, Takimoto H, Sato Y, Kanagawa A. Insect Pest Detection and Identification Method Based on Deep Learning for Realizing a Pest Control System. Presented at: 2020 59th Annual Conference of the Society of Instrument and Control Engineers of Japan (SICE); 23-26 September 2020; Chiang Mai, Thailand. https://doi.org/23919/SICE48898.2020.9240458
CrossRef - Ramesh N.V.K, Mohanpradeep Reddy B, Suresh N, Rao K.R, Reddy B.N.K. Identification of Tomato Crop Diseases Using Neural Networks-CNN,” 2021 12th International Conference on Computing Communication and Networking Technologies (ICCCNT); 06-08 July 2021; Kharagpur, India. https://doi.org/10.1109/ICCCNT51525.2021.9580083
CrossRef - Sagar V, Khule R.S. Tomato Plant Disease Detection using Image Processing. International Journal of Advanced Research in Computer and Communication Engineering. 2017; 6; 293-297. https://doi.org/10.17148/IJARCCE.2017.6651
CrossRef - Alvaro F, Sook Y, Sang C.K, Dong S.P. A robust Deep Learning – Based Detection for Real time Tomato Plant Diseases and pests Recognition. Sensor; 2017; 17; 1-22. https://doi.org/10,3390/s17092022
- Karthik K, Rajaprakash S, Nazeeb Ahmed S, Perincheeri R, Alexander CR. Tomato and Potato Leaf Disease Prediction With Health Benefits Using Deep Learning Techniques. Presented at: 2021 Fifth International Conference on I-SMAC (IoT in Social, Mobile, Analytics and Cloud) (I-SMAC). 11-13 November 2021; Palladam, India. https://doi.org/1109/I-SMAC52330.2021.9640765
CrossRef - Meivel S, Kalaiarasi G, Brindha P, Kowsalya K, JibethaVeerakumari C. Disease Detection of Paddy Crops using UAV Image Analysis. International Journal of Innovative Research in Computer and Communication Engineering. 2017; 5; 4686-4694. https://doi.org/15680/IJIRCCE.2017.0503197
- Moghadam P, Ward D, Goan E, Jayawardena S, Sikka P, Hernandez E. Plant Disease Detection Using Hyperspectral Imaging. Presented at: 2017 International Conference on Digital Image Computing: Techniques and Applications (DICTA); 29 November 2017 – 01 December 2017; Sydney, NSW, Australia. https://doi.org/1109/DICTA.2017.8227476.
CrossRef - Singh V, Misra A.K. Detection of Plant leaf diseases using Image Segmentation and Soft computing Techniques. Information Processing in Agriculture. 2017; 4; 41-49. https://doi.org/1016/j-inpa.2016.10.005
CrossRef - Alvaro F, Dong S.P, Sook Y, Hong Y, Yujeong L. Characteristics of Tomato Plant Diseases – A study for tomato plant disease identification. Presented at: ISITC 2016 International Symposium on Information Technology Convergence. 14-15 October 2016; Shanghai, China.










