Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 34

1.

INTRODUCTION

1.1PROJECT PROFILE
Crop cultivation plays an essential role in the agricultural field. Presently,
the loss of food is mainly due to infected crops, which reflexively reduces
the production rate. To identify the plant diseases at an untimely phase is not
yet explored. The main challenge is to reduce the usage of pesticides in the
agricultural field and to increase the quality and quantity of the production
rate. Our paper is used to explore the leaf disease prediction at an untimely
action. We propose an enhanced k-mean clustering algorithm to predict the
infected area of the leaves. A color based segmentation model is defined to
segment the infected region and placing it to its relevant classes.
Experimental analyses were done on samples images in terms of time
complexity and the area of infected region. Plant diseases can be detected by
image processing technique. Disease detection involves steps like image
acquisition, image pre-processing, image segmentation, feature extraction
and classification. Our project is used to detect the plant diseases and
provide solutions to recover from the disease. It shows the affected part of
the leaf in percentage. We planned to design our project with voice
navigation system, so a person with lesser expertise in software should also
be able to use it easily.
About 70% of the India economy depends on agriculture. Due to
environmental changes the crops get heavily affected and characteristics
symptoms such as leaf spot, dryness, color change and defoliation occurs.
Development of automatic detection system using advanced computer
technology such as image processing help to support the farmers in the
1
identification of diseases at an early or initial stage and provide useful
information for its control Detection of leaf spot disease using following
techniques such as image acquisition, image pre-processing, disease spot
segmentation, feature extraction and disease classification were carried out
by various workers. Proposed methodology like K-mean clustering, texture
and color analysis for plant disease detection in Malus domestica. The
authors reviewed various symptoms and diseases of banana leaves.
Algorithms were used for the detection of disease. They also explained the
importance of pattern classification for disease identification. Made study on
the disease severity of leaf using image processing techniques. They used
feature extraction such as threshold and triangular threshold methods.
Identification of diseased leaf of blast and brown spot of rice using image
processing techniques. They used zooming algorithm, SOM neural network
for disease detection. The authors made investigation on Early scorch,
Ashen mould, Late scorch, Cottony mold and Ting whiteness diseases of
plants using KMeans clustering, Back propagation algorithm and CCM.
Made study on chilly diseases using image processing techniques which
involves morphological processing, color clustering, LABVIEW IMAQ
Vision. Leaf disease detection of orchid leaf such as Black leaf spot and Sun
scorch. They applied border segmentation and pattern classification
techniques for detection of diseased leaf.

The concept of image processing with data mining technologies assists us in


following purposes:
i) Recognizing infected leaf and stem
2
ii) Measure the affected area
iii) Finding the shape of the infected region
iv) Determine the color of infected region
v) And also influence the size and shape of the leaf.

2. SYSTEM ANALYSIS

2.1 EXISTING SYSTEM


3
In existing presents an improved method for plant disease detection
using an adaptive approach. This approach helps to increase the accuracy of
the disease level, it provides various prevention methods (type and amount
of pesticides to be used), the level of destruction and helps to check whether
the disease spreads or not.

DISADVANTAGES

 We can just find disease spread or Not.


 Leaf disease spots were segmented and their shape and texture
features were extracted. Because the color features are influenced
largely by outside light, shape and color texture features of disease
spot are selected as characteristic values of classification.

2.2 PROPOSED SYSTEM

The leaf gets severely affected by fungus Alternaria alternata.


Development of automatic detection system using advanced computer
technology such as image processing help to support the farmers in the
identification of diseases at an early or initial stage and provide useful
information for its control. Therefore the present study was carried out on
automatic disease detection of plant leaf of Phaseolus vulgaris (Beans) and
Camellia assamica (Tea) using image processing techniques. It involves
image acquisition, image preprocessing, image segmentation, feature
extraction and classification.

ADVANTAGES
 Easy to detect plant disease
 Separate plant disease based on disease category wise.

4
3. SYSTEM SPECIFICATION

3.1 HARDWARE SPECIFICATION

5
Processor : Dual Core 2.0 GHz
RAM : 2 GB
Hard disk : 160 GB
Display unit : Samsung Monitor
Keyword : 104 Keys Standard
Mouse : Optical Mouse

3.2 SOFTWARE SPECIFICATION

Coding Language: MATHLAB


OS: Windows 7/8/10

3.3 SOFTWARE PROFILE


Introduction
The name MATLAB stands for MATrix LABoratory. MATLAB was
written originally to provide easy access to matrix software developed by the
LINPACK (linear system package) and EISPACK (Eigen system package)
projects.
MATLAB has many advantages compared to conventional computer
languages (e.g., C, FORTRAN) for solving technical problems. MATLAB is
an interactive system whose basic data element is an array that does not
require dimensioning. The software package has been commercially
available since 1984 and is now considered as a standard tool at most
universities and industries worldwide.
It has powerful built-in routines that enable a very wide variety of
computations. It also has easy to use graphics commands that make the
6
visualization of results immediately available. Specific applications are
collected in packages referred to as toolbox. There are toolboxes for signal
processing, symbolic computation, control theory, simulation, optimization,
and several other fields of applied science and engineering.
Basic features
After logging into your account, you can enter MATLAB by double-clicking
on the MATLAB shortcut icon (MATLAB 7.0.4) on your Windows desktop.
When you start MATLAB, a special window called the MATLAB desktop
appears. The desktop is a window that contains other windows. The major
tools within or accessible from the desktop are:
 The Command Window
 The Command History
 The Workspace
 The Current Directory
 The Help Browser
 The Start button

This illustration also shows the default configuration of the MATLAB


desktop. You can customize the arrangement of tools and documents to suit
your needs. Now, we are interested in doing some simple calculations. We
will assume that you have sufficient understanding of your computer under
which MATLAB is being run. You are now faced with the MATLAB
desktop on your computer, which contains the prompt (>>) in the Command
Window. Usually, there are 2 types of prompt:
>> for full version
EDU> for educational version
Using MATLAB as a calculator
7
As an example of a simple interactive calculation, just type the expression
you want to evaluate. Let’s start at the very beginning. For example, let’s
suppose you want to calculate the expression, 1 + 2 × 3.
You type it at the prompt command (>>) as follows,
>> 1+2*3
ans = 7
Getting help
To view the online documentation, select MATLAB Help from Help
menu or MATLAB Help directly in the Command Window. The preferred
method is to use the Help Browser. The Help Browser can be started by
selecting the ? icon from the desktop toolbar. On the other hand, information
about any command is available by typing
>> help Command
Another way to get help is to use the lookfor command. The lookfor
command differs from the help command. The help command searches for
an exact function name match, while the lookfor command searches the
quick summary information in each function for a match. For example,
suppose that we were looking for a function to take the inverse of a matrix.
Since MATLAB does not have a function named inverse, the command help
inverse will produce nothing. On the other hand, the command lookfor
inverse will produce detailed information, which includes the function of
interest, inv.
>> lookfor inverse
MATLAB offers many predefined mathematical functions for
technical computing which contains a large set of mathematical functions.
Typing help elfun and help specfun calls up full lists of elementary and
special functions respectively
8
Images and pictures
As we mentioned in the preface, human beings are predominantly
visual creatures: we rely heavily on our vision to make sense of the world
around us. We not only look at things to identify and classify them, but we
can scan for differences, and obtain an overall rough “feeling” for a scene
with a quick glance. Humans have evolved very precise visual skills: we can
identify a face in an instant; we can differentiate colours; we can process a
large amount of visual information very quickly. However, the world is in
constant motion: stare at something for long enough and it will change in
some way. Even a large solid structure, like a building or a mountain, will
change its appearance depending on the time of day (day or night); amount
of sunlight (clear or cloudy), or various shadows falling upon it. We are
concerned with single images: snapshots, if you like, of a visual scene.
Although image processing can deal with changing scenes, we shall not
discuss it in any detail in this text. For our purposes, an image is a single
picture which represents something. It may be a picture of a person, of
people or animals, or of an outdoor scene, or a microphotograph of an
electronic component, or the result of medical imaging. Even if the picture is
not immediately recognizable, it will not be just a random blur.

9
Removing “noise” from an image; noise being random errors in the image.
An example is given in figure 3.3.1. Noise is a very common problem in
data transmission: all sorts of electronic components may affect data passing
through them, and the results may be undesirable. As we shall see in chapter
7 noise may take many different forms;each type of noise requiring a
different method of removal.
Removing motion blur from an image. An example is given in figure
3.3.1. Note that in the deblurred image (b) it is easy to read the number plate,
and to see the spokes on the wheels of the car, as well as other details not at
all clear in the original image (a). Motion blur may occur when the shutter
speed of the camera is too long for the speed of the object. In photographs of
fast moving objects: athletes, vehicles for example, the problem of blur may
be considerable

Figure 3.3.1
Applications of MATLAB
MATLAB can be used as a tool for simulating various electrical
networks but the recent developments in MATLAB make it a very
competitive tool for Artificial Intelligence, Robotics, Image processing,
10
Wireless communication, Machine learning, Data analytics and whatnot.
Though its mostly used by circuit branches and mechanical in the
engineering domain to solve a basic set of problems its application is vast.
It is a tool that enables computation, programming and graphically
visualizing the results.

The basic data element of MATLAB as the name suggests is


the Matrix or an array. MATLAB toolboxes are professionally built and
enable you to turn your imaginations into reality. MATLAB programming
is quite similar to C programming and just requires a little brush up of your
basic programming skills to start working with.
Below are a few applications of MATLAB –

Statistics and machine learning (ML)


This toolbox in MATLAB can be very handy for the programmers.
Statistical methods such as descriptive or inferential can be easily
implemented. So is the case with machine learning. Various models can be
employed to solve modern-day problems. The algorithms used can also be
used for big data applications.
Curve fitting
The curve fitting toolbox helps to analyze the pattern of occurrence of
data. After a particular trend which can be a curve or surface is obtained,
its future trends can be predicted. Further plotting, calculating integrals,
derivatives, interpolation, etc can be done.
Control systems
Systems nature can be obtained. Factors such as closed-loop, open-loop,
its controllability and observability, Bode plot, Nyquist plot, etc can be
11
obtained. Various controlling techniques such as PD, PI and PID can be
visualized. Analysis can be done in the time domain or frequency domain.
Signal Processing
Signals and systems and digital signal processing are taught in various
engineering streams. But MATLAB provides the opportunity for proper
visualization of this. Various transforms such as Laplace, Z, etc can be
done on any given signal. Theorems can be validated. Analysis can be done
in the time domain or frequency domain. There are multiple built-in
functions that can be used.
Mapping
Mapping has multiple applications in various domains. For example, in
Big data, the Map Reduce tool is quite important which has multiple
applications in the real world. Theft analysis or financial fraud detection,
regression models, contingency analysis, predicting techniques in social
media, data monitoring, etc can be done by data mapping.
Deep learning
It’s a subclass of machine learning which can be used for speech
recognition, financial fraud detection, and medical image analysis. Tools
such as time-series, Artificial neural network (ANN), Fuzzy logic or
combination of such tools can be employed.
Financial analysis
An entrepreneur before starting any endeavor needs to do a proper
survey and the financial analysis in order to plan the course of action. The
tools needed for this are all available in MATLAB. Elements such as
profitability, solvency, liquidity, and stability can be identified. Business
valuation, capital budgeting, cost of capital, etc can be evaluated.
Image processing
12
The most common application that we observe almost every day are bar
code scanners, selfie (face beauty, blurring the background, face detection),
image enhancement, etc. The digital image processing also plays quite an
important role in transmitting data from far off satellites and receiving and
decoding it in the same way. Algorithms to support all such applications
are available.
Text analysis
Based on the text, sentiment analysis can be done. Google gives
millions of search results for any text entered within a few milliseconds.
All this is possible because of text analysis. Handwriting comparison in
forensics can be done. No limit to the application and just one software
which can do this all.
Electric vehicles designing
Used for modeling electric vehicles and analyze their performance with
a change in system inputs. Speed torque comparison, designing and
simulating of a vehicle, whatnot.
Aerospace
This toolbox in MATLAB is used for analyzing the navigation and to
visualize flight simulator.
Audio toolbox
Provides tools for audio processing, speech analysis, and acoustic
measurement. It also provides algorithms for audio and speech feature
extraction and audio signal transformation.

13
4. SYSTEM DESIGN

4.1 SYSTEM FLOW DIAGRAM

14
Figure 4.1.1 Block Diagram

5. IMPLEMENTATION

5.1 MODULE DESCRIPTION


Image acquisition

15
Image acquisition involves capturing the images with the help of
digital camera. Our study focussed on the diseased images of leaf of
Phaseolus vulgaris and Camellia sinensis which were stored in digital media
for further MATLAB operations.

Figure 5.1.1: Original image of the diseased leaf

Image Pre- processing:


Image Pre- processing is carried out to improve the quality of the
image and remove the unwanted noise in image followed by clipping and
smoothing of the image. The image enhancement is carried out to increase
the contrast. The RGB images are converted into grey images using colour
conversion by the following formula:
F(x) = 0.2989*R + 0.5870*B + 0.114*B....................(1)

Image Segmentation:
This method is used for the conversion of digital image into various
segments having some similarity. Image segmentation helps in the detection
of objects and boundary line of the image. In our study K- mean clustering is
16
done for classification of objects based on a set of features into K number of
classes. The classification is done by minimizing sum of squares of distance
between data objects and corresponding cluster.

Feature Extraction:
In feature extraction method features such as color, texture,
morphology and structure are used in plant disease detection. Color co-
occurrence method is used in which the texture and color of the image are
considered. The methods used in color co-occurrence are firstly the RGB
image of the leaves are converted into HIS color space representation. For
generation of color co-occurrence matrix each pixel map is applied which
results into three color co-occurrence matrix one for each of H, S, I [1].

Classification:
Classification is used in the interpretation of the extracted diseased
region in an image which helps in the identification of the type of disease
infection in leaves. In our analysis back propagation neural network (BPNN)
is used which build association between known pattern of input and specific
17
output. The input layer analyzes the diseased region while the output layer
specifies the disease outcome of the affected region. A hidden layer occurs
in between the input and output layer which provides connecting link
between the input and output images. It is applied to obtain least error in the
classification of disease of the affected region.

6. SYSTEM TESTING

6.1 TEST CASE REPORTS

18
The purpose of testing is to discover errors. Testing is the process of
trying to discover every conceivable fault or weakness in a work product. It
provides a way to check the functionality of components, sub-assemblies,
assemblies and/or a finished product. It is the process of exercising software
with the intent of ensuring that the Software system meets its requirements
and user expectations and does not fail in an unacceptable manner. There are
various types of test. Each test type addresses a specific testing requirement.

6.2 TYPES OF TESTS

Unit testing

Unit testing involves the design of test cases that validate that the
internal program logic is functioning properly, and that program inputs
produce valid outputs. All decision branches and internal code flow should
be validated. It is the testing of individual software units of the application
.it is done after the completion of an individual unit before integration. This
is a structural testing, that relies on knowledge of its construction and is
invasive. Unit tests perform basic tests at component level and test a specific
business process, application, and/or system configuration.

Integration testing

Integration tests are designed to test integrated software components


to determine if they actually run as one program. Testing is event driven and
is more concerned with the basic outcome of screens or fields. Integration

19
tests demonstrate that although the components were individually
satisfaction, as shown by successfully unit testing, the combination of
components is correct and consistent. Integration testing is specifically
aimed at exposing the problems that arise from the combination of
components.

Functional test

Functional tests provide systematic demonstrations that functions tested


are available as specified by the business and technical requirements, system
documentation, and user manuals. Functional testing is centered on the
following items:

Valid Input : identified classes of valid input must be accepted.

Invalid Input : identified classes of invalid input must be rejected.

Functions : identified functions must be exercised.

Output : identified classes of application outputs must be


exercised.

Systems/Procedures : interfacing systems or procedures must be invoked.

Organization and preparation of functional tests is focused on


requirements, key functions, or special test cases. In addition, systematic
coverage pertaining to identify Business process flows; data fields,
predefined processes, and successive processes must be considered for
testing. Before functional testing is complete, additional tests are identified
and the effective value of current tests is determined.

20
System Test

System testing ensures that the entire integrated software system


meets requirements. It tests a configuration to ensure known and predictable
results. An example of system testing is the configuration oriented system
integration test. System testing is based on process descriptions and flows,
emphasizing pre-driven process links and integration points.

White Box Testing

White Box Testing is a testing in which in which the software tester


has knowledge of the inner workings, structure and language of the software,
or at least its purpose. It is purpose. It is used to test areas that cannot be
reached from a black box level.

Black Box Testing

Black Box Testing is testing the software without any knowledge of the
inner workings, structure or language of the module being tested. Black box
tests, as most other kinds of tests, must be written from a definitive source
document, such as specification or requirements document, such as
specification or requirements document. It is a testing in which the software
under test is treated, as a black box. You cannot “see” into it. The test
provides inputs and responds to outputs without considering how the
software works.

Unit Testing

21
Unit testing is usually conducted as part of a combined code and unit
test phase of the software lifecycle, although it is not uncommon for coding
and unit testing to be conducted as two distinct phases.

Test strategy and approach

Field testing will be performed manually and functional tests will be


written in detail.

Test objectives

 All field entries must work properly.

 Pages must be activated from the identified link.

 The entry screen, messages and responses must not be delayed.

Features to be tested

 Verify that the entries are of the correct format

 No duplicate entries should be allowed

 All links should take the user to the correct page.

Integration Testing

Software integration testing is the incremental integration testing of


two or more integrated software components on a single platform to produce
failures caused by interface defects.
22
The task of the integration test is to check that components or
software applications, e.g. components in a software system or one step up
software applications at the company level – interact without error.

Acceptance Testing

User Acceptance Testing is a critical phase of any project and requires


significant participation by the end user. It also ensures that the system
meets the functional requirements.

7. APPENDIX
7.1 SOURCE CODE

function [itrfin] = multisvm( T,C,test )


%Inputs: T=Training Matrix, C=Group, test=Testing matrix
%Outputs: itrfin=Resultant class
23
itrind=size(test,1);
itrfin=[];
Cb=C;
Tb=T;
for tempind=1:itrind
tst=test(tempind,:);
C=Cb;
T=Tb;
u=unique(C);
N=length(u);
c4=[];
c3=[];
j=1;
k=1;
if(N>2)
itr=1;
classes=0;
cond=max(C)-min(C);
while((classes~=1)&&(itr<=length(u))&& size(C,2)>1 && cond>0)
%This while loop is the multiclass SVM Trick
c1=(C==u(itr));
newClass=c1;
%svmStruct = svmtrain(T,newClass,'kernel_function','rbf'); % I am
using rbf kernel function, you must change it also
svmStruct = svmtrain(T,newClass);
classes = svmclassify(svmStruct,tst);
24
% This is the loop for Reduction of Training Set
for i=1:size(newClass,2)
if newClass(1,i)==0;
c3(k,:)=T(i,:);
k=k+1;
end
end
T=c3;
c3=[];
k=1;

% This is the loop for reduction of group


for i=1:size(newClass,2)
if newClass(1,i)==0;
c4(1,j)=C(1,i);
j=j+1;
end
end
C=c4;
c4=[];
j=1;

cond=max(C)-min(C); % Condition for avoiding group


%to contain similar type of values
%and the reduce them to process

25
% This condition can select the particular value of iteration
% base on classes
if classes~=1
itr=itr+1;
end
end
end

valt=Cb==u(itr); % This logic is used to allow classification


val=Cb(valt==1); % of multiple rows testing matrix
val=unique(val);
itrfin(tempind,:)=val;
end

end

Sample Screen
Home Screen

26
Load Image

Enhance Contrast

27
Image Segmentation

Segmented ROI

28
Find Disease

Disease Detection Accuracy

29
8. CONCLUSION

30
The present study deals with automatic disease detection of plant leaf
of Phaseolus vulgaris and Camellia assamica using image processing
techniques. It involves image acquisition, image preprocessing, image
segmentation, feature extraction and classification. Development of
automatic detection system using advanced computer technology such as
image processing help to support the farmers in the identification of diseases
at an early or initial stage and provide useful information for its control. We
would like to extend our work further on more plant disease detection.

9. FUTURE ENHANCEMENT

31
However, there are a number of limitations at the current stage
that need to be addressed in future work. First, when tested on a set of
images taken under conditions different from the images used for
training, the model's accuracy is reduced substantially, to just above
31%. It's important to note that this accuracy is much higher than the
one based on random selection of 38 classes (2.6%), but nevertheless, a
more diverse set of training data is needed to improve the accuracy. Our
current results indicate that more (and more variable) data alone will be
sufficient to substantially increase the accuracy, and corresponding data
collection efforts are underway.

The second limitation is that we are currently constrained to the


classification of single leaves, facing up, on a homogeneous background.
While these are straightforward conditions, a real world application
should be able to classify images of a disease as it presents itself directly
on the plant. Indeed, many diseases don't present themselves on the
upper side of leaves only (or at all), but on many different parts of the
plant. Thus, new image collection efforts should try to obtain images
from many different perspectives, and ideally from settings that are as
realistic as possible.

10. REFERENCES

32
[1] Khirade SD, Patil AB (2015) Plant Disease Detection Using Image
Processing. Int Conf on Comp Communication Control and Automation
IEEE 153: 768-771.
[2] Surya Prabha D, Satheesh Kumar J (2014) Study on Banana Leaf
Disease Identification Using Image Processing Methods. Int Jour of Res in
Comp Sc and Inf Tech IJRCSIT 2(A): 89-94.
[3] Weizheng S, Yachun W, Zhanliang C, Hongda3 W (2008) Grading
Method of Leaf Spot Disease Based on Image Processing. Int Conf on Comp
Sc and Soft Eng, IEEE 491-494.
[4] Phadikar S, Sil J (2008) Rice Disease Identification using Pattern
Recognition Techniques, Proce of 11th Int Conf on Comp and Inf Tech,
ICCIT, Khulna, Bangladesh, IEEE 420-423.
[5] Sabah B, Sharma N (2012) Remote area plant disease detection using
image processing. IOSR J Electron Commun Eng 2(6): 31-4.
[6] Sanjay B, Patil et. al (2011) Leaf Disease Severity Measurement Using
Image Processing. Int Jour of Eng and Tech 3(5): 297-301.
[7] Phadikar S, Jaya S (2008) Rice Disease Identification using Pattern
Recognition Techniques. Proceed of 11th Int Conf on Comp and Inf Tech
ICCIT, Khulna, Bangladesh [8] Al Bashish D, Braik M, Bani-Ahmad S
(2010) A Framework for Detection and Classification of Plant Leaf and
Stem Diseases. Int Conf on Signal and Image Processing IEEE.
[9] Bin Husin Z, Bin Abdul Aziz AH, Bin Md Shakaff AY, Mohamed
Farook, RBS (2012) Feasibility Study on Plant Chilli Disease Detection
Using Image Processing Techniques. Third Int Conf on Intelligent Sys
Modelling and Simulation IEEE.
[10] Wan Mohd Fadzil WMN, Shah Rizam MSB, Jilani R, Nooritawati MT
(2014) Orchid Leaf Disease Detection using Border Segmentation
33
Techniques. Conf on Systems Process and Control IEEE, Kuala Lumpur,
Malaysia.

34

You might also like