Plant Disease Detection Using Image Processing

Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

SCHOOL OF SCIENCE AND ENGINEERING

PLANT DISEASE DETECTION USING


IMAGE PROCESSING

Spring 2022

Maryam TAKTI

Supervised by:

Dr. Moulay El Hassan El Azhari

1
PLANT DISEASE DETECTION USING IMAGE PROCESSING

Capstone Report

Student Statement:

“I, Maryam Takti, affirm that “I have applied ethics to the design process and in the selection

of the final proposed design. And, that the designer has held the safety of the public to be

paramount and has addressed this in the presented design whether may be applicable.”

Takti Maryam

Approved by

Dr. Moulay El Hassan El Azhari

2
Acknowledgments:

Thanks to the contribution and the support of many people, I was able to achieve the intended

objectives of my project capstone.

I would like to express my deep gratitude to my supervisor Dr. El Azhari Moulay El Hassan for

his guidance throughout the whole semester, thank you for giving me the chance and allowing

me to work on this project that match my interests even if it is something beyond my academic

background as a general engineer. Hence, this capstone project was not a challenge for me, but

it was a huge opportunity where I acquired new knowledge that will help me in the long term.

I am truly grateful for his support, assistance, useful instructions, helpful advice, and his regular

guidance to give my best and succeed in this capstone project.

I am extremely thankful to Mr. Mouad Bousalama for his help and assistance that he provided

regarding the coding part and the hours he spent to fix the difficulties that I faced in this phase

of my project.

Last but not least, I would like to express my sincere gratitude to my parents, my brother, and

my sister for all their sacrifices, unconditional support, also for believing in me. I would like to

thank all my friends for their support, assistance. Thank you for always encouraging me

whenever it gets overwhelming. This would not be reached without the contribution and the

support of these people.

3
TABLE OF CONTENTS:

Abstract in English

Abstract in French

List of Figures

1. Introduction

2. Problem Statement

3. Suggested Solution

4. STEEPLE Analysis

5. Feasibility Study

6. State of The Art:

6.1. Impact of Monoculture on The Environment and Economy:

6.2. Artificial Intelligence

6.3. Deep Learning

6.4. Machine Learning

6.5. The Difference Between ML & DL

6.6. Some Applications of AI in Agriculture

6.7. AI For Plant Disease Detection

7. Methodology:

7.1. Type of Diseases

7.2. Data Collection

7.3. Image Processing System

8. Implementation On MATLAB:

8.1. MATLAB Code

8.2. MATLAB Output

4
8.3. Standalone Application

9. Future Work

9.1. Mobile application

9.2. Drone’s Intervention

10. Conclusion

11. References

12. Appendix

5
Abstract In English:

Morocco is an agricultural country, and the agricultural industry is the largest contributor (about

14%) of GDP ahead of other industrial sectors [6]. Agriculture is one of the pillars of our

economy. Therefore, the farming industry is the main source of gaining. However, due to some

factors such as plant diseases, pests, climate change, the yield of the farming industry decreases,

and the productivity decreases as well.

The detection of plant diseases is crucial to avert the losses in the productivity and in the yield.

It is not obvious to monitor the plant diseases manually as the act of disease detection is very

critical. It needs a huge effort, along with knowledge of plant diseases and extensive processing

times. Therefore, image processing technology is used to detect the plant disease, this is done

by capturing the input image that undergoes the process and is compared with the dataset. This

dataset is composed of diverse plant leaves in the image format. This project aims at designing

a standalone application that will provide the framer with the necessary information about the

type of disease. The purpose of this project is to assist and provide efficient support to the

monoculture farmers.

In this paper, we propose a system that will use the different techniques of the image process to

both analyze and detect the plant diseases. The results of the implementation show that the

designed system could give a successful result by detecting and classifying the plant diseases.

In this paper, we are focusing on three common plant diseases: Bacterial Blight, Cercospora

Leaf Spot, and Alternaria Alternata.

Keywords: Image Processing; K-Means; GLCM; SVM; Plant Disease Detection; Standalone

Application.

6
Abstract in French :

Le Maroc est un pays agricole et l’industrie agricole est le premier contributeur (environ 14%)

du PIB devant les autres secteurs industriels. L’agriculture a toujours constitué un pilier

essentiel de l’économie et de la société du Royaume, ses performances conditionnent même

celles de l’économie tout entière. Toutefois, en raison de certains facteurs tels que les maladies

des plantes, les ravageurs, le changement climatique, le rendement de l'industrie agricole

diminue et la productivité diminue également.

La détection des maladies des plantes est cruciale pour éviter les pertes de productivité et de

rendement. Il n'est pas évident de surveiller manuellement les maladies des plantes car la

détection des maladies est très critique. Cela nécessite un effort considérable, ainsi qu'une

connaissance des maladies des plantes et des délais de traitement importants. Par conséquent,

la technologie de traitement d'image est utilisée pour détecter la maladie des plantes, cela se fait

en capturant l'image d'entrée qui subit le processus et est comparée à l'ensemble de données. Ce

jeu de données est composé de diverses feuilles de plantes au format image. Ce projet consiste

à concevoir une application autonome qui fournira à l'utilisateur les informations nécessaires

sur le type de maladie ainsi que le type et le taux de pesticide à respecter. L'objectif de ce projet

est d'accompagner et d'accompagner efficacement les monoculteurs.

Dans cet article, nous proposons un système qui utilisera les différentes techniques du

traitement de l'image pour à la fois analyser et détecter les maladies des plantes. Les résultats

de la mise en œuvre montrent que le système conçu pourrait donner un bon résultat en détectant

et en classant les maladies des plantes. Dans cet article, nous nous concentrons sur trois

maladies végétales courantes : la brûlure bactérienne, la tache cercosporéenne et l'Alternaria

Alternata.

7
Mots clés : Traitement d'images ; K-Means ; GLCM ; SVM ; détection des maladies des

plantes ; Application autonome.

8
List of Figures:
Figure 1: Workflow of the System

Figure 2: Figure: Image of Alternaria Alternata disease

Figure 3: Image of Bacterial Blight disease

Figure 4: Image of Cercospora Leaf Spot disease

Figure 5: Sample Images of Alternaria Alternata

Figure 6: Sample Images of Bacterial Blight

Figure 7: Sample Images of Cercospora Leaf Spot

Figure 8: Block Diagram of The Image Processing Steps

Figure 9: Extracted Features & Their Expressions

Figure 10: SVM Classifier Database

Figure 11: Uploading the Input Image

Figure 12: Segmentation of The Input Image

Figure 13: Classification Result-Disease Detection

Figure 14: Classification Result-Accuracy

Figure 15: Diagram Representing: From MATLAB to Standalone Application

Figure 16: MATLAB Compiler Interface to Create Standalone App

Figure 17: Drone Used for Plant Disease Detection

9
LIST OF ABBREVIATIONS:

GUI: Graphical User Interface

GLCM: Gray-Level Co-occurrence Matrices

SVM: Support Vector Machine

CNN: Convolutional Neural Network

RGB: Red, Green, Bleu

IPT: Image Processing Toolboxes

ROI: Region of Interest

UAV: Unmanned Aerial Vehicles

DL: Deep Learning

ML: Machine Learning

10
1. INTRODUCTION

Agriculture is the backbone of Morocco’s economy. A big part of our country’s economy

depends on the agriculture in the first place. Farmers have a big range of options to select the

crops and choose the convenient chemicals and pesticides to use. Thus, crop damage could

result in generating unexpected losses that will impact the productivity of the farming industries

which will directly affect the economy. Therefore, taking care of the plants is necessary to

maintain an excellent quality of agriculture and guarantee the efficient productivity along with

the high profit.

Plants are sensitive to diseases especially the plant leaves as symptoms of the disease appear

first on the leaves. Due to the bad impacts of plant diseases on the both the economy and the

environment, the farmers should consider monitoring the crops in such a way that they may

mitigate losses.

It exists a way that is used by experts to monitor the crops which is the naked eye observation.

This is a traditional method that has many constraints related to time consuming as the operation

of monitoring is done manually, and it requires the presence of experts.

However, lately, crop monitoring is being developed to be digital and semi-automatic, meaning

that only from the symptoms that are shown on the leaf, the disease could be detectedin an

easier, quicker, cheaper way. Therefore, this digitalized method will be beneficial for the

farmers as well since it will facilitate for them the detection of the diseases because most of

the farmers do not have a sufficient background and knowledge about monitoring the crops and

dealing with the variety of diseases that could affect them. The proposed system that we are

suggesting in this paper could be used by the farmers to increase the yield with no need to

consult experts. The core purpose of this proposed system is not aiming only at detecting the

plant diseases using the image processing technology, but it aims also at directing the user
11
(farmer) to use a mobile application in which he will upload the image and receive the type of

disease infection along with a suggestion of needed pesticides.

The digitalization of the agriculture field has known the intervention of the latest technologies

namely the image processing. As a result, our system that is designed to be automated system

is implemented using image processing technique using MATLAB.

Farmers opt for monoculture due to its benefits that will be discussed in the coming sections.

Therefore, nowadays, monoculture farming industry is becoming important.

This paper would be helpful for the framers and will represent a sort of guidance. Many

technologies have been developed to execute the plant disease detection; in this paper we are

targeting the most common technique which is image processing.

12
2. FEASIBILITY STUDY

The feasibility study allowed us to determine whether the project idea is viable and could be

achievable within the specified time. For this project, we discussed the impact of the

monoculture farming advantages on the economy along with its negative impact on the

environment. Also, we analyzed the use of pesticides in the monoculture farming industry, this

part took around one week to do the research by referring to scientific papers.

After that, we collected the convenable dataset for the image acquisition, this required one

week. The systemof processing the images focuses on the image acquisition, the preprocessing

of the image, thesegmentation (using the K-mean segmentation method), feature extraction, and

classification. Therefore, an extensive and solid knowledge in deep learning and image

processing specifically is required for a better understanding of the image processing system.

To implement this process, we used MATLAB as a software. Processing the images using this

software might be difficult since it requires a strong background while working with its different

features. Three to four weeks were spent in the code part and executing this technical part

required five to six weeks.

In parallel to that, we tried to work on the mobile application that will contain guidelines for

the users and will pick for them the suitable pesticide for the specific plant’s disease. However,

due to time constraints, we moved to the idea of designing an application using MATLAB

which is the standalone application. This required a good understanding of the necessary tools

of building a standalone application. This part required from three to eight weeks including the

code and the implementation.

This project has a positive impact on the economy as it will minimize the losses and reduce the

use of pesticides and assure an efficient production. As a further implementation of the project

a drone may be added to the project as a tool to take the leaves’ pictures that will be processed

instead of doing this manually using an ordinary camera or a mobile phone. This part will
13
require a lot of time and the legal considerations could be an issue. Therefore, only the

theoretical part willbe included in this capstone project. We spent one to two weeks to finish

this phase of the project.

Based on this feasibility study, we can deduce that this capstone project is feasible and that all

the due dates can be met on time.

14
3. STATE OF THE ART

3.1. Impact of Monoculture on The Environment and

Economy:

Monoculture was introduced as a solution to satisfy the higher need for food that is growing

day by day. It is a form of agriculture that refers to a process of planting one type of crop within

the same land. The farmers can focus only on growing one type of crops, and they need only

thenecessary tools and machines to deal with one specific type of crop while preparing the soil

and harvesting. This method of farming is profitable for the farmers due to its benefits on both

the environment and the economy [10]. The monoculture increases the efficiency and the

productivity. Also, this form of agriculture is easier to manage as it requires less efforts

compared to the polyculture. It guarantees for the farmers higher incomes. However, due to its

negative impact on the soil, the farmers are obliged to use fertilizers to boost the soil and the

plant growth [5]. Also, to protect plant from the pests and the diseases, farmers use a lot of

pesticides. The thing that explains the bad impact of monoculture on the environment because

of the highly use of chemical inputs that the monoculture needs. Even if the farmers try as much

as they can to use less harmful chemicals or at least using them in a very low concentration,

many of the chemicals are toxic and will have negative impacts on the soil [7]. Moreover, the

monocropping lacks many pests and insects, that help to reduce the spread of disease among

plants. Which emphasizes again on the highly need of using pesticides and chemicals that could

result in pollution and negative impacts on the environment as a whole. The use of pesticides

will result in the exhaustion of the soil since the monocropping impoverishes the soil and

reduces the presence of nutrients. Despite of its drawbacks, farmers opt for monocropping as

an option since it requires less equipment and workers. Also, it guarantees an efficiency in

terms of harvesting and planting which implies the rise of productivity and automatically the

15
profit. As a result, the monoculture farming helps in increasing both the productivity and

efficiency within a farm industry.

3.2. Artificial Intelligence:

Any method that mimics human behavior, it is known as an artificial intelligence. Basically, it

is a science that aims at training machines to solve difficult and complex problems. In other

words, the science and engineering of constructing intelligent devices, particularly computer

programs, is known as artificial intelligence. It is like using computers to research human

intelligence, but AI does not have to be limited to medically detectable methods [11]. The

intelligence displayed by robots or machines is referred to as artificial intelligence. It belongs

to the fieldof computer science [12]. It has improved human lives in many ways, and it is

currently becoming a significant and useful topic in computer science.

3.3. Deep Learning:

Deep learning is a subset of machine learning where the artificial neural networks adapt and

learn from large amounts of data. Also, it uses hierarchical designs to learn high-level

abstractions from data [2]. It is a new technique that is already being used in classic artificial

intelligence applications including. The blossoming of deep learning today may beattributed to

three major factors: the expansion of chip processing, low-cost computer hardware, and

machine learning techniques [3]. In recent years, various deep learning algorithms have been

extensively studied and discussed.

16
3.4. Machine Learning:

Machine learning is an artificial intelligence application that uses algorithms and data to

evaluate and make decisions without the need for human intervention. It discusses how

computers accomplish tasks independently based on their prior experiences [11]. As a result,

we might argue that artificial intelligence is developed through experience in machine language.

We are able to distinguish between regular computer software and machine learning by

knowing that the human is not providing any programs to this system; however, it is trained and

taught throughout the use of the data that is collected.

3.5. The Difference Between ML & DL:

Deep Learning is a specific type of machine learning. It functions in the same manner that

machine learning does in terms of technology, but with different techniques. It is based on the

functionality of human neurons, and it gives rise to the concept of artificial neural networks.

While the functioning of machine learning may be illustrated using the case of distinguishing a

cat or dog image. In this case, the machine learning model takes photos of both animals as an

input, then it extracts various elements from these two images: shape, height, eyes… After

that, it performs the classification algorithm, and finishes by predicting the outcome whether it

is an image for a dog or a cat.

3.6. Some Applications of AI in Agriculture:

Image processing:

Image processing is used in the field of agriculture to mainly detect the plant diseases, also to

specify the affected area by the disease in the plant’s leaf [14].

Machine Learning:

17
In agriculture, machine learning is used as a tool of disease identification due to the efficiency

and accuracy of its algorithms [14].

Convolutional Neural Networks (CNNs):

CNNs are seen to succeed in the diagnosis of plant diseases as they have the ability to ensure

a fast diagnosis [14].

3.7. AI For Plant Disease Detection:

Application of computer in the domain of agriculture was introduced in the aim of solving

many problems related to agriculture and plant diseases. Artificial Intelligence is the most

common used mechanism for the plant disease detection due to its high performance and

precision [7]. The different AI techniques helped to figure out and solve many problems in the

field of agriculture. These techniques include deep learning, machine learning, convolutional

neural network, image processing, and they were used for the disease detection in many crops

such rice, tomato, banana, etc.

The domain of agriculture, in general, has known the revolution of the latest technologies as

part of its process namely artificial intelligence. It highly increases the productivity and the

monitoring of plant disease in the real time [7].

18
1. PROBLEM STATEMENT

Plant diseases are impacting the agriculture in general and the monoculture more precisely. The

detection of plant diseases most of the time is done only throughout the naked eye observation.

This is a traditional way to deal with the detection of plant diseases, the farmers used to consult

the experts who spend a lot of time trying to specify the type of disease that is affecting the

plants’ leaves. The experts based their analytics that includes categorizing andclassifying the

diseases, only on the visual symptoms that are usually shown on the leaves.

The thing that is time consuming and costs a lot for the framers of this kind of agriculture. This

operation of detecting plant diseases is expensive since the framers must consult experts, and

time consuming as those experts need time to detect the disease and classify its type and need

a continuous control. Knowing that some farmers could not have the capabilities to consult the

experts regularly, so the risk of contagion between plants is extremely high. Also, this will have

bad impacts on the environment due to the extensive use of chemicals and pesticides that are

used in a random quantity, also, the production process is affected especially that in this case

we are dealing only with one type of crops.

19
2. SUGGESTED SYSTEM

As a suggested solution for this issue that every farmer is facing, we are suggesting the use of

the latest technologies to detect the plant disease detection which is image processing. The idea

is to create a standalone application using MATLAB that will be used by the farmer. He will

be uploading the image of the leaf to the application, once the image is processed and the

detection is executed, the application will display to the farmers the type of disease along with

the affected region, and the accuracy. The image that is uploaded to the standalone application

will undergo the process of MATLAB throughout its image processing tools.

By using MATLAB, features related to the area affected by the disease, the accuracy and many

other features are analyzed. After MATLAB continues the processing of the given image, the

type of disease is classified and detected.

The core idea behind this system is to remedy the disease with minimum impact on the

environment, and to guarantee for the user or the farmer a fast and economical way in detecting

leaf disease and categorizing it.

20
3. STEEPLE ANALYSIS

This steeple analysis part is dedicated to discussing the social, technological, economic,

environmental, political, legal, and ethical impacts of our project.

3.1. Social:

The social aspect of this project resides in the fact that it will expand the accuracy results of the

detection which will help the farmers to guarantee an efficient production, so that it will

guarantee a harmonious family life free of troublesome revenue related problems.

3.2. Technological:

Recently, much research was conducted regarding this topic using different methods. However,

using this technology of image processing will allow to tackle the problem form a different

perspective. Also, in this project we will be using dome already invented methods that could be

developed. Detecting using image processing is mainly implemented using Python, in this

project we will be using MATLAB to discover this technology and see how efficient its results

will be.

3.3. Economic:

Plant disease detection was always requiring the existence of experts, the thing that costs a lot

of money and waste of time as this manual work requires a lot of working and processing hours.

Also, the detection is done after the healthy plant are contaminated also. The main purpose of

our project is to ensure for the farmer the pre-prediction of the plant disease the thing that will

minimize the use of pesticides especially in the monoculture. Therefore, this will increase the

profit for any monoculture farming industry as it will guarantee the increase in the quantity of

the products that are produced by the monoculture farming industry.

21
3.4. Environmental:

Our project will be very friendly to the environment as it will reduces the use of pesticides and

all the chemicals that are harmful for the soil. Also, by monitoring the plants’ health will have

a positive impact on the cultivation process of the crops.

3.5. Political:

The food security of a country allows its prosperity and political effectiveness. Solving the plant

diseases problem allows for a more stable and prosperous society

3.6. Legal:

This project is considered to be legal as it will be tested regularly, and it will undergo many

regulations from the experts to specify the framework in which it will be implemented.

3.7. Ethical:

This project is more ethical from a consumer perspective to buy products with minimum impact

of harmful pesticides.

22
4. METHODOLOGY

The idea at first was to create an android mobile application that will be used by the farmer to

help him upload the picture of the unhealthy plant’s leaf and receive the type of the disease with

the type of pesticide to use and the amount of pesticide that the farmer should not exceed. The

MATLAB code will be the software that we will be using to process the image that will be sent

to it from the mobile application as input throughout a database using MySQL. After some

trials, this idea could not be achieved due to constraints of time as it will require a lot of time

from building, executing to testing. Also, we tried to achieve this by using “ThingSpeak” which

is an IoT cloud platform that is used to analyze and visualize data, but it does not support the

upload of images to have a database; therefore, it was not accurate to our system. Then, we

thought of another scenario which is making a standalone application using MATLAB that will

be a desktop application that the users can download and access it from their computers. The

process of making the standalone application will be discussed later in the next sections.

In the figure below (figure 9), the block diagram summarizes the methodology that is used in

our system. First, we can distinguish between two parts, the training part, and the testing part.

➔ In the training part: the first step in this phase concerns training the SVM classifier from the

dataset that we collected from the internet. We have different classes of diseases that

contains many leaves. We label every class disease by assigning to it an integer value. After

that, the segmentation is executed in order to get the region of interest (ROI). We can get

this region of interest by removing all unwanted or undesired information like distortion.

After getting the ROI, we extract the features that were calculated. At this stage, we create

our database that will be the backup of the testing phase.

➔ In the testing part: we input to the system an image of a plant leaf that is unknown, and after

getting the ROI by segmenting the image, we could extract the features of the region of

interest. Then, the information is transferred to the SVM classifier. The main purpose of
23
this SVM classifier (in our system we used a multi SVM classifier due to the large set of

data that we are working with) is to compare the features extracted from the input of image

with the database that we already built in the training part. Finally, the system will be able

to detect the type of the disease based on this comparison, meaning that it compares the

values of the vector features of the testing image and see to what vector feature it

corresponds in the database. Therefore, it could predict the disease depending on the values

that are matching.

Figure 1: Workflow of the System

24
5. IMPLEMENTATION

5.1. Types of Diseases:

It exits different types of diseases that affect the plants. The most common diseases between

the plants are Alternaria alternate (fungal), Anthracnose, Bacterial Blight (bacteria), and

Cercospora Leaf Spot, Downy Mildew, Alternaria Leaf Spot, Frogeye Leaf Spot, White Spot,

Powdery Mildew [5].

In our system we focused only on three types of plant diseases which are the following:

Alternaria Alternata:

It is one of the common plant diseases, it is a fungus that cause spots on the plant’s leaf, it has

bad impacts on both the health of the plant and the human as it may cause for them asthma [5].

Figure 2: Image of Alternaria Alternata disease

25
Bacterial Blight:

It is one of the dangerous diseases that can affect a plant’s leaf, one of its initial symptomsthat

could be visually seen on the plant’s leaf is the dark and yellow spots other symptoms could be

necrotic blotches [5].

Figure 3: Image of Bacterial Blight disease

Cercospora Leaf Spot:

This type of disease appears and spread in high temperature and humidity. It is characterized

by small grey spots on the plant’s leaf [5].

Figure 4: Image of Cercospora Leaf Spot disease

26
As mentioned above, the proposed system will consist mainly of identifying and classifying the

type of disease the leaf is suffering from. This will be implemented using image processing

method on MATLAB as a tool to process the images. This process undergoes many steps, and

the first step is the data collection.

5.2. Data Collection:

Our collected data contains different images of the leaf diseases that were taken from the

internet, and these images are stored as a database in the computer, and they are used also to

train our system along with the healthy leaf images.

Below are samples of images of the three diseases that we picked for our dataset.

Figure 5: Sample Images of Alternaria Alternata

Figure 6: Sample Images of Bacterial Blight

Figure 7: Sample Images of Cercospora Leaf Spot

27
6. IMAGE PROCESSING SYSTEM

6.1. Image Processing:

Image processing is a method that uses computerized algorithms to analyze the images and

process them. Image processing has been used in the field of agriculture in many applications

and more specifically in the detection of plant diseases. The processing of image goes through

many steps that are listed below:

Figure 8: Block Diagram of The Image Processing Steps

28
6.2. Image Acquisition:

The first step in the image processing is the image acquisition. In this step the leaves of the

plant are captured using a digital camera or a mobile phone. These images are used as an input

to the system, and they must be stored in the computer.

6.3. Image Pre-processing:

This step is mainly about enhancing the input images for the processing. This pre-processing

helps to improve the quality of the images by removing undesired distortion including the

spores, dust. Also, it could be used to adjust the images’ colors. The objective of this step is to

provide clear images for further analysis. Basically, in this step the input image is converted

from the RGB image to L*a*b* color space (L* = Luminosity layer, a* & b* chromacity layers).

6.4. Image Segmentation:

In this stage, an image is divided into sub images, or we are converting the input image into

segments. There are a variety of methods that are used for segmentation: K -mean clustering,

region-based segmentation, edge detection segmentation [8]. However, the most common used

one is the K-mean clustering. The main purpose of this method is to divide n observations into

k clusters with each observation belonging to the cluster with the closest mean. Based on the

k-means results, each pixel in the image that is uploaded is labeled, after that,the results of

clustering are stored in a blank cell array. One of important things in this step is to choose the

convenient cluster. We select this cluster based on the one that shows the big part that is affected

by the disease. Then, the features of the chosen cluster are to be extracted in the following phase

which is the feature extraction. Basically, segmentation serves to separate the region that the

disease allocates on the leaf image from the non-disease region.

29
6.5. Feature Extraction:

In this phase, it is time to extract the needed information from the image. The dimensions of

the region of interest (ROI) are smaller compared to the original image. It exists a lot of methods

that are used for the feature extraction, but the commonly used one is the Gray Level Co-

occurrence Matrix. The GLCM is known for its ability to extract the texture features that will

ease any further analysis. This method calculates the pixel with a specific intensity with the

image. The chosen image will be converted to grayscale as it is originally in RGB format. In

the table below, are listed the thirteen features and theirexpressions, an array is used to store

these features.

Figure 9: Extracted Features & Their Expressions [16]

30
6.6. Classification:

The common diseases that could affect the leaves are fungi, bacteria, and viruses or even the

insects’ impact that is usually shown as spot on the leaves of the plants. Based on the method

SVM the disease could be classified.

The support vectors machine is to be trained with images of different diseases with their

extracted features, and these images that are part of the training process are stored in the dataset,

it is referred to them as training images.

This table below shows the dataset that was trained using the SVM classifier and it represent at

the same time the database reference to which the SVM classifier rely on to compare the vector

features.

Figure 10: SVM Classifier Database

31
7. IMPLEMENTATION ON MATLAB

7.1. MATLAB:

MATLAB (Matrix Laboratory) is a platform that is used to solve mathematical problems along

with the ability to code in MATLAB [10]. It contains toolboxes to process many problems, one

of the important tools that it provides is the “Image Processing Toolboxes.” This toolbox

consists of many algorithms that analyzes, processes, and visualizes the images [15]. IPT is a

tool that is used to automate standard image processing tasks. It could be used also for both

image enhancement and segmentation.

7.2. MATLAB CODE:

MATLAB code is used for the plant disease detection. The output is displayed on theMATLAB

GUI. The GUI consists of many buttons for choosing the image, enhancing, segmenting,

classification, accuracy, and an exit button. Moreover, the functionality for those buttons have

been implemented in the appropriate places. The SVM classifier is the tool thatis responsible

to classify the plant diseases.

For the coding part, we used an open source [13]and we modified it according to our collected

data and our desired output.

32
Figure 11: Uploading the Input Image

Figure 12: Segmentation of The Input Image

33
Figure 13: Classification Result-Disease Detection

Figure 14: Classification Result-Accuracy

34
7.3. Standalone Application:

To create the standalone application, we used MATLAB as a software to execute this. We made

this standalone application from the GUI that was generated previously by MATLAB.

It was build using MATLAB compile license in which you can either create an application or

convert the GUI to a standalone application and it has many other features. This standalone

application does not require MATLAB to be installed. In other words, when you are targeting

machines or computers that does not have MATLAB installed, you can use the standalone

application. Also, this applies when the users have not access to MATLAB which is the case

for the farmers. Not all the framers are familiar with MATLAB, so the standalone application

that could be downloaded and installed in their desktops will allow them to benefit from the

service of the application without the need of installing MATLAB or even having a MATLAB

license. Moreover, the use of the standalone application does not require connection to internet

to function. Thus, the data is saved on the device. It is reliable since it does not fail due to lack

of a license. In addition to that, it has many other features.

Figure 15: Diagram Representing: From MATLAB to Standalone Application

35
Figure 16: MATLAB Compiler Interface to Create Standalone App

1)Application Interface
that the user sees after
downloading and opening 2)Then, the GUI is
the standalone application displayed on the screen,
on his computer. and the user can upload
the desired image to
process.

36
8. FUTURE PERSPECTIVE

8.1. Mobile App:

As a future work and to improve our project, the idea is to create a mobile application that

will be connected to MATLAB. The farmer will use the application to detect the type of the

plant disease. He will be the one to upload the leaf image that will be sent to MATLAB as an

input after being saved into a database. Meanwhile, the farmer will be receiving a notification

saying that the upload was done successfully. Once the image is processed and the detection

is executed, the farmers will receive a message specifying the type of disease along with the

type and the quantity of pesticide to use. The image that is uploaded to the mobile application

will undergo the process of MATLAB throughout its image processing toolboxes.

8.2. Drones Intervention:

The second idea to be implemented in parallel with the first one as future work as well is the

use of drones to reach the automatic monitoring and detection of plant diseases. Drone will be

programmed in such a way that it will be able to take instantaneous pictures for the leaves, so

that they can be processed. This operation will allow us to save more time since it will be

quicker as we will have a huge data and information that will help to refine the process of

images. Another incentive to use the drones is the fact that they have a huge occupancy along

with a high scouting ability.

The cameras of UAVs could detect early stages of disease and alert farmers about the need to

spray before the disease causes damage to the crop. The UAVs have many advantages beside

the detection of disease, they can detect the stress inplants, yield prediction, and quantification.

37
Figure 17: Drone Used for Plant Disease Detection

38
9. CONCLUSION

The plant disease detection using image processing is the most convenient method to keep up

with an efficient yield. The main goal of this paper was to prove how image processing tool is

able to guarantee accurate results regarding the detection of the plant diseases and also how it

can assist the farmers in increasing the yields. By the end of this project, we were able to achieve

the intended objective which was the implementation of image processing in the plant disease

detection. Furthermore, building the standalone application will make this technology more

accessible and practical for the farmers. As a result, the standalone application for identifying

disease-affected plants and healthy plants has been developed. Moreover, the goal for future

work is to create a mobile application to make the process much easier for the farmers, and to

use drones in order to expand the dataset of training images and improve the accuracy of our

proposed system.

39
10. REFERENCES

[1] “Advantages and Disadvantages of Monoculture.” Gardenerdy, 22 Jan. 2015,

https://gardenerdy.com/advantages-disadvantages-of-monoculture/.

[2] Khirade, Sachin D., and A.B. Patil. “Plant Disease Detection Using Image

Processing.” 2015 International Conference on Computing CommunicationControl

and Automation, 2015, https://doi.org/10.1109/iccubea.2015.153.

[3] Kumar, Surender, and Rupinder Kaur. "Plant disease detection using image

processing-a review." International Journal of Computer Applications 124.16

(2015).

[4] “Monoculture Farming Explained: What Are the Pros and Cons?” EARTH

OBSERVING SYSTEM, 29 Dec. 2021, https://eos.com/blog/monoculture-

farming/.

[5] Otani, Saria, et al. “Disease-Free Monoculture Farming by Fungus-Growing

Termites.” Scientific Reports, vol. 9, no. 1, 2019, https://doi.org/10.1038/s41598-

019-45364-z.

[6] Power, J. F., and R. F. Follett. “Monoculture.” Scientific American, vol. 256,

no. 3, Scientific American, a division of Nature America, Inc., 1987, pp. 78–87,

http://www.jstor.org/stable/24979342.

40
[7] Singh, Vijai, and A.K. Misra. “Detection of Plant Leaf Diseases Using Image

Segmentation and Soft Computing Techniques.” Information Processing in

Agriculture, vol. 4, no. 1, 2017, pp. 41–49.,

https://doi.org/10.1016/j.inpa.2016.10.005.

[8] Chamasemani, F. F., and Y. P. Singh. Malaysia, Bio-Inspired Computing:

Theories and Applications (BIC-TA), 2011 Sixth International Conference. Faculty

of Information Technology, MultiMedia University. Cyberjaya, Malaysia

[9] Chih-Wei, H., and C. Lin. 2002. A comparison of methods for multiclass

support vector machines. IEEE Transactions on Neural Networks, 13(2): 415-425

[10] Helly, M. E., A. Rafea, and Salwa-El-Gammal. 2003. An integrated image

processing system for leaf disease detection and diagnosis. in Proc. IICAI, pp.1182-

1195

[11] Jean, W. 2009. Extension plant pathologist, georgia plant disease loss

estimates, www.caes.uga.edu/publications

[12] Manu BN (2022). Plant Leaf Disease Detection and Classification using

Multiclass SVM

Classifier (https://www.mathworks.com/matlabcentral/fileexchange/55098-plant-

leaf-disease-detection-and-classification-using-multiclass-svm-

classifier),MATLAB Central File Exchange. Retrieved April 29, 2022.

[13] Jun, W., and S. Wang. 2008. Image thresholding using weighted parzen

window estimation. Journal of Applied Sciences, 8(5):772-779

[14] Kim, D. G., T. F. Burks, J. Qin, and D. M. Bulanon. 2009. Classification of

grapefruit peel diseases using color texture feature analysis. International Journal on

Agriculture and Biological Engineering, 2(3): 41-50


41
[15] Gonzalez, R., R. E. Woods. 2008 Digital image processing. Third edition,

Pearson Education, Prentice-Hall, Inc

[16] Detection and Classification of Plant Diseases Using Image ... - Researchgate.

https://www.researchgate.net/publication/340793034_Detection_and_Classification_of_Plant

_Diseases_Using_Image_Processing_and_Multiclass_Support_Vector_Machine.

42
11. Appendix:

Some Screenshots of The Code:

43
44

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy