69
VISVESVARAYA TECHNOLOGICAL UNIVERSITY “Jnana Sangama”, Belgaum – 590 014 A PROJECT REPORT ON LEAVES RECOGNITION SYSTEMSubmitted in partial fulfillment for the award of the degree of BACHELOR OF ENGINEERING IN COMPUTER SCIENCE AND ENGINEERING BY AFSHIYA SUMAN (1NH11CS704) ANKIT KUMAR (1NH11CS710) BUDDAREDDY TEJASWINI(1NH11CS713) SARANYA.G(1NH11CS747) Under the guidance of Mr.VIJAY KUMAR ( Assistant Professor, Dept. of CSE, NHCE)

VISVESVARAYA TECHNOLOGICAL UNIVERSITY - New

Embed Size (px)

Citation preview

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

“Jnana Sangama”, Belgaum – 590 014

A PROJECT REPORT ON

“LEAVES RECOGNITION SYSTEM”

Submitted in partial fulfillment for the award of the degree of

BACHELOR OF ENGINEERING

IN

COMPUTER SCIENCE AND ENGINEERING

BY

AFSHIYA SUMAN (1NH11CS704)

ANKIT KUMAR (1NH11CS710)

BUDDAREDDY TEJASWINI(1NH11CS713)

SARANYA.G(1NH11CS747)

Under the guidance of

Mr.VIJAY KUMAR

( Assistant Professor, Dept. of CSE, NHCE)

DEPARTMENT OF COMPUTER SCIENCE AND

ENGINEERING

NEW HORIZON COLLEGE OF ENGINEERING

(ISO-9001:2000 certified, Accredited by NBA,

Permanently affiliated to VTU)

Outer Ring Road,Panathur Post, Near Marathalli,

Bangalore – 560103

NEW HORIZON COLLEGE OF ENGINEERING

(ISO-9001:2000 certified, Accredited by NBA,

Permanently affiliated to VTU)

Outer Ring Road, Panathur Post, Near Marathalli,

Bangalore-560 103

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

CERTIFICATE

Certified that the project work entitled “LEAVES RECOGNITION SYSTEM” carried out

by AFSHIYA SUMAN (1NH11CS704), ANKIT KUMAR(1NH11CS710),

BUDDAREDDY TEJASWINI(1NH11CS713) and SARANYA.G(1NH11CS747)

bonafide students of NEW HORIZON COLLEGE OF ENGINEERING in partial

fulfillment for the award of Bachelor Of Engineering/Bachelor Of Technology in

Computer Science and Engineering of the Visvesvaraya Technological University,

Belgaum during the year 2014-2015. It is certified that all corrections/suggestions indicated

for Internal Assessment have been incorporated in the report deposited in the department

library. The project report has been approved as it satisfies the academic requirements in

respect of Project work prescribed for the said Degree.

Name & Signature of Guide Name Signature of HOD Signature of Principal

(Mr. Vijay Kumar) (Dr. Prashanth C.S.R.) (Dr. Manjunatha)

External Viva

Name of Examiner Signature with date

1.

2.

I

ACKNOWLEDGEMENT

The satisfaction and euphoria that accompany the successful completion of any

task would be, but impossible without the mention of the people who made it possible,

whose constant guidance and encouragement crowned our efforts with success.

We thank the management, Dr. Mohan Manghnani, Chairman of NEW

HORIZON EDUCTIONAL INSTITUTIONS for providing necessary infrastructure and

creating good environment.

We also record here the constant encouragement and facilities extended to us by

Dr. Manjunatha, Principal, NHCE and Dr. Prashanth.C.S.R, Head of the Department

of Computer Science and Engineering. We extend our sincere gratitude to them.

We express our gratitude to Mr Vijay Kumar, our project guide for constantly

monitoring the development of the project and setting up precise deadlines. Their valuable

suggestions were the motivating factors in completing the work.

We would also like to express our gratitude to NHCE and to all our external

guides at NHCE for their continuous guidance and motivation.

Finally a note of thanks to the teaching and non-teaching staff of Computer

Science and Engineering Department for their cooperation extended to us and our friends,

who helped us directly or indirectly in the course of the project work.

AFSHIYA SUMAN(1NH11CS704)

ANKIT KUMAR (1NH11CS710)

BUDDAREDDY TEJASWINI (1NH11CS713)

SARANYA G (1NH11CS747)

II

ABSTRACT

Plants are essential part of nature and in people's lives. They are the ultimate

source of food and metabolic energy for nearly all animals, which cannot manufacture

their own food. Thus the study of plants is vital because they are a fundamental part of

life on Earth, and generate the oxygen and food that allow humans and other organisms to

exist.A digital plant identification system can be used for quick characterization of plant

species without requiring the expertise of botanists, thus atomizing their task.

The proposed system ”Leaves Recognition System” is aimed to develop a java

program to recognize the images of leaves by using previously trained Neural Network.

The outer frame (edge) of the leaf and a back propagation neural network is enough to

give a reasonable statement about the species it belongs to. The system is user friendly.

The user can scan the leaf and click the recognition button to get the solution.

III

CONTENTS

1. INTRODUCTION

1.1. PROBLEM DEFINITION 2

1.2. PROJECT PURPOSE 2

1.3. MODULES DESCRIPTION 3

2. LITERATURE SURVEY

2.1. IMAGE PROCESSING 6

2.2. EXISTING SYSTEM 7

2.3. PROPOSED SYSTEM 7

2.4. SOFTWARE DESCRIPTION 8

3. REQUIREMENT ANALYSIS

3.1. FUNCTIONAL REQUIREMENTS 17

3.2. NON FUNCTIONAL REQUIREMENTS 18

3.3. HARDWARE REQUIREMENTS 19

3.4. SOFTWARE REQUIREMENTS 19

4. TOOLS TECHNIQUES AND METHODS

4.1. IMAGE EDGE DETECTION 20

4.2. THINNING 24

4.3. BACK PROPAGATION NEURAL NETWORK 24

5. DESIGN

5.1. DESIGN FLOW DIAGRAM 28

5.2. DATA FLOW DIAGRAM 30

IV

5.3. DESIGN DIAGRAM 31

6. IMPLEMENTATION

6.1. EDGE DETECTION 32

6.2. LEAF IMAGE TOKEN 34

6.3. NEURONAL NETWORK 35

7. TESTING

7.1 TYPES OF TESTS 37

7.2 TESTING OF INITIALIZATION AND UI COMPONENTS 40

8. SNAPSHOT 46

9. CONCLUSION AND FUTURE ENHANCEMENT

9.1 CONCLUSION 59

9.2 FUTURE ENHANCEMENT 59

BIBLIOGRAPHY 60

V

LIST OF FIGURES

2.1.Illustration of Component hierarchy. 12

2.2.Illustration of Java program execution. 16

4.1.Feed-Forward back propagation neuronal network 25

4.2. Sigmoid Function 27

5.1.Pre-processing the leaf image 29

5.2.System Architecture 31

6.1.Leaf token 35

6.2.Token of a single leaf image 35

6.3.Neuronal network 36

7.1.Testing process 38

LIST OF TABLES

7.1Test case for Image processing 40

7.2Test case for Adding image in admin module 41

7.3Test case for Testing the network 42

7.4 Test case for Network operation 43

7.5Test case for Loading the image for recognition 44

7.6 Test case for Recognition match 45

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 1

CHAPTER 1

INTRODUCTION

Plants are essential part of nature and in people's lives. They are the ultimate

source of food and metabolic energy for nearly all animals, which cannot manufacture

their own food. Thus the study of plants is vital because they are a fundamental part of

life on Earth, and generate the oxygen and food that allow humans and other organisms to

exist.A digital plant identification system can be used for quick characterization of plant

species without requiring the expertise of botanists, thus atomizing their task.

All over the world, there are currently about 310000–420000 known plant species,

and many are still unknown. At present, plant taxonomy usually adopts traditional

classification method. And so far many other classification methods, such as morphology,

anatomy, cell biology, molecule biology, phytochemistry, have also been used.The digital

morphology features (DMF) generally include geometrical features (GF) and invariable

moment features (MF). The geometrical features consist of aspect ratio, rectangularity,

area ratio of convexity, perimeter ratio of convexity, sphericity, circularity, eccentricity

and form factor, etc. These methods have great relation to deal with biology and

chemistry.

The proposed system ‖Leaves Recognition System‖ is aimed to develop a java

program to recognize the images of leaves by using previously trained Neural Network.

The outer frame (edge) of the leaf and a back propagation neural network is enough to

give a reasonable statement about the species it belongs to. The system is user friendly.

The user can scan the leaf and click the recognition button to get the solution.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 2

1.1 PROBLEM DEFINITION

Digital Image Processing, image analysis and machine vision have been sharply

developed , and they have become into a very important part of artificial intelligence and

the interface between human and machine grounded theory and applied technology.

These technologies have been applied widely in industry and medicine, but rarely in

realm related to agriculture.

Our project is introducing digital image processing theory into the numerical

taxonomy in botany. Generally, the digital morphological features are most conventional

and widely used. Thus, this efficient feature extraction method is adopted in this Project.

By computing the digital morphological features of some kinds of plant species, plants

can be classified automatically .

1.2 PROJECT PURPOSE

Plant Recognition is a neuronal network based java application/applet to recognize

images of leaves accordingly to a previously trained Backpropagation Network.The

intention of this application is to give the user the ability to administrate a hierarchical list

of leaf images, where he can perform some sort of edge detection to identify the

individual tokens of every image. These tokens will then be the basis of the neuronal

network calculations to make it possible to recognize a unknown leaf image and specify

the species it belongs to.

The ‖leaves Recognition System‖ is consisting of three modules.

They are: Leaves Processing module, Network Training module, Leaf Recognition

module. The first module ‗Image processing‘ module is finding an edge of the given leaf

and also finding the token values. The second module ‗network training module‘ is

training the entire network and drawing the error graph. The third module ‗recognition

module‘ is recognizing the given leaf at what percentage it matches to the already trained

leaf.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 3

1.3 MODULES DESCRIPTION

1.3.1 IMAGE PROCESSING

Digital Image Processing (DIP) deals with manipulation of digital images using a

digital computer. It is a subfield of signals and systems but focuses particularly on

images. DIP focuses on developing a computer system that is able to perform processing

on an image. The input of such system is a digital image. The system processes the

image using efficient algorithms, and gives an image as an output.

The leaf image pre-processing refers to the initial processing of input leaf image to

correct the geometric distortions, calibrate the data radiometrically and eliminate the

noise and clouds that present in the data . These operations are called pre-processing

because they normally carried out before the real analysis and manipulations of the image

data occur in order to extract any specific information. Techniques like grayscale

conversion, binarization ,smoothing, filtering, edge detection, etc. used for the

enhancement of the leaf image.The aim is to correct the distorted or degraded image data

to create a more faithful representation of the real leaf.

1.3.2 NETWORK TRAINING MODULE

Many hundreds of Neural Network types have been proposed over the years. In

fact, because Neural Nets are so widely studied (for example, by Computer Scientists,

Electronic Engineers, Biologists and Psychologists), they are given many different names

lIKE Artificial Neural Networks (ANNs), Connectionism or Connectionist Models,

Multi-layer Percpetrons (MLPs) and Parallel Distributed Processing (PDP).

A Back Propagation network learns by example. You give the algorithm examples

of what you want the network to do and it changes the network‘s weights so that, when

training is finished, it will give you the required output for a particular input. Back

Propagation networks are ideal for simple Pattern Recognition and Mapping Tasks .

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 4

1.3.3 RECOGNITION

Recognition module is recognizing the given leaf at what percentage it matches to the

already trained leaf.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 5

CHAPTER 2

LITERATURE SURVEY

Literature survey is the most important step in software development process.

Before developing the tool it is necessary to determine the time factor, economy and

company strength. Once these things are satisfied, then next steps is to determine which

operating system and language can be used for developing the tool. Once the

programmers start building the tool the programmers need lot of external support. This

support can be obtained from senior programmers, from book or from websites. Before

building the system the above consideration are taken into account for developing the

proposed system.

Although a significant amount of research has been done studying various aspects

of leaf identification in inventory systems, most of it deals with semi-automated systems.

A state-of-the-art system which is fully automated and requires least human interaction is

yet to be developed.

Arora. categorized the different images and used a variety of novel pre-processing

methods such as shadow and background correction, petiole removal and automatic

leaflet segmentation for identifying the leaf blobs. Also used complex network framework

along with novel tooth detection method and morphological operations to compute

several useful features. They used the Pl@ntLeaves II dataset.

Pavan proposed an algorithm for identification using multiclass classification

based on color, shape volume and cell feature. They performed three stage comparisons:

first stage compares redness, greenness, blueness index feature, second stage compare

shape feature and the last stage compares cell feature and volume fraction feature.

Experiment is performed on a sample of diverse collection of 1000 leaf and flower

images. Limitations of this approach is that it semi-automatic approach and its

recognition rate is up to 85% percent on an average.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 6

2.1 Image processing & training

2.1.1 Edge detection

Edges are significant local changes of intensity in an image. It typically occur on the

boundary between two different regions in an image.

• Goal of edge detection

Produce a line drawing of a scene from an image of that scene.

Important features can be extracted from the edges of an image (e.g., corners, lines,

curves).

These features are used by higher-level computer vision algorithms (e.g.,

recognition).

2.1.2 Thinning

Thinning is a morphological operation that is used to remove selected foreground

pixels frombinary images, somewhat like erosion or opening. It can be used for several

applications, but is particularly useful for skeletonization. In this mode it is commonly

used to tidy up the output of edge detectors by reducing all lines to single pixel thickness.

Thinning is normally only applied to binary images, and produces another binary image

as output.

2.1.3 Neural Network

Neural Networks (NN) are important data mining tool used for classification and

clustering. It is an attempt to build machine that will mimic brain activities and be able to

learn. NN usually learns by examples. If NN is supplied with enough examples, it should

be able to perform classification and even discover new trends or patterns in data. Basic

NN is composed of three layers, input, output and hidden layer. Each layer can have

number of nodes and nodes from input layer are connected to the nodes from hidden

layer. Nodes from hidden layer are connected to the nodes from output layer. Those

connections represent weights between nodes.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 7

Back Proportion algorithm is quite simple, output of NN is evaluated against

desired output. If results are not satisfactory, connection(weights) between layers are

modified and process is repeated again and again until error is small enough.

2.2 EXISTING SYSTEM

There are several system based on different technology and Algorithm for

processing the leaf image .Some systems are takes different images and used a variety of

novel pre-processing methods such as shadow and background correction, petiole

removal and automatic leaflet segmentation for identifying the leaf blobs. Also used

complex network framework along with novel tooth detection method and morphological

operations to compute several useful features.

Disadvantages:

The main drawback of this scheme is the high resource costs it requires for the

implementation.

Takes lots of time to process the image.

It is difficult to analyze shapes and structures of flowers since they have complex

3D structures

Consumption of large amount of bandwidth in transmission of file over internet.

2.3 PROPOSED SYSTEM

The proposed system ‖Plant Recognition System‖ is aimed to develop a java program to

recognize the images of leaves by using previously trained Neural Network. The outer

frame (edge) of the leaf and a back propagation neural network is enough to give a

reasonable statement about the species it belongs to. The system is user friendly. The user

can scan the leaf and click the recognition button to get the solution.

Advantages:

User friendly .

By reducing the costs of storage, maintenance and personnel.

Configurable image processing properties (Threshold/Distance/min.Line)

Configurable Neuronal Network properties

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 8

2.4 SOFTWARE DESCRIPTION

2.4.1 JAVA

Java was conceived by James Gosling, Patrick Naughton, Chris Wrath, Ed Frank,

and Mike Sheridan at Sun Micro system. It is an platform independent programming

language that extends its features wide over the network.Java2 version introduces a new

component called ―Swing‖ – is a set of classes that provides more power & flexible

components than are possible with AWT. It‘s a light weight package, as they are not

implemented by platform-specific code. Related classes are contained in javax.swing and

its sub packages, such as javax. swing.tree. Components explained in the Swing have

more capabilities than those of AWTJava is two things: a programming language and a

platform.

Java is a high-level programming language that is all of the following:

Simple

Object-oriented

Distributed

Interpreted

Robust

Secure

Architecture-neutral

Portable

High-performance

Multithreaded

Dynamic

A high-level programming language developed by Sun Microsystems. Java was

originally called OAK, and was designed for handheld devices and set-top boxes.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 9

OAK was unsuccessful so in 1995 Sun changed the name to Java and modified the

language to take advantage of the burgeoning World Wide Web.

Java is an object-oriented language similar to C++, but simplified to

eliminate language features that cause common programming errors. Java source

code files (files with a .java extension) are compiled into a format called byte code

(files with a .class extension), which can then be executed by a Java interpreter.

Compiled Java code can run on most computers because Java interpreters

and runtime environments, known as Java Virtual Machines (JVMs), exist for most

operating systems, including UNIX, the Macintosh OS, and Windows. Byte code

can also be converted directly into machine language instructions by a just-in-time

compiler (JIT).

Java is a general purpose programming language with a number of features

that make the language well suited for use on the World Wide Web. Small Java

applications are called Java applets and can be downloaded from a Web server and

run on your computer by a Java-compatible Web browser, such as Netscape

Navigator or Microsoft Internet Explorer.

The standard lists the design goals for JAVA as:

JAVA language is intended to be a simple, modern, general-purpose, object-

oriented programming language.

The language, and implementations thereof, should provide support for software

engineering principles such as strong type checking, array bounds checking,

detection of attempts to use uninitialized variables, and automatic garbage

collection. Software robustness, durability, and programmer productivity are

important.

The language is intended for use in developing software components suitable for

deployment in distributed environments.

Source code portability is very important, as is programmer portability, especially

for those programmers already familiar with C and C++.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 10

JAVA is intended to be suitable for writing applications for both hosted and

embedded systems, ranging from the very large that use sophisticated operating

systems, down to the very small having dedicated functions.

Although JAVA applications are intended to be economical with regard to

memory and processing power requirements, the language was not intended to

compete directly on performance and size with C or assembly language.

2.4.2 JAVA SWINGS

Swing API is set of extensible GUI Components to ease developer's life to create

JAVA based Front End/ GUI Applications. It is build upon top of AWT API and acts as

replacement of AWT API as it has almost every control corresponding to AWT controls.

Swing component follows a Model-View-Controller architecture to fulfill the following

criterias.

A single API is to be sufficient to support multiple look and feel.

API is to model driven so that highest level API is not required to have the data.

API is to use the Java Bean model so that Builder Tools and IDE can provide better

services to the developers to use it.

MVC Architecture

Swing API architecture follows loosely based MVC architecture in the following

manner.

A Model represents component's data.

View represents visual representation of the component's data.

Controller takes the input from the user on the view and reflects the changes in

Component's data.

Swing component have Model as a seperate element and View and Controller part

are clubbed in User Interface elements. Using this way, Swing has pluggable look-

and-feel architecture.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 11

Swing features

Light Weight - Swing component are independent of native Operating System's API as

Swing API controls are rendered mostly using pure JAVA code instead of underlying

operating system calls.

Rich controls - Swing provides a rich set of advanced controls like Tree, TabbedPane,

slider, colorpicker, table controls

Highly Customizable - Swing controls can be customized in very easy way as visual

apperance is independent of internal representation.

Pluggable look-and-feel- SWING based GUI Application look and feel can be changed

at run time based on available values.

Every user interface considers the following three main aspects:

UI elements : These are the core visual elements the user eventually sees and interacts

with. GWT provides a huge list of widely used and common elements varying from

basic to complex

Layouts: They define how UI elements should be organized on the screen and provide a

final look and feel to the GUI (Graphical User Interface).

Behavior: These are events which occur when the user interacts with UI elements.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 12

Fig 2.1: Illustration of Component hierarchy.

Class & Description

1 Component

A Container is the abstract base class for the non menu user-interface controls of

SWING. Component represents an object with graphical representation

2 Container

A Container is a component that can contain other SWING components.

3 JComponent

A JComponent is a base class for all swing UI components. In order to use a swing

component that inherits from JComponent, component must be in a containment

hierarchy whose root is a top-level Swing container.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 13

Swing UI Elements

Following is the list of commonly used controls while designed GUI using SWING.

Sr.

No.

Control & Description

1 JLabel

A JLabel object is a component for placing text in a container.

2 JButton

This class creates a labeled button.

3 JColorChooser

A JColorChooser provides a pane of controls designed to allow a user to

manipulate and select a color.

4 JCheck Box

A JCheckBox is a graphical component that can be in either an on (true) or off

(false) state.

5 JRadioButton

The JRadioButton class is a graphical component that can be in either an on (true)

or off (false) state. in a group.

6 JList

A JList component presents the user with a scrolling list of text items.

7 JComboBox

A JComboBox component presents the user with a to show up menu of choices.

8 JTextField

A JTextField object is a text component that allows for the editing of a single line

of text.

9 JPasswordField

A JPasswordField object is a text component specialized for password entry.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 14

10 JTextArea

A JTextArea object is a text component that allows for the editing of a multiple

lines of text.

11 ImageIcon

A ImageIcon control is an implementation of the Icon interface that paints Icons

from Images

12 JScrollbar

A Scrollbar control represents a scroll bar component in order to enable user to

select from range of values.

13 JOptionPane

JOptionPane provides set of standard dialog boxes that prompt users for a value or

informs them of something.

14 JFileChooser

A JFileChooser control represents a dialog window from which the user can select

a file.

15 JProgressBar

As the task progresses towards completion, the progress bar displays the task's

percentage of completion.

16 JSlider

A JSlider lets the user graphically select a value by sliding a knob within a bounded

interval.

17 JSpinner

A JSpinner is a single line input field that lets the user select a number or an object

value from an ordered sequence.

2.4.3 Java Virtual Machine

The Java 2 Standard Edition (J2SE) platform currently supports two different

virtual machines: the so-called classic virtual machine and the newer Hotspot virtual

machine. Swapping out the classic virtual machine and replacing it with a Hotspot.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 15

Virtual machine gives J2SE programs an immediate and measurable performance

boost without making any other changes to the runtime environment. If a new virtual

machine can be designed from the ground up in order to boost performance, why not

design a virtual machine to run in a constrained environment? That is exactly what J2ME

does with the KVM, which is short for Kuaui VM (an early name).

The KVM is a completely new implementation of a Java virtual you should

understand that the Micro Edition is more than just the KVM. In fact, the classic virtual

machine can still be used with J2me. Thus, J2ME supports two different virtual machines.

Java is a new programming language from Sun Microsystems. The logo for Java

is ―Write Once Run Anywhere At Any Time‖. Java has a number of characteristics that

make it suitable for use with Internet applications, such as World Wide Web, although it

is not limited exclusively to the Internet.

Java‘s cross-platform portability is very attractive, which makes it a good choice

from any internal corporate networks.

The Java language has also been used for the development of large scale software

systems. This experience suggests that the language can be used as a general purpose tool

for writing business and scientific logic.

Java‘s support for rich classes and object inheritance enables a programmer to

reuse existing code and to write complex applications quickly. Sun describes its

Java language as a simple, distributed, interpreted, secure, architecturally neutral,

Portable, high performance, multithreaded, and dynamic language.

That is a lot of adjectives, and some of people may even classify them as

buzzwords. Some buzzwords Java also been used to describe other languages, But what

makes Java unique is that it is first language that can be used for writing general purpose

programs, as well as programs designed specifically for use on internets and intranets.

When used for internet or intranet applications, Java programs are typically used while

viewing Web pages in conjunction with suing a tool such as a Web browser. Java

programs that are designed to be run with in a Web browser are called Applets. General

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 16

purpose Java programs that can be run stand alone, outside a Web browser, are called

Java Applications.

Fig 2.2 : Illustration of Java program execution.

2.4.4 ECLIPSE

Eclipse is an integrated development environment (IDE). It contains a base

workspace and an extensible plug-in system for customizing the environment. Written

mostly in Java, Eclipse can be used to develop applications. By means of various plug-

ins, Eclipse may also be used to develop applications in other programming languages:

Ada, ABAP, C, C++, COBOL, Fortran, Haskell, JavaScript,Lasso, Lua, Natural, Perl,

PHP, Prolog, Python, R, Ruby (including Ruby on Rails framework), Scala, Clojure,

Groovy, Scheme, and Erlang.

The Eclipse software development kit (SDK), which includes the Java

development tools, is meant for Java developers. Users can extend its abilities by

installing plug-ins written for the Eclipse Platform, such as development toolkits for other

programming languages, and can write and contribute their own plug-in modules.Eclipse

SDK isfree and open source software

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 17

CHAPTER 3

REQUIREMENT ANALYSIS

3.1 FUNCTIONAL REQUIREMENTS

In software engineering, a functional requirement defines a function of a software

system or its component. A function is described as a set of inputs, the behavior, and

outputs. Functional requirements may be calculations, technical details, data manipulation

and processing and other specific functionality that define what a system is supposed to

accomplish. Behavioral requirements describing all the cases where the system uses the

functional requirements are captured in use cases.

Here, the system has to perform the following tasks:

Process Image of the leaf and detect the leaf edge and compute leaf token.

Leaf token is feed to the neural network for training of the network

Calculate the error while training the network and show the curve in error graph.

Recognize the leaf image from the previously trained network

Input and Output Requirements: The system needs a scanner or Digital camera to

capture the input images.

The system needs to generate the following outputs.

A frame displaying a graphical view of the tokens of the input leaf scanned and also to

present information like name of the leaf and token count.

Displaying the information like percentage of matching to already trained leaves and

also pest percentage.

Computational Requirement Specification:

To study about Prewitt edge detection algorithm.

Applying Thinning algorithm for reducing more than one pixel edge to one pixel edge.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 18

Study about feed forward back propagation neural networks.

Implementing all techniques and recognizing leaves and finding the percentage of best

fit with the existing leaf.

3.2 NON-FUNCTIONAL REQUIREMENTS

In systems engineering and requirements engineering, a non-functional

requirement is a requirement that specifies criteria that can be used to judge the operation

of a system, rather than specific behaviors. This should be contrasted with functional

requirements that define specific behavior or functions. The plan for implementing

functional requirements is detailed in the system design. The plan for implementing non-

functional requirements is detailed in the system architecture.

Other terms for non-functional requirements are "constraints", "quality

attributes", "quality goals", "quality of service requirements" and "non-behavioral

requirements".

Some of the quality attributes are as follows:

3.2.1 ACCESSIBILITY:

Accessibility is a general term used to describe the degree to which a product,

device, service, or environment is accessible by as many people as possible. User

interface is simple and efficient and easy to use.

3.2.2 MAINTAINABILITY:

In software engineering, maintainability is the ease with which a software product

can be modified in order to:

Correct defects

Meet new requirements

New functionalities can be added in the project based on the user requirements

just by adding the appropriate files to existing project using JAVA programming

languages.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 19

Since the programming is very simple, it is easier to find and correct the defects

and to make the changes in the project.

3.2.3 SCALABILITY:

System is capable of handling increase total throughput under an increased load

when resources (typically hardware) are added.

System can work normally under situations such as low bandwidth and large

number of users.

3.2.4 PORTABILITY:

Portability is one of the key concepts of high-level programming. Portability is the

software code base feature to be able to reuse the existing code instead of creating new

code when moving software from an environment to another.

Project can be executed under different operation conditions provided it meet its

minimum configurations. Only system files and dependant assemblies would have to be

configured in such case.

3.3 HARDWARE REQUIREMENTS

Processor : Any Processor above 1.0 GHz

RAM : 1Gb

Hard Disk : 512GB

Input device : Standard Keyboard and Mouse

Output device : VGA and High Resolution Monitor

3.4 SOFTWARE REQUIREMENTS

• Operating system : Windows Xp

• IDE : Eclipse

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 20

Chapter 4

TOOLS, TECHNIQUES AND METHODS USED

4.1 Image edge detection:

On of the main tasks of this application is the detection of specific tokens in a leaf

image. These tokens will then be the basis of the neuronal network calculations.

Assuming that the image is a full 2D scan of a single leaf Prewitt edge detection produces

an image where higher grey level values indicate the presence of an edge between two

objects. Prewitt operator is used for edge detection in an image. It detects two types of

edges:

Horizontal edges

Vertical Edges

Edges are calculated by using difference between corresponding pixel intensities

of an image. All the masks that are used for edge detection are also known as derivative

masks. Because image is also a signal so changes in a signal can only be calculated using

differentiation. So that‘s why these operators are also called as derivative operators or

derivative masks.

All the derivative masks should have the following properties:

Opposite sign should be present in the mask.

Sum of mask should be equal to zero.

More weight means more edge detection.

Prewitt operator provides us two masks one for detecting edges in horizontal

direction and another for detecting edges in an vertical direction.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 21

Vertical direction:

-1 0

1

-1 0 1

-1 0 1

Above mask will find the edges in vertical direction and it is because the zeros column in

the vertical direction. When you will convolve this mask on an image, it will give you the

vertical edges in an image.

How it works:

When we apply this mask on the image it prominent vertical edges. It simply works like

as first order derivate and calculates the difference of pixel intensities in a edge region. As

the center column is of zero so it does not include the original values of an image but

rather it calculates the difference of right and left pixel values around that edge. This

increase the edge intensity and it become enhanced comparatively to the original image.

Horizontal Direction:

-1 -1 -1

0 0 0

1 1 1

Above mask will find edges in horizontal direction and it is because that zeros column is

in horizontal direction. When you will convolve this mask onto an image it would

prominent horizontal edges in the image.

Prewitt gradient = SQRT(X*X + Y*Y)

All pixels are filtered. In order to filter pixels located near the edge of an

image, edge pixels values are replicated to give sufficient data

How it works:

This mask will prominent the horizontal edges in an image. It also works on the principle

of above mask and calculates difference among the pixel intensities of a particular edge.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 22

As the center row of mask is consist of zeros so it does not include the original values of

edge in the image but rather it calculate the difference of above and below pixel

intensities of the particular edge. Thus increasing the sudden change of intensities and

making the edge more visible. Both the above masks follow the principle of derivate

mask. Both masks have opposite sign in them and both masks sum equals to zero. The

third condition will not be applicable in this operator as both the above masks are

standardize and we can‘t change the value in them.

Now it‘s time to see these masks in action:

Sample Image:

Following is a sample picture on which we will apply above two masks one at time.

After applying Vertical Mask:

After applying vertical mask on the above sample image, following image will be

obtained. This image contains vertical edges. You can judge it more correctly by

comparing with horizontal edges picture.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 23

After applying Horizontal Mask:

After applying horizontal mask on the above sample image, following image will be

obtained.

Comparison:

As you can see that in the first picture on which we apply vertical mask, all the vertical

edges are more visible than the original image. Similarly in the second picture we have

applied the horizontal mask and in result all the horizontal edges are visible. So in this

way you can see that we can detect both horizontal and vertical edges from an image.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 24

4.2 Thinning

Thinning is a morphological operation that is used to remove selected foreground

pixels frombinary images, somewhat like erosion or opening. It can be used for several

applications, but is particularly useful for skeletonization. In this mode it is commonly

used to tidy up the output of edge detectors by reducing all lines to single pixel thickness.

Thinning is normally only applied to binary images, and produces another binary image

as output.

Thinning algorithm to minimize this threshold-based edge to a one-line frame

where we then can apply a sort of token recognition. The used thinning algorithm here

processed the image recursively and minimizes the found lines to a one-pixel wide one by

comparing the actual pixel situation with specific patterns and then minimizes it.

4.3 Back propagation Neural Network:

Back Propagation is the training or learning algorithm rather than the network itself.

A Back Propagation network learns by example. You give the algorithm examples

of what you want the network to do and it changes the network‘s weights so that, when

training is finished, it will give you the required output for a particular input. Back

Propagation networks are ideal for simple Pattern Recognition and Mapping Tasks

Another main part of this work is the integration of a feed-forward back

propagation neuronal network. The inputs for this neuronal network are the individual

tokens of a leaf image, and as a token normally consists of a cosines and sinus angle, the

amount of input layers for this network are the amount of tokens multiplied by two. The

image on the below should give you an idea of the neuronal network that takes place in

the Plant Recognition application.

Architect

Figure represent architecture of an simple NN. It is made up from an input, output and

one or more hidden layers. Each node from input layer is connected to a node from

hidden layer and every node from hidden layer is connected to a node in output layer.

There is usually some weight associated with every connection.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 25

Input layer represents an the raw information that is fed into the network. This part of

network is never changing its values. Every single input to the network is duplicated and

send down to the nodes in hidden layer. Hidden Layer accepts data from the input layer. It

uses input values and modifies them using some weight value, this new value is than send

to the output layer but it will also be modified by some weight from connection between

hidden and output layer. Output layer process information received from the hidden layer

and produces an output. This output is than processed by activation function.

Fig 4.1 :Feed-Forward back propagation neuronal network

Number of Nodes and Layers

Choosing number of nodes for each layer will depend on problem NN is trying to solve,

types of data network is dealing with, quality of data and some other parameters. Number

of input and output nodes depends on training set in hand. Larose [2005] argued that

choosing number of nodes in hidden layer could be challenging task. If there are too

many nodes in hidden layer, number of possible computations that algorithm has to deal

with increases. Picking just few nodes in hidden layer can prevent the algorithm of its

learning ability. Right balance needs to be picked. It is very important to monitor the

progress of NN during its training, if results are not improving, some modification to the

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 26

model might be needed.

Setting Weights

The way to control NN is by setting and adjusting weights between nodes. Initial

weights are usually set at some random numbers and than they are adjusted during NN

training.

According to Fogel focus should not be at changing one weight at time, changing

all the weights should be attempted simultaneously. Some NN are dealing with thousands,

even millions of nodes so changing one or two at time would not help in adjusting NN to

get desired results in timely manner. Logic behind weight updates is quite simple. During

the NN training weights are updated after iterations. If results of NN after weights

updates are better than previous set of weights, the new values of weights are kept and

iteration goes on. Finding combination of weights that will help us minimize error should

be main aim when setting weights. This will become bit more clear once the learning rate;

momentum and training set are explained.

Running and training NN

Running the network consist of a forward pass and a backward pass. In the

forward pass outputs are calculated and compared with desired outputs. Error from

desired and actual output are calculated. In the backward pass this error is used to alter

the weights in the network in order to reduce the size of the error. Forward and backward

pass are repeated until the error is low enough (users usually set the value of accepted

error).

Training will be explained briey.

When training NN, we are feeding network with set of examples that have inputs

and desired outputs. If we have some set of 1000 samples, we could use 100 of them to

train the network and 900 to test our model. Choosing the learning rate and momentum

will help with weight adjustment.

Setting right learning rate could be difficult task, if learning rate is too small,

algorithm might take long time to converges. On the other hand, choosing large learning

rate could have opposite effect, algorithm could diverge. Sometimes in NN every weight

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 27

has it's own learning rate. Learning rate of 0.35 proved to be popular choice when training

NN. Momentum term represents inertia. Large values of momentum term will influence

the adjustment in the current weight to move in same direction as previous adjustment.

Activation Function

Activations function are needed for hidden layer of the NN to introduce

nonlinearity. Without them NN would be same as plain perceptions. If linear function

were used, NN would not be as powerful as they are.

Activation function can be linear, threshold or sigmoid function. Sigmoid

activation function is usually used for hidden layer because it combines nearly linear

behavior, curvilinear behavior and nearly constant behavior depending on the input value

.

Fig:4.2 Sigmoid function

SUM is collection of the output nodes from hidden layer that have been multiplied

by connection weights, added to get single number and put through sigmoid function

(activation function). Input to sigmoid is any value between negative infinity and positive

infinity number while the output can only be a number between 0 and 1.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 28

CHAPTER 5

DESIGN

5.1 DESIGN FLOW DIAGRAM

5.1.1 Image acquisition and preprocessing

Acquisition of plant leaf

Plants can be usually identified according to the shapes, colors, textures and structures of

their leaf, bark, lower, seedling and morph. However, it is very difficult for ones to

analyze the shapes of flowers, seedling and morph of plants for their complex 3D

structures if based on only 2D images.we will identify different plants by leaf features.

Leaves are usually firstly clustered so that it is not easy for us to automatically extract

features of leaves from the complex background.The procedure is that we pluck the leaf

from plant, put it on the scanner, and then take the digital color image of the leaf directly,

or put it on a panel, take digital color image of the leaf with a digital camera. In this way,

we can get an image including only one leaf, and the background of the leaf image will be

blurred.

Leaf image preprocessing

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 29

The colors of plant leaves are usually green.Moreover, the shades and the variety of

changes of water, nutrient, atmosphere and season can cause change of the color, so the

color feature has low reliability. Thus, we decided to recognize various plants by the

grey-level image of plant leaf.while ignoring the color information. As a result, only Gray

component for each pixel is computed from the color image by

Gray =0:299 *R +0:578 *G +0:114 *B;

where R, G, B correspond to the color of the pixel , respectively.

The rectangle of interest (ROI) of leaf image should include all the pixels their gray

values are smaller than a specific threshold, then the binary image of leaf.Then the

contour of leaf can be extracted from the binary image by the operators of mathematical

morphology.

Fig 5.1:-Prepossessing the leaf image

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 30

5.2 DATA FLOW DIAGRAM

Network keeps training all the patterns repeatedly until the total error falls to some

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 31

pre-determined low target value and then it stops. Note that when calculating the final

error used to stop the network (which is the sum of all the individual neuron errors for

each pattern) you need to make all errors positive so that they add up and do not subtract

(an error of -0.5 is just as bad as an error of +0.5).

Once the network has been trained, it should be able to recognise not just the

perfect patterns, but also corrupted or noisy versions. When the network has fully

trained, the Validation Set error reaches a minimum. When the network is overtraining

(becoming too accurate) the validation set error starts rising. If the network overtrains, it

won‘t be able to handle noisy data so well.

5.3 DESIGN DIAGRAM

Fig 5.2 System architecture

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 32

CHAPTER 6

IMPLEMENTATION

6.1 EDGE DETECTION

The early stages of vision processing identify features in images that are relevant

to estimating the structure and properties of objects in a scene. Edges are one such

feature. Edges are significant local changes in the image and are important features for

analyzing images. Edges typically occur on the boundary between two different regions

in an image. Edge detection is frequently the first step in recovering information from

images.

An edge in an image is a significant local change in the image intensity, usually

associated with a discontinuity in either the image intensity or the first derivative of the

image intensity. Discontinuities in the image intensity can be either step discontinuities,

where the image intensity abruptly changes from one value on one side of the

discontinuity to a different value on the opposite side, or line discontinuities, where the

image intensity abruptly changes value but then returns to the starting value within some

short distance.

GRADIENT

The gradient is a measure of change in a function, and an image can be considered

to be an array of samples of some continuous function of image intensity. By analogy,

significant changes in the gray values in an image can be detected by using a discrete

approximation to the gradient. The gradient is the two-dimensional equivalent of the first

derivative and is defined as the vector.

PREWITT EDGE DETECTION

Prewitt edge detection produces an image where higher grey level values indicate the

presence of an edge between two objects. Prewitt operator is used for edge detection in an

image. It detects two types of edges:

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 33

Horizontal edges

Vertical Edges

Edges are calculated by using difference between corresponding pixel intensities of an

image. All the masks that are used for edge detection are also known as derivative masks.

Because image is also a signal so changes in a signal can only be calculated using

differentiation. So that‘s why these operators are also called as derivative operators or

derivative masks.

All the derivative masks should have the following properties:

Opposite sign should be present in the mask.

Sum of mask should be equal to zero.

More weight means more edge detection.

Prewitt operator provides us two masks one for detecting edges in horizontal direction

and another for detecting edges in an vertical direction.

Prewitt edge detection produces an image where higher grey-level values indicate

the presence of an edge between two objects. The Prewitt Edge Detection filter computes

the root mean square of two 3x3 templates. It is one of the most popular 3x3 edge

detection filters.

The Prewitt edge detection filter uses these two 3x3 templates to calculate the gradient

value:

-1 0 1 1 1 1

-1 0 1 0 0 0

-1 0 1 -1 -1 -1

X Y

Now consider the following 3x3 image window:

+------------+

| a1 a2 a3 |

| a4 a5 a6 |

| a7 a8 a9 |

+------------+

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 34

where:

a1 .. a9 - are the grey levels of each pixel in the filter window

X = -1*a1 + 1*a3 - 1*a4 + 1*a6 - 1*a7 + 1*a9

Y = 1*a1 + 1*a2 + 1*a3 - 1*a7 - 1*a8 - 1*a9

Prewitt gradient = SQRT(X*X + Y*Y)

All pixels are filtered. In order to filter pixels located near the edge of an image, edge

pixels values are replicated to give sufficient data

6.1.1 THINNING

As discussed earlier, the idea of identifying a specific leaf image`s species here is

that the outer frame of a leaf is enough to specify the species it belongs to. To accomplish

that, it is necessary to identify this outer frame exactly. The previously applied Prewitt

Edge detection normally just identify the edges with a preconfigured threshold and after

this edge detection we have to perform a thinning algorithm to minimize this threshold-

based edge to a one-line frame where we then can apply a sort of token recognition as

discussed later.

The used thinning algorithm here processed the image recursivly and minimizes

the found lines to a one-pixel wide one by comparing the actual pixel situation with

specific patterns and then minimizes it.

6.2 LEAF IMAGE TOKEN

The central part of this application are the tokens of each leaf image that are found after

the image processing is through with it. What exactly stands behind the idea of this tokens

and how we defined this tokens The idea behind the transfer of the leaf image shape into

a neuronal network usable form is, that the cosinus and sinus angles of the shape

represents the criterias of a recognition pattern.

The image shows a part of a leaf image that was already processed through the above

mentioned edge detection and thinning algorithms.

To give you an idea of what you see in this image, here is a short list:

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 35

Green line: The shape of the leaf image after a successfull edge detection & thinning.

Red Square: This square represents a point on the shape of the leaf image from which we are

going to draw a line to the next square.

Blue line: The compound of the center of two squares from which we are going to calculate

the cosinus and sinus angle. Such a blue line is a representation of a leaf token.

If you now take a deeper view on the small triangle zoom on this image you should regonize

that it shows a right-angled triangle. This and the summary of all triangles of a leaf image are

the representation of the tokens of a leaf from which we can start the neuronal network

calculations.

Fig 6.1 :- Leaf Token Fig 6.2:-Token of a single leaf image

6.3 NEURONAL NETWORK

Another main part of this work is the integration of a feed-forward

backpropagation neuronal network. As described earlier the inputs for this neuronal

network are the individual tokens of a leaf image, and as a token normally consists of a

cosinus and sinus angle, the amount of input layers for this network are the amount of

tokens multiplied by two.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 36

The fig below of neuronal network that takes place in the Plant Recognition application.

We have choosen a feed-forward backpropagation network because it was part of the task

to show that just a backpropagation network and the shape of a leaf image is enough to specify

the species of a leaf.

The implemented network also just have one input, hidden and output layer to simplify and

speed-up the calculations on that java implementation.

To fill the input neurons of the network, we use the previous calculated leaf tokens like

dicussed in section 5.3. The number of output neurons is normally specified by the amount of

different species because we use a encoded form to specify the outputs.

All other behaviour of the network is specified by the normal mathematical principals of a

backpropagation network.

Fig 6.3:-Neuronal network

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 37

CHAPTER 7

TESTING

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.

7.1 TYPES OF TESTS

7.1.1 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. Unit tests ensure that each

unique path of a business process performs accurately to the documented specifications

and contains clearly defined inputs and expected results.

7.1.2 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 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.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 38

7.1.3 VALIDATION TESTING

An engineering validation test (EVT) is performed on first engineering prototypes,

to ensure that the basic unit performs to design goals and specifications. It is important in

identifying design problems, and solving them as early in the design cycle as possible, is

the key to keeping projects on time and within budget. Too often, product design and

performance problems are not detected until late in the product development cycle —

when the product is ready to be shipped. The old adage holds true: It costs a penny to

make a change in engineering, a dime in production and a dollar after a product is in the

field.

Verification is a Quality control process that is used to evaluate whether or not a

product, service, or system complies with regulations, specifications, or conditions

imposed at the start of a development phase. Verification can be in development, scale-

up, or production. This is often an internal process.

Validation is a Quality assurance process of establishing evidence that provides a

high degree of assurance that a product, service, or system accomplishes its intended

requirements. This often involves acceptance of fitness for purpose with end users and

other product stakeholders.

The testing process overview is as follows:

Fig 7.1: The testing process

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 39

7.1.4 SYSTEM TESTING

System testing of software or hardware is testing conducted on a complete,

integrated system to evaluate the system's compliance with its specified requirements.

System testing falls within the scope of black box testing, and as such, should require no

knowledge of the inner design of the code or logic.

As a rule, system testing takes, as its input, all of the "integrated" software

components that have successfully passed integration testing and also the software system

itself integrated with any applicable hardware system(s).

System testing is a more limited type of testing; it seeks to detect defects both

within the "inter-assemblages" and also within the system as a whole.

System testing is performed on the entire system in the context of a Functional

Requirement Specification(s) (FRS) and/or a System Requirement Specification (SRS).

System testing tests not only the design, but also the behavior and even the

believed expectations of the customer. It is also intended to test up to and beyond the

bounds defined in the software/hardware requirements specification(s).

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 40

7.2 TESTING OF INITIALIZATION AND UI COMPONENTS

Table 7.1: Test case for Image processing(edge detection and leaf token)

Serial Number of Test Case TC 01

Module Under Test Image processor

Description

When the admin load the image of leaf

for processing the edge and finding the

tokens in the leaf image

Output Image has been processed and the token is

found

Remarks Test Successful.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 41

Table 7.2: Adding the species in the admin module

Serial Number of Test Case TC 02

Module Under Test Image processor

Description Adding leaf species in admin module and

adding the leaf image for each species.

Input Image of leaf from the source such as

scanner or digital camera

Output Leaf species directory created and leaf

image are added in the jtree

Remarks Test Successful.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 42

Table 7.3: Test Case for training the network

Serial Number of Test Case TC 03

Module Under Test Neuronal network

Description After admin uploaded the leaf species with

respective leaf image , the network should

be trained .

Input Leaf image form the image processing

module (admin side)

Output If there are enough no of images in the

network ,the network will get trained and

the error graph will show the error

accordingly

Remarks Test Successful.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 43

Table 7.4: Test Case for Network operation

Serial Number of Test Case TC 04

Module Under Test Neuronal network

Description Changing the values of the network

operations like input neuron,hidden

neurons,learn rate ,steps etc

Input User change the values in the network

operation

Output According to the user changes to the

network operation values the graph

shows deviation and change in the error

rate.

Remarks Test Successful.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 44

Table 7.5: Test Case for loading the image for recognition

Serial Number of Test Case TC 05

Module Under Test Recognition module

Description Loading the image for recognition and

processing the image for finding the leaf

tokem

Input Image to be recognize

Output When the user click on the button

recognize the image processsor module

process the image and the leaf token is

shown

Remarks Test Successful.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 45

Table 7.6: Test Case for recognition match

Serial Number of Test Case TC 06

Module Under Test Recognition module

Description Recognition of the leaf and the matching

result of the species

Output Result of matching is shown in

percentage of highest match .Red color

denotes the match greater than 90%

Remarks Test Successful.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 46

CHAPTER 8

SNAPSHOT

Fig 8.1 Screen Layout of Main Page

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 47

Fig 8.2 Screen Layout of image processing

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 48

Fig 8.3 Snapshot of Renaming Plant Species

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 49

Fig 8.4 Screen Layout of image processing

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 50

Fig 8.5 Screen Layout of neuronal network

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 51

Fig 8.6 Snapshot of network training

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 52

Fig 8.7 Screen Layout for Recognition

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 53

Fig 8.8 Screen Layout of Loading image for Recognition

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 54

Fig 8.9 Snapshot for Recognition module before recognition of leaf image

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 55

Fig 8.10 Snapshot of recognized leaf

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 56

Fig 8.11 Screen Layout for Project menu

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 57

Fig 8.12 Screen Layout look & feel menu

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 58

Fig 8.13 Screen Layout Themes menu

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 59

CHAPTER 9

CONCLUSION AND FUTURE ENHANCEMENT

9.1 CONCLUSION

A Back propagation neural network for recognition of leaves is implemented in

this project. The training set contains minimum five spices for each type of leaf in each

data file. Using more number of species in training set and no: of output nodes can

enhance the recognition ability. Using quick training algorithms with out losing

recognition performance can enhance the scope of this paper.

Further enhancement of this work involves more experimentation‘s with large

training sets to recognize various leave develop an expert system. The leaves images are

to be collected in large number and are to be send to experts in agricultural research

stations . The present system is developed using java swings. Using the concepts of the

Java Beans are may be modified to add network features to the system.

A centralised database can be used to link with the image processor module to

have large no of leaf image set which can be used for training the system

9.2 FUTURE ENHANCEMENT

Access of application through Mobile devices.

More interactive user interface.

Facilities for Backup creation.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 60

BIBLIOGRAPHY

Good Teachers are worth more than thousand books, we have them in Our

Department.

REFERENCE PAPERS:

1. Patrick Naughton and Herbert schild , The complete reference Java2‖ 8th

Edition.

Tata McGraw hill publication-2001

2. Harken S. ―Neural Networks: A Complete Foundation‖,Prentice Hall-1999.

3. Rural Development Expert Systems, M.S. Prasad Babu & M.Bharatha Lakshmi.Proc

84th Indian Science Congress, Part IV Jan, 1997.

4. 4.Information Technology in Rural Perspective for developing countries—Proc. 91st

Indian Science Congress , Pat III section VIII : Information and Communication, Jan

2004.

5. Leaf Recognition using Back propagation Neural Networks—M.Tech Dissertation—

Andhra University,2004.

6. Neeraj Kumar, Peter N. Belhumeur, Arijit Biswas, David W. Jacobs, W. John Kress,

Ida C. Lopez, and João V. B. Soares, "Leafsnap:"A Computer Vision System for

Automatic Plant Species Identification", Computer Vision – ECCV 2012, 2012, pp

502-516.

7. N.Valliammal, Dr. S.N.Geethalakshmi, ―Automatic Recognition System Using

Preferential Image Segmentation for Leaf and Flower Images‖, Computer Science &

Engineering: An International Journal (CSEIJ), 2011, pp. 13-25.

8. Agarwal, S., Awan, A. and Roth, D. (2004) Learning to detect objects in images via a

sparse, partbased representation, IEEE Trans. Pattern Anal.Mach. Intell., Vol. 26, No.

11, Pp. 1475–1490.

9. Jiazhi Pan and Yong He "Recognition of plants by leaves digital image and neural

network", International Conference on Compute Science and Software Engineering,

2008, pp 906-910.

LEAVES RECOGNITION SYSTEM

Dept of CSE, NHCE 61

TEXT BOOKS:

1. The Java Handbook by Patrick Naughton, Michael Morrison

2. The Java AWT Reference by John Zukowski

3. Articial intelligence: a guide to intelligent systems. Pearson Education Limited,

2005.Raul Rojas

4. Neural Networks:A Systematic Introduction. Springer

5. Machine learning, neural and statistical classication. Articial intelligence. Ellis

Horwood

Sites Referred:

1. http://www.tutorialspoint.com

2. http://www.almaden.ibm.com/software/quest/Resources/

3. http://www.computer.org/publications/dlib

4. http://www.developerfusion.com/

5. http://en.wikipedia.org/wiki/Artificial_neural_network