Sei sulla pagina 1di 87

PROGNOSIS OF LEUKOCYTES DISEASES(ACUTE

&CHRONIC)INMACHINE VISIONSYSTEM BY USING NEURAL


NETWORK

A PROJECT REPORT

Submitted by

S.PONMALAR 211015106060

G.RAMYA 211015106067

R.THAMARAI SELVI 211015106082

in partial fulfilment for the award of the degree

Of

BACHELOR OF ENGINEERING

IN

ELECTRONICS AND COMMUNICATION ENGINEERING

JEPPIAAR MAAMALLAN ENGINEERING COLLEGE


SRIPERUMBUDUR

ANNA UNIVERSITY: CHENNAI 600 025

MARCH 2019
ANNA UNIVERSITY: CHENNAI 600 025

BONAFIDE CERTIFICATE

Certified that this project report “PROGNOSIS OF LEUKOCYTES


DISEASES(ACUTE&CHRONIC)IN MACHINE VISION SYSTEM BY
USING NEURAL NETWORK”is the bonafide work of
“S.PONMALAR(211015106060), G.RAMYA(211015106067), R.THAMARAI
SELVI(211015106082)” who carried out the project work under my supervision.

SIGNATURE SIGNATURE

Mr.M.AYYADURAI.,M.E.,(Ph.D) Mrs.S.AGNES SHIFANI.,M.E.,(Ph.D)

HEAD OF THE DEPARTMENT SUPERVISOR

(ASSOCIATE PROFESSOR) (ASSISTANT PROFESSOR)

Department of Electronics and Department of Electronics and

Communication Engineering. Communication Engineering.

JeppiaarMaamallan Engineering JeppiaarMaamallan Engineering

college, Sriperumpudur. College, Sriperumpudur.

Submitted for the university examination held on __________________

INTERNAL EXAMINER EXTERNAL EXAMINAR


ACKNOWLEDGEMENT
First and foremost, we bow our head to the Almighty for being our light and his
gracious showers of blessing throughout the course of this project.

We would like to thank Col. Dr.JEPPIAAR., M.A.B.L., Ph.D., Founder, whose


words are inspired us and we are greatly and profoundly thankful to our honourable
Chairman Dr. MARIAZEENA JOHNSON.,B.E., M.B.A., M.Phil., Ph.D., for
facilitating us with this opportunity. We also record our sincere thanks to our honorable
Vice President Dr. MARIE JOHNSON.,B.E., M.B.A., M.Phil., Ph.D., for his kind
support to take up this project.

We thank our Principal Dr. K.V.KARTHIKEYAN.,M.E., Ph.D., for expressing


his keen interest during this project work and also in our academic side of B.E. program.

We are deeply indebted and extremely grateful to our Head of the Department
Mr.M.AYYADURAI.,M.E.,(Ph.D.), who permitted us to work on this valuable project
and his invaluable assistance in the course of our graduation amid his hustle.

We express our sincere thanks and profound sense of gratitude to our


Project Coordinators Mrs.P.VIJAYAKUMARI.,M.E.,(Ph.D.)for her valuable guidance,
suggestion paid way for the successful completion of the project work.

We would like to express our sincere honor and thanks to our Project Supervisor
Mrs.S.AGNES SHIFANI.,M.E.,(Ph.D)., for her constant technical support and
stupendous encouragement, which enabled us to complete our project successfully.

Further the acknowledgement would be incomplete if we would not mention a word of


thanks to our most beloved Parents whose continuous support and encouragement all the
way through the course has led us to pursue the degree and confidently complete the
project.
ABSTRACT

Blood smear images are efficient and reliable source of information in


extraction of features in case of cancer detection. In assessment of cancer detection
like leukaemia cancer image feature extraction and reduction has to be carried out
efficiently. In this paper, we discuss a robust image feature extraction algorithm
using scale invariant feature points for key point extraction and GLCM Shape
Analysis. For matching the key points and k nearest network algorithm is developed
with tumbling functions of model. This technique assists in comparing the scale
invariant feature points and GLCM features. From the obtained outcomes, the
capability of the obtained accuracy is estimated and it is wrapped up that the
proposed approach is efficient in regards to previous algorithm. Automated
diagnosis of white blood cells cancer diseases such as leukemia and Myeloma is
challenging bio-medical research topic. To develop an algorithm that automatically
detects and segment disease in blood serum. We proposed a simple technique that
automatically detects and segment diseases in blood serum by using K-Means
clustering algorithm. To assist in diagnosis of WBC diseases SVM and KNN
method is used for classification and neural network algorithm is used to achieve the
final result.
TABLE OF CONTENTS

CHAPTER TITLE PAGE NO.


NO.

ABSTRACT IV

LIST OF TABLES X
LIST OF FIGURES XI
LIST OF ABBREVIATIONS XIII
1. INTRODUCTION
1.1GENERAL 1
1.1.1THE IMAGE PROCESSING 1
SYSTEM
1.1.2 IMAGE PROCESSING 4
TECHNIQUE
1.2 OBJECTIVE OF IMAGE PROCESSING 6
1.3APPLICATION OF DIGITAL IMAGE 6
PROCESSING

2. LITERATURE REVIEW
2.1 SCOPE OF LITERATURE REVIEW 8
2.2 REVIEW OF PAPERS 8

3. EXISTING SYSTEM
3.1 INTRODUCTION 12
3.2 SYSTEM OVERVIEW 13

3.3 BLOCK DIAGRAM OF EXISTING 13


SYSTEM
3.4WORKING PROCESS 14
3.5 DRAWBACKS OF THE EXISTING 14
SYSTEM
4. PROPOSED SYSTEM
4.1 INTRODUCTION 15
4.2 SYSTEM OVERVIEW 16
4.3 BLOCK DIAGRAM 16
4.4 MODULES 17
4.5 MODULE DESCRIPTION 17
4.5.1 PRE-PROCESSING 17
4.5.2 SEGMENTATION 17
4.5.2.1 K-MEANS CLUSTERING 18
ALGORITHM
4.5.3 FEATURE EXTRACTION 20
4.5.4 KNN CLASSIFICATION 21
4.5.5 SUPPORT VECTOR MACHINE 22
4.5.6 NEURAL NETWORK 23
4.6 ADVANTAGES OF PROPOSED 24
SYSTEM

5. SYSTEM DESIGN

5.1 RGB COLOR IMAGE 25

5.2 GRAY SCALE 26

5.3 MORPHOLOGICAL OPERATIONS 27

5.3.1GRAY-VALUE MORPHOLOGICAL 28

PROCESSING
5.3.2 MORPHOLOGICAL FILTERING 29

OF GRAY LEVEL DATA

5.3.3 MORPHOLOGICAL SMOOTHING 30

5.3.4 MORPHOLOGICAL GRADIENT 30

5.3.5 MORPHOLOGICAL LAPACIAN 30

5.4 K-NEAREST NEIGHBOUR 31

ALGORITHM

5.4.1 SELECTION OF K VALUE 31

5.4.2 ADVANTAGE KNN ALGORITHM 32

5.5 SUPPORT VECTOR MACHINE 33

(KERNELS)

5.5.1 ADVANTAGES OF SVM 35

5.5.2 APPLICATION OF SVM 35

5.6 ARTIFICIAL NEURAL NETWORK 35

5.6.1 ADVANTAGES OF ANN 37

5.6.2 APPLICATIONS OF ANN 37

6. HARDWARE REQUIREMENTS

6.1 MAX232 IC 38

6.1.1 PIN DESCRIPTION OF MAX-232 38

IC
6.1.2 TYPES OF MAX-232 IC 39

6.1.3 MAX-232 IC INTERFACING 40

6.1.4 PC SERIAL PORT 40

COMMUNICATION

6.1.5 RXD AND TXD PINS OF 8051 40

6.2 APPLICATION OF MAX232 IC 41

6.3 ARDUINO UNO 41

6.3.1 TECHNICAL SPECIFICATION 42

6.3.2 ATMEGA168/328-ARDUINO PIN 43

MAPPING

6.3.3 GENERAL PIN FUNCTIONS: 44

6.3.4 FEATURES OF THE ARDUINO 45

UNO BOARD

6.3.5 PROGRAMMING 47

6.3.6APPLICATIONS OF ARDUINO 47

UNO BOARD

6.4 LCD 47

6.4.1 PIN DESCRIPTION 48

6.5 APPLICATION OF LCD 50

SOFTWARE REQUIREMENTS

7.
7.1 GENERAL 51

7.2 FEATURES OF MATLAB 52

7.2.1 INTERFACING WITH OTHER 53

LANGUAGES

7.2.2DEVELOPING ALGORITHMS 56

AND APPLICATIONS

7.2.3 ANALYSING AND ACCESSING 56

DATA

7.2.4 PERFORMING THE NUMERICAL 57

COMPUTATION

7.2.5 HARDWARE REQUIREMENTS 58

7.2.6 SOFTWARE REQUIREMENTS 58

8. RESULT

8.1 GENERAL 59

8.2 SNAPSHOTS 59

8.3 HARDWARE RESULT 66

9. CONCLUSION 67

10. FUTURE SCOPE 68


11. APPENDIX 69
12. REFERENCES 71
LIST OF TABLES

TABLE NO. TABLE NAME PAGE NO.

1. LCD PIN DESCRIPTION 49

LIST OF FIGURES
11
FIGURE NO NAME OF THE FIGURE PAGE NO

1.1 BLOCK DAIGRAM FOR IMAGE PROCESSING 1


SYSTEM
1.2 BLOCK DIAGRAM OF FUNDAMENTAL 2
SEQUENCE INVOLVED IN AN IMAGE
PROCESSING SYSTEM

1.3 IMAGE PROCESSING TECHNIQUES 4

3.1 BLOCK DIAGRAM FOR EXISTING SYSTEM 13

4.1 BLOCK DIAGRAM FOR PROPOSED SYSTEM 16

4.2 PREPROCESSING GRAPH 17

4.3 BLOOD SMEAR CLUSTERING 18

4.4 EXTRACTING THE IMAGE FOR FEATURE

PURPOSE 21

4.5 K-NEAREST NEIGHBOUR CLASSIFICATION 22

5.1 RGB COLOR IMAGE 26

5.2 GRAY SCALE IMAGE 27

5.3 TWO OBJECTS OR SETS A AND B 27

5.4 FINDING BACKGROUND AND OBJECT 28

5.5 KNN CLASSIFIER 32

5.6 SUPPORT VECTOR MACHINE (KERNEL) 33

11
5.7 DECISION FROM ANN 36

6.1 MAX-232 IC 39

6.2 PC SERIAL PORT COMMUNICATION

THROUGH THE MAX232 INTERFACE 40

6.3 ARDUINO BOARD PIN DIAGRAM 42

6.4 ATMEGA 168/328-ARDUINO PIN MAPPING 43

6.5 PIN DIAGRAM OF LCD 48

8.1 INPUT IMAGE 59

8.2 GRAY CONVERTED IMAGE 60

8.3 IMAGE ENHANCEMENT 60

8.4 BINARY CONVERTED IMAGE 61

8.5 COMPLEMENT IMAGE 61

8.6 SMALL OBJECT REMOVED IMAGE 62

8.7 BORDER CORRECTED IMAGE 62

8.8 MORPHOLOGICAL OPERATION 63

8.9 DETECTED IMAGE 63

8.10 OUTLINED ORGINAL IMAGE 64

8.11 NEUTRAL NETWORK 64

8.12 FUNCTION FITTING NEURAL NETWORK 65

8.13 NEURAL NETWORK OUTPUT 65

8.14 HARDWARE OUTPUT 66

LIST OF ABBREVIATIONS

11
AML - Acute myeloid leukaemia

ALL - Acute lymphoblastic leukaemia

CML - Chronic myeloid leukaemia

CLL - Chronic lymphoblastic leukaemia

GLCM - Gray level co-occurrence matrix

KNN - K-nearest neighbour

ANN - Artificial neural network

SVM - Support vector machine

RBC - Red blood cells

WBC - White blood cells

CBC - Complete blood cell count

ATRA - All-Trans-Retinoic-Acid

NMR - Nuclear magnetic resonance

MK - k mean clustering algorithm

HIS - Hue, saturation, intensity

TTL - Transistor-Transistor logic

CG-RAM - Character generation RAM

CHAPTER I

11
INTRODUCTION

1.1 GENERAL
The term digital image refers to processing of a two dimensional picture by
a digital computer. In a broader context, it implies digital processing of any two
dimensional data. A digital image is an array of real or complex numbers
represented by a finite number of bits. An image given in the form of a
transparency, slide, photograph or an X-ray is first digitized and stored as a
matrix of binary digits in computer memory. This digitized image can then be
processed and/or displayed on a high-resolution television monitor. For display,
the image is stored in a rapid-access buffer memory, which refreshes the
monitor at a rate of 25 frames per second to produce a visually continuous
display.

1.1.1 THE IMAGE PROCESSING SYSTEM

Input Digitizer Mass


Image Storage

Image Digital Operator


Processor Computer Console

Hard Copy
Display Device

FIG 1.1 BLOCK DIAGRAM FOR IMAGE


PROCESSING SYSTEM

DIGITIZER:

11
A digitizer converts an image into a numerical representation suitable for
input into a digital computer. Some common digitizers are

1. Microdensitometer
2. Flying spot scanner
3. Image dissector
4. Videocon camera
5. Photosensitive solid- state arrays.
IMAGE PROCESSOR:

An image processor does the functions of image acquisition, storage, pre-


processing, segmentation, representation, recognition and interpretation and
finally displays or records the resulting image. The following block diagram
gives the fundamental sequence involved in an image processing system.

Problem Image Representation


Image Segmentation Representation
Domain Acquisition Segmentation &&Description
Acquisition nn Description

Knowledge Result
Recognition
Preprocessing
Preprocessing
Knowledge Recognition&&
Base interpretation
Base interpretation

FIG 1.2 BLOCK DIAGRAM OF FUNDAMENTAL


SEQUENCE INVOLVED IN AN IMAGE PROCESSING
SYSTEM

As detailed in the diagram, the first step in the process is image


acquisition by an imaging sensor in conjunction with a digitizer to digitize the
image. The next step is the pre-processing step where the image is improved
11
being fed as an input to the other processes. Pre-processing typically deals with
enhancing, removing noise, isolating regions, etc. Segmentation partitions an
image into its constituent parts or objects. The output of segmentation is usually
raw pixel data, which consists of either the boundary of the region or the pixels
in the region themselves. Representation is the process of transforming the raw
pixel data into a form useful for subsequent processing by the computer.
Description deals with extracting features that are basic in differentiating one
class of objects from another. Recognition assigns a label to an object based on
the information provided by its descriptors. Interpretation involves assigning
meaning to an ensemble of recognized objects. The knowledge about a problem
domain is incorporated into the knowledge base. The knowledge base guides the
operation of each processing module and also controls the interaction between
the modules. Not all modules need be necessarily present for a specific function.
The composition of the image processing system depends on its application.
The frame rate of the image processor is normally around 25 frames per second.

DIGITAL COMPUTER:

Mathematical processing of the digitized image such as convolution,


averaging, addition, subtraction, etc. are done by the computer.

MASS STORAGE:

The secondary storage devices normally used are floppy disks, CD ROMs
etc.

HARD COPY DEVICE:

The hard copy device is used to produce a permanent copy of the image
and for the storage of the software involved.

OPERATOR CONSOLE:

The operator console consists of equipment and arrangements for


verification of intermediate results and for alterations in the software as and
11
when require. The operator is also capable of checking for any resulting errors
and for the entry of requisite data.

1.1.2 IMAGE PROCESSING TECHNIQUES

Digital image processing refers processing of the image in digital form.


Modern cameras may directly take the image in digital form but generally
images are originated in optical form. They are captured by video cameras and
digitalized. The digitalization process includes sampling, quantization. Then
these images are processed by the five fundamental processes, at least any one
of them, not necessarily all of them.

This section gives various image processing techniques.

Image Enhancement

Image Restoration

Image
processin
g Image Analysis

Image Compression

Image Synthesis

FIG1.3: IMAGE PROCESSING TECHNIQUES

A) IMAGE ENHANCEMENT:
Image enhancement operations improve the qualities of an image like
improving the image’s contrast and brightness characteristics, reducing its noise

11
content, or sharpen the details. This just enhances the image and reveals the
same information in more understandable image. It does not add any
information to it.

B) IMAGE RESTORATION:
Image restoration like enhancement improves the qualities of image but
all the operations are mainly based on known, measured, or degradations of the
original image. Image restorations are used to restore images with problems
such as geometric distortion, improper focus, repetitive noise, and camera
motion. It is used to correct images for known degradations.

C) IMAGE ANALYSIS:
Image analysis operations produce numerical or graphical information
based on characteristics of the original image. They break into objects and then
classify them. They depend on the image statistics. Common operations are
extraction and description of scene and image features, automated
measurements, and object classification. Image analyze are mainly used in
machine vision applications.

D) IMAGE COMPRESSION:
Image compression and decompression reduce the data content necessary
to describe the image. Most of the images contain lot of redundant information,
compression removes all the redundancies. Because of the compression the size
is reduced, so efficiently stored or transported. The compressed image is
decompressed when displayed. Lossless compression preserves the exact data in
the original image, but Loss compression does not represent the original image
but provide excellent compression.

E) IMAGE SYNTHESIS:

11
Image synthesis operations create images from other images or non-image
data. Image synthesis operations generally create images that are either
physically impossible or impractical to acquire.

1.2 OBJECTIVE IMAGE PROCESSING TECHNIQUE


The principle objective of image processing technique is to process an
image so that the resultant image is more suitable than the original for a
particular application. Most of the techniques are very much problem oriented
and hence enhancement for one application may turn out to be degradation for
the other.
1.3 APPLICATIONS OF DIGITAL IMAGE PROCESSING

Digital image processing has a broad spectrum of applications, such as


remote sensing via satellites and other spacecrafts, image transmission and
storage for business applications, medical processing, radar, sonar and acoustic
image processing, robotics and automated inspection of industrial parts.

MEDICAL APPLICATIONS:

In medical applications, one is concerned with processing of chest X-


rays, cineangiograms, projection images of transsexual tomography and other
medical images that occur in radiology, nuclear magnetic resonance (NMR) and
ultrasonic scanning. These images may be used for patient screening and
monitoring or for detection of tumours’ or other disease in patients.
SATELLITE IMAGING:

Images acquired by satellites are useful in tracking of earth resources;


geographical mapping; prediction of agricultural crops, urban growth and
weather; flood and fire control; and many other environmental applications.
Space image applications include recognition and analysis of objects contained
in image obtained from deep space-probe missions.

11
COMMUNICATION:

Image transmission and storage applications occur in broadcast


television, teleconferencing, and transmission of facsimile images for office
automation, communication of computer networks, closed-circuit television
based security monitoring systems and in military communications.

RADAR IMAGING SYSTEMS:

Radar and sonar images are used for detection and recognition of various
types of targets or in guidance and manoeuvring of aircraft or missile systems.

DOCUMENT PROCESSING:

It is used in scanning, and transmission for converting paper documents


to a digital image form, compressing the image, and storing it on magnetic tape.
It is also used in document reading for automatically detecting and recognizing
printed characteristics.

DEFENSE/INTELLIGENCE:

It is used in reconnaissance photo-interpretation for automatic


interpretation of earth satellite imagery to look for sensitive targets or military
threats and target acquisition and guidance for recognizing and tracking targets
in real-time smart-bomb and missile-guidance systems.

11
CHAPTER 2
LITERATURE REVIEW

2.1 SCOPE OF LITERATURE REVIEW


Chapter 2, literature review deals with the survey of the papers related to
the project. By this survey, a clear idea of the project is acquired and can
understand the technology used in different papers along either the advantages
and the issues related to the previous methods. The literature review is needed
basically to get a clear knowledge of the proposed system along with their
existing technologies and methods.

2.2 REVIEW OF PAPERS

1. “White Blood Cell Classification and Counting Using


ConvolutionalNeural Network”, presented by Merl James Macawile,
Vonn Vincent Quiñones, at 2018 IEEE 3rd International Conference
on Control and Robotics Engineering.
Establishing an accurate count and classification of leukocytes
commonly known as WBC (white blood cells) is crucial in the
assessment and detection of illness of an individual, which involves
complications on the immune system that leads to various types of
diseases including infections, anemia, leukemia, cancer, AIDS (Acquired
Immune Deficiency Syndrome) etc. The two widely used methods to
count WBC is with the use of hematology analyzer and manual counting.
Currently, in the age of modernization there has been numerous research
in the field of image processing incorporated with various segmentation
and classification techniques to be able to generate alternatives for WBC
classification and counting. However, the accuracy of these existing
methods could still be improved. Thus, in this paper we proposed a new
method that could segment various types of WBCs: monocytes,
lymphocytes, eosinophils, basophils, and neutrophils from a microscopic

11
blood image using HSV (Hue, Saturation, Value) saturation component
with blob analysis for segmentation and incorporate CNN (Convolutional
Neural Network) for counting which in turn generates more accurate
results

2. “Detection of Leukemia in Microscopic White Blood cell


Images”,presentedbyShubhangi Khobragade, Dheeraj D Mor,Dr.
C.Y.Patil, at 2016, IEEE International Conference on Information
Processing (ICIP).
Leukemia means blood cancer which is featured by the
uncontrolled and abnormal production of white blood cells (leukocytes)
by the bone marrow in the blood. Analysing microscopic blood cell
images, diseases can be identified and diagnosed early. Hematologist is
using technique of image processing to analyse, detect and identify
leukemia types in patients recently. Detection through images is fast and
cheap method as there is no special need of equipment for lab testing. In
this paper, we proposed a method of detection of leukemia in patients
from microscopic white blood cell images. We have focused on the
changes in the geometry of cells and statistical parameters like mean and
standard deviation which separates white blood cells from other blood
components using processing tools like MATLAB and LabVIEW.
Images processing steps like image enhancement, image segmentation
and feature extraction are applied on microscopic images.

3. “A Study on Image Processing Concepts Used for the Detection on


LeukaemiaaSurvey”, presentedby R. Suriyagrace Dr. M.
Devapriyaat 2015, IJARCSSE.

11
In medical science, cancer cell detection can be done through the
microscopic images of the collected blood samples. Medical world states
that Leukaemia is a type of blood cancer which occurs on the White
Blood Cell (WBC) of the bone marrow. In Image processing, various
techniques can be used in the detecting the cells that are affected by
cancer. This paper deals with the comparison of different algorithms that
are used for leukaemia detection from the collected sample images. This
paper consists of the introduction of various cancerous cells in Section 1,
the literature review in Section 2, the various modules that are used for
the detection .
4. “Unsupervised Color Image Segmentation of Red Blood Cell for
Thalassemia Disease”, presented by NurulZhafikha, and Noor
Rashid, at 2015IEEE 2nd International Conference on Biomedical
Engineering (ICoBE)
Current diagnosis of thalassemia disease based on peripheral blood
images has given significant contribution to the field of hematology. Due
to the requirement of prompt and accurate diagnosis of the disease, this
study has proposed an unsupervised color image segmentation of
thalassemia disease using moving k-means (MK) clustering algorithm. It
has been applied on blood sample images of both types of thalassemia
including normal (healthy) blood sample. The proposed segmentation
method provides a basic step of red blood cell detection in thin blood
smears. With the aim of obtaining the fully segmented abnormal and
normal red blood cells, the blood images will firstly enhanced by using
the global contrast technique. Then, the MK clustering algorithm has
been applied on each of the HSI (hue, saturation, intensity) color
components to segment the blood cells from the background. After that,
the segmented images have been processed using median filter for
smoothing the image. By comparing the segmentation accuracy of the

11
segmented blood cells, the best one will be processed using seeded region
growing area extraction algorithms based on saturation color component
for removing any unwanted regions from the image and to obtain the
segmented red blood cells.
5. “Molecular-Level Dengue Fever Diagnostics via a Combination of
RT-LAMP and Paper-based Devices”, by Shih-Jie Lo, Shih-Chun
Yang, and Da-Jeng Yao,2012 IEEE Nanotechnology Material and
Devices Conference.
This paper describes the development of an inexpensive, but robust
and easy-to-use point-of-care diagnostic device that can be used for the
detection of dengue fever at the molecular level (i.e., the detection of
dengue virus via using a piece of paper). To date, the clinical diagnosis of
dengue fever mainly relies on ELISA-based examinations for a specific
antigen. However, the protein-based diagnostics is at the relatively late
stage, and it is needed to develop a simple and low-cost diagnostic device
for the detection of dengue fever at the early stage after the infection.
Here, we have developed a procedure for monitoring dengue virus
serotype 2 RNA (in the buffer system), including: i) amplifying the
nucleic acids via RT-LAMP (reverse transcription loop-mediated
isothermal amplification), and ii) examining the amplified products via a
colorimetric assay in paper. We have demonstrated the ability to amplify
dengue virus via RT-LAMP with the virus concentration of 60 PFU/mL;
the current results indicated that this paper-based diagnostic device was
capable of detecting the RT-LAMP products in the buffer system with the
concentration of 300 ng/mL.

11
CHAPTER 3

EXISTING SYSTEM

3.1 INTRODUCTION

According to the World Health Organization (WHO) Cancer is consider


as the second leading cause of death in the world and has claimed the lives of
8.8 million people, attributed to the death of nearly one in six deaths worldwide.
According to WHO Low-income and middle-income countries accounted for
almost 70% of cancer deaths Discovering those diseases in the early stages
highly affects the treatment period. In addition, some of the diseases’ sub-types
are really confusing to the doctors. Nowadays, there is a great tendency for
diagnostic pathology to heavily rely on automated systems which can aid in the
diagnosis. Image processing is concerning with digital images to extract useful
information. It is involved in different other topics such as layout land use,
Character recognition, coin recognition, Medical imaging. Medical imaging
uses the information extracted from digital image to enhance the diagnostic of
different diseases. White blood cells cancer diseases; Leukaemia and Myeloma,
threaten people’s life nowadays. Leukaemia is found when the bone marrow
produces abnormal white blood cells, which don’t function properly. It may be
either acute or chronic. Acute Myeloid Leukaemia (AML) is sub categorized to
(M0, M1, M2, M3, M4, M5, M6, M7). Acute lymphoblastic leukaemia (ALL) is
sub categorized to (L1, L2, L3). Myeloma is another type of cancer that
develops from cells in the bone marrow called plasma cells. A hybrid automated
system to facilitate the diagnosis of different white blood cells cancer diseases is
introduced to identify Leukaemia with its sub-types (AML, ALL) and
Myeloma. Two main approaches are conducted for the sake of eliminating the
confusion while discriminating between some of the sub-types. A new
combination of ratio features is conducted for each approach. Ratio feature is

11
considered because it is invariant to scaling. Finally, in order to make the
system as an expert system through improving the learning efficiency by
allowing the system to learn from the misdiagnosed input tests in which the
experts reclassify the disease with the new label.

3.2 SYSTEM OVERVIEW:

The main aim of the system is to early discovery of white blood cells
cancer; reduce the misdiagnosis cases in addition to improve the system
learning methodology. Based on the doctor’s selection, one of two approaches
is implemented. Each approach is applied on one of the two diseases category
by computing different features. Finally, Random Forest classifier is applied for
final decision. Moreover, allowing the experts only to have the final tuning on
the result obtained from the system.

3.3 BLOCK DIAGRAM OF EXISTING SYSTEM

Input image

Pre-processing and Segmentation

Gustafson clustering technique

Mathematical Feature extraction

Random forest

Final output

FIG 3.1 BLOCK DIAGRAM OF EXISTING SYSTEM

11
3.4 WORKING PROCESS:

This is a system developed forevaluation of an automated system to


accurately detect white blood cells cancer diseases. It detects types and sub-
types of Leukaemia (ALL and AML) and Myeloma. It is a recognition system
applied on acquired blood microscopic images then performs pre-processing,
segmentation, feature extraction and classification. It converts images to
YCBCR colour space and construct Gaussian distribution of CB and CR values.
Statistical, texture, size ratio and morphological features are then computed to
train classifier. This system has the ability of learning from misclassified tests to
enhance the future accuracy of the system. Random Forest classifier is the best
classifier that is able to differentiate between different types.

3.5 DRAWBACKS OF EXISTING SYSTEM

1. Memory intensive.
2. Sensitive to initialization, outliers.
3. It is not suitable for very noisy and edgeless images.
4. It is not suitable for images whose boundaries are very smooth.
5. No guarantees of object coherency-might have holes, extraneous pixels.
But the color images it is a difficult task to work. While the dispensable
image in low light.

11
CHAPTER 4

PROPOSED SYSTEM

4.1 INTRODUCTION:

The blood consists of a suspension of special cells in liquid called


plasma. Blood consists of 55 % plasma, and 45 % by cells called formed
elements. The blood performs a lot of important functions. By means of the
haemoglobin contained in the erythrocytes, it carries oxygen to the tissues and
collects the carbon dioxide (CO2). It also conveys nutritive substances (e.g.
amino acids, sugars, Mineral salts). Mostly in case of high severity diseases
where the mortality rates are more, the waiting time of patients for their reports
such as blood test, MRI is more. The time taken for generation of any of the test
is from 1-7 days. In high risk diseases like Hepatitis B, it is recommended that
the patient’s waiting time should be as less as possible and the treatment should
be started immediately. The current system used by the pathologists for
identification of blood parameters is costly and the time involved in generation
of the reports is also more sometimes leading to loss of patient’s life. Also the
pathological tests are expensive, which are sometimes not affordable by the
patient. Hence, there should be an automated system where the blood reports
should be generated in a very less time with as minimum cost as possible. The
proposed system would be an initiative to generate the blood test reports in
minimum time and will be cost effective. Currently the time taken by
pathologist is 1-7 days to generate the reports. The reports will get generated
after chemical treatments on blood samples which requires more time. It is also
costly as the instruments used for identification of the blood parameters are
costly. The patients suffer due to both these reasons physically as well as
mentally. In detection process several methods used for the segmentation of red
blood cell from white blood cell Using colour space model with the help of
MATLAB software.

11
4.2 SYSTEM OVERVIEW:

Leukemia is a cancer of the blood and bone marrow, the spongy tissue
confidential the bones where blood cells are made.The white blood cells
diseases are classified as leukaemia with its sub-types (AML, ALL) and
Myeloma. The signs and symptoms of leukemia are non-specific in nature and
also they are comparable to the symptoms of other mutual disorders. Manual
microscopic inspection of stained blood smear or bone marrow aspirate is the
only way to an effective diagnosis of leukemia. But this method is time
consuming and less accurate. In this system, a technique for automatic detection
and classification of leukemia and its sub-types in blood smear is presented. K-
means algorithm is used for segmentation. KNN, NN, and SVM are used for
classification. GLCM is used for optimizing the spectral features. The local
binary pattern is used for texture description. Blood microscope images were
tested and the performance of the classifier was analyzed.

4.3 BLOCK DIAGRAM

FIG 4.1BLOCK DIAGRAM OF PROPOSED SYSTEM

11
4.4 MODULES:

 PREPROCESSING
 SEGMENTATION
 FEATURE EXTRACTION
 CANCER TYPE CLASSIFICATION
4.5 MODULE DESCRIPTION

4.5.1 PREPROCESSING

The purpose of the pre-processing stage is to remove unwanted effects


such as noise from the image, and transform or adjust the image as necessary
for further processing. The resolution of the image is reduced by a factor of
four to 512x384 to speed up performance of the system. Also, the test images
will be subjected to selective median filtering and unsharp masking to isolate
noise which may have been accumulated during image acquisition and due to
excessive staining.

FIG 4.2 PREPROCESSING GRAPH

4.5.2SEGMENTATION

The technique of partitioning the image into segment can be defined as


image segmentation. Considering the similar property, segmentation is
implemented. This similar property is cluster together our propounded
11
approach implements Lloyd’s clustering technique which aids in the
segmentation of blood microscopic images on the basis of alike properties.
This technique broadens the k-mean clustering algorithm by introducing
repeated segmentation scheme which explores the centroid of each set in the
segment and eventually re-segments the input based on the closest centroid.
This technique aids in the extraction of important image characteristics, based
on which information can be easily perceived. A simple thresholding approach
is applied to give initial labels to pixels in the blood cell images. The algorithm
is based on apriority information about blood smear images. Then the labels are
adjusted with a shape detection method based on large regional context
information to produce meaningful results.

FIG4.3 BLOOD SMEAR CLUSTERING

4.5.2.1 K-MEANS CLUSTERING ALGORITHM:


The Κ-means clustering algorithm uses iterative refinement to produce
a final result. The algorithm inputs are the number of clusters  Κ and the data
set. The data set is a collection of features for each data point. The
algorithms starts with initial estimates for the Κ  centroids, which can either
be randomly generated or randomly selected from the data set. The
algorithm then iterates between two steps:

1. Dataassignment step:

Each centroid defines one of the clusters. In this step, each data point
is assigned to its nearest centroid, based on the squared Euclidean distance.
11
More formally, if ci is the collection of centroids in set C, then each data
point x is assigned to a cluster based on

argmindist(ci, x)2

c i∈ c

2. Centroid update step:

In this step, the centroids are recomputed. This is done by taking the
mean of all data points assigned to that centroid's cluster. The algorithm
iterates between steps one and two until a stopping criteria is met (i.e., no
data points change clusters, the sum of the distances is minimized, or some
maximum number of iterations is reached).
1
c i=
¿ S∨¿ ∑ x ¿ i
xi ∈s i

This algorithm is guaranteed to converge to a result. The result may be


a local optimum (i.e. not necessarily the best possible outcome), meaning
that assessing more than one run of the algorithm with randomized starting
centroids may give a better outcome.

3. Choosing K

The algorithm described above finds the clusters and data set labels
for a particular pre-chosen K. To find the number of clusters in the data, the
user needs to run the K-means clustering algorithm for a range of K values
and compare the results. In general, there is no method for determining exact
value of K, but an accurate estimate can be obtained using the following
techniques.

One of the metrics that is commonly used to compare results across


different values of K is the mean distance between data points and their
cluster centroid. Since increasing the number of clusters will always reduce
the distance to data points, increasing K will always decrease this metric, to
the extreme of reaching zero when K is the same as the number of data
points. Thus, this metric cannot be used as the sole target. Instead, mean
distance to the centroid as a function of K is plotted and the "elbow point,"
where the rate of decrease sharply shifts, can be used to roughly
determine K.

11
A number of other techniques exist for validating K, including cross-
validation, information criteria, the information theoretic jump method, the
silhouette method, and the G-means algorithm. In addition, monitoring the
distribution of data points across groups provides insight into how the
algorithm is splitting the data for each K.

4.5.3 FEATURE EXTRACTION

In pattern recognition and in image processing, feature extraction is a


special form of dimensionality reduction. When the input data to an algorithm is
too large to be processed and it is suspected to be notoriously redundant, then
the input data will be transformed into a reduced representation set of features.
Transforming the input data into the set of features is called feature extraction.
If the features extracted are carefully chosen it is expected that the features set
will extract the relevant information from the input data in order to perform the
desired task using this reduced representation instead of the full size input.
Feature extraction involves simplifying the amount of resources required to
describe a large set of data accurately. When performing analysis of complex
data one of the major problems stems from the number of variables involved.
Analysis with a large number of variables generally requires a large amount of
memory and computation power or a classification algorithm which over fits the
training sample and generalizes poorly to new samples. Feature extraction is a
general term for methods of constructing combinations of the variables to get
around these problems while still describing the data with sufficient accuracy.

Geometrical Features

'Area' -The actual number of pixels in the region.

‘Centroid' -Note that the first element of Centroid is the horizontal coordinate
(or x-coordinate) of the centre of mass, and the second element is the vertical
coordinate (or y-coordinate).

'Eccentricity' -Scalar that specifies the eccentricity of the ellipse that has the
same second-moments as the region. The eccentricity is the ratio of the distance
between the foci of the ellipse and its major axis length. The value is between 0
and 1.

'Equiv Diameter' -Scalar that specifies the diameter of a circle with the same
area as the region. Computed as sqrt(4*Area/pi).

11
'Extent' — Scalar that specifies the ratio of pixels in the region to pixels in the
total bounding box.

1. 'Major Axis Length' — Scalar specifying the length (in pixels) of the major axis
of the ellipse that has the same normalized second central moments as the
region.
2. 'Minor Axis Length' — Scalar; the length (in pixels) of the minor axis of the
ellipse that has the same normalized second central moments as the region.
3. 'Orientation' — Scalar; the angle (in degrees ranging from -90 to 90 degrees)
between the x-axis and the major axis of the ellipse that has the same second-
moments as the region.
4. 'Perimeter' — Scalar; the distance around the boundary of the region. Region
props compute the perimeter by calculating the distance between each
adjoining pair of pixels around the border of the region.

FIG 4.4 EXTRACTING THE IMAGE FOR FEATURE PURPOSE


4.5.4 KNN Classification
The KNN binary (as two class) is given more accurate data classification
which beneficial to select k as an odd number which avoids the irregular data.
The KNN procedure is the technique in ML procedures: It is an object which
classified through a mainstream selection of its neighbours, with the
determination assigned occurrence for most mutual class amongst its k nearest
neighbours (k is a positive integer, classically small). Classically Euclidean
distance is used as the distance metric; however, this is only suitable for
endless variables. KNN is a new process that deliveries all available cases and

11
categorizes novel cases built on an evaluation quantity (e.g., distance
functions).KNN procedure is identical simple. It works built on a minimum
distance from the interrogation instance to the training samples to regulate the
K-nearest neighbours. The information for KNN procedure contains numerous
attribute which will be used to categorize. The information of KNN can be any
dimension scale from insignificant, to measurable scale.

FIG 4.5K-NEAREST NEIGHBOUR CLASSIFICATION


4.5.5 SUPPORT VECTOR MACHINE:
In machine learning, support-vector machines (SVMs, also support-
vector networks are supervised learning models with associated
learning algorithms that analyse data used for classification and regression
analysis. Given a set of training examples, each marked as belonging to one or
the other of two categories, an SVM training algorithm builds a model that
assigns new examples to one category or the other, making it a non-probabilistic
binary linear classifier (although methods such as plat scaling exist to use SVM
in a probabilistic classification setting). An SVM model is a representation of
the examples as points in space, mapped so that the examples of the separate
categories are divided by a clear gap that is as wide as possible. New examples
are then mapped into that same space and predicted to belong to a category
based on which side of the gap they fall. In addition to performing linear
classification, SVMs can efficiently perform a non-linear classification using
what is called the kernel trick, implicitly mapping their inputs into high-

11
dimensional feature spaces. When data is unlabelled, supervised learning is not
possible, and an unsupervised learning approach is required, which attempts to
find natural clustering of the data to groups, and then map new data to these
formed groups. The support-vector clustering algorithm, created
by havasiegemann and valdimirvapnik, applies the statistics of support vectors,
developed in the support vector machines algorithm, to categorize unlabeled
data, and is one of the most widely used clustering algorithms in industrial
applications.

4.5.6 NEURAL NETWORK


The proposed work uses features extracted from previous step as input to
ANN to classify whether it is analysis image. Neural networks or connectionist
systems are a computational model used in computer science and other research
disciplines, which is based on a large collection of simple neural units (artificial
neurons), loosely analogous to the observed behaviour of a biological brain's
axons. Each neural unit is connected with many others, and links can be
enhance or inhibit the activation state of adjoining neural units. Each individual
neural unit computes using summation function. The word network in the term
'artificial neural network' refers to the interconnections between the neurons in
the different layers of each system. An example system has three layers. The
first layer has input neurons which send data via synapses to the second layer of
neurons, and then via more synapses to the third layer of output neurons. More
complex systems will have more layers of neurons, some having increased
layers of input neurons and output neurons. The synapses store parameters
called "weights" that manipulate the data in the calculations. An Artificial
Neural Network (ANN) is an information processing paradigm that is inspired
by the way biological nervous systems. The key element of this paradigm is the
novel structure of the information processing system. It is composed of a large
number of highly interconnected processing elements (neurones) working in

11
unison to solve specific problems. ANNs, like people, learn by example. An
ANN is configured for a specific application, such as pattern recognition or data
classification, through a learning process. Learning in biological systems
involves adjustments to the synaptic connections that exist between the neurons.
This is true of ANNs as well.
4.6 Advantages of Proposed System:

 Nucleus segmentation is performed well in this technique.


 It can be used for both classification and regression.
 Both acute and chronic type of myeloma and leukemia will be detected.
 Better accuracy and diseased cell count is obtained.

11
CHAPTER 5

SYSTEM DESIGN

5.1. RGB COLOR IMAGE:


The RGB colour model is an additive colour model in which red, green
and blue light are added together in various ways to reproduce a broad array
of colours. The name of the model comes from the initials of the three additive
primary colours, red, green, and blue.

The main purpose of the RGB colour model is for the sensing,
representation, and display of images in electronic systems, such as televisions
and computers, though it has also been used in conventional photography.
Before the electronic age, the RGB colour model already had a solid theory
behind it, based in human perception of colours. RGB is a device-
dependent colour model: different devices detect or reproduce a given RGB
value differently, since the colour elements (such as phosphors or dyes) and
their response to the individual R, G, and B levels vary from manufacturer to
manufacturer, or even in the same device over time. Thus an RGB value does
not define the same colour across devices without some kind of colour
management. Typical RGB input devices are colour TV and video
cameras, image scanners, and digital cameras. Typical RGB output devices are
TV sets of various technologies (CRT, LCD, plasma, etc.) computer and mobile
phones and displays, video projectors, multicolour LED displays, and large
screens such as Jumbo tron. Colour printers, on the other hand, are not RGB
devices, but subtractive colour devices (typically CMYK colour model).

11
Fig 5.1 RGB colour image

5.2 GRAYSCALE:

In photography and computing, a grey scale or greyscale digital image is


an image in which the value of each pixel is a single sample, that is, it carries
only intensity information. Images of this sort, also known as black-and-white,
are composed exclusively of shades of grey, varying from black at the weakest
intensity to white at the strongest.

Grey scale images are distinct from one-bit bi-tonal black-and-white


images, which in the context of computer imaging are images with only the
two colours, black, and white (also called bit level or binary images). Grey
scale images have many shades of gray in between. Gray scale images are also
called monochromatic, denoting the presence of only one (mono) colour
(chrome).

Gray scale images are the often the results of measuring the intensity of
light at each pixel in a single band of the electromagnetic spectrum (e.g.
infrared, visible light, ultraviolet, etc.), and in such cases they are
monochromatic proper when only a given frequency is captured. But also they
can be synthesized from a full colour images; see the section about converting
to gray scale. Example of gray scale image is given below

11
FIG, 5.2 GRAY SCALE IMAGE

5.3 MORPHOLOGICAL OPERATIONS:


To find the exact features we have to segment the lung region from the
chest CT scan image for easy computation. For segmenting the lung region
from the chest CT scan image morphological operation is carried out.

We defined an image as an (amplitude) function of two, real (coordinate)


variables a(x,y) or two, discrete variables a[m,n]. An alternative definition of
an image can be based on the notion that an image consists of a set (or
collection) of either continuous or discrete coordinates. In a sense the set
corresponds to the points or pixels that belong to the objects in the image. This
is illustrated in figure below which contains two objects or sets A and B. Note
that the coordinate system is required.

FIG 5.3 TWO OBJECTS OR SETS A

The object A consists of those pixels athat share some common property:

11
A={ α ∨ property ( α )=¿TRUE }

As an example, object B consists of {[0,0], [1,0], [0,1]}.

The background of A is given by Ac (the complement of A) which is


defined as those elements that are not in A:

AC ={ α ∨α ∉ A }

We introduced the concept of neighbourhood connectivity. We now


observe that if an object A is defined on the basis of C-connectivity (C=4, 6, or
8) then the background Ac has a connectivity given by 12 - C.

FIG 5.4 FINDING

5.3.1 GRAY-VALUE MORPHOLOGICAL PROCESSING


The techniques of morphological filtering can be extended to gray-level
images. To simplify matters we will restrict our presentation to structuring
elements, B, that comprise a finite number of pixels and are convex and
bounded.

In many situations the seeming complexity of gray level morphological


processing is significantly reduced through the use of symmetric structuring
elements where b[j,k] = b[-j,-k]. The most common of these is based on the use
of B = constant = 0. For this important case and using again the domain[ j , k ] ∈ B
, the definitions above reduce to:

11
Dilation:

DG ( A , B)= max { a [ m− j , n−k ] }=¿ max ( A )¿


[ j , k] ϵB B

Erosion:

EG ( A , B)= min { a [ m− j, n−k ] }=¿ min ( A)¿


[ j ,k ]ϵB B

Opening:

O G ( A , B)=max ¿ ¿
B

Closing:

C G ( A , B)=min ¿¿
B

The remarkable conclusion is that the maximum filter and


the minimum filterare gray-level dilation and gray-level erosion for the specific
structuring element given by the shape of the filter window with the gray value
"0" inside the window.

5.3.2 MORPHOLOGICAL FILTERING OF GRAY-LEVEL DATA

For a rectangular window, J x K, the two-dimensional maximum or


minimum filter is separable into two, one-dimensional windows. Further, a
one-dimensional maximum or minimum filter can be written in incremental
form. This means that gray-level dilations and erosions have a computational
complexity per pixel that is O (constant), that is, independent of J and K. The
operations defined above can be used to produce morphological algorithms for
smoothing, gradient determination and a version of the Laplacian. All are
constructed from the primitives for gray-level dilation and gray-
level erosion and in all cases the maximum and minimum filters are taken over
the domain[ j , k ] ∈ B .

11
5.3.3 MORPHOLOGICAL SMOOTHING
This algorithm is based on the observation that a gray-
level opening smoothes a gray-value image from above the brightness surface
given by the function a[m,n] and the gray-level closing smoothes from below.
We use a structuring element B based on equation

Morphsmooth ( A , B )=C o ( Oo ( A , B ) , B )
¿ min( max(max (min ( A ) )))

Note that we have suppressed the notation for the structuring


element B under the max and min operations to keep the notation simple. Its
use, however, is understood.

5.3.4 MORPHOLOGICAL GRADIENT


For linear filters the gradient filter yields a vector representation with a
magnitude and direction. The version presented here generates a morphological
estimate of the gradient magnitude:

5.3.5 MORPHOLOGICAL LAPLACIAN


The morphologically-based Laplacian filter is defined by:

5.4 K-NEAREST NEIGHBOUR ALGORITHM

Let’s consider a setup with “n” training samples, where x i is the training
data point. The training data points are categorized into “c” classes. Using
KNN, we want to predict class for the new data point. So, the first step is to
calculate the distance (Euclidean) between the new data point and all the
training data points.

11
Next step is to arrange all the distances in non-decreasing order.
Assuming a positive value of “K” and filtering “K” least values from the sorted
list. Now, we have K top distances. Let k i denotes no. of points belonging to the
ith class among k points. If ki >kj ∀i ≠ j then put x in class i.Nearestneighbour is
a special case of k-nearest neighbour class. Where k value is 1 (k = 1). In this
case, new data point target class will be assigned to the 1st closest neighbour.

5.4.1 SELECTION OF K VALUE

Selecting the value of K in K-nearest neighbour is the most critical


problem. A small value of K means that noise will have a higher influence on
the result i.e., the probability of over fitting is very high. A large value of K
makes it computationally expensive and defeats the basic idea behind KNN
(that points that are near might have similar classes). A simple approach to
select k is k = n^ (1/2). To optimize the results, we can use Cross Validation.
Using the cross-validation technique, we can test KNN algorithm with different
values of K. The model which gives good accuracy can be considered to be an
optimal choice. It depends on individual cases, at times best process is to run
through each possible value of k and test our result.

Start

Initialization, define
k
Compute the distance between input sample and the training
samples

Sort the distance

Take K nearest
neighbours
11
Apply simple majority

End
FIG 5.5 KNN CLASSIFICATION

5.4.2 ADVANTAGES OF K-NEAREST NEIGHBOUR’S ALGORITHM

 KNN is simple to implement.


 KNN executes quickly for small training data sets.
 Performance asymptotically approaches the performance of the Bayes
Classifier.
 Does not need any prior knowledge about the structure of data in the
training set.
 No retraining is required if the new training pattern is added to the
existing training set.
5.5 SUPPORT VECTOR MACHINES (KERNELS)

The SVM algorithm is implemented in practice using a kernel.

FIG 5.6 SUPPORT VECTOR

The learning of the hyper plane in linear SVM is done by transforming


the problem using some linear algebra, which is out of the scope of this
introduction to SVM.A powerful insight is that the linear SVM can be rephrased

11
using the inner product of any two given observations, rather than the
observations themselves. The inner product between two vectors is the sum of
the multiplication of each pair of input values.

The equation for making a prediction for a new input using the dot
product between the input (x) and each support vector (xi) is calculated as
follows:

f(x) = B0 + sum(ai * (x, xi))

This is an equation that involves calculating the inner products of a new


input vector (x) with all support vectors in training data. The coefficients B0
and ai (for each input) must be estimated from the training data by the learning
algorithm.

Linear Kernel SVM

The dot-product is called the kernel and can be re-written as:

K(x, xi) = sum(x * xi)

The kernel defines the similarity or a distance measure between new data
and the support vectors. The dot product is the similarity measure used for
linear SVM or a linear kernel because the distance is a linear combination of the
inputs.

Other kernels can be used that transform the input space into higher
dimensions such as a Polynomial Kernel and a Radial Kernel. This is called
the Kernel Trick.It is desirable to use more complex kernels as it allows lines to
separate the classes that are curved or even more complex. This in turn can lead
to more accurate classifiers.

11
Polynomial Kernel SVM

Instead of the dot-product, we can use a polynomial kernel

K(x, xi) = 1 + sum(x * xi) ^d

The degree of the polynomial must be specified by hand to


learnthealgorithm. When d=1 this is the same as the linear kernel. The
polynomial kernel allows for curved lines in the input space.

Radial Kernel SVM


Finally, we can also have a more complex radial kernel. For example:

K(x, xi) = exp (-gamma * sum ((x – xi^2))

The gamma is a parameter that must be specified to the learning algorithm. A


good default value for gamma is 0.1, where gamma is often 0 < gamma < 1. The
radial kernel is very local and can create complex regions within the feature
space, like closed polygons in two-dimensional space.

5.5.1 SVM Advantages


 SVM’s are very good when we have no idea on the data.
 Works well with even unstructured and semi structured data like text,
Images and trees.
 The kernel trick is real strength of SVM. With an appropriate kernel
function, we can solve any complex problem.
 Unlike in neural networks, SVM is not solved for local optima.
 It scales relatively well to high dimensional data.
 SVM models have generalization in practice, the risk of over fitting is
less in SVM

5.5.2 APPLICATIONS OF SVM:

11
 Face detection 
 Text and hypertext categorization 
 Classification of images 
 Bioinformatics Protein fold and remote homology detection 
 Generalized predictive control(GPC)
5.6 ARTIFICIAL NEURAL NETWORK
ANNs are capable of learning and they need to be trained. There are several
learning strategies

 Supervised Learning − It involves a teacher that is scholar than the


ANN itself. For example, the teacher feeds some example data about
which the teacher already knows the answers. The ANN comes up with
guesses while recognizing. Then the teacher provides the ANN with the
answers. The network then compares it guesses with the teacher’s
“correct” answers and makes adjustments according to errors.
 Unsupervised Learning − It is required when there is no example data
set with known answers. For example, searching for a hidden pattern. In
this case, clustering i.e. dividing a set of elements into groups according
to some unknown pattern is carried out based on the existing data sets
present.
 Reinforcement Learning − this strategy built on observation. The ANN
makes a decision by observing its environment. If the observation is
negative, the network adjusts its weights to be able to make a different
required decision the next time.

11
FIG 5.7 DECISION FROM ARTIFICIAL NEURAL NETWORK

Back Propagation Algorithm


It is the training or learning algorithm. It learns by example. If you
submit to the algorithm the example of what you want the network to do, it
changes the network’s weights so that it can produce desired output for a
particular input on finishing the training. Back Propagation networks are ideal
for simple Pattern Recognition and Mapping Tasks.

Bayesian Networks (BN)

These are the graphical structures used to represent the probabilistic


relationship among a set of random variables. Bayesian networks are also
called Belief Networks or Bayes Nets. BNs reason about uncertain domain.

In these networks, each node represents a random variable with specific


propositions. The edges connecting the nodes represent probabilistic
dependencies among those random variables. If out of two nodes, one is
affecting the other then they must be directly connected in the directions of the
effect. The strength of the relationship between variables is quantified by the
probability associated with each node. There is an only constraint on the arcs in
a BN that you cannot return to a node simply by following directed arcs. Hence
the BNs are called Directed Acyclic Graphs (DAGs).

BNs are capable of handling multivalue variables simultaneously. The


BN variables are composed of two dimensions −

 Range of prepositions

 Probability assigned to each of the prepositions.

5.6.1 ADVANTAGES:
11
 ANNs have the ability to learn and model non-linear and complex
relationships.
 ANNs can generalize — after learning from the initial inputs and their
relationships.
 Unlike many other prediction techniques, ANN does not impose any
restrictions on the input variables.
5.6.2 APPLICATIONS:

 Image Processing and Character recognition


 Forecasting

CHAPTER 6

HARDWARE REQUIREMENTS

6.1 MAX232 IC

The MAX-232 IC is an integrated circuit which consists of 16 pins and it


is a resourceful IC mostly used in the voltage level signal problems. Generally,
the MAX-232 IC is used in the RS232 communication system for the
conversion of voltage levels on TTL devices that are interfaced with the PC
serial port and the Microcontroller. This IC is used as a hardware layer
converter like to communicate two systems simultaneously. 

An interfacing is a microprocessor which is used to connect various


peripherals to carry out various operations to get a preferred output. There are
two different types of interfacing first one is memory interfacing and the other
one is I/O interfacing. The memory interface is used for the microprocessor to
access the memory which is continuously stored in the memory in the form of
reading and writing data. It is used for specific register for reading and writing
the data in the memory chip. I/O interfacing is done by the inputs which are
keyboards and display monitors are outputs with the microprocessor.

11
6.1.1 Pin Description of MAX-232 IC:

The MAX-232 IC is used to exchange the TTL/CMOS logic to RS232


logic levels through the serial communication of Microcontroller with the
personal computers. The microcontroller operates at the TTL logic levels with
the voltage of 0-5v, and the serial communication with PC works on the RS232
with the volts of -25V to +25V. The difference of voltage will become the
makes difficult to establish the communication with each other.

FIG 6.1MAX-232 IC

The in-between links are provided through the MAX232 interface, it is a


transmitter/receiver which includes the voltage generator to the supply of
RS232 voltage levels through the 5V supply. The RS232 input converts to 5V
TTL/COMS level through these receivers, i.e. R1 and R2 do not exclude the +-
30V. The transmitters T1 and T2 are used to convert the TTL/COMS input
levels to RS232 level.

The transmitter obtains input from the microcontrollers and


microprocessors through serial transmission pins and the output is given to the
receiver of RS232. The receiver on the other side obtains the input from
transmission pin of RS232 serial port and the output is given to the receiver pin

11
of the microcontroller. The external capacitor is added to the MAX232 with a
range of 1µF to 22µF.

6.1.2 Types of MAX-232 IC

There are two different types of MAX232 IC’s are MAX232N and the
other one is MAX232D. Where in the MAX232N “N” represents the PDIP
package style and it is used widely with low price. In the MAX232D “D”
represents the SOIC package this type of packages is used correctly by the
trained professionals.

6.1.3 MAX-232 IC Interfacing

There are different types of MAX232 interface which are shown below
with clear information and diagrams

6.1.4 PC Serial Port Communication by using MAX-232 IC

The following diagram gives the information about the PC serial port
communication through the MAX232 interface. We can see the DB9 packages
to the desktops and some old laptops. From the DB9 package pins we can use
only two pins which are transmitter (Tx) and receiver (Rx)

11
FIG 6.2 PC SERIAL PORT COMMUNICATION THROUGH THE MAX232
INTERFACE

The diagram consists of two drivers once the driver is used for circuit
purpose and the other one is second drive it is used for the other purpose. There
are two pins, i.e. Pin 11 and pin 12 are obtained from the TTL data and these
two pins are attached to the Microcontroller.

6.1.5 RxD and TxD Pins of 8051

The 8051 Microcontroller has two pins which are used for the


transmitting and receiving the data continuously. The two pins are TxD and
RxD these two pins are pin11 and pin10 to the 8051 Microcontroller and these
are from the port 3. The two pins are TTL compatible; hence it requires line
drivers to make it as an RS232 compatible.

The RS232 is not a compatible in the microprocessors and


microcontrollers using through the voltage converter we can convert the RS232
signal to TTL voltage which are acceptable to the 8051 pins i.e. TxD and RxD.
The MAX232 converts the voltage levels of RS232 to TTL voltage and the
operation is done in vise versa. We can see once example of a converter is
MAX232 from Maxim Corp. The power supply of MAX232 and 8051
Microcontroller has same power supply, i.e. +5v hence we don’t use the dual
power supplies.

6.2Applications of MAX-232 IC

 Interface Transactions
 Low power modes
 Battery powered RS232 system
 RS232 networks
 Portable Computing

11
6.3 Arduino Uno

Arduino is a single-board microcontroller meant to make the application


more accessible which are interactive objects and its surroundings. The
hardware features with an open-source hardware board designed around an 8-bit
Atmel AVR microcontroller or a 32-bit Atmel ARM. Current models consists a
USB interface, 6 analog input pins and 14 digital I/O pins that allows the user to
attach various extension boards.

The Arduino Uno board is a microcontroller based on the ATmega328. It


has 14 digital input/output pins in which 6 can be used as PWM outputs, a 16
MHz ceramic resonator, an ICSP header, a USB connection, 6 analog inputs, a
power jack and a reset button. This contains all the required support needed for
microcontroller. In order to get started, they are simply connected to a computer
with a USB cable or with a AC-to-DC adapter or battery. Arduino Uno Board
varies from all other boards and they will not use the FTDI USB-to-serial driver
chip in them. It is featured by the Atmega16U2 (Atmega8U2 up to version R2)
programmed as a USB-to-serial converter.

FIG 6.3 ARDUINO UNO BOARD

There are various types of Arduino boards in which many of them were
third-party compatible versions. The most official versions available are the
Arduino Uno R3 and the Arduino Nano V3. Both of these run a 16MHz Atmel

11
ATmega328P 8-bit microcontroller with 32KB of flash RAM 14 digital I/O and
six analogues I/O and the 32KB will not sound like as if running Windows.
Arduino projects can be stand-alone or they can communicate with software on
running on a computer. For e.g. Flash, Processing, and Max/MSP). The board is
clocked by a 16 MHz ceramic resonator and has a USB connection for power
and communication. 

6.3.1 Technical specifications

 Microcontroller: Microchip ATmega328P
 Operating Voltage: 5 Volts
 Input Voltage: 7 to 20 Volts
 Digital I/O Pins: 14 (of which 6 provide PWM output)
 Analog Input Pins: 6
 DC Current per I/O Pin: 20 mA
 DC Current for 3.3V Pin: 50 mA
 Flash Memory: 32 KB of which 0.5 KB used by bootloader
 SRAM: 2 KB
 EEPROM: 1 KB
 Clock Speed: 16 MHz
 Length: 68.6 mm
 Width: 53.4 mm
 Weight: 25 g
6.3.2 ATmega168/328-Arduino Pin Mapping

11
FIG 6.4ATMEGA 168/328-ARDUINO PIN MAPPING

6.3.3 General Pin functions:

 LED: There is a built-in LED driven by digital pin 13. When the pin is
HIGH value, the LED is on, when the pin is LOW, it's off.
 VIN: The input voltage to the Arduino/Genuino board when it's using an
external power source (as opposed to 5 volts from the USB connection or
other regulated power source). You can supply voltage through this pin,
or, if supplying voltage via the power jack, access it through this pin.
 5V: This pin outputs a regulated 5V from the regulator on the board. The
board can be supplied with power either from the DC power jack (7 -
20V), the USB connector (5V), or the VIN pin of the board (7-20V).
Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can
damage the board.
 3V3: A 3.3 volt supply generated by the on-board regulator. Maximum
current draw is 50 mA.
 GND: Ground pins.

11
 IOREF: This pin on the Arduino/Genuino board provides the voltage
reference with which the microcontroller operates. A properly configured
shield can read the IOREF pin voltage and select the appropriate power
source or enable voltage translators on the outputs to work with the 5V or
3.3V.
 RESET: Typically used to add a reset button to shields which block the
one on the board.
Special Pin Functions:

Each of the 14 digital pins and 6 Analog pins on the Uno can be used as
an input or output, using pinMode(),digitalWrite(), and digitalRead() functions.
They operate at 5 volts. Each pin can provide or receive 20 mA as
recommended operating condition and has an internal pull-up resistor
(disconnected by default) of 20-50k ohm. A maximum of 40mA is the value
that must not be exceeded on any I/O pin to avoid permanent damage to the
microcontroller. The Uno has 6 analog inputs, labeled A0 through A5, each of
which provide 10 bits of resolution (i.e. 1024 different values). By default they
measure from ground to 5 volts, though is it possible to change the upper end of
their range using the AREF pin and the analogReference() function

In addition, some pins have specialized functions:

Serial / UART: pins 0 (RX) and 1 (TX). Used to receive (RX) and transmit
(TX) TTL serial data. These pins are connected to the corresponding pins of the
ATmega8U2 USB-to-TTL Serial chip.

External Interrupts: pins 2 and 3. These pins can be configured to trigger an


interrupt on a low value, a rising or falling edge, or a change in value.

PWM (Pulse Width Modulation): 3, 5, 6, 9, 10, and 11 Can provide 8-bit PWM


output with the analogWrite() function.

11
SPI (Serial Peripheral Interface): 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK).
These pins support SPI communication using the SPI library.

TWI (Two Wire Interface) / I²C: A4 or SDA pin and A5 or SCL pin. Support


TWI communication using the Wire library.

AREF (Analog REFerence): Reference voltage for the analog inputs.

6.3.4 Features of the Arduino Uno Board:

 It is an easy USB interface. This allows interface with USB as this is like
a serial device.
 The chip on the board plugs straight into your USB port and supports on
your computer as a virtual serial port. The benefit of this setup is that
serial communication is an extremely easy protocol which is time-tested
and USB makes connection with modern computers and makes it
comfortable.
 It is easy-to-find the microcontroller brain which is the ATmega328 chip.
It has more number of hardware features like timers, external and internal
interrupts, PWM pins and multiple sleep modes.
 It is an open source design and there is an advantage of being open source
is that it has a large community of people using and troubleshooting it.
This makes it easy to help in debugging projects.
 It is a 16 MHz clock which is fast enough for most applications and does
not speeds up the microcontroller.
 It is very convenient to manage power inside it and it had a feature of
built-in voltage regulation. This can also be powered directly off a USB
port without any external power. You can connect an external power
source of upto 12v and this regulates it to both 5v and 3.3v.
 13 digital pins and 6 analog pins. This sort of pins allows you to connect
hardware to your Arduino Uno board externally. These pins are used as a

11
key for extending the computing capability of the Arduino Uno into the
real world. Simply plug your electronic devices and sensors into the
sockets that correspond to each of these pins and you are good to go.
 It has a 32 KB of flash memory for storing your code.
 An on-board LED is attached to digital pin 13 to make fast the debugging
of code and to make the debug process easy.
 Finally, it has a button to reset the program on the chip.
 Arduino uno microcontroller can sense the environment by receiving
input from a variety of sensors and can affect its surroundings by
controlling lights, motors, and other actuators. The microcontroller is
programmed using the Arduino programming language (based on Wiring)
and the Arduino development environment (based on Processing).
6.3.5 Programming:

 The Arduino integrated development environment (IDE) is a cross-


platform application written in Java, and is derived from the IDE for the
Processing programming language and the Wiring projects
 The Arduino Uno board can be programmed with the Arduino software.
 Select “Arduino Uno from the Tools > Board menu (according to the
microcontroller on your upload new code to it without the use of an
external hardware programmer. It communicates board).
 The ATmega328 on the Arduino Uno comes preburned with a bootloader
that allows you to using the original STK500 protocol.
 You can also bypass the bootloader and program the
microcontroller through the ICSP (In-Circuit Serial Programming)
header.
 The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source
code is available.
6.3.6 Applications of Arduino Uno Board:

11
 Arduino Based Home Automation System
 Arduino based Auto Intensity Control of Street Lights
6.4 LCD

LCD (Liquid Crystal Display) screen is an electronic display module and


find a wide range of applications. A 16x2 LCD display is very basic module and
is very commonly used in various devices and circuits. These modules are
preferred over seven segments and other multi segment LEDs. The reasons
being: LCDs are economical; easily programmable; have no limitation of
displaying special & even custom character (unlike in seven segment) animation
and so on.A 16x2 LCD means it can display 16 characters per line and there are
2 such lines. In this LCD each character is displayed in 5x7 pixel matrix. This
LCD has two registers, namely, Command and Data.

RS (Register select)

A 16X2 LCD has two registers, namely, command and data. The register
select is used to switch from one register to other. RS=0 for command register,
whereas RS=1 for data register.

Command Register: The command register stores the command instructions


given to the LCD. A command is an instruction given to LCD to do a
predefined task like initializing it, clearing its screen, setting the cursor position,
controlling display etc. Processing for commands happens in the command
register.

Data Register:  The data register stores the data to be displayed on the LCD.
The data is the ASCII value of the character to be displayed on the LCD. When
we send data to LCD it goes to the data register and is processed there. When
RS=1, data register is selected.

6.4.1 Pin Description: 

11
FIG 6.5 PIN

Pin No Function Function


1 Ground (0V) Ground
2
Supply voltage; 5V (4.7V – 5.3V)  Vcc
3 Contrast adjustment; through a variable
 VEE
resistor
4 Selects command register when low; and data
Register Select
register when high
5 Low to write to the register; High to read from
Read/write
the register
6 Sends data to data pins when a high to low
Enable
pulse is given
7
DB0
8
DB1
9
DB2
10 8-bit data pins
DB3
11
DB4

11
12
DB5
13
DB6
14 DB7
15
Backlight VCC (5V) Led+
16 Backlight Ground (0V) Led-
Table 6.1 LCD pin description

Generating custom characters on LCD is not very hard. It requires the


knowledge about custom generated random access memory (CG-RAM) of LCD
and the LCD chop controller. Most LCDs contain Hitachi HD4478 controller.
CG-RAM is the main component in making custom characters. It stores the
custom characters once declared in the code. CG-Ram size is 64 byte providing
the option of creating eight characters of time. Each character is eight byte in
size.CG-RAM address starts from 0x40 (Hexadecimal) or 64 in decimal. We
can generate custom characters at these addresses. Once we generate our
characters at these addresses, now we can print them on the KCD at any time by
just sending simple commands to the LCD.

6.5Applications of Liquid Crystal Display

 Liquid crystal thermometer


 Optical imaging
 The liquid crystal display technique is also applicable in visualization of
the radio frequency waves in the waveguide
 Used in the medical applications

11
CHAPTER 7

SOFTWARE REQUIREMENTS

7.1 GENERAL

MATLAB (matrix laboratory) is a numerical computing environment


and fourth-generation programming language. Developed by Math Works,
MATLAB allows matrix manipulations, plotting of functions and data,
implementation of algorithms, creation of user interfaces, and interfacing with
programs written in other languages, including C, C++, Java, and FORTRAN.

Although MATLAB is intended primarily for numerical computing, an


optional toolbox uses the MuPADsymbolic engine, allowing access to symbolic
computing capabilities. An additional package, Simulink, adds graphical multi-
domain simulation and Model-Based Design for dynamic and embedded
systems.

MATLAB was first adopted by researchers and practitioners in control


engineering, Little's specialty, but quickly spread to many other domains. It is
now also used in education, in particular the teaching of linear
algebra and numerical analysis, and is popular amongst scientists involved
in image processing. The MATLAB application is built around the MATLAB

11
language. The simplest way to execute MATLAB code is to type it in the
Command Window, which is one of the elements of the MATLAB Desktop.
When code is entered in the Command Window, MATLAB can be used as an
interactive mathematical shell. Sequences of commands can be saved in a text
file, typically using the MATLAB Editor, as a script or encapsulated into
a function, extending the commands available.

MATLAB provides a number of features for documenting and sharing


your work. You can integrate your MATLAB code with other languages and
applications, and distribute your MATLAB algorithms and applications.

7.2 FEATURES OF MATLAB

 High-level language for technical computing.


 Development environment for managing code, files, and data.
 Interactive tools for iterative exploration, design, and problem solving.
 Mathematical functions for linear algebra, statistics, Fourier analysis,
filtering, optimization, and numerical integration.
 2-D and 3-D graphics functions for visualizing data.
 Tools for building custom graphical user interfaces.
 Functions for integrating MATLAB based algorithms with external
applications and languages, such as C, C++, FORTRAN, Java™, COM,
and Microsoft Excel.

MATLAB is used in vast area, including signal and image processing,


communications, control design, test and measurement, financial modelling
and analysis, and computational. Add-on toolboxes (collections of special-
purpose MATLAB functions) extend the MATLAB environment to solve
particular classes of problems in these application areas.

11
MATLAB can be used on personal computers and powerful server
systems, including the Cheaha compute cluster. With the addition of the
Parallel Computing Toolbox, the language can be extended with parallel
implementations for common computational functions, including for-loop
unrolling. Additionally this toolbox supports offloading computationally
intensive workloads to Cheaha the campus compute cluster. MATLAB is one
of a few languages in which each variable is a matrix (broadly construed) and
"knows" how big it is. Moreover, the fundamental operators (e.g. addition,
multiplication) are programmed to deal with matrices when required. And the
MATLAB environment handles much of the bothersome housekeeping that
makes all this possible. Since so many of the procedures required for Macro-
Investment Analysis involves matrices, MATLAB proves to be an extremely
efficient language for both communication and implementation.

7.2.1 INTERFACING WITH OTHER LANGUAGES

MATLAB can call functions and subroutines written in the C


programming language or FORTRAN. A wrapper function is created allowing
MATLAB data types to be passed and returned. The dynamically loadable
object files created by compiling such functions are termed "MEX-files"
(for MATLAB executable).

Libraries written in Java, ActiveX or .NET can be directly called from


MATLAB and many MATLAB libraries (for example XML or SQL support)
are implemented as wrappers around Java or ActiveX libraries. Calling
MATLAB from Java is more complicated, but can be done with MATLAB
extension, which is sold separately by Math Works, or using an undocumented
mechanism called JMI (Java-to-Mat lab Interface), which should not be
confused with the unrelated Java that is also called JMI.

11
As alternatives to the MuPAD based Symbolic Math Toolbox available
from Math Works, MATLAB can be connected to Maple or Mathematical.

Libraries also exist to import and export MathML.

Development Environment

 Startup Accelerator for faster MATLAB startup on Windows, especially


on Windows XP, and for network installations.
 Spreadsheet Import Tool that provides more options for selecting and
loading mixed textual and numeric data.
 Readability and navigation improvements to warning and error messages
in the MATLAB command window.
 Automatic variable and function renaming in the MATLAB Editor.

7.2.2 Developing Algorithms and Applications

MATLAB provides a high-level language and development tools that let


you quickly develop and analyze your algorithms and applications.

The MATLAB Language

The MATLAB language supports the vector and matrix operations that
are fundamental to engineering and scientific problems. It enables fast
development and execution. With the MATLAB language, you can program
and develop algorithms faster than with traditional languages because you do
not need to perform low-level administrative tasks, such as declaring variables,
specifying data types, and allocating memory. In many cases, MATLAB
eliminates the need for ‘for’ loops. As a result, one line of MATLAB code can
often replace several lines of C or C++ code.

At the same time, MATLAB provides all the features of a traditional


programming language, including arithmetic operators, flow control, data
11
structures, data types, object-oriented programming (OOP), and debugging
features.

MATLAB lets you execute commands or groups of commands one at a


time, without compiling and linking, enabling you to quickly iterate to the
optimal solution. For fast execution of heavy matrix and vector computations,
MATLAB uses processor-optimized libraries. For general-purpose scalar
computations, MATLAB generates machine-code instructions using its JIT
(Just-In-Time) compilation technology.

This technology, which is available on most platforms, provides


execution speeds that rival those of traditional programming languages.

Development Tools

MATLAB includes development tools that help you implement your


algorithm efficiently. These include the following:

MATLAB Editor 

Provides standard editing and debugging features, such as setting


breakpoints and single stepping

Code Analyzer 

Checks your code for problems and recommends modifications to


maximize performance and maintainability

MATLAB Profiler 

Records the time spent executing each line of code

Directory Reports 

Scan all the files in a directory and report on code efficiency, file
differences, file dependencies, and code coverage.

11
Designing Graphical User Interfaces

By using the interactive tool GUIDE (Graphical User Interface


Development Environment) to layout, design, and edit user interfaces. GUIDE
lets you include list boxes, pull-down menus, push buttons, radio buttons, and
sliders, as well as MATLAB plots and Microsoft ActiveX ® controls.
Alternatively, you can create GUIs programmatically using MATLAB
functions.

7.2.3 ANALYZING AND ACCESSING DATA

MATLAB supports the entire data analysis process, from acquiring data
from external devices and databases, through pre-processing, visualization, and
numerical analysis, to producing presentation-quality output.

Data Analysis

 MATLAB provides interactive tools and command-line functions for data


analysis operations, including:
 Interpolating and decimating
 Extracting sections of data, scaling, and averaging
 Thresholding and smoothing
 Correlation, Fourier analysis, and filtering
 1-D peak, valley, and zero finding
 Basic statistics and curve fitting
 Matrix analysis
Data Access

MATLAB is an efficient platform for accessing data from files, other


applications, databases, and external devices. You can read data from popular
file formats, such as Microsoft Excel; ASCII text or binary files; image, sound,
and video files; and scientific files, such as HDF and HDF5. Low-level binary

11
file I/Ofunctions let you work with data files in any format. Additional
functions let you read data from Web pages and XML.

Visualizing Data

All the graphics features that are required to visualize engineering and
scientific data are available in MATLAB. These include 2-D and 3-D plotting
functions, 3-D volume visualization functions, tools for interactively creating
plots, and the ability to export results to all popular graphics formats. You can
customize plots by adding multiple axes; changing line colours and markers;
adding annotation, Latex equations, and legends; and drawing shapes.

2-D Plotting

Visualizing vectors of data with 2-D plotting functions that create:

 Line, area, bar, and pie charts.


 Direction and velocity plots.
 Histograms.
 Polygons and surfaces.
 Scatter/bubble plots.
 Animations.
3-D Plotting and Volume Visualization

MATLAB provides functions for visualizing 2-D matrices, 3-D scalar,


and 3-D vector data. You can use these functions to visualize and understand
large, often complex, multidimensional data. Specifying plot characteristics,
such as camera viewing angle, perspective, lighting effect, light source
locations, and transparency.

3-D plotting functions include:

 Surface, contour, and mesh.

11
 Image plots.
 Cone, slice, stream, and isosurface.
7.2.4 PERFORMING NUMERIC COMPUTATION

MATLAB contains mathematical, statistical, and engineering functions


to support all common engineering and science operations. These functions,
developed by experts in mathematics, are the foundation of the MATLAB
language. The core math functions use the LAPACK and BLAS linear algebra
subroutine libraries and the FFTW Discrete Fourier Transform library. Because
these processor-dependent libraries are optimized to the different platforms that
MATLAB supports, they execute faster than the equivalent C or C++ code.

MATLAB provides the following types of functions for performing


mathematical operations and analyzing data:

 Matrix manipulation and linear algebra.


 Polynomials and interpolation.
 Fourier analysis and filtering.
 Data analysis and statistics.
 Optimization and numerical integration.
 Ordinary differential equations (ODEs).
 Partial differential equations (PDEs).
7.2.5 HARDWAREREQUIREMENTS:
 Processor : Pentium Dual Core 2.00GHZ
 Hard Disk : 40 GB
 RAM : 2GB (minimum)
 Keyboard : 110 keys enhanced

7.2.6SOFTWAREREQUIREMENTS:
 MATLAB 7.14 Version R2016a
11
CHAPTER 8
RESULTS

8.1 GENERAL

MATLAB is a program that was originally designed to simplify the


implementation of numerical linear algebra routines. It has since grown into
something much bigger, and it is used to implement numerical algorithms for a
wide range of applications. The basic language used is very similar to standard
linear algebra notation, but there are a few extensions that will likely cause you
some problems at first.

8.2 SNAPSHOTS

1)INPUT IMAGE:

11
FIG 8.1 INPUT IMAGE

2)GRAY CONVERTED IMAGE:

FIG 8.2 GRAY CONVERTED IMAGE

3)IMAGE ENHANCEMENT:

11
FIG 8.3 IMAGE ENHANCEMENT

4)BINARY CONVERTED IMAGE

FIG 8.4 BINARY CONVERTED IMAGE

5)COMPLEMENT IMAGE

11
FIG 8.5 COMPLEMENT IMAGE

6)SMALL OBJECT REMOVED IMAGE

FIG 8.6 SMALL OBJECT REMOVED IMAGE

7)BORDER CORRECTED IMAGE

11
FIG 8.7 BORDER CORRECTED IMAGE

8)MORPHOLOGICAL OPERATION

FIG 8.8 MORPHOLOGICAL OPERATION

11
9)DETECTED IMAGE

FIG 8.9 DETECTED IMAGE

10) OUTLINED ORGINAL IMAGE

FIG 8.10 OUTLINED ORGINAL IMAGE

11) NEURAL NETWORK

11
FIG 8.11 NEUTRAL NETWORK

12) FUNCTION FITTING NEURAL NETWORK

FIG 8.12 FUNCTION FITTING NEURAL NETWORK

11
13) NEURAL NETWORK OUTPUT

FIG 8.13 NEURAL NETWORK OUTPUT

8.3 HARDWARE RESULT

11
FIG 8.14 HARDWARE OUTPUT

CHAPTER 9

CONCLUSION

11
Our proposed method is automated segmentation, feature extraction and
classification of red and white blood cells using KNN, NN, and SVM
classification algorithm. Several improvements were made to the SVM
algorithm, including an initialization step to find 12-neighbor connected
component. Additionally, the proposed model features an enhanced accuracy of
selecting the correct circle from three candidate circles, the capability to detect
irregular cells, the use of a dynamic number of iterations, and improved
detection of overlapping cells. The proposed method performed the
segmentation and classification of WBCs and RBCs well when results were
compared with the ground truth, which was determined by experts. The
following segmentation and counting accuracies were achieved using the
proposed method.

CHAPTER 10
FUTURE SCOPE

11
As  proposed the  automation of  blood analysis and parameters
detection  using image processing is a promising field.  The work carried out
in this dissertation adds value  to previous work by improving accuracy of
existing system,  but a lot of more is required to be done to make this
technology  available for commercial usage.White blood cells (WBCs)
differential counting yields valued information about human health and disease.
The current developed automated cell morphology equipments perform
differential count which is based on blood smear image analysis. Previous
identification systems for WBCs consist of successive dependent stages; pre-
processing, segmentation, feature extraction, feature selection, and
classification. There is a real need to employ deep learning methodologies so
that the performance of previous WBCs identification systems can be increased.
Classifying small limited datasets through deep learning systems is a major
challenge and should be investigated. For this novel identification system for
WBCs based on deep convolutional neural networks can be implemented.

CHAPTER 11
APPENDIX

11
Coding
clc
closeall;
clearall;
warningoff;
%% Get the input image
[filename,pathname]=uigetfile('images\*.jpg');
% Read Input Image
I=imread([pathname,filename]);
% Resize The input image
I=imresize(I,[512 512]);
figure,imshow(I);title('input image');
%% RGB to Gray conversion
[m n o]=size(I);
if o==3
gray=rgb2gray(I);
else
gray=I;
end
figure,imshow(gray);title('gray image')
%% Contrast Enhancement of the Image
ad=imadjust(gray);
figure,imshow(ad);title('Enhancement Image');
%% Binary conversion
bw=im2bw(gray,0.5);
figure,imshow(bw);title('Binary Image');
% Complementing the binary image
bw=imcomplement(bw);
figure,imshow(bw);title('complement Image');
magnification_value=2000;
II=round(magnification_value/15);
bw1 = bwareaopen(bw,II);
figure,imshow(bw1);title('small objects removed image');

%% Removal of unwanted boundary regions


bw2=imclearborder(bw1);
figure,imshow(bw2);title('Border corrected Image');
bw5=imdilate(bw2,strel('disk',2));
figure,imshow(bw5);title('morphological operation Image');
bw5 = imfill(bw5,'holes');
figure,imshow(I);title('Detected Image');
holdon

11
%% Segmentation
S=regionprops(bw5,'All');
fori=1:length(S)
box_temp1 =S(i).BoundingBox;
a = box_temp1(1) + (box_temp1(3)/2);
b = box_temp1(2) + (box_temp1(4)/2);
Elong(i) = 1 -(box_temp1(3)/box_temp1(4));
center1_temp = S(i).Centroid;
viscircles([a,b],20);
end
%end
holdoff
a = length(S);
disp('Total number of parasites detected in image = ');
disp(a)
% % % Feature Extraction
% % % % Geometrical Feature
Area = mean([S.Area]);

fori = 1:size(S,1)
diameters(i) = mean([S(i).MajorAxisLength S(i).MinorAxisLength])/2;
radii(i) = diameters(i)./2;
end
perimeter = mean([S.Perimeter]);
ecc = mean([S.Eccentricity]);
elg = mean([S.Solidity]);
Elongation = mean(Elong);
dia = mean(diameters);
rad = mean(radii);
Geome_Fea = [Area dia rad perimeter eccelg Elongation];
% % Texture Feature
[out] = GLCM_Features1(bw5);
angular_momentum = abs(out.idmnc);
Energy = abs(out.energ);
Entropy = abs(out.entro);
Homogeneity = abs(out.homop);
Correlation = abs(out.corrp);
Tex_Fea = [angular_momentum Energy Entropy Homogeneity Correlation];
% % % % Color Feature
R = mean2(I(:,:,1));
G = mean2(I(:,:,2));
B = mean2(I(:,:,3));
Co_Fea = [R G B];

11
Feature = [Geome_FeaTex_FeaCo_Fea];
% % % % % Classification
lab = ones(1,50);
lab(1:9) = 1;
lab(10:17) = 2;
lab(18:31) = 3;
lab(32:end) = 4;
loadfea.mat;
mdl = fitcknn(C,lab);
yfit = predict(mdl,Feature);
% % % Decision making
ifyfit == 1
msgbox('Acute Lymphocytic Leukemia');
elseifyfit == 2
msgbox('Acute Myeloid Leukemia');
elseifyfit == 3
msgbox('Chronic Lymphocytic Leukemia');
elseifyfit == 4
msgbox('Chronic Myeloid Leukemia');
end
% % % % Performence
ACTUAL = lab;
loadyfit1.mat;
PREDICTED = yfit1';
EVAL = Evaluate(ACTUAL,PREDICTED);
% % Table
%% Evalution table
LastName = {'Accuracy';'Sensitivity';'Specificity';'Precision';'Recall';'F-
Measure';'G-mean'};
MultiSVM =
{EVAL(1);EVAL(2);EVAL(3);EVAL(4);EVAL(5);EVAL(6);EVAL(7)};
T = table(MultiSVM,...
'RowNames',LastName);
disp(T)

CHAPTER 12

REFERENCE

11
[1] Cristianini, N., and J. Shawe-Taylor. “An Introduction to support vector
machines and other kernel-based learning methods” New York: Cambridge
University Press, 2000.
[2] Vapnik, V. N. “The Ature of Statistical Learning Theory” New York:
Springer, 1995.
[3] A. Madabhushi, “Digital pathology image analysis: opportunities and
challenges,” Imaging in Medicine, vol. 1, no. 1, pp. 7– 10, 2009.
[4] A. N. Esgiar, R. N. G. Naguib, B. S. Sharif, M. K. Bennett, and A. Murray,
“Fractal analysis in the detection of colonic cancer images,” IEEE Transactions
on Information Technology in Biomedicine, vol. 6, no. 1, pp. 54–58, 2002.
[5] L. Yang, O. Tuzel, P. Meer, and D. J. Foran, “Automatic image analysis of
histopathology specimens using concave vertex graph,” in Medical Image
Computing and Computer-Assisted Intervention—MICCAI 2008, pp. 833–841,
Springer, Berlin, Germany, 2008.
[6] R. C. Gonzalez, Digital Image Processing, Pearson Education India, 2009.
[7] S. Liao, M. W. K. Law, and A. C. S. Chung, “Dominant local binary
patterns for texture classification,” IEEE Transactions on Image Processing, vol.
18, no. 5, pp. 1107–1118, 2009.
[8] J. C. Caicedo, A. Cruz, and F. A. Gonzalez, “Histopathology image
classification using a bag of features and kernel functions,” in Artificial
Intelligence in Medicine, vol. 5651 of Lecture Notes in Computer Science, pp.
126–135, Springer, Berlin, Germany, 2009.
[9] H. S. Wu, J. Barba, and J. Gil, “Iterative thresholding for segmentation of
cells from noisy images” Journal of Microscopy, vol. 197, no. 3, pp. 296–304,
2000.
[10]C. Di Rubeto, A. Dempster, S. Khan, and B. Jarra, “Segmentation of blood
images using morphological operators,” in Proceedings of the 15th International
Conference on Pattern Recognition, vol. 3, pp. 397–400, 2000.

11
[11]C.D., Ruberto, A., Dempster, S., Khan, B. Jarra, “Analysis of Infected
Blood Cell Images Using Morphological Operators”, Image and Vision
Computing, Vol. 20, 2002, pp. 133-146 PaswanSachin, RathoreYogesh Kumar,
International Journal of Advance Research, Ideas and Innovations in
Technology.
© 2017, www.IJARIIT.com All Rights Reserved Page | 324 [12]Q. Liao and Y.
Deng, “An accurate segmentation method for white blood cell images,” in
Proceedings of the IEEE International Symposium on Biomedical Imaging, pp.
245–258, 2002
[13] J.L. Starck, E.J. Candes, D.L. Donoho, “The curvelet transform for image
denoising”, IEEE Transaction on Image Processing 11 (6) (2002) 670–684.
[14] G. Lin, U. Adiga, K. Olson, J. F. Guzowski, C. A. Barnes, and B. Roysam,
“A hybrid 3Dwatershed algorithm incorporating gradient cues and object
models for automatic segmentation of nuclei in confocal image stacks,”
Cytometry Part A, vol. 56, no. 1, pp. 23–36, 2003.
[15] the Fabio Scotti University of Milan, Department of Information
Technologies, via Bramante 65, 26013 “Automatic Morphological Analysis for
Acute Leukemia Identification in Peripheral Microscope Images” IEEE
International Conference on Computational Intelligence for Measurement
Systems and Giardini Naxos, Italy, 20-22 July 2005.
[16] SubrajeetMohapatra, DiptiPatra, SanghamitraSatpathy,"Automated
Leukemia Detection in Blood Microscopic Images using Statistical Texture
Analysis",inICCCS, February 2011.

11

Potrebbero piacerti anche